diff --git a/api/ee/databases/postgres/migrations/core/versions/7990f1e12f47_create_free_plans.py b/api/ee/databases/postgres/migrations/core/versions/7990f1e12f47_create_free_plans.py index 7f68d984a5..86f1fab639 100644 --- a/api/ee/databases/postgres/migrations/core/versions/7990f1e12f47_create_free_plans.py +++ b/api/ee/databases/postgres/migrations/core/versions/7990f1e12f47_create_free_plans.py @@ -26,9 +26,16 @@ from ee.src.models.extended.deprecated_models import DeprecatedOrganizationDB from ee.src.dbs.postgres.subscriptions.dbes import SubscriptionDBE from ee.src.dbs.postgres.meters.dbes import MeterDBE -from ee.src.core.subscriptions.types import FREE_PLAN from ee.src.core.entitlements.types import Gauge +# Point-in-time literal; the runtime free-plan slug is now resolved via +# `ee.src.core.subscriptions.settings.get_free_plan()`. Operators running +# with a custom `AGENTA_ACCESS_PLANS` set must either keep this slug in +# the effective plan set or declare a `"free": true` entry in +# `AGENTA_BILLING_PRICING`. Startup validation in `settings.py` fails fast +# when neither condition is met. +FREE_PLAN = "cloud_v0_hobby" + stripe.api_key = env.stripe.api_key log = get_module_logger(__name__) @@ -143,7 +150,7 @@ def upgrade() -> None: organization_id=organization_id, subscription_id=subscription_id, customer_id=customer_id, - plan=plan.value, + plan=plan, active=active, anchor=anchor, ) @@ -158,7 +165,7 @@ def upgrade() -> None: .values( subscription_id=subscription_id, customer_id=customer_id, - plan=plan.value, + plan=plan, active=active, anchor=anchor, ) diff --git a/api/ee/databases/postgres/migrations/core/versions/a1b2c3d4e5f7_unify_org_member_role_to_viewer.py b/api/ee/databases/postgres/migrations/core/versions/a1b2c3d4e5f7_unify_org_member_role_to_viewer.py new file mode 100644 index 0000000000..32ee8f52aa --- /dev/null +++ b/api/ee/databases/postgres/migrations/core/versions/a1b2c3d4e5f7_unify_org_member_role_to_viewer.py @@ -0,0 +1,60 @@ +"""Unify organization_members.role 'member' to 'viewer' + +Aligns the organization scope with workspace/project scopes on a single +least-permission role slug. The runtime access-controls layer +(`ee.src.core.entitlements.controls`) treats `viewer` as the per-scope +minima for every scope; this migration brings stored data and the column +default in line with that. + +- Rewrites every row with role='member' to role='viewer'. +- Changes the column server default from 'member' to 'viewer'. + +The downgrade reverses both, restoring the previous behavior. + +Revision ID: a1b2c3d4e5f7 +Revises: e6f7a8b9c0d1 +Create Date: 2026-05-13 00:00:00.000000 +""" + +from typing import Sequence, Union + +from alembic import op +from sqlalchemy import text + + +revision: str = "a1b2c3d4e5f7" +down_revision: Union[str, None] = "e6f7a8b9c0d1" +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + + +def upgrade() -> None: + conn = op.get_bind() + + conn.execute( + text("UPDATE organization_members SET role = 'viewer' WHERE role = 'member'") + ) + + op.alter_column( + "organization_members", + "role", + server_default="viewer", + existing_type=None, + existing_nullable=False, + ) + + +def downgrade() -> None: + conn = op.get_bind() + + op.alter_column( + "organization_members", + "role", + server_default="member", + existing_type=None, + existing_nullable=False, + ) + + conn.execute( + text("UPDATE organization_members SET role = 'member' WHERE role = 'viewer'") + ) diff --git a/api/ee/databases/postgres/migrations/core/versions/a9f3e8b7c5d1_clean_up_organizations.py b/api/ee/databases/postgres/migrations/core/versions/a9f3e8b7c5d1_clean_up_organizations.py index 53855568f4..01d4fcd81c 100644 --- a/api/ee/databases/postgres/migrations/core/versions/a9f3e8b7c5d1_clean_up_organizations.py +++ b/api/ee/databases/postgres/migrations/core/versions/a9f3e8b7c5d1_clean_up_organizations.py @@ -13,9 +13,20 @@ import uuid_utils.compat as uuid from oss.src.utils.env import env -from ee.src.core.subscriptions.types import FREE_PLAN from sqlalchemy.dialects import postgresql +# Point-in-time literal; the runtime free-plan slug is now resolved via +# `ee.src.core.subscriptions.settings.get_free_plan()`. +# +# Operators running this migration MUST either: +# 1. keep `cloud_v0_hobby` in their effective `AGENTA_ACCESS_PLANS` set, or +# 2. set one entry of `AGENTA_BILLING_PRICING` to `"free": true` so +# `get_free_plan()` resolves without falling back to this literal. +# +# `settings._build_settings()` enforces this at startup; mismatches fail +# loudly rather than silently writing an unknown plan slug. +FREE_PLAN = "cloud_v0_hobby" + # revision identifiers, used by Alembic. revision: str = "a9f3e8b7c5d1" down_revision: Union[str, None] = "12d23a8f7dde" @@ -402,7 +413,7 @@ def _constraint_exists(constraint_name: str) -> bool: WHERE s.organization_id = o.id ) """), - {"plan": FREE_PLAN.value}, + {"plan": FREE_PLAN}, ) # Step 13: Ensure any remaining orgs have flags set diff --git a/api/ee/docker/Dockerfile.dev b/api/ee/docker/Dockerfile.dev index 873723b0ce..e5af3f284e 100644 --- a/api/ee/docker/Dockerfile.dev +++ b/api/ee/docker/Dockerfile.dev @@ -58,11 +58,13 @@ COPY ./api/ee/src/crons/meters.sh /meters.sh COPY ./api/ee/src/crons/meters.txt /etc/cron.d/meters-cron COPY ./api/ee/src/crons/spans.sh /spans.sh COPY ./api/ee/src/crons/spans.txt /etc/cron.d/spans-cron +COPY ./api/ee/src/crons/events.sh /events.sh +COPY ./api/ee/src/crons/events.txt /etc/cron.d/events-cron -RUN chmod +x /queries.sh /meters.sh /spans.sh \ - && chmod 0644 /etc/cron.d/queries-cron /etc/cron.d/meters-cron /etc/cron.d/spans-cron \ - && for f in /etc/cron.d/queries-cron /etc/cron.d/meters-cron /etc/cron.d/spans-cron; do sed -i -e '$a\' "$f"; done \ - && cat /etc/cron.d/queries-cron /etc/cron.d/meters-cron /etc/cron.d/spans-cron \ +RUN chmod +x /queries.sh /meters.sh /spans.sh /events.sh \ + && chmod 0644 /etc/cron.d/queries-cron /etc/cron.d/meters-cron /etc/cron.d/spans-cron /etc/cron.d/events-cron \ + && for f in /etc/cron.d/queries-cron /etc/cron.d/meters-cron /etc/cron.d/spans-cron /etc/cron.d/events-cron; do sed -i -e '$a\' "$f"; done \ + && cat /etc/cron.d/queries-cron /etc/cron.d/meters-cron /etc/cron.d/spans-cron /etc/cron.d/events-cron \ | sed -E 's/^(([^[:space:]]+[[:space:]]+){5})root[[:space:]]+/\1/' \ | sed 's| >> /proc/1/fd/1 2>&1||' > /app/crontab \ && chown agenta:agenta /app/crontab diff --git a/api/ee/docker/Dockerfile.gh b/api/ee/docker/Dockerfile.gh index 8c89e8ca0c..3fa795af20 100644 --- a/api/ee/docker/Dockerfile.gh +++ b/api/ee/docker/Dockerfile.gh @@ -99,6 +99,8 @@ COPY --chmod=755 ./api/ee/src/crons/meters.sh /meters.sh COPY --chmod=644 ./api/ee/src/crons/meters.txt /etc/cron.d/meters-cron COPY --chmod=755 ./api/ee/src/crons/spans.sh /spans.sh COPY --chmod=644 ./api/ee/src/crons/spans.txt /etc/cron.d/spans-cron +COPY --chmod=755 ./api/ee/src/crons/events.sh /events.sh +COPY --chmod=644 ./api/ee/src/crons/events.txt /etc/cron.d/events-cron # Copy dependencies from builder COPY --from=builder /opt/venv /opt/venv @@ -112,10 +114,10 @@ COPY --chown=agenta:agenta --from=builder /clients/python /clients/python # Generate supercronic-compatible crontab (strip user field and /proc redirects) RUN set -eux; \ - for cron_file in /etc/cron.d/queries-cron /etc/cron.d/meters-cron /etc/cron.d/spans-cron; do \ + for cron_file in /etc/cron.d/queries-cron /etc/cron.d/meters-cron /etc/cron.d/spans-cron /etc/cron.d/events-cron; do \ sed -i -e '$a\' "${cron_file}"; \ done; \ - cat /etc/cron.d/queries-cron /etc/cron.d/meters-cron /etc/cron.d/spans-cron \ + cat /etc/cron.d/queries-cron /etc/cron.d/meters-cron /etc/cron.d/spans-cron /etc/cron.d/events-cron \ | sed -E 's/^(([^[:space:]]+[[:space:]]+){5})root[[:space:]]+/\1/' \ | sed 's| >> /proc/1/fd/1 2>&1||' > /app/crontab && \ chown agenta:agenta /app/crontab diff --git a/api/ee/src/apis/fastapi/billing/router.py b/api/ee/src/apis/fastapi/billing/router.py index f7649f32eb..3074ebe63a 100644 --- a/api/ee/src/apis/fastapi/billing/router.py +++ b/api/ee/src/apis/fastapi/billing/router.py @@ -24,10 +24,15 @@ from ee.src.services import db_manager_ee from ee.src.utils.permissions import check_action_access from ee.src.models.shared_models import Permission -from ee.src.core.entitlements.types import ENTITLEMENTS, CATALOG, Tracker, Quota -from ee.src.core.subscriptions.types import Event, Plan +from ee.src.core.entitlements.types import Tracker, Quota +from ee.src.core.entitlements.controls import get_plan_entitlements, get_plans +from ee.src.core.subscriptions.settings import ( + get_catalog, + get_stripe_line_items, + get_free_plan, +) +from ee.src.core.subscriptions.types import Event from ee.src.core.meters.service import MetersService -from ee.src.core.tracing.service import TracingService from ee.src.core.subscriptions.service import ( SubscriptionsService, SwitchException, @@ -92,11 +97,9 @@ def __init__( self, subscription_service: SubscriptionsService, meters_service: MetersService, - tracing_service: TracingService, ): self.subscription_service = subscription_service self.meters_service = meters_service - self.tracing_service = tracing_service # ROUTER self.router = APIRouter() @@ -198,12 +201,6 @@ def __init__( methods=["POST"], ) - self.admin_router.add_api_route( - "/usage/flush", - self.flush_usage, - methods=["POST"], - ) - async def _reset_organization_flags(self, organization_id: str) -> None: organization = await db_manager_ee.get_organization(organization_id) if not organization: @@ -378,7 +375,20 @@ async def handle_events( }, ) - plan = Plan(_stripe_get(metadata, "plan")) + plan = _stripe_get(metadata, "plan") + if plan not in get_plans(): + log.warn( + "Skipping stripe event: %s (unknown plan %s)", + stripe_event.type, + plan, + ) + return JSONResponse( + status_code=status.HTTP_400_BAD_REQUEST, + content={ + "status": "error", + "message": f"Unknown plan '{plan}'", + }, + ) if not _stripe_has(stripe_event.data.object, "billing_cycle_anchor"): log.warn("Skipping stripe event: %s (no anchor)", stripe_event.type) @@ -471,7 +481,7 @@ async def create_portal( async def create_checkout( self, organization_id: str, - plan: Plan, + plan: str, success_url: str, ): # No-op if Stripe is disabled @@ -481,12 +491,19 @@ async def create_checkout( content={"status": "ok", "message": "Stripe not configured"}, ) - if plan.name not in Plan.__members__.keys(): + if plan not in get_plans(): raise HTTPException( status_code=status.HTTP_400_BAD_REQUEST, detail="Invalid plan", ) + line_items = get_stripe_line_items(plan) + if not line_items: + raise HTTPException( + status_code=status.HTTP_400_BAD_REQUEST, + detail=f"Plan '{plan}' is not available for purchase (no Stripe line items configured).", + ) + subscription = await self.subscription_service.read( organization_id=organization_id, ) @@ -558,13 +575,13 @@ async def create_checkout( tax_id_collection={"enabled": True}, # customer=subscription.customer_id, - line_items=list(env.stripe.pricing[plan].values()), + line_items=line_items, # subscription_data={ # "billing_cycle_anchor": anchor, "metadata": { "organization_id": organization_id, - "plan": plan.value, + "plan": plan, "target": env.stripe.webhook_target, }, }, @@ -588,12 +605,12 @@ async def fetch_plans( if not subscription: key = None else: - key = subscription.plan.value + key = subscription.plan - for plan in CATALOG: - if plan["type"] == "standard": + for plan in get_catalog(): + if plan.get("type") == "standard": plans.append(plan) - elif plan["type"] == "custom" and plan["plan"] == key: + elif plan.get("type") == "custom" and plan.get("plan") == key: plans.append(plan) return plans @@ -601,10 +618,10 @@ async def fetch_plans( async def switch_plans( self, organization_id: str, - plan: Plan, + plan: str, # force: bool, ): - if plan.name not in Plan.__members__.keys(): + if plan not in get_plans(): raise HTTPException( status_code=status.HTTP_400_BAD_REQUEST, detail="Invalid plan", @@ -614,7 +631,7 @@ async def switch_plans( subscription = await self.subscription_service.process_event( organization_id=organization_id, event=Event.SUBSCRIPTION_SWITCHED, - plan=plan.value, + plan=plan, # force=force, ) @@ -667,11 +684,11 @@ async def fetch_subscription( anchor = subscription.anchor _status: Dict[str, Any] = dict( - plan=plan.value, + plan=plan, type="standard", ) - if plan == Plan.CLOUD_V0_HOBBY: + if plan == get_free_plan(): return _status # Self-hosted / non-Stripe plans still need a subscription status shape @@ -869,9 +886,12 @@ async def fetch_usage( anchor_day = subscription.anchor anchor_year, anchor_month = compute_billing_period(now=now, anchor=anchor_day) - entitlements = ENTITLEMENTS.get(plan) + entitlements = get_plan_entitlements(plan) - if not entitlements: + # `None` means the plan is unknown — 404 the request. `{}` means the + # plan exists but defines no enforced trackers (description-only, + # display-only plan). In that case we return an empty usage map. + if entitlements is None: return JSONResponse( status_code=status.HTTP_404_NOT_FOUND, content={"status": "error", "message": "Plan not found"}, @@ -884,8 +904,9 @@ async def fetch_usage( usage = {} for tracker in [Tracker.COUNTERS, Tracker.GAUGES]: - for key in list(entitlements[tracker].keys()): - quota: Quota = entitlements[tracker][key] + tracker_entries = entitlements.get(tracker) or {} + for key in list(tracker_entries.keys()): + quota: Quota = tracker_entries[key] value = 0 for meter in meters: @@ -1014,70 +1035,6 @@ async def unlock_report_usage( content={"status": "noop", "released": False}, ) - @intercept_exceptions() - async def flush_usage( - self, - ): - log.info("[flush] [endpoint] Trigger") - - try: - lock_owner = await acquire_lock( - namespace="spans:flush", - key={}, - ttl=3600, # 1 hour - strict=True, - ) - - if not lock_owner: - log.info("[flush] [endpoint] Skipped (ongoing)") - return JSONResponse( - status_code=status.HTTP_200_OK, - content={"status": "skipped"}, - ) - - log.info("[flush] [endpoint] Lock acquired") - - try: - log.info("[flush] [endpoint] Retention started") - await self.tracing_service.flush_spans() - log.info("[flush] [endpoint] Retention completed") - - return JSONResponse( - status_code=status.HTTP_200_OK, - content={"status": "success"}, - ) - - except Exception: - log.error( - "[flush] [endpoint] Retention failed:", - exc_info=True, - ) - return JSONResponse( - status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, - content={"status": "error", "message": "Retention failed"}, - ) - - finally: - released = await release_lock( - namespace="spans:flush", - key={}, - owner=lock_owner, - ) - if released: - log.info("[flush] [endpoint] Lock released") - else: - log.warn("[flush] [endpoint] Lock release skipped (expired/lost)") - - except Exception: - log.error( - "[flush] [endpoint] Fatal error:", - exc_info=True, - ) - return JSONResponse( - status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, - content={"status": "error", "message": "Fatal error"}, - ) - # ROUTES @intercept_exceptions() @@ -1110,7 +1067,7 @@ async def create_portal_admin_route( async def create_checkout_user_route( self, request: Request, - plan: Plan = Query(...), + plan: str = Query(...), success_url: str = Query(...), # find a way to make this optional or moot ): if is_ee(): @@ -1131,7 +1088,7 @@ async def create_checkout_user_route( async def create_checkout_admin_route( self, organization_id: str = Query(...), - plan: Plan = Query(...), + plan: str = Query(...), success_url: str = Query(...), # find a way to make this optional or moot ): return await self.create_checkout( @@ -1161,7 +1118,7 @@ async def fetch_plan_user_route( async def switch_plans_user_route( self, request: Request, - plan: Plan = Query(...), + plan: str = Query(...), ): if is_ee(): if not await check_action_access( @@ -1180,7 +1137,7 @@ async def switch_plans_user_route( async def switch_plans_admin_route( self, organization_id: str = Query(...), - plan: Plan = Query(...), + plan: str = Query(...), ): return await self.switch_plans( organization_id=organization_id, diff --git a/api/ee/src/apis/fastapi/events/__init__.py b/api/ee/src/apis/fastapi/events/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/api/ee/src/apis/fastapi/events/router.py b/api/ee/src/apis/fastapi/events/router.py new file mode 100644 index 0000000000..f9de081078 --- /dev/null +++ b/api/ee/src/apis/fastapi/events/router.py @@ -0,0 +1,101 @@ +"""Admin-only events retention router. + +Mounts at ``/admin/events/flush``. Independent from spans retention — own +lock namespace, own cron schedule, own failure mode. +""" + +from fastapi import APIRouter, status +from fastapi.responses import JSONResponse + +from oss.src.utils.logging import get_module_logger +from oss.src.utils.exceptions import intercept_exceptions +from oss.src.utils.caching import acquire_lock, release_lock + +from ee.src.core.events.service import EventsService + + +log = get_module_logger(__name__) + + +class EventsRouter: + def __init__( + self, + events_service: EventsService, + ): + self.events_service = events_service + + self.admin_router = APIRouter() + + self.admin_router.add_api_route( + "/flush", + self.flush, + methods=["POST"], + ) + + @intercept_exceptions() + async def flush(self): + """Apply events retention across all plans that define + ``Counter.EVENTS.retention``. Wrapped in a Redis lock so concurrent + cron triggers no-op cleanly. + """ + log.info("[flush-events] [endpoint] Trigger") + + try: + lock_owner = await acquire_lock( + namespace="events:flush", + key={}, + ttl=3600, # 1 hour + strict=True, + ) + + if not lock_owner: + log.info("[flush-events] [endpoint] Skipped (ongoing)") + return JSONResponse( + status_code=status.HTTP_200_OK, + content={"status": "skipped"}, + ) + + log.info("[flush-events] [endpoint] Lock acquired") + + try: + log.info("[flush-events] [endpoint] Retention started") + await self.events_service.flush_events() + log.info("[flush-events] [endpoint] Retention completed") + + return JSONResponse( + status_code=status.HTTP_200_OK, + content={"status": "success"}, + ) + + except Exception: + log.error( + "[flush-events] [endpoint] Retention failed:", + exc_info=True, + ) + return JSONResponse( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + content={"status": "error", "message": "Retention failed"}, + ) + + finally: + released = await release_lock( + namespace="events:flush", + key={}, + owner=lock_owner, + ) + if released: + log.info("[flush-events] [endpoint] Lock released") + else: + log.warn( + "[flush-events] [endpoint] Lock release skipped (expired/lost)" + ) + + except Exception: + log.error( + "[flush-events] [endpoint] Fatal error:", + exc_info=True, + ) + return JSONResponse( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + content={"status": "error", "message": "Fatal error"}, + ) diff --git a/api/ee/src/apis/fastapi/spans/__init__.py b/api/ee/src/apis/fastapi/spans/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/api/ee/src/apis/fastapi/spans/router.py b/api/ee/src/apis/fastapi/spans/router.py new file mode 100644 index 0000000000..0c19ae1c94 --- /dev/null +++ b/api/ee/src/apis/fastapi/spans/router.py @@ -0,0 +1,102 @@ +"""Admin-only spans retention router. + +Mounts at ``/admin/spans/flush``. Owned by tracing; replaces the previous +``/admin/billing/usage/flush`` endpoint (which conflated billing and span +retention). Independent from the events retention router. +""" + +from fastapi import APIRouter, status +from fastapi.responses import JSONResponse + +from oss.src.utils.logging import get_module_logger +from oss.src.utils.exceptions import intercept_exceptions +from oss.src.utils.caching import acquire_lock, release_lock + +from ee.src.core.tracing.service import TracingService + + +log = get_module_logger(__name__) + + +class SpansRouter: + def __init__( + self, + tracing_service: TracingService, + ): + self.tracing_service = tracing_service + + self.admin_router = APIRouter() + + self.admin_router.add_api_route( + "/flush", + self.flush, + methods=["POST"], + ) + + @intercept_exceptions() + async def flush(self): + """Apply span retention across all plans that define + ``Counter.TRACES.retention``. Wrapped in a Redis lock so concurrent + cron triggers no-op cleanly. + """ + log.info("[flush-spans] [endpoint] Trigger") + + try: + lock_owner = await acquire_lock( + namespace="spans:flush", + key={}, + ttl=3600, # 1 hour + strict=True, + ) + + if not lock_owner: + log.info("[flush-spans] [endpoint] Skipped (ongoing)") + return JSONResponse( + status_code=status.HTTP_200_OK, + content={"status": "skipped"}, + ) + + log.info("[flush-spans] [endpoint] Lock acquired") + + try: + log.info("[flush-spans] [endpoint] Retention started") + await self.tracing_service.flush_spans() + log.info("[flush-spans] [endpoint] Retention completed") + + return JSONResponse( + status_code=status.HTTP_200_OK, + content={"status": "success"}, + ) + + except Exception: + log.error( + "[flush-spans] [endpoint] Retention failed:", + exc_info=True, + ) + return JSONResponse( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + content={"status": "error", "message": "Retention failed"}, + ) + + finally: + released = await release_lock( + namespace="spans:flush", + key={}, + owner=lock_owner, + ) + if released: + log.info("[flush-spans] [endpoint] Lock released") + else: + log.warn( + "[flush-spans] [endpoint] Lock release skipped (expired/lost)" + ) + + except Exception: + log.error( + "[flush-spans] [endpoint] Fatal error:", + exc_info=True, + ) + return JSONResponse( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + content={"status": "error", "message": "Fatal error"}, + ) diff --git a/api/ee/src/core/entitlements/controls.py b/api/ee/src/core/entitlements/controls.py new file mode 100644 index 0000000000..5f049654cf --- /dev/null +++ b/api/ee/src/core/entitlements/controls.py @@ -0,0 +1,782 @@ +"""Access controls: effective plan/role accessors built from code defaults or env overrides. + +This module is the single runtime source of truth for: + +- the effective plan slug set; +- per-plan entitlement controls (flags, counters, gauges, throttles); +- per-scope role catalogs (organization, workspace, project). + +Code defaults live in `types.py` and `ee.src.models.shared_models`. Environment +overrides come from `AGENTA_ACCESS_PLANS` and `AGENTA_ACCESS_ROLES` (raw JSON +strings exposed via `env.access_controls`). Parsing happens once at import time. +""" + +import hashlib +from json import dumps +from typing import Any, Dict, List, Optional + +from pydantic import BaseModel, ConfigDict, ValidationError + +from oss.src.utils.env import env +from oss.src.utils.logging import get_module_logger + +from ee.src.core.entitlements.types import ( + Category, + Counter, + DEFAULT_ENTITLEMENTS, + DefaultPlan, + DefaultRole, + Flag, + Gauge, + OWNER_PERMISSIONS, + Quota, + SCOPES, + Throttle, + Tracker, +) +from ee.src.models.shared_models import Permission, WorkspaceRole + + +log = get_module_logger(__name__) + + +# --------------------------------------------------------------------------- +# Override schemas +# --------------------------------------------------------------------------- + + +class _PlanOverride(BaseModel): + description: Optional[str] = None + flags: Optional[Dict[str, bool]] = None + counters: Optional[Dict[str, Quota]] = None + gauges: Optional[Dict[str, Quota]] = None + throttles: Optional[List[Throttle]] = None + + model_config = ConfigDict(extra="forbid") + + +class _RoleOverride(BaseModel): + role: str + description: Optional[str] = None + permissions: List[str] + + model_config = ConfigDict(extra="forbid") + + +# --------------------------------------------------------------------------- +# Plan entitlements + descriptions +# --------------------------------------------------------------------------- + +# Effective state is a dict[plan_slug, plan_entry] where plan_entry has the same +# shape as DEFAULT_ENTITLEMENTS values (Tracker -> mapping) plus an optional +# "description" key in the top-level plan entry's own description map. + +_DEFAULT_PLAN_DESCRIPTIONS: Dict[str, str] = {} + + +def _default_plans() -> Dict[str, Dict[Tracker, Any]]: + # Keys in DEFAULT_ENTITLEMENTS are `DefaultPlan` (str, Enum) members. + # Coerce to plain strings so the runtime plan map is uniformly keyed by slug. + return {str(plan.value): entry for plan, entry in DEFAULT_ENTITLEMENTS.items()} + + +def _validate_flag_key(key: str) -> Flag: + try: + return Flag(key) + except ValueError as e: + raise ValueError(f"Unknown flag '{key}'") from e + + +def _validate_counter_key(key: str) -> Counter: + try: + return Counter(key) + except ValueError as e: + raise ValueError(f"Unknown counter '{key}'") from e + + +def _validate_gauge_key(key: str) -> Gauge: + try: + return Gauge(key) + except ValueError as e: + raise ValueError(f"Unknown gauge '{key}'") from e + + +def _parse_plans_override( + decoded: Any, +) -> tuple[Dict[str, Dict[Tracker, Any]], Dict[str, str]]: + if not isinstance(decoded, dict) or not decoded: + raise ValueError("AGENTA_ACCESS_PLANS must be a non-empty JSON object") + + plans: Dict[str, Dict[Tracker, Any]] = {} + descriptions: Dict[str, str] = {} + + for slug, payload in decoded.items(): + if not slug or not isinstance(slug, str): + raise ValueError(f"Invalid plan slug '{slug}' in AGENTA_ACCESS_PLANS") + + try: + override = _PlanOverride.model_validate(payload) + except ValidationError as e: + raise ValueError( + f"Invalid plan override for '{slug}' in AGENTA_ACCESS_PLANS: {e}" + ) from e + + plan_entry: Dict[Tracker, Any] = {} + + if override.flags is not None: + plan_entry[Tracker.FLAGS] = { + _validate_flag_key(k): bool(v) for k, v in override.flags.items() + } + + if override.counters is not None: + plan_entry[Tracker.COUNTERS] = { + _validate_counter_key(k): v for k, v in override.counters.items() + } + + if override.gauges is not None: + plan_entry[Tracker.GAUGES] = { + _validate_gauge_key(k): v for k, v in override.gauges.items() + } + + if override.throttles is not None: + plan_entry[Tracker.THROTTLES] = list(override.throttles) + + # Plans with only a description are allowed — they represent custom / + # display-only plans (e.g. self-hosted Enterprise) that don't enforce + # quotas server-side. Downstream consumers must handle the empty + # entitlement map gracefully (e.g. `fetch_usage` returns no rows). + plans[slug] = plan_entry + + if override.description: + descriptions[slug] = override.description + + return plans, descriptions + + +# --------------------------------------------------------------------------- +# Role catalogs (scoped) +# --------------------------------------------------------------------------- +# +# Minima contract: every scope MUST expose `owner` and `viewer` with code- +# defined permissions. Env overrides may add roles or customize permissions +# of non-minima roles, but the minima are always present and their slugs +# cannot be re-bound to a different permission set. + + +def _read_only_permissions() -> List[str]: + """Read-only permission set sourced from the code-default `WorkspaceRole.VIEWER`. + + Used as the `viewer` minima permissions for the `workspace` and `project` + scopes where permissions are actually enforced. Organization-scope `viewer` + has no permissions (it's just a membership marker today). + """ + return [p.value for p in Permission.default_permissions(WorkspaceRole.VIEWER)] + + +def _viewer_permissions_for_scope(scope: str) -> List[str]: + """Per-scope code-default permissions for the `viewer` minima role. + + - `organization`: empty — orgs have no permission concept today. + - `workspace` and `project`: the code-default `WorkspaceRole.VIEWER` read-only set. + """ + if scope == "organization": + return [] + return _read_only_permissions() + + +def _minima_for(scope: str) -> List[Dict[str, Any]]: + """Return the required role entries for a scope (owner + viewer). + + Application code relies on these slugs being present in every scope; the + builder synthesizes them up front and re-applies them after any env + overrides so they can never be dropped or relabeled. + + The permission set for `viewer` varies per scope (see + `_viewer_permissions_for_scope`); `owner` is always wildcard. + """ + return [ + { + "role": DefaultRole.OWNER.value, + "description": "Full access (wildcard permissions).", + "permissions": list(OWNER_PERMISSIONS), + }, + { + "role": DefaultRole.VIEWER.value, + "description": ( + "Membership marker (no permissions)." + if scope == "organization" + else "Read-only access." + ), + "permissions": _viewer_permissions_for_scope(scope), + }, + ] + + +def _default_roles() -> Dict[str, List[Dict[str, Any]]]: + """Return the code-default role catalog for each scope. + + Workspace and project scopes expose the code-default `WorkspaceRole` + entries on top of the minima — project membership stores the same role + slugs (`admin`/`developer`/`editor`/`annotator`), and the runtime + permission check resolves them through this map. Organization scope + only gets the minima today; new roles can be added per-scope via + `AGENTA_ACCESS_ROLES`. + """ + default_extras: List[Dict[str, Any]] = [] + minima_slugs = {DefaultRole.OWNER.value, DefaultRole.VIEWER.value} + for role in WorkspaceRole: + if role.value in minima_slugs: + continue + default_extras.append( + { + "role": role.value, + "description": WorkspaceRole.get_description(role), + "permissions": [p.value for p in Permission.default_permissions(role)], + } + ) + + return { + "organization": _minima_for("organization"), + "workspace": _minima_for("workspace") + default_extras, + "project": _minima_for("project") + default_extras, + } + + +def _validate_permission(slug: str) -> str: + if slug == "*": + return slug + try: + Permission(slug) + except ValueError as e: + raise ValueError(f"Unknown permission '{slug}'") from e + return slug + + +def _parse_roles_override(decoded: Any) -> Dict[str, List[Dict[str, Any]]]: + """Parse `AGENTA_ACCESS_ROLES` and merge with scope minima. + + Schema is `{scope: [role, ...]}` where scope is one of `organization`, + `workspace`, `project`. Missing scopes fall back to the code-default + minima for that scope. Within an overridden scope: + + - `owner` and `viewer` are reserved slugs; if present, they're rejected + with a clear error so application invariants stay intact. The minima + for that scope are re-applied after parsing. + - Other roles are validated (known permissions, no duplicates) and + appended to the minima list. + + Empty `{}` or an empty per-scope list is rejected. + """ + if not isinstance(decoded, dict) or not decoded: + raise ValueError("AGENTA_ACCESS_ROLES must be a non-empty JSON object") + + # Start with code-default catalogs for every scope. Overrides only mutate + # the scopes they specify; non-overridden scopes keep their full code + # defaults (e.g. workspace's admin/developer/editor/annotator stay even + # when only `project` is overridden). + result: Dict[str, List[Dict[str, Any]]] = _default_roles() + + reserved = {DefaultRole.OWNER.value, DefaultRole.VIEWER.value} + + for scope, roles in decoded.items(): + if scope not in SCOPES: + raise ValueError( + f"Unknown role scope '{scope}' in AGENTA_ACCESS_ROLES " + f"(allowed: {list(SCOPES)})" + ) + + if not isinstance(roles, list) or not roles: + raise ValueError( + f"AGENTA_ACCESS_ROLES['{scope}'] must be a non-empty list of roles" + ) + + extras: List[Dict[str, Any]] = [] + seen: set[str] = set() + for entry in roles: + try: + role = _RoleOverride.model_validate(entry) + except ValidationError as e: + raise ValueError( + f"Invalid role override under scope '{scope}': {e}" + ) from e + + slug = role.role + if not slug: + raise ValueError(f"Empty role slug under scope '{scope}'") + if slug in reserved: + raise ValueError( + f"AGENTA_ACCESS_ROLES['{scope}'] cannot redefine reserved " + f"role '{slug}'; minima are always synthesized by the platform" + ) + if slug in seen: + raise ValueError(f"Duplicate role slug '{slug}' under scope '{scope}'") + seen.add(slug) + + permissions = [_validate_permission(p) for p in role.permissions] + + extras.append( + { + "role": slug, + "description": role.description, + "permissions": permissions, + } + ) + + # Minima first, then validated extras. + result[scope] = _minima_for(scope) + extras + + return result + + +# --------------------------------------------------------------------------- +# Roles overlay +# --------------------------------------------------------------------------- +# +# `AGENTA_ACCESS_ROLES_OVERLAY` lets operators tweak individual fields on +# existing default roles (`admin`, `developer`, `editor`, `annotator`) — or +# add new roles — without restating the whole scope catalog the way +# `AGENTA_ACCESS_ROLES` requires. +# +# Today only the `project` key is accepted. The patch is applied to both +# the `workspace` and `project` scopes because the two scopes share the +# same role set in the code defaults. If `workspace` or `organization` +# appears as a key, startup fails — silent ignore would mislead operators. +# +# Merge semantics per role slug: +# - role exists in the scope: per-field replace (`permissions` and/or +# `description`). +# - role does not exist: append as a new role (must include both +# `description` and `permissions`). +# - `owner` and `viewer` minima cannot be patched (platform-managed). + + +class _RoleOverlayEntry(BaseModel): + """Partial role update. ``permissions`` and ``description`` are both + optional; whatever is set replaces the matching field on the existing + role entry. To add a new role both fields must be supplied — that + constraint is enforced in :func:`_apply_roles_overlay`. + """ + + description: Optional[str] = None + permissions: Optional[List[str]] = None + + model_config = ConfigDict(extra="forbid") + + +def _parse_roles_overlay(decoded: Any) -> Dict[str, _RoleOverlayEntry]: + """Parse `AGENTA_ACCESS_ROLES_OVERLAY` and return per-slug entries. + + Today only the ``project`` scope key is accepted. The single accepted + payload shape is ``{"project": {: }}``. The result + is the inner ``{: }`` dict; the caller decides which + scopes the patch applies to. + """ + if not isinstance(decoded, dict) or not decoded: + raise ValueError("AGENTA_ACCESS_ROLES_OVERLAY must be a non-empty JSON object") + + unknown = set(decoded.keys()) - {"project"} + if unknown: + raise ValueError( + f"AGENTA_ACCESS_ROLES_OVERLAY only supports the 'project' scope " + f"today (got: {sorted(unknown)}). The patch is applied to both " + "workspace and project." + ) + + project_payload = decoded.get("project") + if not isinstance(project_payload, dict) or not project_payload: + raise ValueError( + "AGENTA_ACCESS_ROLES_OVERLAY['project'] must be a non-empty " + "JSON object keyed by role slug" + ) + + reserved = {DefaultRole.OWNER.value, DefaultRole.VIEWER.value} + entries: Dict[str, _RoleOverlayEntry] = {} + for slug, patch in project_payload.items(): + if not slug or not isinstance(slug, str): + raise ValueError( + f"Invalid role slug '{slug}' in AGENTA_ACCESS_ROLES_OVERLAY" + ) + if slug in reserved: + raise ValueError( + f"AGENTA_ACCESS_ROLES_OVERLAY cannot patch reserved role " + f"'{slug}'; minima are platform-managed" + ) + try: + entry = _RoleOverlayEntry.model_validate(patch) + except ValidationError as e: + raise ValueError( + f"Invalid AGENTA_ACCESS_ROLES_OVERLAY['project']['{slug}']: {e}" + ) from e + if entry.permissions is not None: + for perm in entry.permissions: + _validate_permission(perm) + entries[slug] = entry + + return entries + + +def _apply_roles_overlay( + roles: Dict[str, List[Dict[str, Any]]], + overlay: Dict[str, _RoleOverlayEntry], +) -> Dict[str, List[Dict[str, Any]]]: + """Apply the parsed overlay to the workspace and project scopes. + + Returns a new dict; the input is not mutated. New roles (where the + slug doesn't already exist on the scope) require both ``description`` + and ``permissions``. + """ + result = {scope: [dict(entry) for entry in roles[scope]] for scope in roles} + + for scope_name in ("workspace", "project"): + scope_entries = result[scope_name] + by_slug = {entry["role"]: idx for idx, entry in enumerate(scope_entries)} + + for slug, patch in overlay.items(): + if slug in by_slug: + # Patch existing role: per-field replace. + idx = by_slug[slug] + if patch.description is not None: + scope_entries[idx]["description"] = patch.description + if patch.permissions is not None: + scope_entries[idx]["permissions"] = list(patch.permissions) + else: + # New role: both fields must be present. + if patch.permissions is None: + raise ValueError( + f"AGENTA_ACCESS_ROLES_OVERLAY['project']['{slug}']: " + f"new role requires 'permissions' (scope '{scope_name}' " + "has no existing role with this slug to patch)" + ) + scope_entries.append( + { + "role": slug, + "description": patch.description, + "permissions": list(patch.permissions), + } + ) + + return result + + +# --------------------------------------------------------------------------- +# Default-plan overlay +# --------------------------------------------------------------------------- +# +# `AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY` lets self-hosted operators tweak individual +# entitlement values on the default plan without restating the entire plan in +# `AGENTA_ACCESS_PLANS`. Common cases: bumping trace retention, raising the +# standard-throttle rate, flipping a flag. +# +# Shape mirrors a plan entry (same keys, same units) with one divergence: +# `throttles` is a map keyed by category slug instead of a list, so per- +# category patches don't require restating the whole list. Throttles that +# combine multiple categories or use `endpoints` cannot be addressed via the +# overlay — operators who need that should use `AGENTA_ACCESS_PLANS`. + + +class _ThrottleOverlay(BaseModel): + """Partial throttle update keyed by a single category. + + Every field is optional; only fields explicitly set on the overlay + replace the matching field on the existing throttle entry. + """ + + bucket: Optional[Dict[str, Any]] = None + mode: Optional[str] = None + + model_config = ConfigDict(extra="forbid") + + +class _DefaultPlanOverlay(BaseModel): + """Partial overlay for the default plan. Same shape as `_PlanOverride` + except `throttles` is a map keyed by category slug.""" + + description: Optional[str] = None + flags: Optional[Dict[str, bool]] = None + counters: Optional[Dict[str, Dict[str, Any]]] = None + gauges: Optional[Dict[str, Dict[str, Any]]] = None + throttles: Optional[Dict[str, _ThrottleOverlay]] = None + + model_config = ConfigDict(extra="forbid") + + +def _merge_quota(existing: Optional[Quota], patch: Dict[str, Any]) -> Quota: + """Patch a Quota field-by-field, preserving fields the overlay didn't set.""" + if existing is None: + # Patching an entitlement key that isn't defined on the base plan: + # treat the overlay as the full definition. + return Quota.model_validate(patch) + merged = existing.model_dump() + merged.update(patch) + return Quota.model_validate(merged) + + +def _merge_throttle(existing: Throttle, patch: _ThrottleOverlay) -> Throttle: + """Patch one throttle entry. `bucket` is field-merged; `mode` replaces.""" + base = existing.model_dump() + if patch.bucket is not None: + bucket = dict(base.get("bucket") or {}) + bucket.update(patch.bucket) + base["bucket"] = bucket + if patch.mode is not None: + base["mode"] = patch.mode + return Throttle.model_validate(base) + + +def _parse_default_plan_overlay(decoded: Any) -> _DefaultPlanOverlay: + if not isinstance(decoded, dict) or not decoded: + raise ValueError( + "AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY must be a non-empty JSON object" + ) + try: + overlay = _DefaultPlanOverlay.model_validate(decoded) + except ValidationError as e: + raise ValueError(f"Invalid AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY: {e}") from e + + # Validate slugs upfront so the error message points at the bad key + # rather than failing inside the merge. + if overlay.flags is not None: + for key in overlay.flags: + _validate_flag_key(key) + if overlay.counters is not None: + for key in overlay.counters: + _validate_counter_key(key) + if overlay.gauges is not None: + for key in overlay.gauges: + _validate_gauge_key(key) + if overlay.throttles is not None: + valid_categories = {c.value for c in Category} + for key in overlay.throttles: + if key not in valid_categories: + raise ValueError( + f"AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY.throttles['{key}'] is not a " + f"valid throttle category. Allowed: {sorted(valid_categories)}." + ) + return overlay + + +def _apply_default_plan_overlay( + plans: Dict[str, Dict[Tracker, Any]], + descriptions: Dict[str, str], + overlay: _DefaultPlanOverlay, + default_plan_slug: str, +) -> tuple[Dict[str, Dict[Tracker, Any]], Dict[str, str]]: + """Apply the overlay to the resolved default plan in-place (returning new dicts).""" + if default_plan_slug not in plans: + raise ValueError( + f"AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY targets the default plan " + f"'{default_plan_slug}', which is not in the effective plan set " + f"({sorted(plans.keys())}). Add the slug to AGENTA_ACCESS_PLANS or " + "unset AGENTA_DEFAULT_PLAN." + ) + + plans = {slug: dict(entry) for slug, entry in plans.items()} + descriptions = dict(descriptions) + entry = plans[default_plan_slug] + + if overlay.description is not None: + descriptions[default_plan_slug] = overlay.description + + if overlay.flags is not None: + flags = dict(entry.get(Tracker.FLAGS) or {}) + for key, value in overlay.flags.items(): + flags[Flag(key)] = bool(value) + entry[Tracker.FLAGS] = flags + + if overlay.counters is not None: + counters = dict(entry.get(Tracker.COUNTERS) or {}) + for key, patch in overlay.counters.items(): + counter = Counter(key) + counters[counter] = _merge_quota(counters.get(counter), patch) + entry[Tracker.COUNTERS] = counters + + if overlay.gauges is not None: + gauges = dict(entry.get(Tracker.GAUGES) or {}) + for key, patch in overlay.gauges.items(): + gauge = Gauge(key) + gauges[gauge] = _merge_quota(gauges.get(gauge), patch) + entry[Tracker.GAUGES] = gauges + + if overlay.throttles is not None: + existing_throttles = list(entry.get(Tracker.THROTTLES) or []) + + for category_key, patch in overlay.throttles.items(): + category = Category(category_key) + # Find the single-category throttle entry that matches. + target_idx = next( + ( + idx + for idx, t in enumerate(existing_throttles) + if t.categories + and len(t.categories) == 1 + and t.categories[0] == category + ), + None, + ) + if target_idx is None: + raise ValueError( + f"AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY.throttles['{category_key}']: " + f"the default plan '{default_plan_slug}' has no single-" + f"category throttle entry for '{category_key}'. Use " + "AGENTA_ACCESS_PLANS to define multi-category or endpoint-" + "keyed throttles." + ) + existing_throttles[target_idx] = _merge_throttle( + existing_throttles[target_idx], patch + ) + entry[Tracker.THROTTLES] = existing_throttles + + plans[default_plan_slug] = entry + return plans, descriptions + + +def _resolve_default_plan_slug(plans: Dict[str, Dict[Tracker, Any]]) -> str: + """Resolve the default plan slug for overlay targeting. + + Mirrors `subscriptions.types.get_default_plan()` without importing it (to + avoid pulling subscription/Stripe code into the access-controls layer). + """ + raw = env.access_controls.default_plan + if raw: + return raw + if env.stripe.enabled: + return DefaultPlan.CLOUD_V0_HOBBY.value + return DefaultPlan.SELF_HOSTED_ENTERPRISE.value + + +# --------------------------------------------------------------------------- +# Effective controls (built once at import time) +# --------------------------------------------------------------------------- + + +def _build_controls() -> tuple[ + Dict[str, Dict[Tracker, Any]], + Dict[str, str], + Dict[str, List[Dict[str, Any]]], + str, +]: + plans_payload = env.access_controls.plans + roles_payload = env.access_controls.roles + roles_overlay_payload = env.access_controls.roles_overlay + plan_overlay_payload = env.access_controls.default_plan_overlay + + if plans_payload is not None: + plans, descriptions = _parse_plans_override(plans_payload) + plans_source = "env" + else: + plans = _default_plans() + descriptions = dict(_DEFAULT_PLAN_DESCRIPTIONS) + plans_source = "defaults" + + plan_overlay_source = "none" + if plan_overlay_payload is not None: + plan_overlay = _parse_default_plan_overlay(plan_overlay_payload) + default_plan_slug = _resolve_default_plan_slug(plans) + plans, descriptions = _apply_default_plan_overlay( + plans, descriptions, plan_overlay, default_plan_slug + ) + plan_overlay_source = f"env→{default_plan_slug}" + + if roles_payload is not None: + roles = _parse_roles_override(roles_payload) + roles_source = "env" + else: + roles = _default_roles() + roles_source = "defaults" + + roles_overlay_source = "none" + if roles_overlay_payload is not None: + roles_overlay = _parse_roles_overlay(roles_overlay_payload) + roles = _apply_roles_overlay(roles, roles_overlay) + roles_overlay_source = "env" + + payload = dumps( + { + "plans": sorted(plans.keys()), + "descriptions": descriptions, + "roles": {scope: [r["role"] for r in roles[scope]] for scope in SCOPES}, + }, + sort_keys=True, + default=str, + ) + controls_hash = hashlib.sha256(payload.encode()).hexdigest()[:12] + + log.info( + "[access-controls] plans=%s roles=%s plan_overlay=%s roles_overlay=%s hash=%s", + plans_source, + roles_source, + plan_overlay_source, + roles_overlay_source, + controls_hash, + ) + + return plans, descriptions, roles, controls_hash + + +_PLANS, _PLAN_DESCRIPTIONS, _ROLES, _CONTROLS_HASH = _build_controls() + + +# --------------------------------------------------------------------------- +# Public accessors +# --------------------------------------------------------------------------- + + +def get_plans() -> Dict[str, Dict[Tracker, Any]]: + """Return the effective plan map (slug -> entitlement controls).""" + return _PLANS + + +def get_plan(slug: Optional[str]) -> Optional[Dict[Tracker, Any]]: + """Return the entitlement controls for a plan slug, or None if missing.""" + if not slug: + return None + return _PLANS.get(slug) + + +def get_plan_entitlements(slug: Optional[str]) -> Optional[Dict[Tracker, Any]]: + """Alias for `get_plan`. Kept distinct for readability at call sites.""" + if not slug: + return None + return _PLANS.get(slug) + + +def get_plan_description(slug: Optional[str]) -> Optional[str]: + """Return the operator-facing description for a plan, if any.""" + if not slug: + return None + return _PLAN_DESCRIPTIONS.get(slug) + + +def get_roles(scope: str) -> List[Dict[str, Any]]: + """Return the effective role catalog for a scope.""" + if scope not in SCOPES: + return [] + return _ROLES[scope] + + +def get_role(scope: str, slug: str) -> Optional[Dict[str, Any]]: + """Return a single role entry within a scope.""" + for entry in get_roles(scope): + if entry["role"] == slug: + return entry + return None + + +def get_role_permissions(scope: str, slug: str) -> List[str]: + """Return the permission slugs for a role within a scope.""" + role = get_role(scope, slug) + if not role: + return [] + return list(role["permissions"]) + + +def get_role_description(scope: str, slug: str) -> Optional[str]: + role = get_role(scope, slug) + if not role: + return None + return role.get("description") + + +def get_controls_hash() -> str: + """Stable short hash of the effective controls; useful in logs.""" + return _CONTROLS_HASH diff --git a/api/ee/src/core/entitlements/service.py b/api/ee/src/core/entitlements/service.py index f62b11fc74..5cff086467 100644 --- a/api/ee/src/core/entitlements/service.py +++ b/api/ee/src/core/entitlements/service.py @@ -3,11 +3,10 @@ from ee.src.core.entitlements.types import ( Tracker, Constraint, - ENTITLEMENTS, CONSTRAINTS, ) from ee.src.core.entitlements.types import Quota, Gauge -from ee.src.core.subscriptions.types import Plan +from ee.src.core.entitlements.controls import get_plan_entitlements from ee.src.core.meters.service import MetersService from ee.src.core.meters.types import MeterDTO @@ -50,12 +49,14 @@ async def check( self, *, organization_id: str, - plan: Plan, + plan: str, ) -> Dict[Gauge, int]: issues = {} + entitlements = get_plan_entitlements(plan) or {} + for key in CONSTRAINTS[Constraint.BLOCKED][Tracker.GAUGES]: - quotas: List[Quota] = ENTITLEMENTS[plan][Tracker.GAUGES] + quotas: List[Quota] = entitlements.get(Tracker.GAUGES) or {} if key in quotas: meter = MeterDTO( diff --git a/api/ee/src/core/entitlements/types.py b/api/ee/src/core/entitlements/types.py index 379dcb1e87..cb1f57385b 100644 --- a/api/ee/src/core/entitlements/types.py +++ b/api/ee/src/core/entitlements/types.py @@ -2,7 +2,50 @@ from enum import Enum from pydantic import BaseModel -from ee.src.core.subscriptions.types import Plan + +class DefaultPlan(str, Enum): + """Code-default plan slugs. + + Runtime plan slugs come from `ee.src.core.entitlements.controls.get_plans()` + (env-overridable). This enum is only the default-fallback identifier set, + used as keys for `DEFAULT_ENTITLEMENTS` / `DEFAULT_CATALOG` and as fallback + in `get_default_plan()` / `get_free_plan()` / `get_trial_plan()`. + """ + + CLOUD_V0_HOBBY = "cloud_v0_hobby" + CLOUD_V0_PRO = "cloud_v0_pro" + CLOUD_V0_BUSINESS = "cloud_v0_business" + # + CLOUD_V0_AGENTA_AI = "cloud_v0_agenta_ai" + # + SELF_HOSTED_ENTERPRISE = "self_hosted_enterprise" + + +class DefaultRole(str, Enum): + """Required role slugs per scope. + + `owner` and `viewer` must exist in every scope (organization, workspace, + project) — they are merged in by the access-controls builder regardless of + `AGENTA_ACCESS_ROLES` content, so application code can depend on these + two slugs being valid in any scope. + + Env overrides may customize the permissions of these roles or add + additional roles, but cannot remove them. + """ + + OWNER = "owner" + VIEWER = "viewer" + + +# Permission slugs that the OWNER role always implies. `"*"` is the wildcard +# permission recognized by `permissions.py`. +OWNER_PERMISSIONS: list[str] = ["*"] + + +# Scope identifiers the access-controls layer knows about. Today only +# `project` permissions are enforced at runtime; organization/workspace +# scopes get the same minima for forward-compat. +SCOPES: tuple[str, ...] = ("organization", "workspace", "project") class Tracker(str, Enum): @@ -23,6 +66,7 @@ class Flag(str, Enum): class Counter(str, Enum): TRACES = "traces" + EVENTS = "events" EVALUATIONS = "evaluations" EVALUATORS = "evaluators" ANNOTATIONS = "annotations" @@ -39,7 +83,7 @@ class Constraint(str, Enum): READ_ONLY = "read_only" -class Periods(str, Enum): +class Period(str, Enum): EPHEMERAL = 0 # instant HOURLY = 60 # 1 hour = 60 minutes DAILY = 1440 # 24 hours = 1 day = 1440 minutes @@ -133,13 +177,13 @@ class Throttle(BaseModel): } -CATALOG = [ +DEFAULT_CATALOG = [ { "title": "Hobby", "description": "Great for hobby projects and POCs.", "type": "standard", - "plan": Plan.CLOUD_V0_HOBBY.value, - "retention": Periods.MONTHLY.value, + "plan": DefaultPlan.CLOUD_V0_HOBBY.value, + "retention": Period.MONTHLY.value, "price": { "base": { "type": "flat", @@ -160,8 +204,8 @@ class Throttle(BaseModel): "title": "Pro", "description": "For production projects.", "type": "standard", - "plan": Plan.CLOUD_V0_PRO.value, - "retention": Periods.QUARTERLY.value, + "plan": DefaultPlan.CLOUD_V0_PRO.value, + "retention": Period.QUARTERLY.value, "price": { "base": { "type": "flat", @@ -211,8 +255,8 @@ class Throttle(BaseModel): "title": "Business", "description": "For scale, security, and support.", "type": "standard", - "plan": Plan.CLOUD_V0_BUSINESS.value, - "retention": Periods.YEARLY.value, + "plan": DefaultPlan.CLOUD_V0_BUSINESS.value, + "retention": Period.YEARLY.value, "price": { "base": { "type": "flat", @@ -265,28 +309,10 @@ class Throttle(BaseModel): "Custom terms", ], }, - { - "title": "Humanity Labs", - "description": "For Humanity Labs.", - "plan": Plan.CLOUD_V0_HUMANITY_LABS.value, - "type": "custom", - "features": [ - "Everything in Enterprise", - ], - }, - { - "title": "X Labs", - "description": "For X Labs.", - "plan": Plan.CLOUD_V0_X_LABS.value, - "type": "custom", - "features": [ - "Everything in Enterprise", - ], - }, { "title": "Agenta", "description": "For Agenta.", - "plan": Plan.CLOUD_V0_AGENTA_AI.value, + "plan": DefaultPlan.CLOUD_V0_AGENTA_AI.value, "type": "custom", "features": [ "Everything in Enterprise", @@ -294,8 +320,8 @@ class Throttle(BaseModel): }, ] -ENTITLEMENTS = { - Plan.CLOUD_V0_HOBBY: { +DEFAULT_ENTITLEMENTS = { + DefaultPlan.CLOUD_V0_HOBBY: { Tracker.FLAGS: { Flag.HOOKS: False, Flag.RBAC: False, @@ -308,7 +334,13 @@ class Throttle(BaseModel): limit=5_000, monthly=True, free=5_000, - retention=Periods.MONTHLY.value, + retention=Period.MONTHLY.value, + ), + Counter.EVENTS: Quota( + limit=5_000, + monthly=True, + free=5_000, + retention=Period.MONTHLY.value, ), Counter.EVALUATIONS: Quota( limit=20, @@ -380,7 +412,7 @@ class Throttle(BaseModel): ), ], }, - Plan.CLOUD_V0_PRO: { + DefaultPlan.CLOUD_V0_PRO: { Tracker.FLAGS: { Flag.HOOKS: True, Flag.RBAC: False, @@ -392,7 +424,13 @@ class Throttle(BaseModel): Counter.TRACES: Quota( monthly=True, free=10_000, - retention=Periods.QUARTERLY.value, + retention=Period.QUARTERLY.value, + ), + Counter.EVENTS: Quota( + limit=10_000, + monthly=True, + free=10_000, + retention=Period.QUARTERLY.value, ), Counter.EVALUATIONS: Quota( monthly=True, @@ -462,7 +500,7 @@ class Throttle(BaseModel): ), ], }, - Plan.CLOUD_V0_BUSINESS: { + DefaultPlan.CLOUD_V0_BUSINESS: { Tracker.FLAGS: { Flag.HOOKS: True, Flag.RBAC: True, @@ -474,7 +512,13 @@ class Throttle(BaseModel): Counter.TRACES: Quota( monthly=True, free=1_000_000, - retention=Periods.YEARLY.value, + retention=Period.YEARLY.value, + ), + Counter.EVENTS: Quota( + limit=1_000_000, + monthly=True, + free=1_000_000, + retention=Period.YEARLY.value, ), Counter.EVALUATIONS: Quota( monthly=True, @@ -542,7 +586,7 @@ class Throttle(BaseModel): ), ], }, - Plan.CLOUD_V0_HUMANITY_LABS: { + DefaultPlan.CLOUD_V0_AGENTA_AI: { Tracker.FLAGS: { Flag.HOOKS: True, Flag.RBAC: True, @@ -554,56 +598,7 @@ class Throttle(BaseModel): Counter.TRACES: Quota( monthly=True, ), - Counter.EVALUATIONS: Quota( - monthly=True, - strict=True, - ), - }, - Tracker.GAUGES: { - Gauge.USERS: Quota( - strict=True, - ), - Gauge.APPLICATIONS: Quota( - strict=True, - ), - }, - }, - Plan.CLOUD_V0_X_LABS: { - Tracker.FLAGS: { - Flag.HOOKS: False, - Flag.RBAC: False, - Flag.ACCESS: False, - Flag.DOMAINS: False, - Flag.SSO: False, - }, - Tracker.COUNTERS: { - Counter.TRACES: Quota( - monthly=True, - ), - Counter.EVALUATIONS: Quota( - monthly=True, - strict=True, - ), - }, - Tracker.GAUGES: { - Gauge.USERS: Quota( - strict=True, - ), - Gauge.APPLICATIONS: Quota( - strict=True, - ), - }, - }, - Plan.CLOUD_V0_AGENTA_AI: { - Tracker.FLAGS: { - Flag.HOOKS: True, - Flag.RBAC: True, - Flag.ACCESS: True, - Flag.DOMAINS: True, - Flag.SSO: True, - }, - Tracker.COUNTERS: { - Counter.TRACES: Quota( + Counter.EVENTS: Quota( monthly=True, ), Counter.EVALUATIONS: Quota( @@ -626,7 +621,7 @@ class Throttle(BaseModel): ), }, }, - Plan.SELF_HOSTED_ENTERPRISE: { + DefaultPlan.SELF_HOSTED_ENTERPRISE: { Tracker.FLAGS: { Flag.HOOKS: True, Flag.RBAC: True, @@ -638,6 +633,9 @@ class Throttle(BaseModel): Counter.TRACES: Quota( monthly=True, ), + Counter.EVENTS: Quota( + monthly=True, + ), Counter.EVALUATIONS: Quota( monthly=True, ), @@ -672,6 +670,7 @@ class Throttle(BaseModel): Constraint.READ_ONLY: { Tracker.COUNTERS: [ Counter.TRACES, + Counter.EVENTS, Counter.EVALUATIONS, ], }, diff --git a/api/ee/src/core/events/__init__.py b/api/ee/src/core/events/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/api/ee/src/core/events/service.py b/api/ee/src/core/events/service.py new file mode 100644 index 0000000000..36f4f743c6 --- /dev/null +++ b/api/ee/src/core/events/service.py @@ -0,0 +1,127 @@ +"""EE events service (retention). + +Walks the effective plan map and, for each plan that defines a non-null +``Counter.EVENTS.retention``, deletes events older than the retention +cutoff for projects whose org subscribes to that plan. + +Parallel to ``ee.src.core.tracing.service.TracingService`` (same shape, +different counter and DAO). Both names live in EE; the OSS counterparts +(``oss.src.core.events.service.EventsService`` and +``oss.src.core.tracing.service.TracingService``) own ingest/query. +""" + +from datetime import datetime, timezone, timedelta + +from oss.src.utils.logging import get_module_logger + +from ee.src.core.entitlements.types import Tracker, Counter +from ee.src.core.entitlements.controls import get_plans +from ee.src.dbs.postgres.events.dao import EventsDAO + + +log = get_module_logger(__name__) + + +class EventsService: + def __init__( + self, + events_dao: EventsDAO, + ): + self.events_dao = events_dao + + async def flush_events( + self, + *, + max_projects_per_batch: int = 500, + max_events_per_batch: int = 5000, + ) -> None: + log.info("[flush-events] ============================================") + log.info("[flush-events] Starting events flush job") + log.info("[flush-events] ============================================") + + total_plans = 0 + total_skipped = 0 + total_events = 0 + + for plan, entitlements in get_plans().items(): + total_plans += 1 + + if not entitlements: + log.info(f"[flush-events] [{plan}] Skipped (no entitlements)") + total_skipped += 1 + continue + + events_quota = (entitlements.get(Tracker.COUNTERS) or {}).get( + Counter.EVENTS + ) + + if not events_quota or events_quota.retention is None: + log.info(f"[flush-events] [{plan}] Skipped (unlimited retention)") + total_skipped += 1 + continue + + retention_minutes = events_quota.retention + cutoff = datetime.now(timezone.utc) - timedelta(minutes=retention_minutes) + + log.info( + f"[flush-events] [{plan}] Processing with cutoff={cutoff.isoformat()} " + f"(retention={retention_minutes} minutes)" + ) + + try: + plan_events = await self._flush_events_for_plan( + plan=plan, + cutoff=cutoff, + max_projects_per_batch=max_projects_per_batch, + max_events_per_batch=max_events_per_batch, + ) + + total_events += plan_events + + log.info(f"[flush-events] [{plan}] ✅ Completed: {plan_events} events") + + except Exception: + log.error( + f"[flush-events] [{plan}] ❌ Failed", + exc_info=True, + ) + + log.info("[flush-events] ============================================") + log.info("[flush-events] ✅ FLUSH JOB COMPLETED") + log.info(f"[flush-events] Total plans covered: {total_plans}") + log.info(f"[flush-events] Total plans skipped: {total_skipped}") + log.info(f"[flush-events] Total events deleted: {total_events}") + log.info("[flush-events] ============================================") + + async def _flush_events_for_plan( + self, + *, + plan: str, + cutoff: datetime, + max_projects_per_batch: int, + max_events_per_batch: int, + ) -> int: + last_project_id = None + total_events = 0 + + while True: + project_ids = await self.events_dao.fetch_projects_with_plan( + plan=plan, + project_id=last_project_id, + max_projects=max_projects_per_batch, + ) + + if not project_ids: + break + + last_project_id = project_ids[-1] + + events_deleted = await self.events_dao.delete_events_before_cutoff( + cutoff=cutoff, + project_ids=project_ids, + max_events=max_events_per_batch, + ) + + total_events += events_deleted + + return total_events diff --git a/api/ee/src/core/meters/service.py b/api/ee/src/core/meters/service.py index 3a92107e4c..0e0ca49758 100644 --- a/api/ee/src/core/meters/service.py +++ b/api/ee/src/core/meters/service.py @@ -8,6 +8,7 @@ from ee.src.core.entitlements.types import Quota from ee.src.core.entitlements.types import Counter, Gauge, REPORTS +from ee.src.core.subscriptions.settings import get_stripe_meter_price from ee.src.core.meters.types import MeterDTO from ee.src.core.meters.interfaces import MetersDAOInterface @@ -170,10 +171,9 @@ async def report( if meter.key.name in Gauge.__members__.keys(): try: - price_id = ( - env.stripe.pricing.get(meter.subscription.plan, {}) - .get("users", {}) - .get("price") + price_id = get_stripe_meter_price( + meter.subscription.plan, + meter.key.value, ) if not price_id: diff --git a/api/ee/src/core/subscriptions/service.py b/api/ee/src/core/subscriptions/service.py index 3badcc4c58..df2f3bcbe1 100644 --- a/api/ee/src/core/subscriptions/service.py +++ b/api/ee/src/core/subscriptions/service.py @@ -12,12 +12,15 @@ from ee.src.core.subscriptions.types import ( SubscriptionDTO, Event, - Plan, - FREE_PLAN, - REVERSE_TRIAL_PLAN, - REVERSE_TRIAL_DAYS, get_default_plan, ) +from ee.src.core.subscriptions.settings import ( + get_free_plan, + get_trial_plan, + get_trial_days, + get_stripe_line_items, + trial_enabled, +) from ee.src.core.subscriptions.interfaces import SubscriptionsDAOInterface from ee.src.core.entitlements.service import EntitlementsService from ee.src.core.meters.service import MetersService @@ -83,8 +86,20 @@ async def start_reverse_trial( if not env.stripe.enabled: raise EventException("Reverse trial requires Stripe to be enabled") + if not trial_enabled(): + raise EventException( + "Reverse trial requires AGENTA_BILLING_TRIAL_PLAN and " + "AGENTA_BILLING_TRIAL_DAYS to be configured." + ) + + # Asserted by `trial_enabled()` — narrow types for the rest of the body. + trial_days = get_trial_days() + trial_plan = get_trial_plan() + assert trial_days is not None and trial_plan is not None + free_plan = get_free_plan() + now = datetime.now(tz=timezone.utc) - anchor = now + timedelta(days=REVERSE_TRIAL_DAYS) + anchor = now + timedelta(days=trial_days) subscription = await self.read(organization_id=organization_id) @@ -94,7 +109,7 @@ async def start_reverse_trial( subscription = await self.create( subscription=SubscriptionDTO( organization_id=organization_id, - plan=FREE_PLAN, + plan=free_plan, active=True, anchor=anchor.day, ) @@ -124,16 +139,16 @@ async def start_reverse_trial( stripe_subscription = stripe.Subscription.create( customer=customer_id, - items=list(env.stripe.pricing[REVERSE_TRIAL_PLAN].values()), + items=get_stripe_line_items(trial_plan), # # automatic_tax={"enabled": True}, metadata={ "organization_id": organization_id, - "plan": REVERSE_TRIAL_PLAN.value, + "plan": trial_plan, "target": env.stripe.webhook_target, }, # - trial_period_days=REVERSE_TRIAL_DAYS, + trial_period_days=trial_days, trial_settings={"end_behavior": {"missing_payment_method": "cancel"}}, ) @@ -142,7 +157,7 @@ async def start_reverse_trial( organization_id=organization_id, customer_id=customer_id, subscription_id=stripe_subscription.id, - plan=REVERSE_TRIAL_PLAN, + plan=trial_plan, active=True, anchor=anchor.day, ) @@ -154,13 +169,13 @@ async def start_plan( self, *, organization_id: str, - plan: Plan, + plan: str, ) -> Optional[SubscriptionDTO]: """Start a specific plan for an organization. Args: organization_id: The organization ID - plan: The plan to assign + plan: The plan slug to assign Returns: SubscriptionDTO: The created subscription or None if already exists @@ -181,7 +196,7 @@ async def start_plan( ) ) - log.info("✓ Plan [%s] started for organization %s", plan.value, organization_id) + log.info("✓ Plan [%s] started for organization %s", plan, organization_id) return subscription @@ -194,14 +209,27 @@ async def provision_signup_subscription( ) -> Optional[SubscriptionDTO]: """Provision the initial subscription for a newly signed-up organization. - Cloud signups use the reverse-trial flow. Self-hosted deployments start - directly on the configured default plan. + - Stripe enabled + trial configured → reverse-trial flow on trial plan. + - Stripe enabled + no trial → onboard on the free plan. + - Stripe disabled → onboard on `get_default_plan()`. """ if env.stripe.enabled: - return await self.start_reverse_trial( + if trial_enabled(): + return await self.start_reverse_trial( + organization_id=organization_id, + organization_name=organization_name, + organization_email=organization_email, + ) + + free_plan = get_free_plan() + log.info( + "Trial not configured; onboarding org %s on free plan [%s]", + organization_id, + free_plan, + ) + return await self.start_plan( organization_id=organization_id, - organization_name=organization_name, - organization_email=organization_email, + plan=free_plan, ) return await self.start_plan( @@ -215,8 +243,8 @@ async def process_event( organization_id: str, event: Event, subscription_id: Optional[str] = None, - plan: Optional[Plan] = None, - anchor: Optional[Plan] = None, + plan: Optional[str] = None, + anchor: Optional[int] = None, # force: Optional[bool] = True, **kwargs, ) -> SubscriptionDTO: @@ -239,6 +267,8 @@ async def process_event( "Subscription not found for organization ID: {organization_id}" ) + free_plan = get_free_plan() + if event == Event.SUBSCRIPTION_CREATED: subscription.active = True subscription.plan = plan @@ -247,17 +277,17 @@ async def process_event( subscription = await self.update(subscription=subscription) - elif subscription.plan != FREE_PLAN and event == Event.SUBSCRIPTION_PAUSED: + elif subscription.plan != free_plan and event == Event.SUBSCRIPTION_PAUSED: subscription.active = False subscription = await self.update(subscription=subscription) - elif subscription.plan != FREE_PLAN and event == Event.SUBSCRIPTION_RESUMED: + elif subscription.plan != free_plan and event == Event.SUBSCRIPTION_RESUMED: subscription.active = True subscription = await self.update(subscription=subscription) - elif subscription.plan != FREE_PLAN and event == Event.SUBSCRIPTION_SWITCHED: + elif subscription.plan != free_plan and event == Event.SUBSCRIPTION_SWITCHED: if not env.stripe.enabled: log.warn("✗ Stripe disabled") return None @@ -304,20 +334,20 @@ async def process_event( subscription=subscription.subscription_id, ).data ] - + list(env.stripe.pricing[plan].values()), + + get_stripe_line_items(plan), ) subscription = await self.update(subscription=subscription) - elif subscription.plan != FREE_PLAN and event == Event.SUBSCRIPTION_CANCELLED: + elif subscription.plan != free_plan and event == Event.SUBSCRIPTION_CANCELLED: subscription.active = True - subscription.plan = FREE_PLAN + subscription.plan = free_plan subscription.subscription_id = None subscription.anchor = anchor # await self.entitlements_service.enforce( # organization_id=organization_id, - # plan=FREE_PLAN, + # plan=free_plan, # force=True, # ) diff --git a/api/ee/src/core/subscriptions/settings.py b/api/ee/src/core/subscriptions/settings.py new file mode 100644 index 0000000000..55de6afba3 --- /dev/null +++ b/api/ee/src/core/subscriptions/settings.py @@ -0,0 +1,425 @@ +"""Billing settings: effective catalog, Stripe pricing, free/trial plan accessors. + +Reads `env.billing.catalog`, `env.billing.pricing`, `env.billing.trial_plan`, +and `env.billing.trial_days` at import time and falls back to code defaults. + +Catalog entries provide user-facing display metadata for `/billing/plans`. +Pricing entries provide Stripe line items and the free-plan marker. +""" + +from typing import Any, Dict, List, Optional + +from pydantic import BaseModel, ConfigDict, ValidationError + +from oss.src.utils.env import env +from oss.src.utils.logging import get_module_logger + +from ee.src.core.entitlements.controls import get_plans +from ee.src.core.entitlements.types import ( + DEFAULT_CATALOG, + Counter, + DefaultPlan, + Gauge, +) + + +_VALID_METER_KEYS: set[str] = {c.value for c in Counter} | {g.value for g in Gauge} +_VALID_CATALOG_TYPES: set[str] = {"standard", "custom"} + + +log = get_module_logger(__name__) + + +# --------------------------------------------------------------------------- +# Catalog +# --------------------------------------------------------------------------- + + +class _CatalogEntry(BaseModel): + """Schema-level validation for an entry in ``AGENTA_BILLING_CATALOG``. + + The catalog is rendered by the frontend pricing modal; field shape drives + what the user sees. Extra fields are intentionally allowed so operators + can extend the catalog without backend changes — but the documented set + of required fields (title/description/type/features) is enforced. + """ + + title: str + description: str + type: str + features: List[str] + plan: Optional[str] = None + price: Optional[Dict[str, Any]] = None + retention: Optional[int] = None + + model_config = ConfigDict(extra="allow") + + +def _default_catalog() -> List[Dict[str, Any]]: + return [dict(entry) for entry in DEFAULT_CATALOG] + + +def _parse_catalog_override(decoded: Any) -> List[Dict[str, Any]]: + if not isinstance(decoded, list): + raise ValueError("AGENTA_BILLING_CATALOG must be a JSON array") + + catalog: List[Dict[str, Any]] = [] + for idx, entry in enumerate(decoded): + if not isinstance(entry, dict): + raise ValueError("AGENTA_BILLING_CATALOG entries must be objects") + try: + parsed = _CatalogEntry.model_validate(entry) + except ValidationError as e: + raise ValueError(f"AGENTA_BILLING_CATALOG[{idx}] is invalid: {e}") from e + if parsed.type not in _VALID_CATALOG_TYPES: + raise ValueError( + f"AGENTA_BILLING_CATALOG[{idx}].type must be one of " + f"{sorted(_VALID_CATALOG_TYPES)}; got '{parsed.type}'." + ) + # Round-trip through model_dump so extras (passed through to the + # frontend) survive but required fields are guaranteed present. + catalog.append(parsed.model_dump(exclude_none=True)) + return catalog + + +# --------------------------------------------------------------------------- +# Pricing (Stripe line items + free plan marker) +# --------------------------------------------------------------------------- + + +def _default_pricing() -> Dict[str, Dict[str, Any]]: + """No code-default pricing. Stripe line items must come from + `AGENTA_BILLING_PRICING`; paid-checkout flows fail clearly when missing.""" + return {} + + +def _normalize_pricing_entry(slug: str, entry: Any) -> Dict[str, Any]: + """Validate and normalize one pricing entry. + + Canonical shape: + + { + "free": bool, # optional, exactly one entry may be free=true + "stripe": { # required for paid plans + "line_items": [ # passed to Stripe checkout/subscription + {"price": "price_...", "quantity": 1}, + ... + ], + "meters": { # optional, per-meter price IDs for + "users": {"price": "price_..."}, # usage reporting + "traces": {"price": "price_..."} + } + } + } + + `meters` keys must be valid counter/gauge slugs. They are looked up by + `ee.src.core.meters.service` to report quantities to the right Stripe + subscription item. + """ + if not isinstance(entry, dict): + raise ValueError(f"AGENTA_BILLING_PRICING['{slug}'] must be an object") + + allowed_top = {"free", "stripe"} + unknown = set(entry.keys()) - allowed_top + if unknown: + raise ValueError( + f"AGENTA_BILLING_PRICING['{slug}'] has unknown keys: {sorted(unknown)}. " + f"Allowed: {sorted(allowed_top)}. " + "If migrating from STRIPE_PRICING, see scripts/migrate_stripe_pricing.py." + ) + + normalized: Dict[str, Any] = {} + + if "free" in entry: + normalized["free"] = bool(entry["free"]) + + if "stripe" in entry: + stripe_block = entry["stripe"] + if not isinstance(stripe_block, dict): + raise ValueError( + f"AGENTA_BILLING_PRICING['{slug}'].stripe must be an object" + ) + + stripe_unknown = set(stripe_block.keys()) - {"line_items", "meters"} + if stripe_unknown: + raise ValueError( + f"AGENTA_BILLING_PRICING['{slug}'].stripe has unknown keys: " + f"{sorted(stripe_unknown)}. Allowed: ['line_items', 'meters']." + ) + + line_items = stripe_block.get("line_items") or [] + if not isinstance(line_items, list): + raise ValueError( + f"AGENTA_BILLING_PRICING['{slug}'].stripe.line_items must be a list" + ) + + meters = stripe_block.get("meters") or {} + if not isinstance(meters, dict): + raise ValueError( + f"AGENTA_BILLING_PRICING['{slug}'].stripe.meters must be an object" + ) + for meter_key, meter_entry in meters.items(): + if meter_key not in _VALID_METER_KEYS: + raise ValueError( + f"AGENTA_BILLING_PRICING['{slug}'].stripe.meters['{meter_key}'] " + "is not a valid Counter/Gauge slug. Allowed keys: " + f"{sorted(_VALID_METER_KEYS)}." + ) + if not isinstance(meter_entry, dict) or "price" not in meter_entry: + raise ValueError( + f"AGENTA_BILLING_PRICING['{slug}'].stripe.meters['{meter_key}'] " + "must be an object with a 'price' field" + ) + + normalized["stripe"] = { + "line_items": list(line_items), + "meters": dict(meters), + } + + return normalized + + +def _parse_pricing_override(decoded: Any) -> Dict[str, Dict[str, Any]]: + if not isinstance(decoded, dict): + raise ValueError("AGENTA_BILLING_PRICING must be a JSON object") + + pricing: Dict[str, Dict[str, Any]] = {} + free_seen: Optional[str] = None + + for slug, entry in decoded.items(): + if not slug or not isinstance(slug, str): + raise ValueError(f"Invalid pricing plan slug '{slug}'") + normalized = _normalize_pricing_entry(slug, entry) + if normalized.get("free"): + if free_seen is not None: + raise ValueError( + "AGENTA_BILLING_PRICING has multiple free plans " + f"('{free_seen}' and '{slug}'); exactly one allowed" + ) + free_seen = slug + pricing[slug] = normalized + + return pricing + + +# --------------------------------------------------------------------------- +# Effective settings (built once at import time) +# --------------------------------------------------------------------------- + + +def _resolve_trial( + plans: set[str], +) -> tuple[Optional[str], Optional[int]]: + """Resolve the trial plan slug and duration. + + Rule: `AGENTA_BILLING_TRIAL_PLAN` and `AGENTA_BILLING_TRIAL_DAYS` must + be configured together — either both set or neither. Setting only one + fails startup with a clear error. + + When neither is set the reverse-trial flow is disabled and signups + onboard directly on the free plan. + """ + raw_plan = env.billing.trial_plan + raw_days = env.billing.trial_days + + if (raw_plan is None) != (raw_days is None): + missing = ( + "AGENTA_BILLING_TRIAL_DAYS" if raw_plan else "AGENTA_BILLING_TRIAL_PLAN" + ) + raise ValueError( + f"Trial configuration is incomplete: {missing} is required when the " + "other trial env var is set. Either configure both or unset both." + ) + + if raw_plan is None: + return None, None + + if raw_plan not in plans: + raise ValueError( + f"AGENTA_BILLING_TRIAL_PLAN '{raw_plan}' is not in the effective plans set" + ) + + if raw_days is None or raw_days <= 0: + raise ValueError( + f"AGENTA_BILLING_TRIAL_DAYS must be a positive integer, got {raw_days!r}" + ) + + return raw_plan, int(raw_days) + + +def _build_settings() -> tuple[ + List[Dict[str, Any]], + Dict[str, Dict[str, Any]], + Optional[str], + Optional[str], + Optional[int], +]: + plans = set(get_plans().keys()) + + catalog_payload = env.billing.catalog + if catalog_payload is not None: + catalog = _parse_catalog_override(catalog_payload) + catalog_source = "env" + else: + catalog = _default_catalog() + catalog_source = "defaults" + + for entry in catalog: + slug = entry.get("plan") + if slug and slug not in plans: + raise ValueError( + f"AGENTA_BILLING_CATALOG references plan '{slug}' not in effective plans" + ) + + pricing_payload = env.billing.pricing + if pricing_payload is not None: + pricing = _parse_pricing_override(pricing_payload) + pricing_source = "env" + else: + pricing = _default_pricing() + pricing_source = "defaults" + + for slug in pricing.keys(): + if slug not in plans: + raise ValueError( + f"AGENTA_BILLING_PRICING references plan '{slug}' not in effective plans" + ) + + free_plan: Optional[str] = None + for slug, entry in pricing.items(): + if entry.get("free"): + free_plan = slug + break + + # If no env-driven free plan was declared, fall back to the legacy + # ``cloud_v0_hobby`` slug — but only when it actually exists in the + # effective plan set. Operators who restrict ``AGENTA_ACCESS_PLANS`` to + # a slug set without ``cloud_v0_hobby`` MUST mark one entry of + # ``AGENTA_BILLING_PRICING`` as ``"free": true``; otherwise we would + # silently write a non-existent plan to ``subscriptions.plan`` during + # cancel/downgrade, then 404 on every entitlement check. + if free_plan is None and DefaultPlan.CLOUD_V0_HOBBY.value not in plans: + raise ValueError( + "No free plan can be derived: AGENTA_BILLING_PRICING has no entry " + "marked '\"free\": true' and the default fallback slug " + f"'{DefaultPlan.CLOUD_V0_HOBBY.value}' is not in the effective " + "plan set. Add exactly one '\"free\": true' entry to " + "AGENTA_BILLING_PRICING for a plan slug present in " + "AGENTA_ACCESS_PLANS." + ) + + trial_plan, trial_days = _resolve_trial(plans) + + # If operators set AGENTA_ACCESS_DEFAULT_PLAN (or legacy + # AGENTA_DEFAULT_PLAN), it must reference an effective plan slug. + # Without this guard, signup onboards orgs onto a plan that never + # resolves at runtime and every entitlement check 404s. + default_plan_raw = env.access_controls.default_plan + if default_plan_raw and default_plan_raw not in plans: + raise ValueError( + f"AGENTA_ACCESS_DEFAULT_PLAN '{default_plan_raw}' is not in the " + "effective plans set. Set it to one of the slugs in " + "AGENTA_ACCESS_PLANS, or unset it to fall back to the code " + "defaults." + ) + + log.info( + "[billing-settings] catalog=%s pricing=%s free_plan=%s trial=%s", + catalog_source, + pricing_source, + free_plan, + f"{trial_plan}/{trial_days}d" if trial_plan else "disabled", + ) + + return catalog, pricing, free_plan, trial_plan, trial_days + + +_CATALOG, _PRICING, _FREE_PLAN, _TRIAL_PLAN, _TRIAL_DAYS = _build_settings() + + +# --------------------------------------------------------------------------- +# Public accessors +# --------------------------------------------------------------------------- + + +def get_catalog() -> List[Dict[str, Any]]: + return _CATALOG + + +def get_catalog_plan(slug: Optional[str]) -> Optional[Dict[str, Any]]: + if not slug: + return None + for entry in _CATALOG: + if entry.get("plan") == slug: + return entry + return None + + +def get_pricing() -> Dict[str, Dict[str, Any]]: + return _PRICING + + +def get_pricing_plan(slug: Optional[str]) -> Optional[Dict[str, Any]]: + if not slug: + return None + return _PRICING.get(slug) + + +def get_stripe_line_items(slug: Optional[str]) -> List[Dict[str, Any]]: + """Return Stripe line items for a plan, or [] if not configured.""" + if not slug: + return [] + entry = _PRICING.get(slug) + if not entry: + return [] + stripe_block = entry.get("stripe") or {} + return list(stripe_block.get("line_items") or []) + + +def get_stripe_meter_price( + plan: Optional[str], + meter: Optional[str], +) -> Optional[str]: + """Return the Stripe price ID for a given (plan, meter) pair. + + `meter` is a counter or gauge slug (e.g. "users", "traces"). Used by + `meters/service.py` to find the Stripe subscription item to report usage to. + Returns None when the plan has no pricing or the meter has no price wired up. + """ + if not plan or not meter: + return None + entry = _PRICING.get(plan) + if not entry: + return None + meters = (entry.get("stripe") or {}).get("meters") or {} + return (meters.get(meter) or {}).get("price") + + +def get_free_plan() -> Optional[str]: + """Return the free-plan slug derived from AGENTA_BILLING_PRICING ``free`` marker. + + Falls back to ``cloud_v0_hobby`` when no env-driven free plan is defined, + matching legacy behavior. + """ + if _FREE_PLAN: + return _FREE_PLAN + return DefaultPlan.CLOUD_V0_HOBBY.value + + +def get_trial_plan() -> Optional[str]: + """Return the configured trial plan slug, or None if trial is disabled. + + Disabled when `AGENTA_BILLING_TRIAL_PLAN` / `AGENTA_BILLING_TRIAL_DAYS` + are unset — signups should onboard directly on the free plan. + """ + return _TRIAL_PLAN + + +def get_trial_days() -> Optional[int]: + """Return the configured trial duration in days, or None if disabled.""" + return _TRIAL_DAYS + + +def trial_enabled() -> bool: + """True when both trial env vars are configured.""" + return _TRIAL_PLAN is not None and _TRIAL_DAYS is not None diff --git a/api/ee/src/core/subscriptions/types.py b/api/ee/src/core/subscriptions/types.py index 8e3811ac1e..35b8285381 100644 --- a/api/ee/src/core/subscriptions/types.py +++ b/api/ee/src/core/subscriptions/types.py @@ -7,18 +7,7 @@ from oss.src.utils.env import env from pydantic import BaseModel - -class Plan(str, Enum): - CLOUD_V0_HOBBY = "cloud_v0_hobby" - CLOUD_V0_PRO = "cloud_v0_pro" - CLOUD_V0_BUSINESS = "cloud_v0_business" - # - CLOUD_V0_HUMANITY_LABS = "cloud_v0_humanity_labs" - CLOUD_V0_X_LABS = "cloud_v0_x_labs" - # - CLOUD_V0_AGENTA_AI = "cloud_v0_agenta_ai" - # - SELF_HOSTED_ENTERPRISE = "self_hosted_enterprise" +from ee.src.core.entitlements.types import DefaultPlan class Event(str, Enum): @@ -33,28 +22,25 @@ class SubscriptionDTO(BaseModel): organization_id: UUID customer_id: Optional[str] = None subscription_id: Optional[str] = None - plan: Optional[Plan] = None + plan: Optional[str] = None active: Optional[bool] = None anchor: Optional[int] = None -FREE_PLAN = Plan.CLOUD_V0_HOBBY # Move to ENV FILE -REVERSE_TRIAL_PLAN = Plan.CLOUD_V0_PRO # move to ENV FILE -REVERSE_TRIAL_DAYS = 14 # move to ENV FILE - - -def get_default_plan() -> Plan: - """Returns the default plan for new organizations. +def get_default_plan() -> str: + """Returns the default plan slug for new organizations. - Reads from AGENTA_DEFAULT_PLAN env var. If not set, defaults to: + Reads from `AGENTA_ACCESS_DEFAULT_PLAN` (canonical) or the legacy + `AGENTA_DEFAULT_PLAN` env var (both surfaced via + `env.access_controls.default_plan`). If neither is set, defaults to: - self_hosted_enterprise when Stripe is disabled - cloud_v0_hobby when Stripe is enabled """ - raw = env.agenta.default_plan + raw = env.access_controls.default_plan if raw: - return Plan(raw) + return raw if env.stripe.enabled: - return Plan.CLOUD_V0_HOBBY + return DefaultPlan.CLOUD_V0_HOBBY.value - return Plan.SELF_HOSTED_ENTERPRISE + return DefaultPlan.SELF_HOSTED_ENTERPRISE.value diff --git a/api/ee/src/core/tracing/service.py b/api/ee/src/core/tracing/service.py index ef62344ad0..18524125d4 100644 --- a/api/ee/src/core/tracing/service.py +++ b/api/ee/src/core/tracing/service.py @@ -2,8 +2,8 @@ from oss.src.utils.logging import get_module_logger -from ee.src.core.subscriptions.types import Plan -from ee.src.core.entitlements.types import ENTITLEMENTS, Tracker, Counter +from ee.src.core.entitlements.types import Tracker, Counter +from ee.src.core.entitlements.controls import get_plans from ee.src.dbs.postgres.tracing.dao import TracingDAO @@ -32,20 +32,20 @@ async def flush_spans( total_traces = 0 total_spans = 0 - for plan in Plan: + for plan, entitlements in get_plans().items(): total_plans += 1 - entitlements = ENTITLEMENTS.get(plan) - if not entitlements: - log.info(f"[flush] [{plan.value}] Skipped (no entitlements)") + log.info(f"[flush] [{plan}] Skipped (no entitlements)") total_skipped += 1 continue - traces_quota = entitlements.get(Tracker.COUNTERS, {}).get(Counter.TRACES) + traces_quota = (entitlements.get(Tracker.COUNTERS) or {}).get( + Counter.TRACES + ) if not traces_quota or traces_quota.retention is None: - log.info(f"[flush] [{plan.value}] Skipped (unlimited retention)") + log.info(f"[flush] [{plan}] Skipped (unlimited retention)") total_skipped += 1 continue @@ -53,7 +53,7 @@ async def flush_spans( cutoff = datetime.now(timezone.utc) - timedelta(minutes=retention_minutes) log.info( - f"[flush] [{plan.value}] Processing with cutoff={cutoff.isoformat()} (retention={retention_minutes} minutes)" + f"[flush] [{plan}] Processing with cutoff={cutoff.isoformat()} (retention={retention_minutes} minutes)" ) try: @@ -68,12 +68,12 @@ async def flush_spans( total_spans += plan_spans log.info( - f"[flush] [{plan.value}] ✅ Completed: {plan_traces} traces, {plan_spans} spans" + f"[flush] [{plan}] ✅ Completed: {plan_traces} traces, {plan_spans} spans" ) except Exception: log.error( - f"[flush] [{plan.value}] ❌ Failed", + f"[flush] [{plan}] ❌ Failed", exc_info=True, ) @@ -88,7 +88,7 @@ async def flush_spans( async def _flush_spans_for_plan( self, *, - plan: Plan, + plan: str, cutoff: datetime, max_projects_per_batch: int, max_traces_per_batch: int, @@ -100,7 +100,7 @@ async def _flush_spans_for_plan( while True: project_ids = await self.tracing_dao.fetch_projects_with_plan( - plan=plan.value, + plan=plan, project_id=last_project_id, max_projects=max_projects_per_batch, ) diff --git a/api/ee/src/core/workspaces/types.py b/api/ee/src/core/workspaces/types.py index fda49d7625..4016a564df 100644 --- a/api/ee/src/core/workspaces/types.py +++ b/api/ee/src/core/workspaces/types.py @@ -3,11 +3,14 @@ from pydantic import BaseModel -from ee.src.models.shared_models import Permission, WorkspaceRole +from ee.src.models.shared_models import Permission class WorkspacePermission(BaseModel): - role_name: WorkspaceRole + # Role slugs are dynamic (env-overridable via AGENTA_ACCESS_ROLES); + # validation against the effective scope catalog happens at the API + # boundary via `ee.src.core.entitlements.controls.get_role`. + role_name: str role_description: Optional[str] = None permissions: Optional[List[Permission]] = None diff --git a/api/ee/src/crons/events.sh b/api/ee/src/crons/events.sh new file mode 100644 index 0000000000..571b626ed7 --- /dev/null +++ b/api/ee/src/crons/events.sh @@ -0,0 +1,39 @@ +#!/bin/sh +set -eu + +AGENTA_AUTH_KEY="${AGENTA_AUTH_KEY:-replace-me}" + +echo "--------------------------------------------------------" +echo "[$(date)] events.sh running from cron" + +# Make POST request with 30 minute timeout (retention can be slow) +RESPONSE=$(curl \ + --max-time 1800 \ + --connect-timeout 10 \ + -s \ + -w "\nHTTP_STATUS:%{http_code}\n" \ + -X POST \ + -H "Authorization: Access ${AGENTA_AUTH_KEY}" \ + "http://api:8000/admin/events/flush" 2>&1) || CURL_EXIT=$? + +if [ -n "${CURL_EXIT:-}" ]; then + echo "❌ CURL failed with exit code: ${CURL_EXIT}" + case ${CURL_EXIT} in + 6) echo " Could not resolve host" ;; + 7) echo " Failed to connect to host" ;; + 28) echo " Operation timeout (exceeded 1800s / 30 minutes)" ;; + 52) echo " Empty reply from server" ;; + 56) echo " Failure in receiving network data" ;; + *) echo " Unknown curl error" ;; + esac +else + echo "${RESPONSE}" + HTTP_CODE=$(echo "${RESPONSE}" | grep "HTTP_STATUS:" | cut -d: -f2) + if [ "${HTTP_CODE}" = "200" ]; then + echo "✅ Events retention completed successfully" + else + echo "❌ Events retention failed with HTTP ${HTTP_CODE}" + fi +fi + +echo "[$(date)] events.sh done" diff --git a/api/ee/src/crons/events.txt b/api/ee/src/crons/events.txt new file mode 100644 index 0000000000..6b368aa74f --- /dev/null +++ b/api/ee/src/crons/events.txt @@ -0,0 +1,2 @@ +* * * * * root echo "cron test $(date)" >> /proc/1/fd/1 2>&1 +7,37 * * * * root sh /events.sh >> /proc/1/fd/1 2>&1 diff --git a/api/ee/src/crons/spans.sh b/api/ee/src/crons/spans.sh index c728118fff..61f71f3305 100644 --- a/api/ee/src/crons/spans.sh +++ b/api/ee/src/crons/spans.sh @@ -14,7 +14,7 @@ RESPONSE=$(curl \ -w "\nHTTP_STATUS:%{http_code}\n" \ -X POST \ -H "Authorization: Access ${AGENTA_AUTH_KEY}" \ - "http://api:8000/admin/billing/usage/flush" 2>&1) || CURL_EXIT=$? + "http://api:8000/admin/spans/flush" 2>&1) || CURL_EXIT=$? if [ -n "${CURL_EXIT:-}" ]; then echo "❌ CURL failed with exit code: ${CURL_EXIT}" diff --git a/api/ee/src/dbs/postgres/events/__init__.py b/api/ee/src/dbs/postgres/events/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/api/ee/src/dbs/postgres/events/dao.py b/api/ee/src/dbs/postgres/events/dao.py new file mode 100644 index 0000000000..f2437a0357 --- /dev/null +++ b/api/ee/src/dbs/postgres/events/dao.py @@ -0,0 +1,142 @@ +"""EE events DAO (retention). + +Walks ``projects ⋈ subscriptions`` to find projects on a given plan, then +deletes events older than a cutoff from the ``events`` table. Lives in EE +because the project-to-plan join goes through the EE ``SubscriptionDBE`` +table — same reason ``ee.src.dbs.postgres.tracing.dao.TracingDAO`` is +EE-side. + +The OSS counterpart (``oss.src.dbs.postgres.events.dao.EventsDAO``) owns +ingest/query and never imports EE types. +""" + +from datetime import datetime +from typing import List +from uuid import UUID + +from sqlalchemy import bindparam, delete, func, literal, select, tuple_ +from sqlalchemy.dialects.postgresql import ARRAY, UUID as PG_UUID +from sqlalchemy.sql import any_ + +from oss.src.utils.logging import get_module_logger + +from oss.src.models.db_models import ProjectDB + +from oss.src.dbs.postgres.shared.engine import engine +from oss.src.dbs.postgres.events.dbes import EventDBE + +from ee.src.dbs.postgres.subscriptions.dbes import SubscriptionDBE + + +log = get_module_logger(__name__) + + +class EventsDAO: + """EE events DAO (retention). + + Same-name OSS class exists at ``oss.src.dbs.postgres.events.dao.EventsDAO`` + for ingest/query — both are imported by their full path so they never + collide. Matches the EE/OSS tracing pattern. + """ + + async def fetch_projects_with_plan( + self, + *, + plan: str, + project_id: UUID | None, + max_projects: int, + ) -> List[UUID]: + """Page through projects whose org subscribes to the given plan.""" + async with engine.core_session() as session: + stmt = ( + select(ProjectDB.id) + .select_from( + ProjectDB.__table__.join( + SubscriptionDBE.__table__, + SubscriptionDBE.organization_id == ProjectDB.organization_id, + ) + ) + .where(SubscriptionDBE.plan == plan) + ) + + if project_id: + stmt = stmt.where(ProjectDB.id > project_id) + + stmt = stmt.order_by(ProjectDB.id).limit(max_projects) + + result = await session.execute(stmt) + rows = result.fetchall() + + return [row[0] for row in rows] + + async def delete_events_before_cutoff( + self, + *, + cutoff: datetime, + project_ids: List[UUID], + max_events: int, + ) -> int: + """Delete up to ``max_events`` events with ``created_at < cutoff`` in the + given projects. Returns the number of rows deleted. + + Note: ``events`` are independent rows (not joined to a parent like + ``spans`` → ``traces``), so the query is a single bounded delete rather + than a parent-first selection. The + ``ix_events_project_id_request_id_created_at`` index covers + ``project_id`` + ``created_at`` access. + """ + if not project_ids: + return 0 + + async with engine.tracing_session() as session: + project_ids_param = bindparam( + "project_ids", + value=project_ids, + type_=ARRAY(PG_UUID(as_uuid=True)), + ) + + expired = ( + select( + EventDBE.project_id.label("project_id"), + EventDBE.request_id.label("request_id"), + EventDBE.event_id.label("event_id"), + ) + .where( + EventDBE.project_id == any_(project_ids_param), + EventDBE.created_at < bindparam("cutoff", value=cutoff), + ) + .order_by(EventDBE.created_at) + .limit(bindparam("max_events", value=max_events)) + .cte("expired_events") + ) + + deleted = ( + delete(EventDBE) + .where( + tuple_( + EventDBE.project_id, EventDBE.request_id, EventDBE.event_id + ).in_( + select( + expired.c.project_id, + expired.c.request_id, + expired.c.event_id, + ) + ) + ) + .returning(literal(1).label("deleted")) + .cte("deleted") + ) + + stmt = select( + select(func.count()) + .select_from(deleted) + .scalar_subquery() + .label("events_deleted"), + ) + + result = await session.execute(stmt) + row = result.fetchone() + + await session.commit() + + return int(row[0]) if row and row[0] is not None else 0 diff --git a/api/ee/src/dbs/postgres/subscriptions/mappings.py b/api/ee/src/dbs/postgres/subscriptions/mappings.py index b8d0b4e8b5..f64998d16e 100644 --- a/api/ee/src/dbs/postgres/subscriptions/mappings.py +++ b/api/ee/src/dbs/postgres/subscriptions/mappings.py @@ -1,15 +1,13 @@ from ee.src.core.subscriptions.types import SubscriptionDTO from ee.src.dbs.postgres.subscriptions.dbes import SubscriptionDBE -from ee.src.core.subscriptions.types import Plan - def map_dbe_to_dto(subscription_dbe: SubscriptionDBE) -> SubscriptionDTO: return SubscriptionDTO( organization_id=subscription_dbe.organization_id, customer_id=subscription_dbe.customer_id, subscription_id=subscription_dbe.subscription_id, - plan=Plan(subscription_dbe.plan), + plan=subscription_dbe.plan, active=subscription_dbe.active, anchor=subscription_dbe.anchor, ) @@ -20,7 +18,7 @@ def map_dto_to_dbe(subscription_dto: SubscriptionDTO) -> SubscriptionDBE: organization_id=subscription_dto.organization_id, customer_id=subscription_dto.customer_id, subscription_id=subscription_dto.subscription_id, - plan=subscription_dto.plan.value, + plan=subscription_dto.plan, active=subscription_dto.active or False, anchor=subscription_dto.anchor, ) diff --git a/api/ee/src/main.py b/api/ee/src/main.py index ebe123f276..bab677a227 100644 --- a/api/ee/src/main.py +++ b/api/ee/src/main.py @@ -12,12 +12,16 @@ from ee.src.dbs.postgres.meters.dao import MetersDAO from ee.src.dbs.postgres.tracing.dao import TracingDAO from ee.src.dbs.postgres.subscriptions.dao import SubscriptionsDAO +from ee.src.dbs.postgres.events.dao import EventsDAO from ee.src.core.meters.service import MetersService from ee.src.core.tracing.service import TracingService from ee.src.core.subscriptions.service import SubscriptionsService +from ee.src.core.events.service import EventsService from ee.src.apis.fastapi.billing.router import BillingRouter +from ee.src.apis.fastapi.spans.router import SpansRouter +from ee.src.apis.fastapi.events.router import EventsRouter from ee.src.apis.fastapi.organizations.router import ( router as organization_router, ) @@ -30,6 +34,8 @@ subscriptions_dao = SubscriptionsDAO() +events_dao = EventsDAO() + # CORE ------------------------------------------------------------------------- meters_service = MetersService( @@ -40,6 +46,10 @@ tracing_dao=tracing_dao, ) +events_service = EventsService( + events_dao=events_dao, +) + subscription_service = SubscriptionsService( subscriptions_dao=subscriptions_dao, meters_service=meters_service, @@ -50,9 +60,16 @@ billing_router = BillingRouter( subscription_service=subscription_service, meters_service=meters_service, +) + +spans_router = SpansRouter( tracing_service=tracing_service, ) +events_router = EventsRouter( + events_service=events_service, +) + log = get_module_logger(__name__) @@ -73,6 +90,20 @@ def extend_main(app: FastAPI): include_in_schema=False, ) + app.include_router( + router=spans_router.admin_router, + prefix="/admin/spans", + tags=["Admin"], + include_in_schema=False, + ) + + app.include_router( + router=events_router.admin_router, + prefix="/admin/events", + tags=["Admin"], + include_in_schema=False, + ) + # ROUTES (more) ------------------------------------------------------------ app.include_router( diff --git a/api/ee/src/models/api/api_models.py b/api/ee/src/models/api/api_models.py index 57f01ae98a..6548de81ec 100644 --- a/api/ee/src/models/api/api_models.py +++ b/api/ee/src/models/api/api_models.py @@ -12,7 +12,6 @@ EnvironmentRevision, EnvironmentOutputExtended, ) -from ee.src.models.shared_models import WorkspaceRole class TimestampModel(BaseModel): @@ -22,7 +21,10 @@ class TimestampModel(BaseModel): class InviteRequest(BaseModel): email: str - roles: List[WorkspaceRole] + # Role slugs are dynamic (env-overridable via AGENTA_ACCESS_ROLES); the + # workspace-router validates against the effective workspace catalog + # before assignment. + roles: List[str] class ReseendInviteRequest(BaseModel): diff --git a/api/ee/src/models/api/workspace_models.py b/api/ee/src/models/api/workspace_models.py index 0ff3c877f0..f8f9ebacde 100644 --- a/api/ee/src/models/api/workspace_models.py +++ b/api/ee/src/models/api/workspace_models.py @@ -4,11 +4,14 @@ from pydantic import BaseModel from ee.src.models.api.api_models import TimestampModel -from ee.src.models.shared_models import WorkspaceRole, Permission +from ee.src.models.shared_models import Permission class WorkspacePermission(BaseModel): - role_name: WorkspaceRole + # Role slugs are dynamic (env-overridable via AGENTA_ACCESS_ROLES); + # validation against the effective scope catalog happens at the API + # boundary via `ee.src.core.entitlements.controls.get_role`. + role_name: str role_description: Optional[str] = None permissions: Optional[List[Permission]] = None diff --git a/api/ee/src/models/db_models.py b/api/ee/src/models/db_models.py index bc78201a61..8abf98f6cd 100644 --- a/api/ee/src/models/db_models.py +++ b/api/ee/src/models/db_models.py @@ -31,7 +31,7 @@ class OrganizationMemberDB(Base): role = Column( String, nullable=False, - server_default="member", + server_default="viewer", ) user = relationship( diff --git a/api/ee/src/routers/workspace_router.py b/api/ee/src/routers/workspace_router.py index 6f60b76df4..5ed85d6cf7 100644 --- a/api/ee/src/routers/workspace_router.py +++ b/api/ee/src/routers/workspace_router.py @@ -10,9 +10,9 @@ from ee.src.models.api.workspace_models import ( UserRole, - WorkspaceRole, ) from ee.src.models.shared_models import Permission +from ee.src.core.entitlements.controls import get_role router = APIRouter() @@ -88,7 +88,9 @@ async def assign_role_to_user( }, ) - if not WorkspaceRole.is_valid_role(payload.role): # type: ignore + # Validate against the effective workspace catalog + # (env-overridable via AGENTA_ACCESS_ROLES). + if not payload.role or get_role("workspace", payload.role) is None: return JSONResponse( status_code=400, content={"detail": "Workspace role is invalid."} ) diff --git a/api/ee/src/services/admin_manager.py b/api/ee/src/services/admin_manager.py index b345f2471e..11adbdc711 100644 --- a/api/ee/src/services/admin_manager.py +++ b/api/ee/src/services/admin_manager.py @@ -88,7 +88,7 @@ class ProjectRequest(BaseModel): OrganizationRole = Literal[ "owner", - "member", + "viewer", ] diff --git a/api/ee/src/services/converters.py b/api/ee/src/services/converters.py index 9c4b129062..c62baefdca 100644 --- a/api/ee/src/services/converters.py +++ b/api/ee/src/services/converters.py @@ -1,14 +1,22 @@ -from typing import List, Dict, Any +from typing import List, Any from datetime import datetime, timezone from oss.src.services import db_manager from ee.src.services import db_manager_ee from ee.src.core.workspaces.types import WorkspaceResponse +from ee.src.core.entitlements.controls import ( + get_role_description, + get_role_permissions, +) from ee.src.models.shared_models import Permission -from ee.src.models.shared_models import WorkspaceRole from oss.src.models.db_models import WorkspaceDB +def _role_slug(role: Any) -> str: + """Normalize an enum or string role to its slug form.""" + return role.value if hasattr(role, "value") else str(role) + + async def get_workspace_in_format( workspace: WorkspaceDB, include_members: bool = True, @@ -70,8 +78,8 @@ async def get_workspace_in_format( "roles": [ { "role_name": invitation.role, - "role_description": WorkspaceRole.get_description( - invitation.role + "role_description": get_role_description( + "workspace", _role_slug(invitation.role) ), } ], @@ -92,10 +100,12 @@ async def get_workspace_in_format( [ { "role_name": member_role, - "role_description": WorkspaceRole.get_description( - member_role + "role_description": get_role_description( + "project", _role_slug(member_role) + ), + "permissions": get_role_permissions( + "project", _role_slug(member_role) ), - "permissions": Permission.default_permissions(member_role), } ] if member_role @@ -128,14 +138,9 @@ async def get_all_workspace_permissions() -> List[Permission]: return workspace_permissions -def get_all_workspace_permissions_by_role(role_name: str) -> Dict[str, List[Any]]: - """ - Retrieve all workspace permissions. +def get_all_workspace_permissions_by_role(role_name: str) -> List[str]: + """Retrieve all permissions assigned to a workspace role. - Returns: - List[Permission]: A list of all workspace permissions in the DB. + Resolved via access-controls (env-overridable via AGENTA_ACCESS_ROLES). """ - workspace_permissions = Permission.default_permissions( - getattr(WorkspaceRole, role_name.upper()) - ) - return workspace_permissions + return get_role_permissions("workspace", role_name) diff --git a/api/ee/src/services/db_manager_ee.py b/api/ee/src/services/db_manager_ee.py index 8e0854676c..e0991d1206 100644 --- a/api/ee/src/services/db_manager_ee.py +++ b/api/ee/src/services/db_manager_ee.py @@ -28,6 +28,7 @@ OrganizationUpdate, ) from ee.src.models.shared_models import WorkspaceRole +from ee.src.core.entitlements.controls import get_roles from oss.src.models.db_models import ( OrganizationDB, @@ -1664,21 +1665,19 @@ async def create_org_workspace_invitation( return invitation -async def get_all_workspace_roles() -> List[WorkspaceRole]: - """ - Retrieve all workspace roles. +async def get_all_workspace_roles() -> List[dict]: + """Return the effective workspace role catalog. - Returns: - List[WorkspaceRole]: A list of all workspace roles in the DB. + Resolved via access-controls (env-overridable via `AGENTA_ACCESS_ROLES`). + Each entry is a dict with `role`, `description`, and `permissions`. """ - workspace_roles = list(WorkspaceRole) - return workspace_roles + return get_roles("workspace") async def add_user_to_organization( organization_id: str, user_id: str, - role: str = "member", + role: str = "viewer", # is_demo: bool = False, ) -> None: async with engine.core_session() as session: diff --git a/api/ee/src/services/throttling_service.py b/api/ee/src/services/throttling_service.py index 6f75db1e2d..c4881a0ea5 100644 --- a/api/ee/src/services/throttling_service.py +++ b/api/ee/src/services/throttling_service.py @@ -9,7 +9,6 @@ from oss.src.utils.throttling import Algorithm, check_throttles from ee.src.core.entitlements.types import ( - ENTITLEMENTS, ENDPOINTS, Category, Method, @@ -17,9 +16,10 @@ Throttle, Tracker, ) +from ee.src.core.entitlements.controls import get_plan_entitlements, get_plans +from ee.src.core.subscriptions.settings import get_free_plan from ee.src.core.meters.service import MetersService from ee.src.core.subscriptions.service import SubscriptionsService -from ee.src.core.subscriptions.types import Plan from ee.src.dbs.postgres.meters.dao import MetersDAO from ee.src.dbs.postgres.subscriptions.dao import SubscriptionsDAO @@ -128,7 +128,7 @@ def _throttle_suffix( return "all" -async def _get_plan(organization_id: str) -> Optional[Plan]: +async def _get_plan(organization_id: str) -> Optional[str]: cache_key = { "organization_id": organization_id, } @@ -147,7 +147,7 @@ async def _get_plan(organization_id: str) -> Optional[Plan]: return None subscription_data = { - "plan": subscription.plan.value, + "plan": subscription.plan, } await set_cache( @@ -156,18 +156,16 @@ async def _get_plan(organization_id: str) -> Optional[Plan]: value=subscription_data, ) - plan_value = subscription_data.get("plan") if subscription_data else None - if not plan_value: + plan = subscription_data.get("plan") if subscription_data else None + if not plan: return None - try: - return Plan(plan_value) - - except ValueError: - log.warning("[throttle] Unknown plan", plan=plan_value) - + if plan not in get_plans(): + log.warning("[throttle] Unknown plan", plan=plan) return None + return plan + async def throttling_middleware(request: Request, call_next): if hasattr(request.state, "admin") and request.state.admin: @@ -184,15 +182,38 @@ async def throttling_middleware(request: Request, call_next): plan = await _get_plan(str(organization_id)) - if not plan or plan not in ENTITLEMENTS: + entitlements = get_plan_entitlements(plan) if plan else None + + # Unknown plan or plan without enforced throttles: fall back to the free + # plan's throttle bucket so misconfigured / orphaned subscriptions still + # get rate-limited instead of bypassing throttling entirely. + if not plan or entitlements is None or not (entitlements.get(Tracker.THROTTLES)): + fallback_plan = get_free_plan() + fallback_entitlements = ( + get_plan_entitlements(fallback_plan) if fallback_plan else None + ) + fallback_throttles = (fallback_entitlements or {}).get(Tracker.THROTTLES) or [] + + if not fallback_throttles: + log.warning( + "[throttling] No throttles available for plan and free-plan " + "fallback also has none", + org=organization_id, + plan=plan, + fallback=fallback_plan, + ) + return await call_next(request) + log.warning( - "[throttling] Missing entitlements for plan", + "[throttling] Falling back to free-plan throttles", org=organization_id, plan=plan, + fallback=fallback_plan, ) - return await call_next(request) + plan = fallback_plan + entitlements = fallback_entitlements or {} - throttles: list[Throttle] = ENTITLEMENTS[plan].get(Tracker.THROTTLES) or [] + throttles: list[Throttle] = entitlements.get(Tracker.THROTTLES) or [] if not throttles: return await call_next(request) @@ -222,7 +243,7 @@ async def throttling_middleware(request: Request, call_next): key = { "organization": str(organization_id), - "plan": plan.value, + "plan": plan, "policy": _throttle_suffix(throttle, matched_categories=matched_categories), } diff --git a/api/ee/src/services/workspace_manager.py b/api/ee/src/services/workspace_manager.py index f17063a166..a9cc4d9c07 100644 --- a/api/ee/src/services/workspace_manager.py +++ b/api/ee/src/services/workspace_manager.py @@ -100,16 +100,9 @@ async def update_workspace( ) -async def get_all_workspace_roles() -> List[WorkspaceRole]: - """ - Retrieve all workspace roles. - - Returns: - List[WorkspaceRole]: A list of all workspace roles in the DB. - """ - - workspace_roles_from_db = await db_manager_ee.get_all_workspace_roles() - return workspace_roles_from_db +async def get_all_workspace_roles() -> List[dict]: + """Return the effective workspace role catalog (env-overridable).""" + return await db_manager_ee.get_all_workspace_roles() async def get_all_workspace_permissions() -> List[Permission]: diff --git a/api/ee/src/utils/entitlements.py b/api/ee/src/utils/entitlements.py index 0683ad31d9..9a2a731efa 100644 --- a/api/ee/src/utils/entitlements.py +++ b/api/ee/src/utils/entitlements.py @@ -12,9 +12,8 @@ Flag, Counter, Gauge, - Plan, - ENTITLEMENTS, ) +from ee.src.core.entitlements.controls import get_plan_entitlements from ee.src.core.meters.service import MetersService from ee.src.core.meters.types import MeterDTO from ee.src.dbs.postgres.meters.dao import MetersDAO @@ -121,7 +120,7 @@ async def check_entitlements( ) subscription_data = { - "plan": subscription.plan.value, + "plan": subscription.plan, "anchor": subscription.anchor, } @@ -131,10 +130,11 @@ async def check_entitlements( value=subscription_data, ) - plan = Plan(subscription_data.get("plan")) + plan = subscription_data.get("plan") anchor = subscription_data.get("anchor") - if plan not in ENTITLEMENTS: + entitlements = get_plan_entitlements(plan) + if not entitlements: raise EntitlementsException(f"Missing plan [{plan}] in entitlements") # -------------------------------------------------------------- # @@ -142,10 +142,11 @@ async def check_entitlements( # -------------------------------------------------------------- # if flag: - if flag not in ENTITLEMENTS[plan][Tracker.FLAGS]: + flags = entitlements.get(Tracker.FLAGS) or {} + if flag not in flags: raise EntitlementsException(f"Invalid flag: {flag} for plan [{plan}]") - check = ENTITLEMENTS[plan][Tracker.FLAGS][flag] + check = flags[flag] if flag.name != "RBAC": # TODO: remove this line @@ -162,16 +163,18 @@ async def check_entitlements( quota = None if counter: - if counter not in ENTITLEMENTS[plan][Tracker.COUNTERS]: + counters = entitlements.get(Tracker.COUNTERS) or {} + if counter not in counters: raise EntitlementsException(f"Invalid counter: {counter} for plan [{plan}]") - quota = ENTITLEMENTS[plan][Tracker.COUNTERS][counter] + quota = counters[counter] if gauge: - if gauge not in ENTITLEMENTS[plan][Tracker.GAUGES]: + gauges = entitlements.get(Tracker.GAUGES) or {} + if gauge not in gauges: raise EntitlementsException(f"Invalid gauge: {gauge} for plan [{plan}]") - quota = ENTITLEMENTS[plan][Tracker.GAUGES][gauge] + quota = gauges[gauge] if not quota: raise EntitlementsException(f"No quota found for key [{key}] in plan [{plan}]") diff --git a/api/ee/src/utils/permissions.py b/api/ee/src/utils/permissions.py index 6012a30d62..993920e845 100644 --- a/api/ee/src/utils/permissions.py +++ b/api/ee/src/utils/permissions.py @@ -14,6 +14,7 @@ Permission, WorkspaceRole, ) +from ee.src.core.entitlements.controls import get_role, get_role_permissions from oss.src.services import db_manager from ee.src.services import db_manager_ee @@ -82,12 +83,18 @@ def _project_has_permission( permission: Permission, members: Sequence[Any], ) -> bool: - """True if the user's role implies the given permission.""" + """True if the user's role implies the given permission. + + Role permissions are resolved via access-controls (env-overridable via + AGENTA_ACCESS_ROLES); not the closed `Permission.default_permissions` table. + """ role = _get_project_member_role(user_id, members) if role is None: return False - # Permission.default_permissions was used in the old model methods - return permission in Permission.default_permissions(role) + role_slug = role.value if hasattr(role, "value") else role + role_permissions = get_role_permissions("project", role_slug) + # "*" is the wildcard owner permission — implies everything. + return "*" in role_permissions or permission.value in role_permissions async def _get_workspace_member_ids(workspace: WorkspaceDB) -> List[str]: @@ -382,7 +389,8 @@ async def check_project_has_role_or_permission( return True if role is not None: - if role not in list(WorkspaceRole): + role_slug = role.value if hasattr(role, "value") else role + if get_role("project", role_slug) is None: raise Exception("Invalid role specified") return _project_has_role(user_id, role, project_members) diff --git a/api/ee/tests/pytest/unit/test_access_controls.py b/api/ee/tests/pytest/unit/test_access_controls.py new file mode 100644 index 0000000000..51f84f3ce0 --- /dev/null +++ b/api/ee/tests/pytest/unit/test_access_controls.py @@ -0,0 +1,548 @@ +"""Unit tests for the access-controls parsers in +``ee.src.core.entitlements.controls``. + +These exercise the pure parser functions (`_parse_plans_override`, +`_parse_roles_override`) so we don't have to manipulate process env vars at +test time — the parsers take already-decoded payloads. + +The module-level accessors (`get_plans`, `get_roles`, etc.) are also covered +in the no-env-override case, which exercises the code-default builders. +""" + +import pytest + +from ee.src.core.entitlements import controls +from ee.src.core.entitlements.types import DefaultPlan, DefaultRole, Tracker +from ee.src.models.shared_models import Permission, WorkspaceRole + + +# --------------------------------------------------------------------------- +# Defaults (no env override) +# --------------------------------------------------------------------------- + + +class TestDefaults: + def test_get_plans_returns_all_default_plans(self): + plans = controls.get_plans() + assert set(plans.keys()) == {p.value for p in DefaultPlan} + + def test_get_plan_entitlements_returns_none_for_unknown_slug(self): + assert controls.get_plan_entitlements("nope") is None + + def test_get_plan_entitlements_returns_none_for_empty_slug(self): + assert controls.get_plan_entitlements(None) is None + assert controls.get_plan_entitlements("") is None + + def test_get_roles_returns_workspace_role_set(self): + ws = controls.get_roles("workspace") + slugs = {r["role"] for r in ws} + # Workspace exposes the code-default WorkspaceRole enum set on top of the + # owner/viewer minima. + assert slugs == {r.value for r in WorkspaceRole} + + def test_get_roles_returns_empty_for_unknown_scope(self): + assert controls.get_roles("garbage") == [] + + def test_minima_present_in_every_scope(self): + # Every scope must always expose `owner` and `viewer`. + for scope in ("organization", "workspace", "project"): + slugs = {r["role"] for r in controls.get_roles(scope)} + assert DefaultRole.OWNER.value in slugs + assert DefaultRole.VIEWER.value in slugs + + def test_organization_defaults_to_minima_only(self): + # Organization scope has no permission concept today; it stays at the + # minima while workspace and project expose the code-default WorkspaceRole set. + assert {r["role"] for r in controls.get_roles("organization")} == { + DefaultRole.OWNER.value, + DefaultRole.VIEWER.value, + } + + def test_project_default_mirrors_workspace_role_set(self): + # project_members.role historically stores workspace-role slugs + # (admin/developer/editor/annotator), so the project scope must + # surface the same permission map for non-overridden deployments. + assert {r["role"] for r in controls.get_roles("project")} == { + r.value for r in WorkspaceRole + } + + def test_owner_role_is_wildcard(self): + assert controls.get_role_permissions("project", "owner") == ["*"] + assert controls.get_role_permissions("organization", "owner") == ["*"] + assert controls.get_role_permissions("workspace", "owner") == ["*"] + + def test_viewer_in_workspace_and_project_is_read_only(self): + # Viewer permissions in workspace/project come from the code-default + # `WorkspaceRole.VIEWER` set — every entry is a real Permission. + valid = {p.value for p in Permission} + for scope in ("workspace", "project"): + perms = controls.get_role_permissions(scope, "viewer") + assert perms, f"{scope} viewer must have non-empty permissions" + assert "*" not in perms + assert set(perms).issubset(valid) + + def test_viewer_in_organization_has_no_permissions(self): + # Org-scope viewer is a membership marker — no permissions today. + assert controls.get_role_permissions("organization", "viewer") == [] + + def test_get_role_description_falls_back_to_none_for_unknown_role(self): + assert controls.get_role_description("workspace", "ghost") is None + + def test_controls_hash_is_stable(self): + assert controls.get_controls_hash() == controls.get_controls_hash() + + +# --------------------------------------------------------------------------- +# Plan override parser +# --------------------------------------------------------------------------- + + +class TestParsePlansOverride: + def test_minimal_valid_override_with_flags(self): + plans, descriptions = controls._parse_plans_override( + { + "plan_a": { + "description": "Test plan", + "flags": { + "hooks": True, + "rbac": False, + "access": False, + "domains": False, + "sso": False, + }, + } + } + ) + assert list(plans.keys()) == ["plan_a"] + assert plans["plan_a"][Tracker.FLAGS]["hooks"] is True + assert descriptions["plan_a"] == "Test plan" + + def test_counters_and_gauges_validated(self): + plans, _ = controls._parse_plans_override( + { + "p": { + "counters": {"traces": {"limit": 100, "monthly": True}}, + "gauges": {"users": {"limit": 5, "strict": True}}, + } + } + ) + assert plans["p"][Tracker.COUNTERS]["traces"].limit == 100 + assert plans["p"][Tracker.GAUGES]["users"].strict is True + + def test_empty_dict_rejected(self): + with pytest.raises(ValueError, match="non-empty"): + controls._parse_plans_override({}) + + def test_non_dict_rejected(self): + with pytest.raises(ValueError, match="non-empty JSON object"): + controls._parse_plans_override([]) + + def test_plan_with_no_entitlements_allowed(self): + # Display-only plans (e.g. custom/self-hosted) may carry no + # entitlement trackers. The runtime returns an empty entitlement + # map for those plans rather than treating them as unknown. + plans, _ = controls._parse_plans_override({"empty_plan": {}}) + assert plans == {"empty_plan": {}} + + def test_plan_with_only_description_allowed(self): + plans, descriptions = controls._parse_plans_override( + {"p": {"description": "display only"}} + ) + assert plans == {"p": {}} + assert descriptions == {"p": "display only"} + + def test_unknown_flag_key_rejected(self): + with pytest.raises(ValueError, match="Unknown flag"): + controls._parse_plans_override({"p": {"flags": {"bogus": True}}}) + + def test_unknown_counter_key_rejected(self): + with pytest.raises(ValueError, match="Unknown counter"): + controls._parse_plans_override({"p": {"counters": {"bogus": {"limit": 1}}}}) + + def test_unknown_gauge_key_rejected(self): + with pytest.raises(ValueError, match="Unknown gauge"): + controls._parse_plans_override({"p": {"gauges": {"bogus": {"limit": 1}}}}) + + def test_extra_field_in_plan_rejected(self): + with pytest.raises(ValueError, match="Invalid plan override"): + controls._parse_plans_override({"p": {"surprise": "yes"}}) + + +# --------------------------------------------------------------------------- +# Role override parser +# --------------------------------------------------------------------------- + + +def _custom_role(role: str, permissions: list[str]) -> dict: + return {"role": role, "permissions": permissions} + + +class TestParseRolesOverride: + """Override semantics: minima (`owner`, `viewer`) are platform-controlled + and synthesized for every scope. Env can only add roles to a scope, never + redefine or remove the minima. + """ + + def test_override_only_specified_scope_keeps_other_defaults(self): + # Overriding `project` only; workspace stays at the full code default. + result = controls._parse_roles_override( + {"project": [_custom_role("reviewer", ["read_system"])]} + ) + proj_slugs = [r["role"] for r in result["project"]] + ws_slugs = [r["role"] for r in result["workspace"]] + org_slugs = [r["role"] for r in result["organization"]] + + # Project: minima + override (env overrides REPLACE default extras in + # the overridden scope). + assert proj_slugs == ["owner", "viewer", "reviewer"] + # Workspace: untouched code default (minima + default WorkspaceRole extras). + assert ws_slugs[:2] == ["owner", "viewer"] + assert "admin" in ws_slugs + # Organization: untouched (minima-only by default). + assert org_slugs == ["owner", "viewer"] + + def test_empty_dict_rejected(self): + with pytest.raises(ValueError, match="non-empty"): + controls._parse_roles_override({}) + + def test_unknown_scope_rejected(self): + with pytest.raises(ValueError, match="Unknown role scope"): + controls._parse_roles_override( + {"galaxy": [_custom_role("ranger", ["read_system"])]} + ) + + def test_empty_scope_list_rejected(self): + with pytest.raises(ValueError, match="non-empty list of roles"): + controls._parse_roles_override({"project": []}) + + def test_owner_reserved_cannot_be_redefined(self): + with pytest.raises(ValueError, match="cannot redefine reserved role 'owner'"): + controls._parse_roles_override({"project": [_custom_role("owner", ["*"])]}) + + def test_viewer_reserved_cannot_be_redefined(self): + with pytest.raises(ValueError, match="cannot redefine reserved role 'viewer'"): + controls._parse_roles_override( + {"project": [_custom_role("viewer", ["read_system"])]} + ) + + def test_duplicate_custom_role_slug_rejected(self): + with pytest.raises(ValueError, match="Duplicate role slug"): + controls._parse_roles_override( + { + "project": [ + _custom_role("reviewer", ["read_system"]), + _custom_role("reviewer", ["read_system"]), + ] + } + ) + + def test_empty_role_slug_rejected(self): + with pytest.raises(ValueError, match="Empty role slug|Invalid role override"): + controls._parse_roles_override( + {"project": [{"role": "", "permissions": []}]} + ) + + def test_unknown_permission_rejected(self): + with pytest.raises(ValueError, match="Unknown permission"): + controls._parse_roles_override( + {"project": [_custom_role("custom", ["totally_made_up_perm"])]} + ) + + def test_known_permission_accepted(self): + valid_perm = next(iter(Permission)).value + result = controls._parse_roles_override( + {"project": [_custom_role("custom", [valid_perm])]} + ) + # Last entry is the custom role; first two are the minima. + assert result["project"][-1]["role"] == "custom" + assert result["project"][-1]["permissions"] == [valid_perm] + + def test_minima_always_present_after_override(self): + result = controls._parse_roles_override( + {"organization": [_custom_role("auditor", ["read_system"])]} + ) + slugs = [r["role"] for r in result["organization"]] + # Minima are always re-applied at the front of each scope. + assert slugs[0] == "owner" + assert slugs[1] == "viewer" + assert "auditor" in slugs + + +# --------------------------------------------------------------------------- +# Default-plan overlay parser + apply +# --------------------------------------------------------------------------- + + +from ee.src.core.entitlements.types import ( # noqa: E402 + Category, + Counter, + Flag, + Gauge, + Quota, + Throttle, +) + + +class TestDefaultPlanOverlayParse: + def test_empty_payload_rejected(self): + with pytest.raises(ValueError, match="non-empty"): + controls._parse_default_plan_overlay({}) + + def test_non_dict_rejected(self): + with pytest.raises(ValueError, match="non-empty JSON object"): + controls._parse_default_plan_overlay([]) + + def test_unknown_flag_rejected(self): + with pytest.raises(ValueError, match="Unknown flag"): + controls._parse_default_plan_overlay({"flags": {"bogus": True}}) + + def test_unknown_counter_rejected(self): + with pytest.raises(ValueError, match="Unknown counter"): + controls._parse_default_plan_overlay({"counters": {"bogus": {"limit": 1}}}) + + def test_unknown_throttle_category_rejected(self): + with pytest.raises(ValueError, match="not a valid throttle category"): + controls._parse_default_plan_overlay( + {"throttles": {"galaxy": {"bucket": {"rate": 1}}}} + ) + + def test_extra_field_rejected(self): + with pytest.raises( + ValueError, match="Invalid AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY" + ): + controls._parse_default_plan_overlay({"surprise": "x"}) + + +class TestDefaultPlanOverlayApply: + def _base_plan(self) -> dict: + return { + Tracker.FLAGS: {Flag.HOOKS: False}, + Tracker.COUNTERS: { + Counter.TRACES: Quota(free=5000, monthly=True, retention=44640) + }, + Tracker.GAUGES: {Gauge.USERS: Quota(limit=2, free=2, strict=True)}, + Tracker.THROTTLES: [ + Throttle( + categories=[Category.STANDARD], + mode="include", + bucket={"capacity": 480, "rate": 480}, + ), + Throttle( + categories=[Category.CORE_FAST, Category.TRACING_FAST], + mode="include", + bucket={"capacity": 1200, "rate": 1200}, + ), + ], + } + + def test_quota_field_merge_preserves_other_fields(self): + plans = {"the_plan": self._base_plan()} + descriptions: dict = {} + overlay = controls._parse_default_plan_overlay( + {"counters": {"traces": {"retention": 525600}}} + ) + plans, _ = controls._apply_default_plan_overlay( + plans, descriptions, overlay, "the_plan" + ) + traces: Quota = plans["the_plan"][Tracker.COUNTERS][Counter.TRACES] + # Only retention changed; the rest is untouched. + assert traces.retention == 525600 + assert traces.free == 5000 + assert traces.monthly is True + + def test_throttle_category_patch_preserves_other_throttles(self): + plans = {"the_plan": self._base_plan()} + overlay = controls._parse_default_plan_overlay( + {"throttles": {"standard": {"bucket": {"rate": 7200}}}} + ) + plans, _ = controls._apply_default_plan_overlay(plans, {}, overlay, "the_plan") + throttles = plans["the_plan"][Tracker.THROTTLES] + # Standard throttle: rate patched, capacity preserved. + standard = next(t for t in throttles if t.categories == [Category.STANDARD]) + assert standard.bucket.rate == 7200 + assert standard.bucket.capacity == 480 + # Multi-category throttle: untouched. + multi = next(t for t in throttles if t.categories and len(t.categories) > 1) + assert multi.bucket.rate == 1200 + + def test_overlay_targeting_unknown_plan_fails(self): + plans = {"the_plan": self._base_plan()} + overlay = controls._parse_default_plan_overlay({"flags": {"hooks": True}}) + with pytest.raises(ValueError, match="not in the effective plan set"): + controls._apply_default_plan_overlay(plans, {}, overlay, "ghost_plan") + + def test_overlay_targeting_throttle_with_no_match_fails(self): + plans = {"the_plan": self._base_plan()} + overlay = controls._parse_default_plan_overlay( + {"throttles": {"ai_services": {"bucket": {"rate": 99}}}} + ) + with pytest.raises( + ValueError, match="no single-category throttle entry for 'ai_services'" + ): + controls._apply_default_plan_overlay(plans, {}, overlay, "the_plan") + + def test_description_replaces(self): + plans = {"the_plan": self._base_plan()} + overlay = controls._parse_default_plan_overlay( + {"description": "Self-hosted override"} + ) + _, descriptions = controls._apply_default_plan_overlay( + plans, {}, overlay, "the_plan" + ) + assert descriptions["the_plan"] == "Self-hosted override" + + def test_flag_patch_only_overwrites_named_keys(self): + base = self._base_plan() + base[Tracker.FLAGS] = {Flag.HOOKS: False, Flag.RBAC: True} + plans = {"the_plan": base} + overlay = controls._parse_default_plan_overlay({"flags": {"hooks": True}}) + plans, _ = controls._apply_default_plan_overlay(plans, {}, overlay, "the_plan") + flags = plans["the_plan"][Tracker.FLAGS] + assert flags[Flag.HOOKS] is True + assert flags[Flag.RBAC] is True # untouched + + +# --------------------------------------------------------------------------- +# Roles overlay parser + apply +# --------------------------------------------------------------------------- + + +class TestRolesOverlayParse: + def test_empty_payload_rejected(self): + with pytest.raises(ValueError, match="non-empty"): + controls._parse_roles_overlay({}) + + def test_non_dict_rejected(self): + with pytest.raises(ValueError, match="non-empty JSON object"): + controls._parse_roles_overlay([]) + + def test_non_project_scope_rejected(self): + with pytest.raises(ValueError, match="only supports the 'project' scope"): + controls._parse_roles_overlay( + {"workspace": {"editor": {"permissions": ["read_system"]}}} + ) + + def test_multiple_scopes_rejected_lists_offenders(self): + with pytest.raises(ValueError, match="organization"): + controls._parse_roles_overlay( + { + "project": {"editor": {"permissions": ["read_system"]}}, + "organization": {"foo": {"permissions": []}}, + } + ) + + def test_empty_project_block_rejected(self): + with pytest.raises(ValueError, match="must be a non-empty"): + controls._parse_roles_overlay({"project": {}}) + + def test_reserved_role_patch_rejected(self): + with pytest.raises(ValueError, match="cannot patch reserved role 'owner'"): + controls._parse_roles_overlay( + {"project": {"owner": {"permissions": ["read_system"]}}} + ) + + def test_reserved_viewer_patch_rejected(self): + with pytest.raises(ValueError, match="cannot patch reserved role 'viewer'"): + controls._parse_roles_overlay( + {"project": {"viewer": {"permissions": ["read_system"]}}} + ) + + def test_unknown_permission_rejected(self): + with pytest.raises(ValueError, match="Unknown permission"): + controls._parse_roles_overlay( + {"project": {"editor": {"permissions": ["bogus_perm"]}}} + ) + + def test_extra_field_rejected(self): + with pytest.raises(ValueError, match="Invalid AGENTA_ACCESS_ROLES_OVERLAY"): + controls._parse_roles_overlay({"project": {"editor": {"surprise": "yes"}}}) + + +class TestRolesOverlayApply: + def _base_roles(self) -> dict: + # Mirror the code-default catalog (minima + default extras for + # workspace and project; minima only for organization). + return controls._default_roles() + + def test_patch_existing_role_replaces_permissions_in_both_scopes(self): + roles = self._base_roles() + overlay = controls._parse_roles_overlay( + {"project": {"editor": {"permissions": ["read_system"]}}} + ) + result = controls._apply_roles_overlay(roles, overlay) + + for scope in ("workspace", "project"): + editor = next(r for r in result[scope] if r["role"] == "editor") + assert editor["permissions"] == ["read_system"] + + def test_patch_existing_role_preserves_description_when_not_set(self): + roles = self._base_roles() + original_description = next( + r for r in roles["project"] if r["role"] == "editor" + )["description"] + overlay = controls._parse_roles_overlay( + {"project": {"editor": {"permissions": ["read_system"]}}} + ) + result = controls._apply_roles_overlay(roles, overlay) + + for scope in ("workspace", "project"): + editor = next(r for r in result[scope] if r["role"] == "editor") + assert editor["description"] == original_description + + def test_patch_existing_role_preserves_permissions_when_not_set(self): + roles = self._base_roles() + original_perms = list( + next(r for r in roles["project"] if r["role"] == "editor")["permissions"] + ) + overlay = controls._parse_roles_overlay( + {"project": {"editor": {"description": "Custom description"}}} + ) + result = controls._apply_roles_overlay(roles, overlay) + + for scope in ("workspace", "project"): + editor = next(r for r in result[scope] if r["role"] == "editor") + assert editor["description"] == "Custom description" + assert editor["permissions"] == original_perms + + def test_new_role_added_to_both_scopes(self): + roles = self._base_roles() + overlay = controls._parse_roles_overlay( + { + "project": { + "auditor": { + "description": "Audit-only.", + "permissions": ["read_system"], + } + } + } + ) + result = controls._apply_roles_overlay(roles, overlay) + + for scope in ("workspace", "project"): + slugs = [r["role"] for r in result[scope]] + assert "auditor" in slugs + + def test_new_role_without_permissions_rejected(self): + roles = self._base_roles() + overlay = controls._parse_roles_overlay( + {"project": {"auditor": {"description": "Only description"}}} + ) + with pytest.raises(ValueError, match="new role requires 'permissions'"): + controls._apply_roles_overlay(roles, overlay) + + def test_organization_scope_untouched(self): + roles = self._base_roles() + original_org_slugs = [r["role"] for r in roles["organization"]] + overlay = controls._parse_roles_overlay( + { + "project": { + "auditor": { + "description": "Audit-only.", + "permissions": ["read_system"], + } + } + } + ) + result = controls._apply_roles_overlay(roles, overlay) + + assert [r["role"] for r in result["organization"]] == original_org_slugs diff --git a/api/ee/tests/pytest/unit/test_admin_retention_routers.py b/api/ee/tests/pytest/unit/test_admin_retention_routers.py new file mode 100644 index 0000000000..4d9be86db7 --- /dev/null +++ b/api/ee/tests/pytest/unit/test_admin_retention_routers.py @@ -0,0 +1,113 @@ +"""Unit tests for the admin retention routers (spans + events). + +Each router owns its own Redis lock namespace and its own service call. These +tests stub both so the routes don't talk to real infra. +""" + +from json import loads +from types import SimpleNamespace +from unittest.mock import AsyncMock + +import pytest + +from ee.src.apis.fastapi.events.router import EventsRouter +from ee.src.apis.fastapi.spans.router import SpansRouter + + +@pytest.mark.asyncio +async def test_spans_admin_flush_acquires_lock_and_calls_service(monkeypatch): + acquire_calls: list[dict] = [] + release_calls: list[dict] = [] + + async def fake_acquire_lock(**kwargs): + acquire_calls.append(kwargs) + return "lock-owner-spans" + + async def fake_release_lock(**kwargs): + release_calls.append(kwargs) + return True + + monkeypatch.setattr( + "ee.src.apis.fastapi.spans.router.acquire_lock", fake_acquire_lock + ) + monkeypatch.setattr( + "ee.src.apis.fastapi.spans.router.release_lock", fake_release_lock + ) + + tracing_service = SimpleNamespace(flush_spans=AsyncMock()) + router = SpansRouter(tracing_service=tracing_service) + + response = await router.flush() + + assert response.status_code == 200 + assert loads(response.body) == {"status": "success"} + tracing_service.flush_spans.assert_awaited_once() + assert acquire_calls[0]["namespace"] == "spans:flush" + assert release_calls[0]["namespace"] == "spans:flush" + + +@pytest.mark.asyncio +async def test_events_admin_flush_acquires_lock_and_calls_service(monkeypatch): + acquire_calls: list[dict] = [] + release_calls: list[dict] = [] + + async def fake_acquire_lock(**kwargs): + acquire_calls.append(kwargs) + return "lock-owner-events" + + async def fake_release_lock(**kwargs): + release_calls.append(kwargs) + return True + + monkeypatch.setattr( + "ee.src.apis.fastapi.events.router.acquire_lock", fake_acquire_lock + ) + monkeypatch.setattr( + "ee.src.apis.fastapi.events.router.release_lock", fake_release_lock + ) + + events_service = SimpleNamespace(flush_events=AsyncMock()) + router = EventsRouter(events_service=events_service) + + response = await router.flush() + + assert response.status_code == 200 + assert loads(response.body) == {"status": "success"} + events_service.flush_events.assert_awaited_once() + assert acquire_calls[0]["namespace"] == "events:flush" + assert release_calls[0]["namespace"] == "events:flush" + + +@pytest.mark.asyncio +async def test_events_admin_flush_skips_when_lock_busy(monkeypatch): + async def fake_acquire_lock(**kwargs): + return None # someone else holds the lock + + async def fake_release_lock(**kwargs): + return False + + monkeypatch.setattr( + "ee.src.apis.fastapi.events.router.acquire_lock", fake_acquire_lock + ) + monkeypatch.setattr( + "ee.src.apis.fastapi.events.router.release_lock", fake_release_lock + ) + + events_service = SimpleNamespace(flush_events=AsyncMock()) + router = EventsRouter(events_service=events_service) + + response = await router.flush() + + assert response.status_code == 200 + assert loads(response.body) == {"status": "skipped"} + events_service.flush_events.assert_not_called() + + +@pytest.mark.asyncio +async def test_spans_and_events_use_independent_locks(): + """Smoke test that the two routers use distinct lock namespaces — the + asserts inside the previous two tests already cover this, but this is the + invariant we care about: a busy spans lock must NOT block events, and + vice versa. + """ + assert "spans:flush" != "events:flush" diff --git a/api/ee/tests/pytest/unit/test_billing_router.py b/api/ee/tests/pytest/unit/test_billing_router.py index 262b109707..07a86012f3 100644 --- a/api/ee/tests/pytest/unit/test_billing_router.py +++ b/api/ee/tests/pytest/unit/test_billing_router.py @@ -6,7 +6,8 @@ from ee.src.apis.fastapi.billing import router as billing_router_module from ee.src.apis.fastapi.billing.router import BillingRouter -from ee.src.core.subscriptions.types import Event, Plan +from ee.src.core.entitlements.types import DefaultPlan +from ee.src.core.subscriptions.types import Event @pytest.mark.asyncio @@ -14,7 +15,7 @@ async def test_fetch_subscription_reads_periods_from_stripe_objects(monkeypatch) subscription_service = SimpleNamespace( read=AsyncMock( return_value=SimpleNamespace( - plan=Plan.CLOUD_V0_PRO, + plan=DefaultPlan.CLOUD_V0_PRO.value, anchor=12, subscription_id="sub_123", ) @@ -23,7 +24,6 @@ async def test_fetch_subscription_reads_periods_from_stripe_objects(monkeypatch) router = BillingRouter( subscription_service=subscription_service, meters_service=SimpleNamespace(), - tracing_service=SimpleNamespace(), ) monkeypatch.setattr(billing_router_module.env.stripe, "api_key", "sk_test_123") @@ -48,7 +48,7 @@ async def test_fetch_subscription_reads_periods_from_stripe_objects(monkeypatch) ) assert result == { - "plan": Plan.CLOUD_V0_PRO.value, + "plan": DefaultPlan.CLOUD_V0_PRO.value, "type": "standard", "period_start": 1710000000, "period_end": 1712592000, @@ -75,7 +75,6 @@ async def test_handle_events_reads_subscription_created_metadata_from_stripe_obj router = BillingRouter( subscription_service=subscription_service, meters_service=SimpleNamespace(), - tracing_service=SimpleNamespace(), ) request = DummyRequest() @@ -93,7 +92,7 @@ async def test_handle_events_reads_subscription_created_metadata_from_stripe_obj metadata=SimpleNamespace( target=billing_router_module.env.stripe.webhook_target, organization_id="org_123", - plan=Plan.CLOUD_V0_PRO.value, + plan=DefaultPlan.CLOUD_V0_PRO.value, ), ) ), @@ -108,7 +107,7 @@ async def test_handle_events_reads_subscription_created_metadata_from_stripe_obj organization_id="org_123", event=Event.SUBSCRIPTION_CREATED, subscription_id="sub_123", - plan=Plan.CLOUD_V0_PRO, + plan=DefaultPlan.CLOUD_V0_PRO.value, anchor=9, ) @@ -121,7 +120,6 @@ async def test_handle_events_reads_invoice_metadata_from_stripe_objects(monkeypa router = BillingRouter( subscription_service=subscription_service, meters_service=SimpleNamespace(), - tracing_service=SimpleNamespace(), ) request = DummyRequest() diff --git a/api/ee/tests/pytest/unit/test_billing_settings.py b/api/ee/tests/pytest/unit/test_billing_settings.py new file mode 100644 index 0000000000..b11718c56e --- /dev/null +++ b/api/ee/tests/pytest/unit/test_billing_settings.py @@ -0,0 +1,211 @@ +"""Unit tests for billing settings parsers in +``ee.src.core.subscriptions.settings``. + +Covers `_normalize_pricing_entry`, `_parse_pricing_override`, +`_parse_catalog_override`, and the public accessors in their no-env-override +state. +""" + +import pytest + +from ee.src.core.subscriptions import settings +from ee.src.core.entitlements.types import DefaultPlan + + +# --------------------------------------------------------------------------- +# Catalog parser +# --------------------------------------------------------------------------- + + +class TestParseCatalogOverride: + _FULL_ENTRY = { + "title": "T", + "description": "d", + "type": "standard", + "features": ["a"], + "plan": "p", + } + + def test_minimal_valid_catalog(self): + result = settings._parse_catalog_override([self._FULL_ENTRY]) + assert result == [self._FULL_ENTRY] + + def test_extra_fields_passed_through(self): + entry = dict(self._FULL_ENTRY, custom_badge="new") + result = settings._parse_catalog_override([entry]) + assert result[0]["custom_badge"] == "new" + + def test_missing_required_field_rejected(self): + broken = dict(self._FULL_ENTRY) + del broken["title"] + with pytest.raises(ValueError, match="is invalid"): + settings._parse_catalog_override([broken]) + + def test_invalid_type_value_rejected(self): + broken = dict(self._FULL_ENTRY, type="garbage") + with pytest.raises(ValueError, match="type must be one of"): + settings._parse_catalog_override([broken]) + + def test_non_list_rejected(self): + with pytest.raises(ValueError, match="JSON array"): + settings._parse_catalog_override({"oops": "dict"}) + + def test_non_dict_entry_rejected(self): + with pytest.raises(ValueError, match="must be objects"): + settings._parse_catalog_override(["not-a-dict"]) + + +# --------------------------------------------------------------------------- +# Pricing parser (single entry) +# --------------------------------------------------------------------------- + + +class TestNormalizePricingEntry: + def test_free_plan_entry(self): + result = settings._normalize_pricing_entry("p", {"free": True}) + assert result == {"free": True} + + def test_paid_with_line_items(self): + result = settings._normalize_pricing_entry( + "p", + {"stripe": {"line_items": [{"price": "price_x", "quantity": 1}]}}, + ) + assert result == { + "stripe": { + "line_items": [{"price": "price_x", "quantity": 1}], + "meters": {}, + } + } + + def test_with_per_meter_prices(self): + result = settings._normalize_pricing_entry( + "p", + { + "stripe": { + "line_items": [{"price": "p1"}], + "meters": {"users": {"price": "p_users"}}, + } + }, + ) + assert result["stripe"]["meters"] == {"users": {"price": "p_users"}} + + def test_non_dict_rejected(self): + with pytest.raises(ValueError, match="must be an object"): + settings._normalize_pricing_entry("p", "not-a-dict") + + def test_unknown_top_level_key_rejected(self): + with pytest.raises(ValueError, match="unknown keys"): + settings._normalize_pricing_entry("p", {"surprise": True}) + + def test_stripe_not_dict_rejected(self): + with pytest.raises(ValueError, match="stripe must be an object"): + settings._normalize_pricing_entry("p", {"stripe": "nope"}) + + def test_unknown_stripe_key_rejected(self): + with pytest.raises(ValueError, match="stripe has unknown keys"): + settings._normalize_pricing_entry("p", {"stripe": {"foo": []}}) + + def test_line_items_not_list_rejected(self): + with pytest.raises(ValueError, match="line_items must be a list"): + settings._normalize_pricing_entry("p", {"stripe": {"line_items": "nope"}}) + + def test_meters_not_dict_rejected(self): + with pytest.raises(ValueError, match="meters must be an object"): + settings._normalize_pricing_entry("p", {"stripe": {"meters": "nope"}}) + + def test_meter_entry_missing_price_rejected(self): + with pytest.raises(ValueError, match="must be an object with a 'price'"): + settings._normalize_pricing_entry( + "p", {"stripe": {"meters": {"users": {}}}} + ) + + +# --------------------------------------------------------------------------- +# Pricing parser (full payload) +# --------------------------------------------------------------------------- + + +class TestParsePricingOverride: + def test_multi_plan(self): + result = settings._parse_pricing_override( + { + "free_plan": {"free": True}, + "paid_plan": { + "stripe": {"line_items": [{"price": "p_x", "quantity": 1}]} + }, + } + ) + assert result["free_plan"]["free"] is True + assert result["paid_plan"]["stripe"]["line_items"][0]["price"] == "p_x" + + def test_non_dict_rejected(self): + with pytest.raises(ValueError, match="JSON object"): + settings._parse_pricing_override([]) + + def test_multiple_free_plans_rejected(self): + with pytest.raises(ValueError, match="multiple free plans"): + settings._parse_pricing_override( + { + "a": {"free": True}, + "b": {"free": True}, + } + ) + + +# --------------------------------------------------------------------------- +# Public accessors (defaults state) +# --------------------------------------------------------------------------- + + +class TestDefaults: + def test_get_catalog_returns_default_catalog(self): + catalog = settings.get_catalog() + assert len(catalog) > 0 + # Default catalog references DefaultPlan slugs. + plans_in_catalog = {entry.get("plan") for entry in catalog if entry.get("plan")} + assert plans_in_catalog.issubset({p.value for p in DefaultPlan}) + + def test_get_catalog_plan_lookup(self): + # The default catalog has a Hobby entry. + entry = settings.get_catalog_plan(DefaultPlan.CLOUD_V0_HOBBY.value) + assert entry is not None + assert entry["plan"] == DefaultPlan.CLOUD_V0_HOBBY.value + + def test_get_catalog_plan_unknown_returns_none(self): + assert settings.get_catalog_plan("ghost") is None + + def test_get_catalog_plan_none_slug_returns_none(self): + assert settings.get_catalog_plan(None) is None + + def test_get_pricing_defaults_to_empty(self): + # No env override → no code-default pricing in this deployment. + assert settings.get_pricing() == {} + + def test_get_stripe_line_items_empty_when_no_pricing(self): + assert settings.get_stripe_line_items(DefaultPlan.CLOUD_V0_PRO.value) == [] + + def test_get_stripe_line_items_none_slug_returns_empty(self): + assert settings.get_stripe_line_items(None) == [] + + def test_get_stripe_meter_price_returns_none_when_no_pricing(self): + assert ( + settings.get_stripe_meter_price(DefaultPlan.CLOUD_V0_PRO.value, "users") + is None + ) + + def test_get_stripe_meter_price_with_none_args(self): + assert settings.get_stripe_meter_price(None, "users") is None + assert settings.get_stripe_meter_price("plan", None) is None + + def test_get_free_plan_falls_back_to_hobby(self): + assert settings.get_free_plan() == DefaultPlan.CLOUD_V0_HOBBY.value + + def test_get_trial_plan_disabled_when_no_env(self): + # No AGENTA_BILLING_TRIAL_PLAN/DAYS set → trial is disabled. + assert settings.get_trial_plan() is None + + def test_get_trial_days_disabled_when_no_env(self): + assert settings.get_trial_days() is None + + def test_trial_enabled_false_when_no_env(self): + assert settings.trial_enabled() is False diff --git a/api/ee/tests/pytest/unit/test_controls_env_override.py b/api/ee/tests/pytest/unit/test_controls_env_override.py new file mode 100644 index 0000000000..3bf2f98f75 --- /dev/null +++ b/api/ee/tests/pytest/unit/test_controls_env_override.py @@ -0,0 +1,798 @@ +"""Integration-style tests for env-driven access-controls overrides. + +`controls.py` and `settings.py` parse env at import time, so each scenario +runs in a fresh Python subprocess. Tests cover the consistency rules between +`AGENTA_ACCESS_PLANS`, `AGENTA_BILLING_CATALOG`, and `AGENTA_BILLING_PRICING`, +plus the free-plan derivation and trial-plan accessors. +""" + +import json +import os +import subprocess +import sys + + +def _run(env_extra: dict, snippet: str) -> tuple[int, str, str]: + """Run a Python snippet in a subprocess with extra env vars. + + Returns (exit_code, stdout, stderr). Console logging is silenced in the + subprocess so stdout contains only what the snippet prints. + """ + env = dict(os.environ) + env.update(env_extra) + env["AGENTA_LICENSE"] = "ee" + env.setdefault("AGENTA_LOG_CONSOLE_ENABLED", "false") + proc = subprocess.run( + [sys.executable, "-c", snippet], + env=env, + capture_output=True, + text=True, + ) + return proc.returncode, proc.stdout, proc.stderr + + +def _ok(snippet: str, env_extra: dict | None = None) -> str: + ec, out, err = _run(env_extra or {}, snippet) + assert ec == 0, f"expected success, got {ec}\nstdout: {out}\nstderr: {err}" + return out + + +def _fails(snippet: str, env_extra: dict, expected_msg_substr: str) -> str: + ec, out, err = _run(env_extra, snippet) + assert ec != 0, f"expected failure, got success\nstdout: {out}" + assert expected_msg_substr in err, ( + f"expected error containing {expected_msg_substr!r}, got:\n{err}" + ) + return err + + +# --------------------------------------------------------------------------- +# Defaults path +# --------------------------------------------------------------------------- + + +class TestNoOverride: + def test_no_env_uses_defaults(self): + # Plans count should equal DefaultPlan enum size; catalog count + # should match (one entry per plan in DEFAULT_CATALOG plus the + # Enterprise contact-sales tier which has no `plan` field). + from ee.src.core.entitlements.types import DEFAULT_CATALOG, DefaultPlan + + expected_plans = len(list(DefaultPlan)) + expected_catalog = len(DEFAULT_CATALOG) + out = _ok( + "from ee.src.core.entitlements.controls import get_plans; " + "from ee.src.core.subscriptions.settings import get_catalog; " + "print(len(get_plans())); print(len(get_catalog()))" + ) + assert out.splitlines() == [str(expected_plans), str(expected_catalog)] + + +# --------------------------------------------------------------------------- +# Plans override +# --------------------------------------------------------------------------- + + +class TestPlansOverride: + _CONSISTENT_OVERRIDE = { + "AGENTA_ACCESS_PLANS": json.dumps( + { + "only_plan": { + "description": "Test", + "flags": { + "hooks": True, + "rbac": False, + "access": False, + "domains": False, + "sso": False, + }, + } + } + ), + "AGENTA_BILLING_CATALOG": json.dumps( + [ + { + "title": "Only", + "description": "Only plan", + "plan": "only_plan", + "type": "standard", + "features": [], + } + ] + ), + "AGENTA_BILLING_PRICING": json.dumps({"only_plan": {"free": True}}), + } + + def test_consistent_override_works_end_to_end(self): + out = _ok( + "from ee.src.core.entitlements.controls import get_plans, get_plan_description; " + "from ee.src.core.subscriptions.settings import get_catalog, get_free_plan; " + "print(','.join(sorted(get_plans()))); " + "print(get_plan_description('only_plan')); " + "print(len(get_catalog())); " + "print(get_free_plan())", + env_extra=self._CONSISTENT_OVERRIDE, + ) + lines = out.splitlines() + assert lines[0] == "only_plan" + assert lines[1] == "Test" + assert lines[2] == "1" + assert lines[3] == "only_plan" + + def test_invalid_json_fails_startup(self): + _fails( + "from ee.src.core.entitlements.controls import get_plans", + {"AGENTA_ACCESS_PLANS": "{not json"}, + "AGENTA_ACCESS_PLANS is not valid JSON", + ) + + def test_wrong_top_level_type_fails_startup(self): + _fails( + "from ee.src.core.entitlements.controls import get_plans", + {"AGENTA_ACCESS_PLANS": "[1,2,3]"}, + "must be a JSON object", + ) + + def test_empty_object_fails_startup(self): + _fails( + "from ee.src.core.entitlements.controls import get_plans", + {"AGENTA_ACCESS_PLANS": "{}"}, + "non-empty", + ) + + def test_plan_with_only_description_allowed(self): + # Display-only plans (no enforced trackers) are accepted. They show + # up in the effective plan map with an empty entitlements dict. + out = _ok( + "from ee.src.core.entitlements.controls import get_plans, get_plan_entitlements; " + "print(sorted(get_plans())); print(get_plan_entitlements('x'))", + env_extra={"AGENTA_ACCESS_PLANS": '{"x":{"description":"y"}}'}, + ) + lines = out.splitlines() + assert lines[0] == "['x']" + assert lines[1] == "{}" + + +# --------------------------------------------------------------------------- +# Catalog consistency vs plans +# --------------------------------------------------------------------------- + + +class TestCatalogConsistency: + def test_catalog_referencing_missing_plan_fails(self): + _fails( + "from ee.src.core.subscriptions.settings import get_catalog", + { + "AGENTA_ACCESS_PLANS": json.dumps( + { + "only": { + "flags": { + "hooks": True, + "rbac": False, + "access": False, + "domains": False, + "sso": False, + } + } + } + ), + "AGENTA_BILLING_CATALOG": json.dumps( + [ + { + "plan": "nonexistent", + "title": "X", + "description": "x", + "type": "standard", + "features": [], + } + ] + ), + }, + "AGENTA_BILLING_CATALOG references plan 'nonexistent'", + ) + + def test_default_catalog_with_restricted_plans_fails(self): + # Plans override removes built-in slugs but the default catalog still + # references them — must fail loudly, not silently use defaults. + _fails( + "from ee.src.core.subscriptions.settings import get_catalog", + { + "AGENTA_ACCESS_PLANS": json.dumps( + { + "only": { + "flags": { + "hooks": True, + "rbac": False, + "access": False, + "domains": False, + "sso": False, + } + } + } + ) + }, + "AGENTA_BILLING_CATALOG references plan", + ) + + +# --------------------------------------------------------------------------- +# Pricing consistency vs plans +# --------------------------------------------------------------------------- + + +class TestPricingConsistency: + def test_pricing_referencing_missing_plan_fails(self): + _fails( + "from ee.src.core.subscriptions.settings import get_pricing", + { + "AGENTA_ACCESS_PLANS": json.dumps( + { + "only": { + "flags": { + "hooks": True, + "rbac": False, + "access": False, + "domains": False, + "sso": False, + } + } + } + ), + "AGENTA_BILLING_CATALOG": json.dumps( + [ + { + "plan": "only", + "title": "Only", + "description": "Only plan", + "type": "standard", + "features": [], + } + ] + ), + "AGENTA_BILLING_PRICING": json.dumps({"missing": {"free": True}}), + }, + "AGENTA_BILLING_PRICING references plan", + ) + + def test_pricing_free_marker_drives_get_free_plan(self): + out = _ok( + "from ee.src.core.subscriptions.settings import get_free_plan; " + "print(get_free_plan())", + env_extra={ + "AGENTA_ACCESS_PLANS": json.dumps( + { + "only": { + "flags": { + "hooks": True, + "rbac": False, + "access": False, + "domains": False, + "sso": False, + } + } + } + ), + "AGENTA_BILLING_CATALOG": json.dumps( + [ + { + "plan": "only", + "title": "Only", + "description": "Only plan", + "type": "standard", + "features": [], + } + ] + ), + "AGENTA_BILLING_PRICING": json.dumps({"only": {"free": True}}), + }, + ) + assert out.strip() == "only" + + def test_multiple_free_plans_fails(self): + _fails( + "from ee.src.core.subscriptions.settings import get_pricing", + { + "AGENTA_ACCESS_PLANS": json.dumps( + { + "a": { + "flags": { + "hooks": True, + "rbac": False, + "access": False, + "domains": False, + "sso": False, + } + }, + "b": { + "flags": { + "hooks": True, + "rbac": False, + "access": False, + "domains": False, + "sso": False, + } + }, + } + ), + "AGENTA_BILLING_CATALOG": json.dumps( + [ + { + "plan": "a", + "title": "A", + "description": "a", + "type": "standard", + "features": [], + }, + { + "plan": "b", + "title": "B", + "description": "b", + "type": "standard", + "features": [], + }, + ] + ), + "AGENTA_BILLING_PRICING": json.dumps( + {"a": {"free": True}, "b": {"free": True}} + ), + }, + "multiple free plans", + ) + + +# --------------------------------------------------------------------------- +# Trial env vars +# --------------------------------------------------------------------------- + + +class TestTrialEnv: + def test_trial_both_set_enables_trial(self): + out = _ok( + "from ee.src.core.subscriptions.settings import " + "get_trial_plan, get_trial_days, trial_enabled; " + "print(get_trial_plan()); print(get_trial_days()); print(trial_enabled())", + env_extra={ + "AGENTA_BILLING_TRIAL_PLAN": "cloud_v0_business", + "AGENTA_BILLING_TRIAL_DAYS": "30", + }, + ) + assert out.splitlines() == ["cloud_v0_business", "30", "True"] + + def test_trial_neither_set_disables_trial(self): + out = _ok( + "from ee.src.core.subscriptions.settings import " + "get_trial_plan, get_trial_days, trial_enabled; " + "print(get_trial_plan()); print(get_trial_days()); print(trial_enabled())", + ) + assert out.splitlines() == ["None", "None", "False"] + + def test_trial_plan_only_fails_startup(self): + _fails( + "from ee.src.core.subscriptions.settings import get_trial_plan", + {"AGENTA_BILLING_TRIAL_PLAN": "cloud_v0_business"}, + "AGENTA_BILLING_TRIAL_DAYS is required", + ) + + def test_trial_days_only_fails_startup(self): + _fails( + "from ee.src.core.subscriptions.settings import get_trial_days", + {"AGENTA_BILLING_TRIAL_DAYS": "14"}, + "AGENTA_BILLING_TRIAL_PLAN is required", + ) + + def test_trial_plan_not_in_effective_plans_fails(self): + _fails( + "from ee.src.core.subscriptions.settings import get_trial_plan", + { + "AGENTA_BILLING_TRIAL_PLAN": "bogus_plan", + "AGENTA_BILLING_TRIAL_DAYS": "14", + }, + "not in the effective plans set", + ) + + def test_trial_days_non_positive_fails(self): + _fails( + "from ee.src.core.subscriptions.settings import get_trial_days", + { + "AGENTA_BILLING_TRIAL_PLAN": "cloud_v0_pro", + "AGENTA_BILLING_TRIAL_DAYS": "0", + }, + "must be a positive integer", + ) + + def test_trial_days_invalid_fails_startup(self): + _fails( + "from oss.src.utils.env import env; print(env.billing.trial_days)", + {"AGENTA_BILLING_TRIAL_DAYS": "not-a-number"}, + "must be an integer", + ) + + +# --------------------------------------------------------------------------- +# Roles env override +# --------------------------------------------------------------------------- + + +class TestRolesOverride: + """End-to-end env override; the minima (`owner` + `viewer`) are synthesized + by the platform and the env can only ADD custom roles, never redefine + them. + """ + + def test_custom_role_with_known_permission_appended_to_minima(self): + out = _ok( + "from ee.src.core.entitlements.controls import get_roles, get_role_permissions; " + "print(','.join(r['role'] for r in get_roles('project'))); " + "print(','.join(get_role_permissions('project','reviewer')))", + env_extra={ + "AGENTA_ACCESS_ROLES": json.dumps( + {"project": [{"role": "reviewer", "permissions": ["read_system"]}]} + ) + }, + ) + lines = out.splitlines() + # owner + viewer minima first, custom role last. + assert lines[0] == "owner,viewer,reviewer" + assert lines[1] == "read_system" + + def test_non_overridden_scope_keeps_defaults(self): + # Overriding `project` does not clobber the workspace defaults. + out = _ok( + "from ee.src.core.entitlements.controls import get_roles; " + "print(len(get_roles('workspace')))", + env_extra={ + "AGENTA_ACCESS_ROLES": json.dumps( + {"project": [{"role": "reviewer", "permissions": ["read_system"]}]} + ) + }, + ) + # Workspace = owner + viewer + 4 default extras (admin/developer/editor/annotator). + assert int(out.strip()) == 6 + + def test_unknown_permission_fails_startup(self): + _fails( + "from ee.src.core.entitlements.controls import get_roles", + { + "AGENTA_ACCESS_ROLES": json.dumps( + {"project": [{"role": "x", "permissions": ["bogus_perm_id"]}]} + ) + }, + "Unknown permission", + ) + + def test_redefining_owner_fails_startup(self): + _fails( + "from ee.src.core.entitlements.controls import get_roles", + { + "AGENTA_ACCESS_ROLES": json.dumps( + {"project": [{"role": "owner", "permissions": ["*"]}]} + ) + }, + "cannot redefine reserved role 'owner'", + ) + + def test_redefining_viewer_fails_startup(self): + _fails( + "from ee.src.core.entitlements.controls import get_roles", + { + "AGENTA_ACCESS_ROLES": json.dumps( + {"project": [{"role": "viewer", "permissions": ["read_system"]}]} + ) + }, + "cannot redefine reserved role 'viewer'", + ) + + def test_duplicate_custom_role_fails_startup(self): + _fails( + "from ee.src.core.entitlements.controls import get_roles", + { + "AGENTA_ACCESS_ROLES": json.dumps( + { + "project": [ + {"role": "reviewer", "permissions": ["read_system"]}, + {"role": "reviewer", "permissions": ["read_system"]}, + ] + } + ) + }, + "Duplicate role slug", + ) + + def test_empty_roles_fails_startup(self): + _fails( + "from ee.src.core.entitlements.controls import get_roles", + {"AGENTA_ACCESS_ROLES": "{}"}, + "non-empty", + ) + + def test_empty_scope_list_fails_startup(self): + _fails( + "from ee.src.core.entitlements.controls import get_roles", + {"AGENTA_ACCESS_ROLES": json.dumps({"project": []})}, + "non-empty list of roles", + ) + + +# --------------------------------------------------------------------------- +# Required-env validations +# --------------------------------------------------------------------------- + + +class TestEnvTypeValidation: + def test_plans_as_list_fails(self): + _fails( + "from oss.src.utils.env import env; print(env.access_controls.plans)", + {"AGENTA_ACCESS_PLANS": "[1,2,3]"}, + "must be a JSON object", + ) + + def test_catalog_as_dict_fails(self): + _fails( + "from oss.src.utils.env import env; print(env.billing.catalog)", + {"AGENTA_BILLING_CATALOG": "{}"}, + "must be a JSON array", + ) + + +# --------------------------------------------------------------------------- +# Default-plan overlay (env wired end-to-end) +# --------------------------------------------------------------------------- + + +class TestDefaultPlanOverlay: + """The overlay targets whatever `get_default_plan()` resolves to. We + pin the default plan via `AGENTA_ACCESS_DEFAULT_PLAN` to make the test + deterministic regardless of whether Stripe is configured in the parent + environment. + """ + + def test_overlay_patches_traces_retention(self): + out = _ok( + "from ee.src.core.entitlements.controls import get_plan_entitlements; " + "from ee.src.core.entitlements.types import Tracker, Counter; " + "ent = get_plan_entitlements('cloud_v0_hobby'); " + "print(ent[Tracker.COUNTERS][Counter.TRACES].retention)", + env_extra={ + "AGENTA_ACCESS_DEFAULT_PLAN": "cloud_v0_hobby", + "AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY": json.dumps( + {"counters": {"traces": {"retention": 43200}}} + ), + }, + ) + assert out.strip() == "43200" + + def test_overlay_preserves_other_quota_fields(self): + # Hobby's traces quota: free=5000, monthly=True, retention=44640. + # Overlay sets only retention → free/monthly stay. + out = _ok( + "from ee.src.core.entitlements.controls import get_plan_entitlements; " + "from ee.src.core.entitlements.types import Tracker, Counter; " + "q = get_plan_entitlements('cloud_v0_hobby')" + "[Tracker.COUNTERS][Counter.TRACES]; " + "print(q.retention, q.free, q.monthly)", + env_extra={ + "AGENTA_ACCESS_DEFAULT_PLAN": "cloud_v0_hobby", + "AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY": json.dumps( + {"counters": {"traces": {"retention": 525600}}} + ), + }, + ) + assert out.strip() == "525600 5000 True" + + def test_overlay_patches_throttle_rate_only(self): + out = _ok( + "from ee.src.core.entitlements.controls import get_plan_entitlements; " + "from ee.src.core.entitlements.types import Tracker, Category; " + "ent = get_plan_entitlements('cloud_v0_hobby'); " + "t = next(t for t in ent[Tracker.THROTTLES] " + " if t.categories == [Category.STANDARD]); " + "print(t.bucket.rate, t.bucket.capacity)", + env_extra={ + "AGENTA_ACCESS_DEFAULT_PLAN": "cloud_v0_hobby", + "AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY": json.dumps( + {"throttles": {"standard": {"bucket": {"rate": 7200}}}} + ), + }, + ) + # rate patched; capacity preserved from the hobby default (480). + assert out.strip() == "7200 480" + + def test_overlay_invalid_field_fails_startup(self): + _fails( + "from ee.src.core.entitlements.controls import get_plans", + { + "AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY": json.dumps( + {"flags": {"bogus_flag": True}} + ) + }, + "Unknown flag", + ) + + def test_overlay_targeting_unknown_plan_fails(self): + _fails( + "from ee.src.core.entitlements.controls import get_plans", + { + "AGENTA_ACCESS_DEFAULT_PLAN": "ghost_plan", + "AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY": json.dumps( + {"flags": {"hooks": True}} + ), + }, + "not in the effective plan set", + ) + + def test_overlay_empty_object_fails_startup(self): + _fails( + "from ee.src.core.entitlements.controls import get_plans", + {"AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY": "{}"}, + "non-empty", + ) + + +# --------------------------------------------------------------------------- +# Default-plan env var (canonical + legacy) +# --------------------------------------------------------------------------- + + +class TestDefaultPlanEnv: + def test_canonical_var_takes_precedence(self): + out = _ok( + "from ee.src.core.subscriptions.types import get_default_plan; " + "print(get_default_plan())", + env_extra={ + "AGENTA_ACCESS_DEFAULT_PLAN": "cloud_v0_business", + "AGENTA_DEFAULT_PLAN": "cloud_v0_hobby", + }, + ) + assert out.strip() == "cloud_v0_business" + + def test_legacy_var_still_honored(self): + out = _ok( + "from ee.src.core.subscriptions.types import get_default_plan; " + "print(get_default_plan())", + env_extra={"AGENTA_DEFAULT_PLAN": "cloud_v0_business"}, + ) + assert out.strip() == "cloud_v0_business" + + def test_unset_falls_back_to_self_hosted_when_stripe_off(self): + # Force Stripe disabled by clearing the API key inherited from the + # parent test env, so the fallback path is exercised independently + # of the developer's local config. + out = _ok( + "from ee.src.core.subscriptions.types import get_default_plan; " + "print(get_default_plan())", + env_extra={"STRIPE_API_KEY": ""}, + ) + assert out.strip() == "self_hosted_enterprise" + + def test_unset_falls_back_to_hobby_when_stripe_on(self): + out = _ok( + "from ee.src.core.subscriptions.types import get_default_plan; " + "print(get_default_plan())", + env_extra={"STRIPE_API_KEY": "sk_test_dummy"}, + ) + assert out.strip() == "cloud_v0_hobby" + + def test_default_plan_not_in_effective_set_fails_startup(self): + _fails( + "from ee.src.core.subscriptions.settings import get_catalog", + {"AGENTA_ACCESS_DEFAULT_PLAN": "ghost_plan"}, + "is not in the effective plans set", + ) + + +# --------------------------------------------------------------------------- +# Roles overlay (env wired end-to-end) +# --------------------------------------------------------------------------- + + +class TestRolesOverlay: + """The overlay accepts only the `project` key today and applies to both + workspace and project scopes (they share the same default role set). + """ + + def test_overlay_patches_editor_permissions_in_both_scopes(self): + out = _ok( + "from ee.src.core.entitlements.controls import get_role_permissions; " + "print(get_role_permissions('workspace', 'editor')); " + "print(get_role_permissions('project', 'editor'))", + env_extra={ + "AGENTA_ACCESS_ROLES_OVERLAY": json.dumps( + {"project": {"editor": {"permissions": ["read_system"]}}} + ) + }, + ) + lines = out.splitlines() + assert lines[0] == "['read_system']" + assert lines[1] == "['read_system']" + + def test_overlay_adds_new_role_to_both_scopes(self): + out = _ok( + "from ee.src.core.entitlements.controls import get_roles; " + "print('auditor' in [r['role'] for r in get_roles('workspace')]); " + "print('auditor' in [r['role'] for r in get_roles('project')])", + env_extra={ + "AGENTA_ACCESS_ROLES_OVERLAY": json.dumps( + { + "project": { + "auditor": { + "description": "Audit-only.", + "permissions": ["read_system"], + } + } + } + ) + }, + ) + assert out.splitlines() == ["True", "True"] + + def test_overlay_organization_scope_untouched(self): + # Organization scope only has the minima (owner + viewer) by default. + # The overlay must not change that — it targets workspace + project. + out = _ok( + "from ee.src.core.entitlements.controls import get_roles; " + "print(','.join(r['role'] for r in get_roles('organization')))", + env_extra={ + "AGENTA_ACCESS_ROLES_OVERLAY": json.dumps( + { + "project": { + "auditor": { + "description": "Audit-only.", + "permissions": ["read_system"], + } + } + } + ) + }, + ) + assert out.strip() == "owner,viewer" + + def test_overlay_non_project_scope_fails_startup(self): + _fails( + "from ee.src.core.entitlements.controls import get_roles", + { + "AGENTA_ACCESS_ROLES_OVERLAY": json.dumps( + {"workspace": {"editor": {"permissions": ["read_system"]}}} + ) + }, + "only supports the 'project' scope", + ) + + def test_overlay_reserved_role_fails_startup(self): + _fails( + "from ee.src.core.entitlements.controls import get_roles", + { + "AGENTA_ACCESS_ROLES_OVERLAY": json.dumps( + {"project": {"owner": {"permissions": ["*"]}}} + ) + }, + "cannot patch reserved role 'owner'", + ) + + def test_overlay_unknown_permission_fails_startup(self): + _fails( + "from ee.src.core.entitlements.controls import get_roles", + { + "AGENTA_ACCESS_ROLES_OVERLAY": json.dumps( + {"project": {"editor": {"permissions": ["bogus_perm"]}}} + ) + }, + "Unknown permission", + ) + + def test_overlay_empty_object_fails_startup(self): + _fails( + "from ee.src.core.entitlements.controls import get_roles", + {"AGENTA_ACCESS_ROLES_OVERLAY": "{}"}, + "non-empty", + ) + + def test_overlay_new_role_without_permissions_fails_startup(self): + _fails( + "from ee.src.core.entitlements.controls import get_roles", + { + "AGENTA_ACCESS_ROLES_OVERLAY": json.dumps( + {"project": {"auditor": {"description": "x"}}} + ) + }, + "new role requires 'permissions'", + ) diff --git a/api/ee/tests/pytest/unit/test_events_retention.py b/api/ee/tests/pytest/unit/test_events_retention.py new file mode 100644 index 0000000000..39c8cfb6bb --- /dev/null +++ b/api/ee/tests/pytest/unit/test_events_retention.py @@ -0,0 +1,128 @@ +"""Unit tests for the events retention service. + +Validates plan iteration logic (which plans get flushed) and the project-paging +loop. The DAO is mocked because the SQL against the events table is exercised +in integration; here we just verify the service drives the DAO correctly based +on each plan's ``Counter.EVENTS.retention``. +""" + +from datetime import datetime, timezone +from types import SimpleNamespace +from unittest.mock import AsyncMock +from uuid import uuid4 + +import pytest + +from ee.src.core.entitlements.types import Counter, Quota, Tracker +from ee.src.core.events.service import EventsService + + +def _plan_with_retention(retention_minutes: int | None) -> dict: + return { + Tracker.COUNTERS: { + Counter.EVENTS: Quota(monthly=True, retention=retention_minutes), + } + } + + +def _plan_without_events() -> dict: + return {Tracker.COUNTERS: {Counter.TRACES: Quota(monthly=True)}} + + +@pytest.mark.asyncio +async def test_flush_skips_plans_without_events_retention(monkeypatch): + plans = { + "plan_a": _plan_with_retention(None), # unlimited retention + "plan_b": _plan_without_events(), # no events counter at all + } + monkeypatch.setattr("ee.src.core.events.service.get_plans", lambda: plans) + + dao = SimpleNamespace( + fetch_projects_with_plan=AsyncMock(return_value=[]), + delete_events_before_cutoff=AsyncMock(return_value=0), + ) + service = EventsService(events_dao=dao) + + await service.flush_events() + + # No plan had a retention period, so the DAO never paged projects. + dao.fetch_projects_with_plan.assert_not_called() + dao.delete_events_before_cutoff.assert_not_called() + + +@pytest.mark.asyncio +async def test_flush_pages_projects_then_deletes(monkeypatch): + plans = {"plan_a": _plan_with_retention(60)} # 1 hour retention + monkeypatch.setattr("ee.src.core.events.service.get_plans", lambda: plans) + + project_a = uuid4() + project_b = uuid4() + fetch_calls = [[project_a, project_b], []] + dao = SimpleNamespace( + fetch_projects_with_plan=AsyncMock(side_effect=fetch_calls), + delete_events_before_cutoff=AsyncMock(return_value=42), + ) + service = EventsService(events_dao=dao) + + await service.flush_events() + + assert dao.fetch_projects_with_plan.await_count == 2 + # First call: cursor None; second call: cursor = last project_id of page 1. + first_call_kwargs = dao.fetch_projects_with_plan.await_args_list[0].kwargs + second_call_kwargs = dao.fetch_projects_with_plan.await_args_list[1].kwargs + assert first_call_kwargs["project_id"] is None + assert second_call_kwargs["project_id"] == project_b + + dao.delete_events_before_cutoff.assert_awaited_once() + delete_kwargs = dao.delete_events_before_cutoff.await_args.kwargs + assert delete_kwargs["project_ids"] == [project_a, project_b] + # Cutoff must be in the past. + assert delete_kwargs["cutoff"] < datetime.now(timezone.utc) + + +@pytest.mark.asyncio +async def test_flush_continues_on_per_plan_failure(monkeypatch): + plans = { + "plan_a": _plan_with_retention(60), + "plan_b": _plan_with_retention(60), + } + monkeypatch.setattr("ee.src.core.events.service.get_plans", lambda: plans) + + project = uuid4() + + async def fetch_side_effect(*, plan, project_id, max_projects): + if plan == "plan_a" and project_id is None: + raise RuntimeError("simulated DAO failure") + if plan == "plan_b" and project_id is None: + return [project] + return [] + + dao = SimpleNamespace( + fetch_projects_with_plan=AsyncMock(side_effect=fetch_side_effect), + delete_events_before_cutoff=AsyncMock(return_value=7), + ) + service = EventsService(events_dao=dao) + + # plan_a raises; plan_b must still run. + await service.flush_events() + + dao.delete_events_before_cutoff.assert_awaited_once() + assert dao.delete_events_before_cutoff.await_args.kwargs["project_ids"] == [project] + + +@pytest.mark.asyncio +async def test_flush_empty_entitlements_skipped(monkeypatch): + # Display-only plan (e.g. custom plan with description only) has no + # entitlements map. The service must skip it without raising. + plans = {"display_only": {}} + monkeypatch.setattr("ee.src.core.events.service.get_plans", lambda: plans) + + dao = SimpleNamespace( + fetch_projects_with_plan=AsyncMock(), + delete_events_before_cutoff=AsyncMock(), + ) + service = EventsService(events_dao=dao) + + await service.flush_events() + + dao.fetch_projects_with_plan.assert_not_called() diff --git a/api/oss/src/core/accounts/service.py b/api/oss/src/core/accounts/service.py index a1dc7032cc..4113f5d646 100644 --- a/api/oss/src/core/accounts/service.py +++ b/api/oss/src/core/accounts/service.py @@ -86,7 +86,9 @@ ) from ee.src.core.subscriptions.types import ( # type: ignore[import] get_default_plan as _ee_get_default_plan, - Plan as _EePlan, + ) + from ee.src.core.entitlements.controls import ( # type: ignore[import] + get_plans as _ee_get_plans, ) from ee.src.core.meters.service import MetersService as _EeMetersService # type: ignore[import] from ee.src.dbs.postgres.meters.dao import MetersDAO as _EeMetersDAO # type: ignore[import] @@ -613,18 +615,19 @@ async def create_accounts( if is_ee(): try: sub_create = (dto.subscriptions or {}).get(org_ref) - plan = ( - _EePlan(sub_create.plan) - if sub_create - else _ee_get_default_plan() - ) + plan = sub_create.plan if sub_create else _ee_get_default_plan() # type: ignore + if plan not in _ee_get_plans(): # type: ignore + raise AdminValidationError( + f"Subscription plan '{plan}' for organization " + f"'{org_ref}' is not in the effective plan set." + ) sub = await _ee_subscription_service.start_plan( organization_id=str(org_db.id), plan=plan, ) account.subscriptions = account.subscriptions or {} account.subscriptions[org_ref] = AdminSubscriptionRead( - plan=plan.value, + plan=plan, active=sub.active if sub else None, ) except Exception as exc: diff --git a/api/oss/src/core/auth/service.py b/api/oss/src/core/auth/service.py index 8fdf80409b..effeb69c18 100644 --- a/api/oss/src/core/auth/service.py +++ b/api/oss/src/core/auth/service.py @@ -491,7 +491,7 @@ async def enforce_domain_policies(self, email: str, user_id: UUID) -> None: OrganizationMemberDB( user_id=user.id, organization_id=organization.id, - role="member", + role="viewer", ) ) diff --git a/api/oss/src/routers/workspace_router.py b/api/oss/src/routers/workspace_router.py index 3659b51d89..631bb74c0f 100644 --- a/api/oss/src/routers/workspace_router.py +++ b/api/oss/src/routers/workspace_router.py @@ -10,9 +10,10 @@ if is_ee(): from ee.src.utils.permissions import check_rbac_permission - from ee.src.models.api.workspace_models import WorkspaceRole + from ee.src.models.shared_models import WorkspaceRole from ee.src.services.selectors import get_user_org_and_workspace_id from ee.src.services import db_manager_ee, workspace_manager + from ee.src.core.entitlements.controls import get_roles from ee.src.utils.entitlements import ( check_entitlements, @@ -69,15 +70,14 @@ async def get_all_workspace_roles(request: Request) -> List[Dict[str, str]]: """ if is_ee(): - workspace_roles_with_description = [] - workspace_roles = await workspace_manager.get_all_workspace_roles() - for role in workspace_roles: - workspace_roles_with_description.append( - { - "role_name": role, - "role_description": WorkspaceRole.get_description(role), - } - ) + # Resolve via access-controls (env-overridable via AGENTA_ACCESS_ROLES). + workspace_roles_with_description = [ + { + "role_name": role["role"], + "role_description": role.get("description") or "", + } + for role in get_roles("workspace") + ] else: workspace_roles_with_description = [ diff --git a/api/oss/src/utils/env.py b/api/oss/src/utils/env.py index 3b12166a18..eb36cc54db 100644 --- a/api/oss/src/utils/env.py +++ b/api/oss/src/utils/env.py @@ -374,17 +374,6 @@ class StripeConfig(BaseModel): ) webhook_secret: str | None = os.getenv("STRIPE_WEBHOOK_SECRET") - pricing: dict | None = None - - def __init__(self, **data): - super().__init__(**data) - try: - self.pricing = loads( - os.getenv("STRIPE_PRICING") or os.getenv("AGENTA_PRICING") or "{}" - ) - except Exception: - self.pricing = {} - model_config = ConfigDict(extra="ignore") @property @@ -393,6 +382,92 @@ def enabled(self) -> bool: return bool(self.api_key) +def _load_json_env_raw(name: str) -> object | None: + raw = os.getenv(name) + if raw is None: + return None + raw = raw.strip() + if not raw: + return None + try: + return loads(raw) + except Exception as e: + raise ValueError(f"{name} is not valid JSON: {e}") from e + + +def _load_json_env_dict(name: str) -> dict | None: + """Parse `name` as a JSON object, or return None if unset/empty.""" + value = _load_json_env_raw(name) + if value is None: + return None + if not isinstance(value, dict): + raise ValueError(f"{name} must be a JSON object, got {type(value).__name__}") + return value + + +def _load_json_env_list(name: str) -> list | None: + """Parse `name` as a JSON array, or return None if unset/empty.""" + value = _load_json_env_raw(name) + if value is None: + return None + if not isinstance(value, list): + raise ValueError(f"{name} must be a JSON array, got {type(value).__name__}") + return value + + +def _load_int_env(name: str) -> int | None: + """Parse `name` as an integer, or return None if unset/empty.""" + raw = os.getenv(name) + if not raw: + return None + try: + return int(raw) + except ValueError as e: + raise ValueError(f"{name} must be an integer, got {raw!r}") from e + + +class AccessControls(BaseModel): + """Access controls configuration (plans + roles + default plan). + + JSON env vars are parsed here at startup. Schema validation happens in + ``ee.src.core.entitlements.controls``. + + `default_plan` lives here (not under `agenta`) because it's part of the + access-controls surface: it selects which entry of the effective plan + map a new organization is onboarded onto, even on Stripe-disabled + deployments. The legacy `AGENTA_DEFAULT_PLAN` env var is still honored. + """ + + plans: dict | None = _load_json_env_dict("AGENTA_ACCESS_PLANS") + roles: dict | None = _load_json_env_dict("AGENTA_ACCESS_ROLES") + roles_overlay: dict | None = _load_json_env_dict("AGENTA_ACCESS_ROLES_OVERLAY") + default_plan: str | None = ( + os.getenv("AGENTA_ACCESS_DEFAULT_PLAN") + or os.getenv("AGENTA_DEFAULT_PLAN") + or None + ) + default_plan_overlay: dict | None = _load_json_env_dict( + "AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY" + ) + + model_config = ConfigDict(extra="ignore") + + +class BillingSettings(BaseModel): + """Billing settings configuration (catalog + Stripe pricing + trial). + + JSON env vars are parsed here at startup. Schema validation happens in + ``ee.src.core.subscriptions.settings``. + """ + + catalog: list | None = _load_json_env_list("AGENTA_BILLING_CATALOG") + pricing: dict | None = _load_json_env_dict("AGENTA_BILLING_PRICING") + trial_plan: str | None = os.getenv("AGENTA_BILLING_TRIAL_PLAN") or None + trial_days: int | None = _load_int_env("AGENTA_BILLING_TRIAL_DAYS") + + model_config = ConfigDict(extra="ignore") + + class SendgridConfig(BaseModel): """SendGrid Email configuration""" @@ -589,7 +664,6 @@ class AgentaConfig(BaseModel): ).lower() in _TRUTHY demos: str = os.getenv("AGENTA_DEMOS") or "" - default_plan: str | None = os.getenv("AGENTA_DEFAULT_PLAN") or None # None when unset/empty = unrestricted; non-empty set = only these emails can create orgs org_creation_allowlist: set | None = { @@ -753,6 +827,8 @@ class EnvironSettings(BaseModel): postgres: PostgresConfig = PostgresConfig() alembic: AlembicConfig = AlembicConfig() composio: ComposioConfig = ComposioConfig() + access_controls: AccessControls = AccessControls() + billing: BillingSettings = BillingSettings() model_config = ConfigDict(extra="ignore") diff --git a/clients/python/agenta_client/__init__.py b/clients/python/agenta_client/__init__.py index bdc9e979df..675fb941d3 100644 --- a/clients/python/agenta_client/__init__.py +++ b/clients/python/agenta_client/__init__.py @@ -5,7 +5,7 @@ import typing from importlib import import_module if typing.TYPE_CHECKING: - from .types import AdminAccountCreateOptions, AdminAccountRead, AdminAccountsCreate, AdminAccountsDelete, AdminAccountsDeleteTarget, AdminAccountsResponse, AdminApiKeyCreate, AdminApiKeyResponse, AdminDeleteResponse, AdminDeletedEntities, AdminDeletedEntity, AdminOrganizationCreate, AdminOrganizationMembershipCreate, AdminOrganizationMembershipRead, AdminOrganizationRead, AdminProjectCreate, AdminProjectMembershipCreate, AdminProjectMembershipRead, AdminProjectRead, AdminSimpleAccountCreate, AdminSimpleAccountDeleteEntry, AdminSimpleAccountRead, AdminSimpleAccountsApiKeysCreate, AdminSimpleAccountsCreate, AdminSimpleAccountsDelete, AdminSimpleAccountsOrganizationsCreate, AdminSimpleAccountsOrganizationsMembershipsCreate, AdminSimpleAccountsOrganizationsTransferOwnership, AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjects, AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjectsZero, AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspaces, AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspacesZero, AdminSimpleAccountsOrganizationsTransferOwnershipResponse, AdminSimpleAccountsProjectsCreate, AdminSimpleAccountsProjectsMembershipsCreate, AdminSimpleAccountsResponse, AdminSimpleAccountsUsersCreate, AdminSimpleAccountsUsersIdentitiesCreate, AdminSimpleAccountsUsersResetPassword, AdminSimpleAccountsWorkspacesCreate, AdminSimpleAccountsWorkspacesMembershipsCreate, AdminStructuredError, AdminSubscriptionCreate, AdminSubscriptionRead, AdminUserCreate, AdminUserIdentityCreate, AdminUserIdentityRead, AdminUserIdentityReadStatus, AdminUserRead, AdminWorkspaceCreate, AdminWorkspaceMembershipCreate, AdminWorkspaceMembershipRead, AdminWorkspaceRead, Analytics, AnalyticsResponse, Annotation, AnnotationCreate, AnnotationCreateLinks, AnnotationEdit, AnnotationEditLinks, AnnotationLinkResponse, AnnotationLinks, AnnotationQuery, AnnotationQueryLinks, AnnotationResponse, AnnotationsResponse, Application, ApplicationArtifactFlags, ApplicationArtifactQueryFlags, ApplicationCatalogPreset, ApplicationCatalogPresetResponse, ApplicationCatalogPresetsResponse, ApplicationCatalogTemplate, ApplicationCatalogTemplateResponse, ApplicationCatalogTemplatesResponse, ApplicationCatalogType, ApplicationCatalogTypesResponse, ApplicationCreate, ApplicationEdit, ApplicationFlags, ApplicationFork, ApplicationQuery, ApplicationResponse, ApplicationRevision, ApplicationRevisionCommit, ApplicationRevisionCreate, ApplicationRevisionDataInput, ApplicationRevisionDataInputHeadersValue, ApplicationRevisionDataInputRuntime, ApplicationRevisionDataOutput, ApplicationRevisionDataOutputHeadersValue, ApplicationRevisionDataOutputRuntime, ApplicationRevisionEdit, ApplicationRevisionFlags, ApplicationRevisionFork, ApplicationRevisionQuery, ApplicationRevisionQueryFlags, ApplicationRevisionResolveResponse, ApplicationRevisionResponse, ApplicationRevisionsLog, ApplicationRevisionsResponse, ApplicationVariant, ApplicationVariantCreate, ApplicationVariantEdit, ApplicationVariantFlags, ApplicationVariantFork, ApplicationVariantResponse, ApplicationVariantsResponse, ApplicationsResponse, BodyConfigsFetchVariantsConfigsFetchPost, Bucket, CollectStatusResponse, ComparisonOperator, Condition, ConditionOperator, ConditionOptions, ConditionValue, ConfigResponseModel, CustomModelSettingsDto, CustomProviderDto, CustomProviderKind, CustomProviderSettingsDto, DictOperator, DiscoverResponse, DiscoverResponseMethodsValue, EeSrcModelsApiOrganizationModelsOrganization, EntityRef, Environment, EnvironmentCreate, EnvironmentEdit, EnvironmentFlags, EnvironmentQueryFlags, EnvironmentResponse, EnvironmentRevision, EnvironmentRevisionCommit, EnvironmentRevisionCreate, EnvironmentRevisionData, EnvironmentRevisionDelta, EnvironmentRevisionEdit, EnvironmentRevisionResolveResponse, EnvironmentRevisionResponse, EnvironmentRevisionsLog, EnvironmentRevisionsResponse, EnvironmentVariant, EnvironmentVariantCreate, EnvironmentVariantEdit, EnvironmentVariantResponse, EnvironmentVariantsResponse, EnvironmentsResponse, ErrorPolicy, EvaluationMetrics, EvaluationMetricsCreate, EvaluationMetricsEdit, EvaluationMetricsIdsResponse, EvaluationMetricsQuery, EvaluationMetricsQueryScenarioIds, EvaluationMetricsQueryTimestamps, EvaluationMetricsRefresh, EvaluationMetricsResponse, EvaluationQueue, EvaluationQueueCreate, EvaluationQueueData, EvaluationQueueEdit, EvaluationQueueFlags, EvaluationQueueIdResponse, EvaluationQueueIdsResponse, EvaluationQueueQuery, EvaluationQueueQueryFlags, EvaluationQueueResponse, EvaluationQueueScenariosQuery, EvaluationQueuesResponse, EvaluationResult, EvaluationResultCreate, EvaluationResultEdit, EvaluationResultIdResponse, EvaluationResultIdsResponse, EvaluationResultQuery, EvaluationResultResponse, EvaluationResultsResponse, EvaluationRun, EvaluationRunCreate, EvaluationRunData, EvaluationRunDataMapping, EvaluationRunDataMappingColumn, EvaluationRunDataMappingStep, EvaluationRunDataStep, EvaluationRunDataStepInput, EvaluationRunDataStepOrigin, EvaluationRunDataStepType, EvaluationRunEdit, EvaluationRunFlags, EvaluationRunIdResponse, EvaluationRunIdsRequest, EvaluationRunIdsResponse, EvaluationRunQuery, EvaluationRunQueryFlags, EvaluationRunResponse, EvaluationRunsResponse, EvaluationScenario, EvaluationScenarioCreate, EvaluationScenarioEdit, EvaluationScenarioIdResponse, EvaluationScenarioIdsResponse, EvaluationScenarioQuery, EvaluationScenarioResponse, EvaluationScenariosResponse, EvaluationStatus, Evaluator, EvaluatorArtifactFlags, EvaluatorArtifactQueryFlags, EvaluatorCatalogPreset, EvaluatorCatalogPresetResponse, EvaluatorCatalogPresetsResponse, EvaluatorCatalogTemplate, EvaluatorCatalogTemplateResponse, EvaluatorCatalogTemplatesResponse, EvaluatorCatalogType, EvaluatorCatalogTypesResponse, EvaluatorCreate, EvaluatorEdit, EvaluatorFlags, EvaluatorFork, EvaluatorQuery, EvaluatorResponse, EvaluatorRevision, EvaluatorRevisionCommit, EvaluatorRevisionCreate, EvaluatorRevisionDataInput, EvaluatorRevisionDataInputHeadersValue, EvaluatorRevisionDataInputRuntime, EvaluatorRevisionDataOutput, EvaluatorRevisionDataOutputHeadersValue, EvaluatorRevisionDataOutputRuntime, EvaluatorRevisionEdit, EvaluatorRevisionFlags, EvaluatorRevisionFork, EvaluatorRevisionQuery, EvaluatorRevisionQueryFlags, EvaluatorRevisionResolveResponse, EvaluatorRevisionResponse, EvaluatorRevisionsLog, EvaluatorRevisionsResponse, EvaluatorTemplate, EvaluatorTemplatesResponse, EvaluatorVariant, EvaluatorVariantCreate, EvaluatorVariantEdit, EvaluatorVariantFlags, EvaluatorVariantFork, EvaluatorVariantResponse, EvaluatorVariantsResponse, EvaluatorsResponse, ExistenceOperator, FilteringInput, FilteringInputConditionsItem, FilteringOutput, FilteringOutputConditionsItem, Focus, Folder, FolderCreate, FolderEdit, FolderIdResponse, FolderKind, FolderQuery, FolderQueryKinds, FolderResponse, FoldersResponse, Format, Formatting, FullJsonInput, FullJsonOutput, Header, HttpValidationError, InviteRequest, InviteRequestRolesItem, Invocation, InvocationCreate, InvocationCreateLinks, InvocationEdit, InvocationEditLinks, InvocationLinkResponse, InvocationLinks, InvocationQuery, InvocationQueryLinks, InvocationResponse, InvocationsResponse, JsonSchemasInput, JsonSchemasOutput, LabelJsonInput, LabelJsonOutput, LegacyLifecycleDto, ListApiKeysResponse, ListOperator, ListOptions, LogicalOperator, MetricSpec, MetricType, MetricsBucket, NumericOperator, OTelEventInput, OTelEventInputTimestamp, OTelEventOutput, OTelEventOutputTimestamp, OTelHashInput, OTelHashOutput, OTelLinkInput, OTelLinkOutput, OTelLinksResponse, OTelReferenceInput, OTelReferenceOutput, OTelSpanKind, OTelStatusCode, OTelTracingRequest, OTelTracingResponse, OldAnalyticsResponse, OrganizationDetails, OrganizationDomainResponse, OrganizationProviderResponse, OrganizationUpdate, OssSrcModelsApiOrganizationModelsOrganization, Permission, Plan, ProjectsResponse, QueriesResponse, Query, QueryCreate, QueryEdit, QueryFlags, QueryQueryFlags, QueryResponse, QueryRevision, QueryRevisionCommit, QueryRevisionCreate, QueryRevisionDataInput, QueryRevisionDataOutput, QueryRevisionEdit, QueryRevisionQuery, QueryRevisionResponse, QueryRevisionsLog, QueryRevisionsResponse, QueryVariant, QueryVariantCreate, QueryVariantEdit, QueryVariantQuery, QueryVariantResponse, QueryVariantsResponse, Reference, ReferenceRequestModelInput, ReferenceRequestModelOutput, ResolutionInfo, RevisionFork, SecretDto, SecretDtoData, SecretKind, SecretResponseDto, SecretResponseDtoData, SessionIdsResponse, SimpleApplication, SimpleApplicationCreate, SimpleApplicationDataInput, SimpleApplicationDataInputHeadersValue, SimpleApplicationDataInputRuntime, SimpleApplicationDataOutput, SimpleApplicationDataOutputHeadersValue, SimpleApplicationDataOutputRuntime, SimpleApplicationEdit, SimpleApplicationFlags, SimpleApplicationQuery, SimpleApplicationQueryFlags, SimpleApplicationResponse, SimpleApplicationsResponse, SimpleEnvironment, SimpleEnvironmentCreate, SimpleEnvironmentEdit, SimpleEnvironmentQuery, SimpleEnvironmentResponse, SimpleEnvironmentsResponse, SimpleEvaluation, SimpleEvaluationCreate, SimpleEvaluationData, SimpleEvaluationDataApplicationSteps, SimpleEvaluationDataApplicationStepsOneValue, SimpleEvaluationDataEvaluatorSteps, SimpleEvaluationDataEvaluatorStepsOneValue, SimpleEvaluationDataQuerySteps, SimpleEvaluationDataQueryStepsOneValue, SimpleEvaluationDataTestsetSteps, SimpleEvaluationDataTestsetStepsOneValue, SimpleEvaluationEdit, SimpleEvaluationIdResponse, SimpleEvaluationQuery, SimpleEvaluationResponse, SimpleEvaluationsResponse, SimpleEvaluator, SimpleEvaluatorCreate, SimpleEvaluatorDataInput, SimpleEvaluatorDataInputHeadersValue, SimpleEvaluatorDataInputRuntime, SimpleEvaluatorDataOutput, SimpleEvaluatorDataOutputHeadersValue, SimpleEvaluatorDataOutputRuntime, SimpleEvaluatorEdit, SimpleEvaluatorFlags, SimpleEvaluatorQuery, SimpleEvaluatorQueryFlags, SimpleEvaluatorResponse, SimpleEvaluatorsResponse, SimpleQueriesResponse, SimpleQuery, SimpleQueryCreate, SimpleQueryEdit, SimpleQueryQuery, SimpleQueryResponse, SimpleQueue, SimpleQueueCreate, SimpleQueueData, SimpleQueueDataEvaluators, SimpleQueueDataEvaluatorsOneValue, SimpleQueueIdResponse, SimpleQueueKind, SimpleQueueQuery, SimpleQueueResponse, SimpleQueueScenariosQuery, SimpleQueueScenariosResponse, SimpleQueueSettings, SimpleQueuesResponse, SimpleTestset, SimpleTestsetCreate, SimpleTestsetEdit, SimpleTestsetQuery, SimpleTestsetResponse, SimpleTestsetsResponse, SimpleTrace, SimpleTraceChannel, SimpleTraceCreate, SimpleTraceCreateLinks, SimpleTraceEdit, SimpleTraceEditLinks, SimpleTraceKind, SimpleTraceLinkResponse, SimpleTraceLinks, SimpleTraceOrigin, SimpleTraceQuery, SimpleTraceQueryLinks, SimpleTraceReferences, SimpleTraceResponse, SimpleTracesResponse, SimpleWorkflow, SimpleWorkflowCreate, SimpleWorkflowDataInput, SimpleWorkflowDataInputHeadersValue, SimpleWorkflowDataInputRuntime, SimpleWorkflowDataOutput, SimpleWorkflowDataOutputHeadersValue, SimpleWorkflowDataOutputRuntime, SimpleWorkflowEdit, SimpleWorkflowFlags, SimpleWorkflowQuery, SimpleWorkflowQueryFlags, SimpleWorkflowResponse, SimpleWorkflowsResponse, SpanInput, SpanInputEndTime, SpanInputStartTime, SpanOutput, SpanOutputEndTime, SpanOutputStartTime, SpanResponse, SpanType, SpansNodeInput, SpansNodeInputEndTime, SpansNodeInputSpansValue, SpansNodeInputStartTime, SpansNodeOutput, SpansNodeOutputEndTime, SpansNodeOutputSpansValue, SpansNodeOutputStartTime, SpansResponse, SpansTreeInput, SpansTreeInputSpansValue, SpansTreeOutput, SpansTreeOutputSpansValue, SsoProviderDto, SsoProviderInfo, SsoProviderSettingsDto, SsoProviders, StandardProviderDto, StandardProviderKind, StandardProviderSettingsDto, Status, StringOperator, TestcaseInput, TestcaseOutput, TestcaseResponse, TestcasesResponse, Testset, TestsetCreate, TestsetEdit, TestsetFlags, TestsetQuery, TestsetResponse, TestsetRevision, TestsetRevisionCommit, TestsetRevisionCreate, TestsetRevisionDataInput, TestsetRevisionDataOutput, TestsetRevisionDelta, TestsetRevisionDeltaColumns, TestsetRevisionDeltaRows, TestsetRevisionEdit, TestsetRevisionQuery, TestsetRevisionResponse, TestsetRevisionsLog, TestsetRevisionsResponse, TestsetVariant, TestsetVariantCreate, TestsetVariantEdit, TestsetVariantQuery, TestsetVariantResponse, TestsetVariantsResponse, TestsetsResponse, TextOptions, ToolAuthScheme, ToolCallData, ToolCallFunction, ToolCallResponse, ToolCatalogAction, ToolCatalogActionDetails, ToolCatalogActionResponse, ToolCatalogActionResponseAction, ToolCatalogActionsResponse, ToolCatalogActionsResponseActionsItem, ToolCatalogIntegration, ToolCatalogIntegrationDetails, ToolCatalogIntegrationResponse, ToolCatalogIntegrationResponseIntegration, ToolCatalogIntegrationsResponse, ToolCatalogIntegrationsResponseIntegrationsItem, ToolCatalogProvider, ToolCatalogProviderDetails, ToolCatalogProviderResponse, ToolCatalogProviderResponseProvider, ToolCatalogProvidersResponse, ToolCatalogProvidersResponseProvidersItem, ToolConnection, ToolConnectionCreate, ToolConnectionCreateData, ToolConnectionResponse, ToolConnectionStatus, ToolConnectionsResponse, ToolProviderKind, ToolResult, ToolResultData, TraceIdResponse, TraceIdsResponse, TraceInput, TraceInputSpansValue, TraceOutput, TraceOutputSpansValue, TraceRequest, TraceResponse, TraceType, TracesRequest, TracesResponse, TracingQuery, UserIdsResponse, ValidationError, ValidationErrorLocItem, VariantFork, WebhookDeliveriesResponse, WebhookDelivery, WebhookDeliveryCreate, WebhookDeliveryData, WebhookDeliveryQuery, WebhookDeliveryResponse, WebhookDeliveryResponseInfo, WebhookEventType, WebhookProviderDto, WebhookProviderSettingsDto, WebhookSubscription, WebhookSubscriptionCreate, WebhookSubscriptionData, WebhookSubscriptionDataAuthMode, WebhookSubscriptionEdit, WebhookSubscriptionQuery, WebhookSubscriptionResponse, WebhookSubscriptionsResponse, Windowing, WindowingOrder, Workflow, WorkflowArtifactFlags, WorkflowCatalogFlags, WorkflowCatalogPreset, WorkflowCatalogPresetResponse, WorkflowCatalogPresetsResponse, WorkflowCatalogTemplate, WorkflowCatalogTemplateResponse, WorkflowCatalogTemplatesResponse, WorkflowCatalogType, WorkflowCatalogTypeResponse, WorkflowCatalogTypesResponse, WorkflowCreate, WorkflowEdit, WorkflowFlags, WorkflowFork, WorkflowResponse, WorkflowRevisionCommit, WorkflowRevisionCreate, WorkflowRevisionDataInput, WorkflowRevisionDataInputHeadersValue, WorkflowRevisionDataInputRuntime, WorkflowRevisionDataOutput, WorkflowRevisionDataOutputHeadersValue, WorkflowRevisionDataOutputRuntime, WorkflowRevisionEdit, WorkflowRevisionFlags, WorkflowRevisionFork, WorkflowRevisionInput, WorkflowRevisionOutput, WorkflowRevisionResolveResponse, WorkflowRevisionResponse, WorkflowRevisionsLog, WorkflowRevisionsResponse, WorkflowVariant, WorkflowVariantCreate, WorkflowVariantEdit, WorkflowVariantFlags, WorkflowVariantFork, WorkflowVariantResponse, WorkflowVariantsResponse, WorkflowsResponse, Workspace, WorkspaceMemberResponse, WorkspacePermission, WorkspaceResponse, WorkspaceRole + from .types import AdminAccountCreateOptions, AdminAccountRead, AdminAccountsCreate, AdminAccountsDelete, AdminAccountsDeleteTarget, AdminAccountsResponse, AdminApiKeyCreate, AdminApiKeyResponse, AdminDeleteResponse, AdminDeletedEntities, AdminDeletedEntity, AdminOrganizationCreate, AdminOrganizationMembershipCreate, AdminOrganizationMembershipRead, AdminOrganizationRead, AdminProjectCreate, AdminProjectMembershipCreate, AdminProjectMembershipRead, AdminProjectRead, AdminSimpleAccountCreate, AdminSimpleAccountDeleteEntry, AdminSimpleAccountRead, AdminSimpleAccountsApiKeysCreate, AdminSimpleAccountsCreate, AdminSimpleAccountsDelete, AdminSimpleAccountsOrganizationsCreate, AdminSimpleAccountsOrganizationsMembershipsCreate, AdminSimpleAccountsOrganizationsTransferOwnership, AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjects, AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjectsZero, AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspaces, AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspacesZero, AdminSimpleAccountsOrganizationsTransferOwnershipResponse, AdminSimpleAccountsProjectsCreate, AdminSimpleAccountsProjectsMembershipsCreate, AdminSimpleAccountsResponse, AdminSimpleAccountsUsersCreate, AdminSimpleAccountsUsersIdentitiesCreate, AdminSimpleAccountsUsersResetPassword, AdminSimpleAccountsWorkspacesCreate, AdminSimpleAccountsWorkspacesMembershipsCreate, AdminStructuredError, AdminSubscriptionCreate, AdminSubscriptionRead, AdminUserCreate, AdminUserIdentityCreate, AdminUserIdentityRead, AdminUserIdentityReadStatus, AdminUserRead, AdminWorkspaceCreate, AdminWorkspaceMembershipCreate, AdminWorkspaceMembershipRead, AdminWorkspaceRead, Analytics, AnalyticsResponse, Annotation, AnnotationCreate, AnnotationCreateLinks, AnnotationEdit, AnnotationEditLinks, AnnotationLinkResponse, AnnotationLinks, AnnotationQuery, AnnotationQueryLinks, AnnotationResponse, AnnotationsResponse, Application, ApplicationArtifactFlags, ApplicationArtifactQueryFlags, ApplicationCatalogPreset, ApplicationCatalogPresetResponse, ApplicationCatalogPresetsResponse, ApplicationCatalogTemplate, ApplicationCatalogTemplateResponse, ApplicationCatalogTemplatesResponse, ApplicationCatalogType, ApplicationCatalogTypesResponse, ApplicationCreate, ApplicationEdit, ApplicationFlags, ApplicationFork, ApplicationQuery, ApplicationResponse, ApplicationRevision, ApplicationRevisionCommit, ApplicationRevisionCreate, ApplicationRevisionDataInput, ApplicationRevisionDataInputHeadersValue, ApplicationRevisionDataInputRuntime, ApplicationRevisionDataOutput, ApplicationRevisionDataOutputHeadersValue, ApplicationRevisionDataOutputRuntime, ApplicationRevisionEdit, ApplicationRevisionFlags, ApplicationRevisionFork, ApplicationRevisionQuery, ApplicationRevisionQueryFlags, ApplicationRevisionResolveResponse, ApplicationRevisionResponse, ApplicationRevisionsLog, ApplicationRevisionsResponse, ApplicationVariant, ApplicationVariantCreate, ApplicationVariantEdit, ApplicationVariantFlags, ApplicationVariantFork, ApplicationVariantResponse, ApplicationVariantsResponse, ApplicationsResponse, BodyConfigsFetchVariantsConfigsFetchPost, Bucket, CollectStatusResponse, ComparisonOperator, Condition, ConditionOperator, ConditionOptions, ConditionValue, ConfigResponseModel, CustomModelSettingsDto, CustomProviderDto, CustomProviderKind, CustomProviderSettingsDto, DictOperator, DiscoverResponse, DiscoverResponseMethodsValue, EeSrcModelsApiOrganizationModelsOrganization, EntityRef, Environment, EnvironmentCreate, EnvironmentEdit, EnvironmentFlags, EnvironmentQueryFlags, EnvironmentResponse, EnvironmentRevision, EnvironmentRevisionCommit, EnvironmentRevisionCreate, EnvironmentRevisionData, EnvironmentRevisionDelta, EnvironmentRevisionEdit, EnvironmentRevisionResolveResponse, EnvironmentRevisionResponse, EnvironmentRevisionsLog, EnvironmentRevisionsResponse, EnvironmentVariant, EnvironmentVariantCreate, EnvironmentVariantEdit, EnvironmentVariantResponse, EnvironmentVariantsResponse, EnvironmentsResponse, ErrorPolicy, EvaluationMetrics, EvaluationMetricsCreate, EvaluationMetricsEdit, EvaluationMetricsIdsResponse, EvaluationMetricsQuery, EvaluationMetricsQueryScenarioIds, EvaluationMetricsQueryTimestamps, EvaluationMetricsRefresh, EvaluationMetricsResponse, EvaluationQueue, EvaluationQueueCreate, EvaluationQueueData, EvaluationQueueEdit, EvaluationQueueFlags, EvaluationQueueIdResponse, EvaluationQueueIdsResponse, EvaluationQueueQuery, EvaluationQueueQueryFlags, EvaluationQueueResponse, EvaluationQueueScenariosQuery, EvaluationQueuesResponse, EvaluationResult, EvaluationResultCreate, EvaluationResultEdit, EvaluationResultIdResponse, EvaluationResultIdsResponse, EvaluationResultQuery, EvaluationResultResponse, EvaluationResultsResponse, EvaluationRun, EvaluationRunCreate, EvaluationRunData, EvaluationRunDataMapping, EvaluationRunDataMappingColumn, EvaluationRunDataMappingStep, EvaluationRunDataStep, EvaluationRunDataStepInput, EvaluationRunDataStepOrigin, EvaluationRunDataStepType, EvaluationRunEdit, EvaluationRunFlags, EvaluationRunIdResponse, EvaluationRunIdsRequest, EvaluationRunIdsResponse, EvaluationRunQuery, EvaluationRunQueryFlags, EvaluationRunResponse, EvaluationRunsResponse, EvaluationScenario, EvaluationScenarioCreate, EvaluationScenarioEdit, EvaluationScenarioIdResponse, EvaluationScenarioIdsResponse, EvaluationScenarioQuery, EvaluationScenarioResponse, EvaluationScenariosResponse, EvaluationStatus, Evaluator, EvaluatorArtifactFlags, EvaluatorArtifactQueryFlags, EvaluatorCatalogPreset, EvaluatorCatalogPresetResponse, EvaluatorCatalogPresetsResponse, EvaluatorCatalogTemplate, EvaluatorCatalogTemplateResponse, EvaluatorCatalogTemplatesResponse, EvaluatorCatalogType, EvaluatorCatalogTypesResponse, EvaluatorCreate, EvaluatorEdit, EvaluatorFlags, EvaluatorFork, EvaluatorQuery, EvaluatorResponse, EvaluatorRevision, EvaluatorRevisionCommit, EvaluatorRevisionCreate, EvaluatorRevisionDataInput, EvaluatorRevisionDataInputHeadersValue, EvaluatorRevisionDataInputRuntime, EvaluatorRevisionDataOutput, EvaluatorRevisionDataOutputHeadersValue, EvaluatorRevisionDataOutputRuntime, EvaluatorRevisionEdit, EvaluatorRevisionFlags, EvaluatorRevisionFork, EvaluatorRevisionQuery, EvaluatorRevisionQueryFlags, EvaluatorRevisionResolveResponse, EvaluatorRevisionResponse, EvaluatorRevisionsLog, EvaluatorRevisionsResponse, EvaluatorTemplate, EvaluatorTemplatesResponse, EvaluatorVariant, EvaluatorVariantCreate, EvaluatorVariantEdit, EvaluatorVariantFlags, EvaluatorVariantFork, EvaluatorVariantResponse, EvaluatorVariantsResponse, EvaluatorsResponse, ExistenceOperator, FilteringInput, FilteringInputConditionsItem, FilteringOutput, FilteringOutputConditionsItem, Focus, Folder, FolderCreate, FolderEdit, FolderIdResponse, FolderKind, FolderQuery, FolderQueryKinds, FolderResponse, FoldersResponse, Format, Formatting, FullJsonInput, FullJsonOutput, Header, HttpValidationError, InviteRequest, InviteRequestRolesItem, Invocation, InvocationCreate, InvocationCreateLinks, InvocationEdit, InvocationEditLinks, InvocationLinkResponse, InvocationLinks, InvocationQuery, InvocationQueryLinks, InvocationResponse, InvocationsResponse, JsonSchemasInput, JsonSchemasOutput, LabelJsonInput, LabelJsonOutput, LegacyLifecycleDto, ListApiKeysResponse, ListOperator, ListOptions, LogicalOperator, MetricSpec, MetricType, MetricsBucket, NumericOperator, OTelEventInput, OTelEventInputTimestamp, OTelEventOutput, OTelEventOutputTimestamp, OTelHashInput, OTelHashOutput, OTelLinkInput, OTelLinkOutput, OTelLinksResponse, OTelReferenceInput, OTelReferenceOutput, OTelSpanKind, OTelStatusCode, OTelTracingRequest, OTelTracingResponse, OldAnalyticsResponse, OrganizationDetails, OrganizationDomainResponse, OrganizationProviderResponse, OrganizationUpdate, OssSrcModelsApiOrganizationModelsOrganization, Permission, ProjectsResponse, QueriesResponse, Query, QueryCreate, QueryEdit, QueryFlags, QueryQueryFlags, QueryResponse, QueryRevision, QueryRevisionCommit, QueryRevisionCreate, QueryRevisionDataInput, QueryRevisionDataOutput, QueryRevisionEdit, QueryRevisionQuery, QueryRevisionResponse, QueryRevisionsLog, QueryRevisionsResponse, QueryVariant, QueryVariantCreate, QueryVariantEdit, QueryVariantQuery, QueryVariantResponse, QueryVariantsResponse, Reference, ReferenceRequestModelInput, ReferenceRequestModelOutput, ResolutionInfo, RevisionFork, SecretDto, SecretDtoData, SecretKind, SecretResponseDto, SecretResponseDtoData, SessionIdsResponse, SimpleApplication, SimpleApplicationCreate, SimpleApplicationDataInput, SimpleApplicationDataInputHeadersValue, SimpleApplicationDataInputRuntime, SimpleApplicationDataOutput, SimpleApplicationDataOutputHeadersValue, SimpleApplicationDataOutputRuntime, SimpleApplicationEdit, SimpleApplicationFlags, SimpleApplicationQuery, SimpleApplicationQueryFlags, SimpleApplicationResponse, SimpleApplicationsResponse, SimpleEnvironment, SimpleEnvironmentCreate, SimpleEnvironmentEdit, SimpleEnvironmentQuery, SimpleEnvironmentResponse, SimpleEnvironmentsResponse, SimpleEvaluation, SimpleEvaluationCreate, SimpleEvaluationData, SimpleEvaluationDataApplicationSteps, SimpleEvaluationDataApplicationStepsOneValue, SimpleEvaluationDataEvaluatorSteps, SimpleEvaluationDataEvaluatorStepsOneValue, SimpleEvaluationDataQuerySteps, SimpleEvaluationDataQueryStepsOneValue, SimpleEvaluationDataTestsetSteps, SimpleEvaluationDataTestsetStepsOneValue, SimpleEvaluationEdit, SimpleEvaluationIdResponse, SimpleEvaluationQuery, SimpleEvaluationResponse, SimpleEvaluationsResponse, SimpleEvaluator, SimpleEvaluatorCreate, SimpleEvaluatorDataInput, SimpleEvaluatorDataInputHeadersValue, SimpleEvaluatorDataInputRuntime, SimpleEvaluatorDataOutput, SimpleEvaluatorDataOutputHeadersValue, SimpleEvaluatorDataOutputRuntime, SimpleEvaluatorEdit, SimpleEvaluatorFlags, SimpleEvaluatorQuery, SimpleEvaluatorQueryFlags, SimpleEvaluatorResponse, SimpleEvaluatorsResponse, SimpleQueriesResponse, SimpleQuery, SimpleQueryCreate, SimpleQueryEdit, SimpleQueryQuery, SimpleQueryResponse, SimpleQueue, SimpleQueueCreate, SimpleQueueData, SimpleQueueDataEvaluators, SimpleQueueDataEvaluatorsOneValue, SimpleQueueIdResponse, SimpleQueueKind, SimpleQueueQuery, SimpleQueueResponse, SimpleQueueScenariosQuery, SimpleQueueScenariosResponse, SimpleQueueSettings, SimpleQueuesResponse, SimpleTestset, SimpleTestsetCreate, SimpleTestsetEdit, SimpleTestsetQuery, SimpleTestsetResponse, SimpleTestsetsResponse, SimpleTrace, SimpleTraceChannel, SimpleTraceCreate, SimpleTraceCreateLinks, SimpleTraceEdit, SimpleTraceEditLinks, SimpleTraceKind, SimpleTraceLinkResponse, SimpleTraceLinks, SimpleTraceOrigin, SimpleTraceQuery, SimpleTraceQueryLinks, SimpleTraceReferences, SimpleTraceResponse, SimpleTracesResponse, SimpleWorkflow, SimpleWorkflowCreate, SimpleWorkflowDataInput, SimpleWorkflowDataInputHeadersValue, SimpleWorkflowDataInputRuntime, SimpleWorkflowDataOutput, SimpleWorkflowDataOutputHeadersValue, SimpleWorkflowDataOutputRuntime, SimpleWorkflowEdit, SimpleWorkflowFlags, SimpleWorkflowQuery, SimpleWorkflowQueryFlags, SimpleWorkflowResponse, SimpleWorkflowsResponse, SpanInput, SpanInputEndTime, SpanInputStartTime, SpanOutput, SpanOutputEndTime, SpanOutputStartTime, SpanResponse, SpanType, SpansNodeInput, SpansNodeInputEndTime, SpansNodeInputSpansValue, SpansNodeInputStartTime, SpansNodeOutput, SpansNodeOutputEndTime, SpansNodeOutputSpansValue, SpansNodeOutputStartTime, SpansResponse, SpansTreeInput, SpansTreeInputSpansValue, SpansTreeOutput, SpansTreeOutputSpansValue, SsoProviderDto, SsoProviderInfo, SsoProviderSettingsDto, SsoProviders, StandardProviderDto, StandardProviderKind, StandardProviderSettingsDto, Status, StringOperator, TestcaseInput, TestcaseOutput, TestcaseResponse, TestcasesResponse, Testset, TestsetCreate, TestsetEdit, TestsetFlags, TestsetQuery, TestsetResponse, TestsetRevision, TestsetRevisionCommit, TestsetRevisionCreate, TestsetRevisionDataInput, TestsetRevisionDataOutput, TestsetRevisionDelta, TestsetRevisionDeltaColumns, TestsetRevisionDeltaRows, TestsetRevisionEdit, TestsetRevisionQuery, TestsetRevisionResponse, TestsetRevisionsLog, TestsetRevisionsResponse, TestsetVariant, TestsetVariantCreate, TestsetVariantEdit, TestsetVariantQuery, TestsetVariantResponse, TestsetVariantsResponse, TestsetsResponse, TextOptions, ToolAuthScheme, ToolCallData, ToolCallFunction, ToolCallResponse, ToolCatalogAction, ToolCatalogActionDetails, ToolCatalogActionResponse, ToolCatalogActionResponseAction, ToolCatalogActionsResponse, ToolCatalogActionsResponseActionsItem, ToolCatalogIntegration, ToolCatalogIntegrationDetails, ToolCatalogIntegrationResponse, ToolCatalogIntegrationResponseIntegration, ToolCatalogIntegrationsResponse, ToolCatalogIntegrationsResponseIntegrationsItem, ToolCatalogProvider, ToolCatalogProviderDetails, ToolCatalogProviderResponse, ToolCatalogProviderResponseProvider, ToolCatalogProvidersResponse, ToolCatalogProvidersResponseProvidersItem, ToolConnection, ToolConnectionCreate, ToolConnectionCreateData, ToolConnectionResponse, ToolConnectionStatus, ToolConnectionsResponse, ToolProviderKind, ToolResult, ToolResultData, TraceIdResponse, TraceIdsResponse, TraceInput, TraceInputSpansValue, TraceOutput, TraceOutputSpansValue, TraceRequest, TraceResponse, TraceType, TracesRequest, TracesResponse, TracingQuery, UserIdsResponse, ValidationError, ValidationErrorLocItem, VariantFork, WebhookDeliveriesResponse, WebhookDelivery, WebhookDeliveryCreate, WebhookDeliveryData, WebhookDeliveryQuery, WebhookDeliveryResponse, WebhookDeliveryResponseInfo, WebhookEventType, WebhookProviderDto, WebhookProviderSettingsDto, WebhookSubscription, WebhookSubscriptionCreate, WebhookSubscriptionData, WebhookSubscriptionDataAuthMode, WebhookSubscriptionEdit, WebhookSubscriptionQuery, WebhookSubscriptionResponse, WebhookSubscriptionsResponse, Windowing, WindowingOrder, Workflow, WorkflowArtifactFlags, WorkflowCatalogFlags, WorkflowCatalogPreset, WorkflowCatalogPresetResponse, WorkflowCatalogPresetsResponse, WorkflowCatalogTemplate, WorkflowCatalogTemplateResponse, WorkflowCatalogTemplatesResponse, WorkflowCatalogType, WorkflowCatalogTypeResponse, WorkflowCatalogTypesResponse, WorkflowCreate, WorkflowEdit, WorkflowFlags, WorkflowFork, WorkflowResponse, WorkflowRevisionCommit, WorkflowRevisionCreate, WorkflowRevisionDataInput, WorkflowRevisionDataInputHeadersValue, WorkflowRevisionDataInputRuntime, WorkflowRevisionDataOutput, WorkflowRevisionDataOutputHeadersValue, WorkflowRevisionDataOutputRuntime, WorkflowRevisionEdit, WorkflowRevisionFlags, WorkflowRevisionFork, WorkflowRevisionInput, WorkflowRevisionOutput, WorkflowRevisionResolveResponse, WorkflowRevisionResponse, WorkflowRevisionsLog, WorkflowRevisionsResponse, WorkflowVariant, WorkflowVariantCreate, WorkflowVariantEdit, WorkflowVariantFlags, WorkflowVariantFork, WorkflowVariantResponse, WorkflowVariantsResponse, WorkflowsResponse, Workspace, WorkspaceMemberResponse, WorkspacePermission, WorkspaceResponse from .errors import UnprocessableEntityError from . import access, annotations, applications, billing, environments, evaluations, evaluators, folders, invocations, keys, legacy, organizations, projects, queries, secrets, status, testcases, testsets, tools, traces, users, webhooks, workflows, workspaces from .applications import QueryApplicationVariantsRequestOrder @@ -19,7 +19,7 @@ from .traces import QuerySpansAnalyticsRequestNewest, QuerySpansAnalyticsRequestOldest from .webhooks import WebhookSubscriptionTestRequestSubscription from .workflows import QueryWorkflowRevisionsRequestOrder, QueryWorkflowVariantsRequestOrder, QueryWorkflowsRequestOrder -_dynamic_imports: typing.Dict[str, str] = {"AdminAccountCreateOptions": ".types", "AdminAccountRead": ".types", "AdminAccountsCreate": ".types", "AdminAccountsDelete": ".types", "AdminAccountsDeleteTarget": ".types", "AdminAccountsResponse": ".types", "AdminApiKeyCreate": ".types", "AdminApiKeyResponse": ".types", "AdminDeleteResponse": ".types", "AdminDeletedEntities": ".types", "AdminDeletedEntity": ".types", "AdminOrganizationCreate": ".types", "AdminOrganizationMembershipCreate": ".types", "AdminOrganizationMembershipRead": ".types", "AdminOrganizationRead": ".types", "AdminProjectCreate": ".types", "AdminProjectMembershipCreate": ".types", "AdminProjectMembershipRead": ".types", "AdminProjectRead": ".types", "AdminSimpleAccountCreate": ".types", "AdminSimpleAccountDeleteEntry": ".types", "AdminSimpleAccountRead": ".types", "AdminSimpleAccountsApiKeysCreate": ".types", "AdminSimpleAccountsCreate": ".types", "AdminSimpleAccountsDelete": ".types", "AdminSimpleAccountsOrganizationsCreate": ".types", "AdminSimpleAccountsOrganizationsMembershipsCreate": ".types", "AdminSimpleAccountsOrganizationsTransferOwnership": ".types", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjects": ".types", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjectsZero": ".types", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspaces": ".types", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspacesZero": ".types", "AdminSimpleAccountsOrganizationsTransferOwnershipResponse": ".types", "AdminSimpleAccountsProjectsCreate": ".types", "AdminSimpleAccountsProjectsMembershipsCreate": ".types", "AdminSimpleAccountsResponse": ".types", "AdminSimpleAccountsUsersCreate": ".types", "AdminSimpleAccountsUsersIdentitiesCreate": ".types", "AdminSimpleAccountsUsersResetPassword": ".types", "AdminSimpleAccountsWorkspacesCreate": ".types", "AdminSimpleAccountsWorkspacesMembershipsCreate": ".types", "AdminStructuredError": ".types", "AdminSubscriptionCreate": ".types", "AdminSubscriptionRead": ".types", "AdminUserCreate": ".types", "AdminUserIdentityCreate": ".types", "AdminUserIdentityRead": ".types", "AdminUserIdentityReadStatus": ".types", "AdminUserRead": ".types", "AdminWorkspaceCreate": ".types", "AdminWorkspaceMembershipCreate": ".types", "AdminWorkspaceMembershipRead": ".types", "AdminWorkspaceRead": ".types", "AgentaApi": ".client", "AgentaApiEnvironment": ".environment", "Analytics": ".types", "AnalyticsResponse": ".types", "Annotation": ".types", "AnnotationCreate": ".types", "AnnotationCreateLinks": ".types", "AnnotationEdit": ".types", "AnnotationEditLinks": ".types", "AnnotationLinkResponse": ".types", "AnnotationLinks": ".types", "AnnotationQuery": ".types", "AnnotationQueryLinks": ".types", "AnnotationResponse": ".types", "AnnotationsResponse": ".types", "Application": ".types", "ApplicationArtifactFlags": ".types", "ApplicationArtifactQueryFlags": ".types", "ApplicationCatalogPreset": ".types", "ApplicationCatalogPresetResponse": ".types", "ApplicationCatalogPresetsResponse": ".types", "ApplicationCatalogTemplate": ".types", "ApplicationCatalogTemplateResponse": ".types", "ApplicationCatalogTemplatesResponse": ".types", "ApplicationCatalogType": ".types", "ApplicationCatalogTypesResponse": ".types", "ApplicationCreate": ".types", "ApplicationEdit": ".types", "ApplicationFlags": ".types", "ApplicationFork": ".types", "ApplicationQuery": ".types", "ApplicationResponse": ".types", "ApplicationRevision": ".types", "ApplicationRevisionCommit": ".types", "ApplicationRevisionCreate": ".types", "ApplicationRevisionDataInput": ".types", "ApplicationRevisionDataInputHeadersValue": ".types", "ApplicationRevisionDataInputRuntime": ".types", "ApplicationRevisionDataOutput": ".types", "ApplicationRevisionDataOutputHeadersValue": ".types", "ApplicationRevisionDataOutputRuntime": ".types", "ApplicationRevisionEdit": ".types", "ApplicationRevisionFlags": ".types", "ApplicationRevisionFork": ".types", "ApplicationRevisionQuery": ".types", "ApplicationRevisionQueryFlags": ".types", "ApplicationRevisionResolveResponse": ".types", "ApplicationRevisionResponse": ".types", "ApplicationRevisionsLog": ".types", "ApplicationRevisionsResponse": ".types", "ApplicationVariant": ".types", "ApplicationVariantCreate": ".types", "ApplicationVariantEdit": ".types", "ApplicationVariantFlags": ".types", "ApplicationVariantFork": ".types", "ApplicationVariantResponse": ".types", "ApplicationVariantsResponse": ".types", "ApplicationsResponse": ".types", "AsyncAgentaApi": ".client", "BodyConfigsFetchVariantsConfigsFetchPost": ".types", "Bucket": ".types", "CollectStatusResponse": ".types", "ComparisonOperator": ".types", "Condition": ".types", "ConditionOperator": ".types", "ConditionOptions": ".types", "ConditionValue": ".types", "ConfigResponseModel": ".types", "CreateSimpleTestsetFromFileRequestFileType": ".testsets", "CreateTestsetRevisionFromFileRequestFileType": ".testsets", "CustomModelSettingsDto": ".types", "CustomProviderDto": ".types", "CustomProviderKind": ".types", "CustomProviderSettingsDto": ".types", "DictOperator": ".types", "DiscoverResponse": ".types", "DiscoverResponseMethodsValue": ".types", "EditSimpleTestsetFromFileRequestFileType": ".testsets", "EeSrcModelsApiOrganizationModelsOrganization": ".types", "EntityRef": ".types", "Environment": ".types", "EnvironmentCreate": ".types", "EnvironmentEdit": ".types", "EnvironmentFlags": ".types", "EnvironmentQueryFlags": ".types", "EnvironmentResponse": ".types", "EnvironmentRevision": ".types", "EnvironmentRevisionCommit": ".types", "EnvironmentRevisionCreate": ".types", "EnvironmentRevisionData": ".types", "EnvironmentRevisionDelta": ".types", "EnvironmentRevisionEdit": ".types", "EnvironmentRevisionResolveResponse": ".types", "EnvironmentRevisionResponse": ".types", "EnvironmentRevisionsLog": ".types", "EnvironmentRevisionsResponse": ".types", "EnvironmentVariant": ".types", "EnvironmentVariantCreate": ".types", "EnvironmentVariantEdit": ".types", "EnvironmentVariantResponse": ".types", "EnvironmentVariantsResponse": ".types", "EnvironmentsResponse": ".types", "ErrorPolicy": ".types", "EvaluationMetrics": ".types", "EvaluationMetricsCreate": ".types", "EvaluationMetricsEdit": ".types", "EvaluationMetricsIdsResponse": ".types", "EvaluationMetricsQuery": ".types", "EvaluationMetricsQueryScenarioIds": ".types", "EvaluationMetricsQueryTimestamps": ".types", "EvaluationMetricsRefresh": ".types", "EvaluationMetricsResponse": ".types", "EvaluationQueue": ".types", "EvaluationQueueCreate": ".types", "EvaluationQueueData": ".types", "EvaluationQueueEdit": ".types", "EvaluationQueueFlags": ".types", "EvaluationQueueIdResponse": ".types", "EvaluationQueueIdsResponse": ".types", "EvaluationQueueQuery": ".types", "EvaluationQueueQueryFlags": ".types", "EvaluationQueueResponse": ".types", "EvaluationQueueScenariosQuery": ".types", "EvaluationQueuesResponse": ".types", "EvaluationResult": ".types", "EvaluationResultCreate": ".types", "EvaluationResultEdit": ".types", "EvaluationResultIdResponse": ".types", "EvaluationResultIdsResponse": ".types", "EvaluationResultQuery": ".types", "EvaluationResultResponse": ".types", "EvaluationResultsResponse": ".types", "EvaluationRun": ".types", "EvaluationRunCreate": ".types", "EvaluationRunData": ".types", "EvaluationRunDataMapping": ".types", "EvaluationRunDataMappingColumn": ".types", "EvaluationRunDataMappingStep": ".types", "EvaluationRunDataStep": ".types", "EvaluationRunDataStepInput": ".types", "EvaluationRunDataStepOrigin": ".types", "EvaluationRunDataStepType": ".types", "EvaluationRunEdit": ".types", "EvaluationRunFlags": ".types", "EvaluationRunIdResponse": ".types", "EvaluationRunIdsRequest": ".types", "EvaluationRunIdsResponse": ".types", "EvaluationRunQuery": ".types", "EvaluationRunQueryFlags": ".types", "EvaluationRunResponse": ".types", "EvaluationRunsResponse": ".types", "EvaluationScenario": ".types", "EvaluationScenarioCreate": ".types", "EvaluationScenarioEdit": ".types", "EvaluationScenarioIdResponse": ".types", "EvaluationScenarioIdsResponse": ".types", "EvaluationScenarioQuery": ".types", "EvaluationScenarioResponse": ".types", "EvaluationScenariosResponse": ".types", "EvaluationStatus": ".types", "Evaluator": ".types", "EvaluatorArtifactFlags": ".types", "EvaluatorArtifactQueryFlags": ".types", "EvaluatorCatalogPreset": ".types", "EvaluatorCatalogPresetResponse": ".types", "EvaluatorCatalogPresetsResponse": ".types", "EvaluatorCatalogTemplate": ".types", "EvaluatorCatalogTemplateResponse": ".types", "EvaluatorCatalogTemplatesResponse": ".types", "EvaluatorCatalogType": ".types", "EvaluatorCatalogTypesResponse": ".types", "EvaluatorCreate": ".types", "EvaluatorEdit": ".types", "EvaluatorFlags": ".types", "EvaluatorFork": ".types", "EvaluatorQuery": ".types", "EvaluatorResponse": ".types", "EvaluatorRevision": ".types", "EvaluatorRevisionCommit": ".types", "EvaluatorRevisionCreate": ".types", "EvaluatorRevisionDataInput": ".types", "EvaluatorRevisionDataInputHeadersValue": ".types", "EvaluatorRevisionDataInputRuntime": ".types", "EvaluatorRevisionDataOutput": ".types", "EvaluatorRevisionDataOutputHeadersValue": ".types", "EvaluatorRevisionDataOutputRuntime": ".types", "EvaluatorRevisionEdit": ".types", "EvaluatorRevisionFlags": ".types", "EvaluatorRevisionFork": ".types", "EvaluatorRevisionQuery": ".types", "EvaluatorRevisionQueryFlags": ".types", "EvaluatorRevisionResolveResponse": ".types", "EvaluatorRevisionResponse": ".types", "EvaluatorRevisionsLog": ".types", "EvaluatorRevisionsResponse": ".types", "EvaluatorTemplate": ".types", "EvaluatorTemplatesResponse": ".types", "EvaluatorVariant": ".types", "EvaluatorVariantCreate": ".types", "EvaluatorVariantEdit": ".types", "EvaluatorVariantFlags": ".types", "EvaluatorVariantFork": ".types", "EvaluatorVariantResponse": ".types", "EvaluatorVariantsResponse": ".types", "EvaluatorsResponse": ".types", "ExistenceOperator": ".types", "FetchLegacyAnalyticsRequestNewest": ".legacy", "FetchLegacyAnalyticsRequestOldest": ".legacy", "FetchSimpleTestsetToFileRequestFileType": ".testsets", "FetchTestsetRevisionToFileRequestFileType": ".testsets", "FilteringInput": ".types", "FilteringInputConditionsItem": ".types", "FilteringOutput": ".types", "FilteringOutputConditionsItem": ".types", "Focus": ".types", "Folder": ".types", "FolderCreate": ".types", "FolderEdit": ".types", "FolderIdResponse": ".types", "FolderKind": ".types", "FolderQuery": ".types", "FolderQueryKinds": ".types", "FolderResponse": ".types", "FoldersResponse": ".types", "Format": ".types", "Formatting": ".types", typing.Any: ".types", typing.Any: ".types", "Header": ".types", "HttpValidationError": ".types", "InviteRequest": ".types", "InviteRequestRolesItem": ".types", "Invocation": ".types", "InvocationCreate": ".types", "InvocationCreateLinks": ".types", "InvocationEdit": ".types", "InvocationEditLinks": ".types", "InvocationLinkResponse": ".types", "InvocationLinks": ".types", "InvocationQuery": ".types", "InvocationQueryLinks": ".types", "InvocationResponse": ".types", "InvocationsResponse": ".types", "JsonSchemasInput": ".types", "JsonSchemasOutput": ".types", typing.Any: ".types", typing.Any: ".types", "LegacyLifecycleDto": ".types", "ListApiKeysResponse": ".types", "ListOperator": ".types", "ListOptions": ".types", "LogicalOperator": ".types", "MetricSpec": ".types", "MetricType": ".types", "MetricsBucket": ".types", "NumericOperator": ".types", "OTelEventInput": ".types", "OTelEventInputTimestamp": ".types", "OTelEventOutput": ".types", "OTelEventOutputTimestamp": ".types", "OTelHashInput": ".types", "OTelHashOutput": ".types", "OTelLinkInput": ".types", "OTelLinkOutput": ".types", "OTelLinksResponse": ".types", "OTelReferenceInput": ".types", "OTelReferenceOutput": ".types", "OTelSpanKind": ".types", "OTelStatusCode": ".types", "OTelTracingRequest": ".types", "OTelTracingResponse": ".types", "OldAnalyticsResponse": ".types", "OrganizationDetails": ".types", "OrganizationDomainResponse": ".types", "OrganizationProviderResponse": ".types", "OrganizationUpdate": ".types", "OssSrcModelsApiOrganizationModelsOrganization": ".types", "Permission": ".types", "Plan": ".types", "ProjectsResponse": ".types", "QueriesResponse": ".types", "Query": ".types", "QueryApplicationVariantsRequestOrder": ".applications", "QueryCreate": ".types", "QueryEdit": ".types", "QueryEnvironmentRevisionsRequestOrder": ".environments", "QueryEnvironmentVariantsRequestOrder": ".environments", "QueryEnvironmentsRequestOrder": ".environments", "QueryEvaluatorVariantsRequestOrder": ".evaluators", "QueryFlags": ".types", "QueryQueriesRequestOrder": ".queries", "QueryQueryFlags": ".types", "QueryResponse": ".types", "QueryRevision": ".types", "QueryRevisionCommit": ".types", "QueryRevisionCreate": ".types", "QueryRevisionDataInput": ".types", "QueryRevisionDataOutput": ".types", "QueryRevisionEdit": ".types", "QueryRevisionQuery": ".types", "QueryRevisionResponse": ".types", "QueryRevisionsLog": ".types", "QueryRevisionsResponse": ".types", "QuerySpansAnalyticsRequestNewest": ".traces", "QuerySpansAnalyticsRequestOldest": ".traces", "QueryVariant": ".types", "QueryVariantCreate": ".types", "QueryVariantEdit": ".types", "QueryVariantQuery": ".types", "QueryVariantResponse": ".types", "QueryVariantsResponse": ".types", "QueryWorkflowRevisionsRequestOrder": ".workflows", "QueryWorkflowVariantsRequestOrder": ".workflows", "QueryWorkflowsRequestOrder": ".workflows", "Reference": ".types", "ReferenceRequestModelInput": ".types", "ReferenceRequestModelOutput": ".types", "ResolutionInfo": ".types", "RevisionFork": ".types", "SecretDto": ".types", "SecretDtoData": ".types", "SecretKind": ".types", "SecretResponseDto": ".types", "SecretResponseDtoData": ".types", "SessionIdsResponse": ".types", "SimpleApplication": ".types", "SimpleApplicationCreate": ".types", "SimpleApplicationDataInput": ".types", "SimpleApplicationDataInputHeadersValue": ".types", "SimpleApplicationDataInputRuntime": ".types", "SimpleApplicationDataOutput": ".types", "SimpleApplicationDataOutputHeadersValue": ".types", "SimpleApplicationDataOutputRuntime": ".types", "SimpleApplicationEdit": ".types", "SimpleApplicationFlags": ".types", "SimpleApplicationQuery": ".types", "SimpleApplicationQueryFlags": ".types", "SimpleApplicationResponse": ".types", "SimpleApplicationsResponse": ".types", "SimpleEnvironment": ".types", "SimpleEnvironmentCreate": ".types", "SimpleEnvironmentEdit": ".types", "SimpleEnvironmentQuery": ".types", "SimpleEnvironmentResponse": ".types", "SimpleEnvironmentsResponse": ".types", "SimpleEvaluation": ".types", "SimpleEvaluationCreate": ".types", "SimpleEvaluationData": ".types", "SimpleEvaluationDataApplicationSteps": ".types", "SimpleEvaluationDataApplicationStepsOneValue": ".types", "SimpleEvaluationDataEvaluatorSteps": ".types", "SimpleEvaluationDataEvaluatorStepsOneValue": ".types", "SimpleEvaluationDataQuerySteps": ".types", "SimpleEvaluationDataQueryStepsOneValue": ".types", "SimpleEvaluationDataTestsetSteps": ".types", "SimpleEvaluationDataTestsetStepsOneValue": ".types", "SimpleEvaluationEdit": ".types", "SimpleEvaluationIdResponse": ".types", "SimpleEvaluationQuery": ".types", "SimpleEvaluationResponse": ".types", "SimpleEvaluationsResponse": ".types", "SimpleEvaluator": ".types", "SimpleEvaluatorCreate": ".types", "SimpleEvaluatorDataInput": ".types", "SimpleEvaluatorDataInputHeadersValue": ".types", "SimpleEvaluatorDataInputRuntime": ".types", "SimpleEvaluatorDataOutput": ".types", "SimpleEvaluatorDataOutputHeadersValue": ".types", "SimpleEvaluatorDataOutputRuntime": ".types", "SimpleEvaluatorEdit": ".types", "SimpleEvaluatorFlags": ".types", "SimpleEvaluatorQuery": ".types", "SimpleEvaluatorQueryFlags": ".types", "SimpleEvaluatorResponse": ".types", "SimpleEvaluatorsResponse": ".types", "SimpleQueriesResponse": ".types", "SimpleQuery": ".types", "SimpleQueryCreate": ".types", "SimpleQueryEdit": ".types", "SimpleQueryQuery": ".types", "SimpleQueryResponse": ".types", "SimpleQueue": ".types", "SimpleQueueCreate": ".types", "SimpleQueueData": ".types", "SimpleQueueDataEvaluators": ".types", "SimpleQueueDataEvaluatorsOneValue": ".types", "SimpleQueueIdResponse": ".types", "SimpleQueueKind": ".types", "SimpleQueueQuery": ".types", "SimpleQueueResponse": ".types", "SimpleQueueScenariosQuery": ".types", "SimpleQueueScenariosResponse": ".types", "SimpleQueueSettings": ".types", "SimpleQueuesResponse": ".types", "SimpleTestset": ".types", "SimpleTestsetCreate": ".types", "SimpleTestsetEdit": ".types", "SimpleTestsetQuery": ".types", "SimpleTestsetResponse": ".types", "SimpleTestsetsResponse": ".types", "SimpleTrace": ".types", "SimpleTraceChannel": ".types", "SimpleTraceCreate": ".types", "SimpleTraceCreateLinks": ".types", "SimpleTraceEdit": ".types", "SimpleTraceEditLinks": ".types", "SimpleTraceKind": ".types", "SimpleTraceLinkResponse": ".types", "SimpleTraceLinks": ".types", "SimpleTraceOrigin": ".types", "SimpleTraceQuery": ".types", "SimpleTraceQueryLinks": ".types", "SimpleTraceReferences": ".types", "SimpleTraceResponse": ".types", "SimpleTracesResponse": ".types", "SimpleWorkflow": ".types", "SimpleWorkflowCreate": ".types", "SimpleWorkflowDataInput": ".types", "SimpleWorkflowDataInputHeadersValue": ".types", "SimpleWorkflowDataInputRuntime": ".types", "SimpleWorkflowDataOutput": ".types", "SimpleWorkflowDataOutputHeadersValue": ".types", "SimpleWorkflowDataOutputRuntime": ".types", "SimpleWorkflowEdit": ".types", "SimpleWorkflowFlags": ".types", "SimpleWorkflowQuery": ".types", "SimpleWorkflowQueryFlags": ".types", "SimpleWorkflowResponse": ".types", "SimpleWorkflowsResponse": ".types", "SpanInput": ".types", "SpanInputEndTime": ".types", "SpanInputStartTime": ".types", "SpanOutput": ".types", "SpanOutputEndTime": ".types", "SpanOutputStartTime": ".types", "SpanResponse": ".types", "SpanType": ".types", "SpansNodeInput": ".types", "SpansNodeInputEndTime": ".types", "SpansNodeInputSpansValue": ".types", "SpansNodeInputStartTime": ".types", "SpansNodeOutput": ".types", "SpansNodeOutputEndTime": ".types", "SpansNodeOutputSpansValue": ".types", "SpansNodeOutputStartTime": ".types", "SpansResponse": ".types", "SpansTreeInput": ".types", "SpansTreeInputSpansValue": ".types", "SpansTreeOutput": ".types", "SpansTreeOutputSpansValue": ".types", "SsoProviderDto": ".types", "SsoProviderInfo": ".types", "SsoProviderSettingsDto": ".types", "SsoProviders": ".types", "StandardProviderDto": ".types", "StandardProviderKind": ".types", "StandardProviderSettingsDto": ".types", "Status": ".types", "StringOperator": ".types", "TestcaseInput": ".types", "TestcaseOutput": ".types", "TestcaseResponse": ".types", "TestcasesResponse": ".types", "Testset": ".types", "TestsetCreate": ".types", "TestsetEdit": ".types", "TestsetFlags": ".types", "TestsetQuery": ".types", "TestsetResponse": ".types", "TestsetRevision": ".types", "TestsetRevisionCommit": ".types", "TestsetRevisionCreate": ".types", "TestsetRevisionDataInput": ".types", "TestsetRevisionDataOutput": ".types", "TestsetRevisionDelta": ".types", "TestsetRevisionDeltaColumns": ".types", "TestsetRevisionDeltaRows": ".types", "TestsetRevisionEdit": ".types", "TestsetRevisionQuery": ".types", "TestsetRevisionResponse": ".types", "TestsetRevisionsLog": ".types", "TestsetRevisionsResponse": ".types", "TestsetVariant": ".types", "TestsetVariantCreate": ".types", "TestsetVariantEdit": ".types", "TestsetVariantQuery": ".types", "TestsetVariantResponse": ".types", "TestsetVariantsResponse": ".types", "TestsetsResponse": ".types", "TextOptions": ".types", "ToolAuthScheme": ".types", "ToolCallData": ".types", "ToolCallFunction": ".types", "ToolCallResponse": ".types", "ToolCatalogAction": ".types", "ToolCatalogActionDetails": ".types", "ToolCatalogActionResponse": ".types", "ToolCatalogActionResponseAction": ".types", "ToolCatalogActionsResponse": ".types", "ToolCatalogActionsResponseActionsItem": ".types", "ToolCatalogIntegration": ".types", "ToolCatalogIntegrationDetails": ".types", "ToolCatalogIntegrationResponse": ".types", "ToolCatalogIntegrationResponseIntegration": ".types", "ToolCatalogIntegrationsResponse": ".types", "ToolCatalogIntegrationsResponseIntegrationsItem": ".types", "ToolCatalogProvider": ".types", "ToolCatalogProviderDetails": ".types", "ToolCatalogProviderResponse": ".types", "ToolCatalogProviderResponseProvider": ".types", "ToolCatalogProvidersResponse": ".types", "ToolCatalogProvidersResponseProvidersItem": ".types", "ToolConnection": ".types", "ToolConnectionCreate": ".types", "ToolConnectionCreateData": ".types", "ToolConnectionResponse": ".types", "ToolConnectionStatus": ".types", "ToolConnectionsResponse": ".types", "ToolProviderKind": ".types", "ToolResult": ".types", "ToolResultData": ".types", "TraceIdResponse": ".types", "TraceIdsResponse": ".types", "TraceInput": ".types", "TraceInputSpansValue": ".types", "TraceOutput": ".types", "TraceOutputSpansValue": ".types", "TraceRequest": ".types", "TraceResponse": ".types", "TraceType": ".types", "TracesRequest": ".types", "TracesResponse": ".types", "TracingQuery": ".types", "UnprocessableEntityError": ".errors", "UserIdsResponse": ".types", "ValidationError": ".types", "ValidationErrorLocItem": ".types", "VariantFork": ".types", "WebhookDeliveriesResponse": ".types", "WebhookDelivery": ".types", "WebhookDeliveryCreate": ".types", "WebhookDeliveryData": ".types", "WebhookDeliveryQuery": ".types", "WebhookDeliveryResponse": ".types", "WebhookDeliveryResponseInfo": ".types", "WebhookEventType": ".types", "WebhookProviderDto": ".types", "WebhookProviderSettingsDto": ".types", "WebhookSubscription": ".types", "WebhookSubscriptionCreate": ".types", "WebhookSubscriptionData": ".types", "WebhookSubscriptionDataAuthMode": ".types", "WebhookSubscriptionEdit": ".types", "WebhookSubscriptionQuery": ".types", "WebhookSubscriptionResponse": ".types", "WebhookSubscriptionTestRequestSubscription": ".webhooks", "WebhookSubscriptionsResponse": ".types", "Windowing": ".types", "WindowingOrder": ".types", "Workflow": ".types", "WorkflowArtifactFlags": ".types", "WorkflowCatalogFlags": ".types", "WorkflowCatalogPreset": ".types", "WorkflowCatalogPresetResponse": ".types", "WorkflowCatalogPresetsResponse": ".types", "WorkflowCatalogTemplate": ".types", "WorkflowCatalogTemplateResponse": ".types", "WorkflowCatalogTemplatesResponse": ".types", "WorkflowCatalogType": ".types", "WorkflowCatalogTypeResponse": ".types", "WorkflowCatalogTypesResponse": ".types", "WorkflowCreate": ".types", "WorkflowEdit": ".types", "WorkflowFlags": ".types", "WorkflowFork": ".types", "WorkflowResponse": ".types", "WorkflowRevisionCommit": ".types", "WorkflowRevisionCreate": ".types", "WorkflowRevisionDataInput": ".types", "WorkflowRevisionDataInputHeadersValue": ".types", "WorkflowRevisionDataInputRuntime": ".types", "WorkflowRevisionDataOutput": ".types", "WorkflowRevisionDataOutputHeadersValue": ".types", "WorkflowRevisionDataOutputRuntime": ".types", "WorkflowRevisionEdit": ".types", "WorkflowRevisionFlags": ".types", "WorkflowRevisionFork": ".types", "WorkflowRevisionInput": ".types", "WorkflowRevisionOutput": ".types", "WorkflowRevisionResolveResponse": ".types", "WorkflowRevisionResponse": ".types", "WorkflowRevisionsLog": ".types", "WorkflowRevisionsResponse": ".types", "WorkflowVariant": ".types", "WorkflowVariantCreate": ".types", "WorkflowVariantEdit": ".types", "WorkflowVariantFlags": ".types", "WorkflowVariantFork": ".types", "WorkflowVariantResponse": ".types", "WorkflowVariantsResponse": ".types", "WorkflowsResponse": ".types", "Workspace": ".types", "WorkspaceMemberResponse": ".types", "WorkspacePermission": ".types", "WorkspaceResponse": ".types", "WorkspaceRole": ".types", "access": ".access", "annotations": ".annotations", "applications": ".applications", "billing": ".billing", "environments": ".environments", "evaluations": ".evaluations", "evaluators": ".evaluators", "folders": ".folders", "invocations": ".invocations", "keys": ".keys", "legacy": ".legacy", "organizations": ".organizations", "projects": ".projects", "queries": ".queries", "secrets": ".secrets", "status": ".status", "testcases": ".testcases", "testsets": ".testsets", "tools": ".tools", "traces": ".traces", "users": ".users", "webhooks": ".webhooks", "workflows": ".workflows", "workspaces": ".workspaces"} +_dynamic_imports: typing.Dict[str, str] = {"AdminAccountCreateOptions": ".types", "AdminAccountRead": ".types", "AdminAccountsCreate": ".types", "AdminAccountsDelete": ".types", "AdminAccountsDeleteTarget": ".types", "AdminAccountsResponse": ".types", "AdminApiKeyCreate": ".types", "AdminApiKeyResponse": ".types", "AdminDeleteResponse": ".types", "AdminDeletedEntities": ".types", "AdminDeletedEntity": ".types", "AdminOrganizationCreate": ".types", "AdminOrganizationMembershipCreate": ".types", "AdminOrganizationMembershipRead": ".types", "AdminOrganizationRead": ".types", "AdminProjectCreate": ".types", "AdminProjectMembershipCreate": ".types", "AdminProjectMembershipRead": ".types", "AdminProjectRead": ".types", "AdminSimpleAccountCreate": ".types", "AdminSimpleAccountDeleteEntry": ".types", "AdminSimpleAccountRead": ".types", "AdminSimpleAccountsApiKeysCreate": ".types", "AdminSimpleAccountsCreate": ".types", "AdminSimpleAccountsDelete": ".types", "AdminSimpleAccountsOrganizationsCreate": ".types", "AdminSimpleAccountsOrganizationsMembershipsCreate": ".types", "AdminSimpleAccountsOrganizationsTransferOwnership": ".types", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjects": ".types", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjectsZero": ".types", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspaces": ".types", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspacesZero": ".types", "AdminSimpleAccountsOrganizationsTransferOwnershipResponse": ".types", "AdminSimpleAccountsProjectsCreate": ".types", "AdminSimpleAccountsProjectsMembershipsCreate": ".types", "AdminSimpleAccountsResponse": ".types", "AdminSimpleAccountsUsersCreate": ".types", "AdminSimpleAccountsUsersIdentitiesCreate": ".types", "AdminSimpleAccountsUsersResetPassword": ".types", "AdminSimpleAccountsWorkspacesCreate": ".types", "AdminSimpleAccountsWorkspacesMembershipsCreate": ".types", "AdminStructuredError": ".types", "AdminSubscriptionCreate": ".types", "AdminSubscriptionRead": ".types", "AdminUserCreate": ".types", "AdminUserIdentityCreate": ".types", "AdminUserIdentityRead": ".types", "AdminUserIdentityReadStatus": ".types", "AdminUserRead": ".types", "AdminWorkspaceCreate": ".types", "AdminWorkspaceMembershipCreate": ".types", "AdminWorkspaceMembershipRead": ".types", "AdminWorkspaceRead": ".types", "AgentaApi": ".client", "AgentaApiEnvironment": ".environment", "Analytics": ".types", "AnalyticsResponse": ".types", "Annotation": ".types", "AnnotationCreate": ".types", "AnnotationCreateLinks": ".types", "AnnotationEdit": ".types", "AnnotationEditLinks": ".types", "AnnotationLinkResponse": ".types", "AnnotationLinks": ".types", "AnnotationQuery": ".types", "AnnotationQueryLinks": ".types", "AnnotationResponse": ".types", "AnnotationsResponse": ".types", "Application": ".types", "ApplicationArtifactFlags": ".types", "ApplicationArtifactQueryFlags": ".types", "ApplicationCatalogPreset": ".types", "ApplicationCatalogPresetResponse": ".types", "ApplicationCatalogPresetsResponse": ".types", "ApplicationCatalogTemplate": ".types", "ApplicationCatalogTemplateResponse": ".types", "ApplicationCatalogTemplatesResponse": ".types", "ApplicationCatalogType": ".types", "ApplicationCatalogTypesResponse": ".types", "ApplicationCreate": ".types", "ApplicationEdit": ".types", "ApplicationFlags": ".types", "ApplicationFork": ".types", "ApplicationQuery": ".types", "ApplicationResponse": ".types", "ApplicationRevision": ".types", "ApplicationRevisionCommit": ".types", "ApplicationRevisionCreate": ".types", "ApplicationRevisionDataInput": ".types", "ApplicationRevisionDataInputHeadersValue": ".types", "ApplicationRevisionDataInputRuntime": ".types", "ApplicationRevisionDataOutput": ".types", "ApplicationRevisionDataOutputHeadersValue": ".types", "ApplicationRevisionDataOutputRuntime": ".types", "ApplicationRevisionEdit": ".types", "ApplicationRevisionFlags": ".types", "ApplicationRevisionFork": ".types", "ApplicationRevisionQuery": ".types", "ApplicationRevisionQueryFlags": ".types", "ApplicationRevisionResolveResponse": ".types", "ApplicationRevisionResponse": ".types", "ApplicationRevisionsLog": ".types", "ApplicationRevisionsResponse": ".types", "ApplicationVariant": ".types", "ApplicationVariantCreate": ".types", "ApplicationVariantEdit": ".types", "ApplicationVariantFlags": ".types", "ApplicationVariantFork": ".types", "ApplicationVariantResponse": ".types", "ApplicationVariantsResponse": ".types", "ApplicationsResponse": ".types", "AsyncAgentaApi": ".client", "BodyConfigsFetchVariantsConfigsFetchPost": ".types", "Bucket": ".types", "CollectStatusResponse": ".types", "ComparisonOperator": ".types", "Condition": ".types", "ConditionOperator": ".types", "ConditionOptions": ".types", "ConditionValue": ".types", "ConfigResponseModel": ".types", "CreateSimpleTestsetFromFileRequestFileType": ".testsets", "CreateTestsetRevisionFromFileRequestFileType": ".testsets", "CustomModelSettingsDto": ".types", "CustomProviderDto": ".types", "CustomProviderKind": ".types", "CustomProviderSettingsDto": ".types", "DictOperator": ".types", "DiscoverResponse": ".types", "DiscoverResponseMethodsValue": ".types", "EditSimpleTestsetFromFileRequestFileType": ".testsets", "EeSrcModelsApiOrganizationModelsOrganization": ".types", "EntityRef": ".types", "Environment": ".types", "EnvironmentCreate": ".types", "EnvironmentEdit": ".types", "EnvironmentFlags": ".types", "EnvironmentQueryFlags": ".types", "EnvironmentResponse": ".types", "EnvironmentRevision": ".types", "EnvironmentRevisionCommit": ".types", "EnvironmentRevisionCreate": ".types", "EnvironmentRevisionData": ".types", "EnvironmentRevisionDelta": ".types", "EnvironmentRevisionEdit": ".types", "EnvironmentRevisionResolveResponse": ".types", "EnvironmentRevisionResponse": ".types", "EnvironmentRevisionsLog": ".types", "EnvironmentRevisionsResponse": ".types", "EnvironmentVariant": ".types", "EnvironmentVariantCreate": ".types", "EnvironmentVariantEdit": ".types", "EnvironmentVariantResponse": ".types", "EnvironmentVariantsResponse": ".types", "EnvironmentsResponse": ".types", "ErrorPolicy": ".types", "EvaluationMetrics": ".types", "EvaluationMetricsCreate": ".types", "EvaluationMetricsEdit": ".types", "EvaluationMetricsIdsResponse": ".types", "EvaluationMetricsQuery": ".types", "EvaluationMetricsQueryScenarioIds": ".types", "EvaluationMetricsQueryTimestamps": ".types", "EvaluationMetricsRefresh": ".types", "EvaluationMetricsResponse": ".types", "EvaluationQueue": ".types", "EvaluationQueueCreate": ".types", "EvaluationQueueData": ".types", "EvaluationQueueEdit": ".types", "EvaluationQueueFlags": ".types", "EvaluationQueueIdResponse": ".types", "EvaluationQueueIdsResponse": ".types", "EvaluationQueueQuery": ".types", "EvaluationQueueQueryFlags": ".types", "EvaluationQueueResponse": ".types", "EvaluationQueueScenariosQuery": ".types", "EvaluationQueuesResponse": ".types", "EvaluationResult": ".types", "EvaluationResultCreate": ".types", "EvaluationResultEdit": ".types", "EvaluationResultIdResponse": ".types", "EvaluationResultIdsResponse": ".types", "EvaluationResultQuery": ".types", "EvaluationResultResponse": ".types", "EvaluationResultsResponse": ".types", "EvaluationRun": ".types", "EvaluationRunCreate": ".types", "EvaluationRunData": ".types", "EvaluationRunDataMapping": ".types", "EvaluationRunDataMappingColumn": ".types", "EvaluationRunDataMappingStep": ".types", "EvaluationRunDataStep": ".types", "EvaluationRunDataStepInput": ".types", "EvaluationRunDataStepOrigin": ".types", "EvaluationRunDataStepType": ".types", "EvaluationRunEdit": ".types", "EvaluationRunFlags": ".types", "EvaluationRunIdResponse": ".types", "EvaluationRunIdsRequest": ".types", "EvaluationRunIdsResponse": ".types", "EvaluationRunQuery": ".types", "EvaluationRunQueryFlags": ".types", "EvaluationRunResponse": ".types", "EvaluationRunsResponse": ".types", "EvaluationScenario": ".types", "EvaluationScenarioCreate": ".types", "EvaluationScenarioEdit": ".types", "EvaluationScenarioIdResponse": ".types", "EvaluationScenarioIdsResponse": ".types", "EvaluationScenarioQuery": ".types", "EvaluationScenarioResponse": ".types", "EvaluationScenariosResponse": ".types", "EvaluationStatus": ".types", "Evaluator": ".types", "EvaluatorArtifactFlags": ".types", "EvaluatorArtifactQueryFlags": ".types", "EvaluatorCatalogPreset": ".types", "EvaluatorCatalogPresetResponse": ".types", "EvaluatorCatalogPresetsResponse": ".types", "EvaluatorCatalogTemplate": ".types", "EvaluatorCatalogTemplateResponse": ".types", "EvaluatorCatalogTemplatesResponse": ".types", "EvaluatorCatalogType": ".types", "EvaluatorCatalogTypesResponse": ".types", "EvaluatorCreate": ".types", "EvaluatorEdit": ".types", "EvaluatorFlags": ".types", "EvaluatorFork": ".types", "EvaluatorQuery": ".types", "EvaluatorResponse": ".types", "EvaluatorRevision": ".types", "EvaluatorRevisionCommit": ".types", "EvaluatorRevisionCreate": ".types", "EvaluatorRevisionDataInput": ".types", "EvaluatorRevisionDataInputHeadersValue": ".types", "EvaluatorRevisionDataInputRuntime": ".types", "EvaluatorRevisionDataOutput": ".types", "EvaluatorRevisionDataOutputHeadersValue": ".types", "EvaluatorRevisionDataOutputRuntime": ".types", "EvaluatorRevisionEdit": ".types", "EvaluatorRevisionFlags": ".types", "EvaluatorRevisionFork": ".types", "EvaluatorRevisionQuery": ".types", "EvaluatorRevisionQueryFlags": ".types", "EvaluatorRevisionResolveResponse": ".types", "EvaluatorRevisionResponse": ".types", "EvaluatorRevisionsLog": ".types", "EvaluatorRevisionsResponse": ".types", "EvaluatorTemplate": ".types", "EvaluatorTemplatesResponse": ".types", "EvaluatorVariant": ".types", "EvaluatorVariantCreate": ".types", "EvaluatorVariantEdit": ".types", "EvaluatorVariantFlags": ".types", "EvaluatorVariantFork": ".types", "EvaluatorVariantResponse": ".types", "EvaluatorVariantsResponse": ".types", "EvaluatorsResponse": ".types", "ExistenceOperator": ".types", "FetchLegacyAnalyticsRequestNewest": ".legacy", "FetchLegacyAnalyticsRequestOldest": ".legacy", "FetchSimpleTestsetToFileRequestFileType": ".testsets", "FetchTestsetRevisionToFileRequestFileType": ".testsets", "FilteringInput": ".types", "FilteringInputConditionsItem": ".types", "FilteringOutput": ".types", "FilteringOutputConditionsItem": ".types", "Focus": ".types", "Folder": ".types", "FolderCreate": ".types", "FolderEdit": ".types", "FolderIdResponse": ".types", "FolderKind": ".types", "FolderQuery": ".types", "FolderQueryKinds": ".types", "FolderResponse": ".types", "FoldersResponse": ".types", "Format": ".types", "Formatting": ".types", typing.Any: ".types", typing.Any: ".types", "Header": ".types", "HttpValidationError": ".types", "InviteRequest": ".types", "InviteRequestRolesItem": ".types", "Invocation": ".types", "InvocationCreate": ".types", "InvocationCreateLinks": ".types", "InvocationEdit": ".types", "InvocationEditLinks": ".types", "InvocationLinkResponse": ".types", "InvocationLinks": ".types", "InvocationQuery": ".types", "InvocationQueryLinks": ".types", "InvocationResponse": ".types", "InvocationsResponse": ".types", "JsonSchemasInput": ".types", "JsonSchemasOutput": ".types", typing.Any: ".types", typing.Any: ".types", "LegacyLifecycleDto": ".types", "ListApiKeysResponse": ".types", "ListOperator": ".types", "ListOptions": ".types", "LogicalOperator": ".types", "MetricSpec": ".types", "MetricType": ".types", "MetricsBucket": ".types", "NumericOperator": ".types", "OTelEventInput": ".types", "OTelEventInputTimestamp": ".types", "OTelEventOutput": ".types", "OTelEventOutputTimestamp": ".types", "OTelHashInput": ".types", "OTelHashOutput": ".types", "OTelLinkInput": ".types", "OTelLinkOutput": ".types", "OTelLinksResponse": ".types", "OTelReferenceInput": ".types", "OTelReferenceOutput": ".types", "OTelSpanKind": ".types", "OTelStatusCode": ".types", "OTelTracingRequest": ".types", "OTelTracingResponse": ".types", "OldAnalyticsResponse": ".types", "OrganizationDetails": ".types", "OrganizationDomainResponse": ".types", "OrganizationProviderResponse": ".types", "OrganizationUpdate": ".types", "OssSrcModelsApiOrganizationModelsOrganization": ".types", "Permission": ".types", "ProjectsResponse": ".types", "QueriesResponse": ".types", "Query": ".types", "QueryApplicationVariantsRequestOrder": ".applications", "QueryCreate": ".types", "QueryEdit": ".types", "QueryEnvironmentRevisionsRequestOrder": ".environments", "QueryEnvironmentVariantsRequestOrder": ".environments", "QueryEnvironmentsRequestOrder": ".environments", "QueryEvaluatorVariantsRequestOrder": ".evaluators", "QueryFlags": ".types", "QueryQueriesRequestOrder": ".queries", "QueryQueryFlags": ".types", "QueryResponse": ".types", "QueryRevision": ".types", "QueryRevisionCommit": ".types", "QueryRevisionCreate": ".types", "QueryRevisionDataInput": ".types", "QueryRevisionDataOutput": ".types", "QueryRevisionEdit": ".types", "QueryRevisionQuery": ".types", "QueryRevisionResponse": ".types", "QueryRevisionsLog": ".types", "QueryRevisionsResponse": ".types", "QuerySpansAnalyticsRequestNewest": ".traces", "QuerySpansAnalyticsRequestOldest": ".traces", "QueryVariant": ".types", "QueryVariantCreate": ".types", "QueryVariantEdit": ".types", "QueryVariantQuery": ".types", "QueryVariantResponse": ".types", "QueryVariantsResponse": ".types", "QueryWorkflowRevisionsRequestOrder": ".workflows", "QueryWorkflowVariantsRequestOrder": ".workflows", "QueryWorkflowsRequestOrder": ".workflows", "Reference": ".types", "ReferenceRequestModelInput": ".types", "ReferenceRequestModelOutput": ".types", "ResolutionInfo": ".types", "RevisionFork": ".types", "SecretDto": ".types", "SecretDtoData": ".types", "SecretKind": ".types", "SecretResponseDto": ".types", "SecretResponseDtoData": ".types", "SessionIdsResponse": ".types", "SimpleApplication": ".types", "SimpleApplicationCreate": ".types", "SimpleApplicationDataInput": ".types", "SimpleApplicationDataInputHeadersValue": ".types", "SimpleApplicationDataInputRuntime": ".types", "SimpleApplicationDataOutput": ".types", "SimpleApplicationDataOutputHeadersValue": ".types", "SimpleApplicationDataOutputRuntime": ".types", "SimpleApplicationEdit": ".types", "SimpleApplicationFlags": ".types", "SimpleApplicationQuery": ".types", "SimpleApplicationQueryFlags": ".types", "SimpleApplicationResponse": ".types", "SimpleApplicationsResponse": ".types", "SimpleEnvironment": ".types", "SimpleEnvironmentCreate": ".types", "SimpleEnvironmentEdit": ".types", "SimpleEnvironmentQuery": ".types", "SimpleEnvironmentResponse": ".types", "SimpleEnvironmentsResponse": ".types", "SimpleEvaluation": ".types", "SimpleEvaluationCreate": ".types", "SimpleEvaluationData": ".types", "SimpleEvaluationDataApplicationSteps": ".types", "SimpleEvaluationDataApplicationStepsOneValue": ".types", "SimpleEvaluationDataEvaluatorSteps": ".types", "SimpleEvaluationDataEvaluatorStepsOneValue": ".types", "SimpleEvaluationDataQuerySteps": ".types", "SimpleEvaluationDataQueryStepsOneValue": ".types", "SimpleEvaluationDataTestsetSteps": ".types", "SimpleEvaluationDataTestsetStepsOneValue": ".types", "SimpleEvaluationEdit": ".types", "SimpleEvaluationIdResponse": ".types", "SimpleEvaluationQuery": ".types", "SimpleEvaluationResponse": ".types", "SimpleEvaluationsResponse": ".types", "SimpleEvaluator": ".types", "SimpleEvaluatorCreate": ".types", "SimpleEvaluatorDataInput": ".types", "SimpleEvaluatorDataInputHeadersValue": ".types", "SimpleEvaluatorDataInputRuntime": ".types", "SimpleEvaluatorDataOutput": ".types", "SimpleEvaluatorDataOutputHeadersValue": ".types", "SimpleEvaluatorDataOutputRuntime": ".types", "SimpleEvaluatorEdit": ".types", "SimpleEvaluatorFlags": ".types", "SimpleEvaluatorQuery": ".types", "SimpleEvaluatorQueryFlags": ".types", "SimpleEvaluatorResponse": ".types", "SimpleEvaluatorsResponse": ".types", "SimpleQueriesResponse": ".types", "SimpleQuery": ".types", "SimpleQueryCreate": ".types", "SimpleQueryEdit": ".types", "SimpleQueryQuery": ".types", "SimpleQueryResponse": ".types", "SimpleQueue": ".types", "SimpleQueueCreate": ".types", "SimpleQueueData": ".types", "SimpleQueueDataEvaluators": ".types", "SimpleQueueDataEvaluatorsOneValue": ".types", "SimpleQueueIdResponse": ".types", "SimpleQueueKind": ".types", "SimpleQueueQuery": ".types", "SimpleQueueResponse": ".types", "SimpleQueueScenariosQuery": ".types", "SimpleQueueScenariosResponse": ".types", "SimpleQueueSettings": ".types", "SimpleQueuesResponse": ".types", "SimpleTestset": ".types", "SimpleTestsetCreate": ".types", "SimpleTestsetEdit": ".types", "SimpleTestsetQuery": ".types", "SimpleTestsetResponse": ".types", "SimpleTestsetsResponse": ".types", "SimpleTrace": ".types", "SimpleTraceChannel": ".types", "SimpleTraceCreate": ".types", "SimpleTraceCreateLinks": ".types", "SimpleTraceEdit": ".types", "SimpleTraceEditLinks": ".types", "SimpleTraceKind": ".types", "SimpleTraceLinkResponse": ".types", "SimpleTraceLinks": ".types", "SimpleTraceOrigin": ".types", "SimpleTraceQuery": ".types", "SimpleTraceQueryLinks": ".types", "SimpleTraceReferences": ".types", "SimpleTraceResponse": ".types", "SimpleTracesResponse": ".types", "SimpleWorkflow": ".types", "SimpleWorkflowCreate": ".types", "SimpleWorkflowDataInput": ".types", "SimpleWorkflowDataInputHeadersValue": ".types", "SimpleWorkflowDataInputRuntime": ".types", "SimpleWorkflowDataOutput": ".types", "SimpleWorkflowDataOutputHeadersValue": ".types", "SimpleWorkflowDataOutputRuntime": ".types", "SimpleWorkflowEdit": ".types", "SimpleWorkflowFlags": ".types", "SimpleWorkflowQuery": ".types", "SimpleWorkflowQueryFlags": ".types", "SimpleWorkflowResponse": ".types", "SimpleWorkflowsResponse": ".types", "SpanInput": ".types", "SpanInputEndTime": ".types", "SpanInputStartTime": ".types", "SpanOutput": ".types", "SpanOutputEndTime": ".types", "SpanOutputStartTime": ".types", "SpanResponse": ".types", "SpanType": ".types", "SpansNodeInput": ".types", "SpansNodeInputEndTime": ".types", "SpansNodeInputSpansValue": ".types", "SpansNodeInputStartTime": ".types", "SpansNodeOutput": ".types", "SpansNodeOutputEndTime": ".types", "SpansNodeOutputSpansValue": ".types", "SpansNodeOutputStartTime": ".types", "SpansResponse": ".types", "SpansTreeInput": ".types", "SpansTreeInputSpansValue": ".types", "SpansTreeOutput": ".types", "SpansTreeOutputSpansValue": ".types", "SsoProviderDto": ".types", "SsoProviderInfo": ".types", "SsoProviderSettingsDto": ".types", "SsoProviders": ".types", "StandardProviderDto": ".types", "StandardProviderKind": ".types", "StandardProviderSettingsDto": ".types", "Status": ".types", "StringOperator": ".types", "TestcaseInput": ".types", "TestcaseOutput": ".types", "TestcaseResponse": ".types", "TestcasesResponse": ".types", "Testset": ".types", "TestsetCreate": ".types", "TestsetEdit": ".types", "TestsetFlags": ".types", "TestsetQuery": ".types", "TestsetResponse": ".types", "TestsetRevision": ".types", "TestsetRevisionCommit": ".types", "TestsetRevisionCreate": ".types", "TestsetRevisionDataInput": ".types", "TestsetRevisionDataOutput": ".types", "TestsetRevisionDelta": ".types", "TestsetRevisionDeltaColumns": ".types", "TestsetRevisionDeltaRows": ".types", "TestsetRevisionEdit": ".types", "TestsetRevisionQuery": ".types", "TestsetRevisionResponse": ".types", "TestsetRevisionsLog": ".types", "TestsetRevisionsResponse": ".types", "TestsetVariant": ".types", "TestsetVariantCreate": ".types", "TestsetVariantEdit": ".types", "TestsetVariantQuery": ".types", "TestsetVariantResponse": ".types", "TestsetVariantsResponse": ".types", "TestsetsResponse": ".types", "TextOptions": ".types", "ToolAuthScheme": ".types", "ToolCallData": ".types", "ToolCallFunction": ".types", "ToolCallResponse": ".types", "ToolCatalogAction": ".types", "ToolCatalogActionDetails": ".types", "ToolCatalogActionResponse": ".types", "ToolCatalogActionResponseAction": ".types", "ToolCatalogActionsResponse": ".types", "ToolCatalogActionsResponseActionsItem": ".types", "ToolCatalogIntegration": ".types", "ToolCatalogIntegrationDetails": ".types", "ToolCatalogIntegrationResponse": ".types", "ToolCatalogIntegrationResponseIntegration": ".types", "ToolCatalogIntegrationsResponse": ".types", "ToolCatalogIntegrationsResponseIntegrationsItem": ".types", "ToolCatalogProvider": ".types", "ToolCatalogProviderDetails": ".types", "ToolCatalogProviderResponse": ".types", "ToolCatalogProviderResponseProvider": ".types", "ToolCatalogProvidersResponse": ".types", "ToolCatalogProvidersResponseProvidersItem": ".types", "ToolConnection": ".types", "ToolConnectionCreate": ".types", "ToolConnectionCreateData": ".types", "ToolConnectionResponse": ".types", "ToolConnectionStatus": ".types", "ToolConnectionsResponse": ".types", "ToolProviderKind": ".types", "ToolResult": ".types", "ToolResultData": ".types", "TraceIdResponse": ".types", "TraceIdsResponse": ".types", "TraceInput": ".types", "TraceInputSpansValue": ".types", "TraceOutput": ".types", "TraceOutputSpansValue": ".types", "TraceRequest": ".types", "TraceResponse": ".types", "TraceType": ".types", "TracesRequest": ".types", "TracesResponse": ".types", "TracingQuery": ".types", "UnprocessableEntityError": ".errors", "UserIdsResponse": ".types", "ValidationError": ".types", "ValidationErrorLocItem": ".types", "VariantFork": ".types", "WebhookDeliveriesResponse": ".types", "WebhookDelivery": ".types", "WebhookDeliveryCreate": ".types", "WebhookDeliveryData": ".types", "WebhookDeliveryQuery": ".types", "WebhookDeliveryResponse": ".types", "WebhookDeliveryResponseInfo": ".types", "WebhookEventType": ".types", "WebhookProviderDto": ".types", "WebhookProviderSettingsDto": ".types", "WebhookSubscription": ".types", "WebhookSubscriptionCreate": ".types", "WebhookSubscriptionData": ".types", "WebhookSubscriptionDataAuthMode": ".types", "WebhookSubscriptionEdit": ".types", "WebhookSubscriptionQuery": ".types", "WebhookSubscriptionResponse": ".types", "WebhookSubscriptionTestRequestSubscription": ".webhooks", "WebhookSubscriptionsResponse": ".types", "Windowing": ".types", "WindowingOrder": ".types", "Workflow": ".types", "WorkflowArtifactFlags": ".types", "WorkflowCatalogFlags": ".types", "WorkflowCatalogPreset": ".types", "WorkflowCatalogPresetResponse": ".types", "WorkflowCatalogPresetsResponse": ".types", "WorkflowCatalogTemplate": ".types", "WorkflowCatalogTemplateResponse": ".types", "WorkflowCatalogTemplatesResponse": ".types", "WorkflowCatalogType": ".types", "WorkflowCatalogTypeResponse": ".types", "WorkflowCatalogTypesResponse": ".types", "WorkflowCreate": ".types", "WorkflowEdit": ".types", "WorkflowFlags": ".types", "WorkflowFork": ".types", "WorkflowResponse": ".types", "WorkflowRevisionCommit": ".types", "WorkflowRevisionCreate": ".types", "WorkflowRevisionDataInput": ".types", "WorkflowRevisionDataInputHeadersValue": ".types", "WorkflowRevisionDataInputRuntime": ".types", "WorkflowRevisionDataOutput": ".types", "WorkflowRevisionDataOutputHeadersValue": ".types", "WorkflowRevisionDataOutputRuntime": ".types", "WorkflowRevisionEdit": ".types", "WorkflowRevisionFlags": ".types", "WorkflowRevisionFork": ".types", "WorkflowRevisionInput": ".types", "WorkflowRevisionOutput": ".types", "WorkflowRevisionResolveResponse": ".types", "WorkflowRevisionResponse": ".types", "WorkflowRevisionsLog": ".types", "WorkflowRevisionsResponse": ".types", "WorkflowVariant": ".types", "WorkflowVariantCreate": ".types", "WorkflowVariantEdit": ".types", "WorkflowVariantFlags": ".types", "WorkflowVariantFork": ".types", "WorkflowVariantResponse": ".types", "WorkflowVariantsResponse": ".types", "WorkflowsResponse": ".types", "Workspace": ".types", "WorkspaceMemberResponse": ".types", "WorkspacePermission": ".types", "WorkspaceResponse": ".types", "access": ".access", "annotations": ".annotations", "applications": ".applications", "billing": ".billing", "environments": ".environments", "evaluations": ".evaluations", "evaluators": ".evaluators", "folders": ".folders", "invocations": ".invocations", "keys": ".keys", "legacy": ".legacy", "organizations": ".organizations", "projects": ".projects", "queries": ".queries", "secrets": ".secrets", "status": ".status", "testcases": ".testcases", "testsets": ".testsets", "tools": ".tools", "traces": ".traces", "users": ".users", "webhooks": ".webhooks", "workflows": ".workflows", "workspaces": ".workspaces"} def __getattr__(attr_name: str) -> typing.Any: module_name = _dynamic_imports.get(attr_name) if module_name is None: @@ -37,4 +37,4 @@ def __getattr__(attr_name: str) -> typing.Any: def __dir__(): lazy_attrs = list(_dynamic_imports.keys()) return sorted(lazy_attrs) -__all__ = ["AdminAccountCreateOptions", "AdminAccountRead", "AdminAccountsCreate", "AdminAccountsDelete", "AdminAccountsDeleteTarget", "AdminAccountsResponse", "AdminApiKeyCreate", "AdminApiKeyResponse", "AdminDeleteResponse", "AdminDeletedEntities", "AdminDeletedEntity", "AdminOrganizationCreate", "AdminOrganizationMembershipCreate", "AdminOrganizationMembershipRead", "AdminOrganizationRead", "AdminProjectCreate", "AdminProjectMembershipCreate", "AdminProjectMembershipRead", "AdminProjectRead", "AdminSimpleAccountCreate", "AdminSimpleAccountDeleteEntry", "AdminSimpleAccountRead", "AdminSimpleAccountsApiKeysCreate", "AdminSimpleAccountsCreate", "AdminSimpleAccountsDelete", "AdminSimpleAccountsOrganizationsCreate", "AdminSimpleAccountsOrganizationsMembershipsCreate", "AdminSimpleAccountsOrganizationsTransferOwnership", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjects", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjectsZero", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspaces", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspacesZero", "AdminSimpleAccountsOrganizationsTransferOwnershipResponse", "AdminSimpleAccountsProjectsCreate", "AdminSimpleAccountsProjectsMembershipsCreate", "AdminSimpleAccountsResponse", "AdminSimpleAccountsUsersCreate", "AdminSimpleAccountsUsersIdentitiesCreate", "AdminSimpleAccountsUsersResetPassword", "AdminSimpleAccountsWorkspacesCreate", "AdminSimpleAccountsWorkspacesMembershipsCreate", "AdminStructuredError", "AdminSubscriptionCreate", "AdminSubscriptionRead", "AdminUserCreate", "AdminUserIdentityCreate", "AdminUserIdentityRead", "AdminUserIdentityReadStatus", "AdminUserRead", "AdminWorkspaceCreate", "AdminWorkspaceMembershipCreate", "AdminWorkspaceMembershipRead", "AdminWorkspaceRead", "AgentaApi", "AgentaApiEnvironment", "Analytics", "AnalyticsResponse", "Annotation", "AnnotationCreate", "AnnotationCreateLinks", "AnnotationEdit", "AnnotationEditLinks", "AnnotationLinkResponse", "AnnotationLinks", "AnnotationQuery", "AnnotationQueryLinks", "AnnotationResponse", "AnnotationsResponse", "Application", "ApplicationArtifactFlags", "ApplicationArtifactQueryFlags", "ApplicationCatalogPreset", "ApplicationCatalogPresetResponse", "ApplicationCatalogPresetsResponse", "ApplicationCatalogTemplate", "ApplicationCatalogTemplateResponse", "ApplicationCatalogTemplatesResponse", "ApplicationCatalogType", "ApplicationCatalogTypesResponse", "ApplicationCreate", "ApplicationEdit", "ApplicationFlags", "ApplicationFork", "ApplicationQuery", "ApplicationResponse", "ApplicationRevision", "ApplicationRevisionCommit", "ApplicationRevisionCreate", "ApplicationRevisionDataInput", "ApplicationRevisionDataInputHeadersValue", "ApplicationRevisionDataInputRuntime", "ApplicationRevisionDataOutput", "ApplicationRevisionDataOutputHeadersValue", "ApplicationRevisionDataOutputRuntime", "ApplicationRevisionEdit", "ApplicationRevisionFlags", "ApplicationRevisionFork", "ApplicationRevisionQuery", "ApplicationRevisionQueryFlags", "ApplicationRevisionResolveResponse", "ApplicationRevisionResponse", "ApplicationRevisionsLog", "ApplicationRevisionsResponse", "ApplicationVariant", "ApplicationVariantCreate", "ApplicationVariantEdit", "ApplicationVariantFlags", "ApplicationVariantFork", "ApplicationVariantResponse", "ApplicationVariantsResponse", "ApplicationsResponse", "AsyncAgentaApi", "BodyConfigsFetchVariantsConfigsFetchPost", "Bucket", "CollectStatusResponse", "ComparisonOperator", "Condition", "ConditionOperator", "ConditionOptions", "ConditionValue", "ConfigResponseModel", "CreateSimpleTestsetFromFileRequestFileType", "CreateTestsetRevisionFromFileRequestFileType", "CustomModelSettingsDto", "CustomProviderDto", "CustomProviderKind", "CustomProviderSettingsDto", "DictOperator", "DiscoverResponse", "DiscoverResponseMethodsValue", "EditSimpleTestsetFromFileRequestFileType", "EeSrcModelsApiOrganizationModelsOrganization", "EntityRef", "Environment", "EnvironmentCreate", "EnvironmentEdit", "EnvironmentFlags", "EnvironmentQueryFlags", "EnvironmentResponse", "EnvironmentRevision", "EnvironmentRevisionCommit", "EnvironmentRevisionCreate", "EnvironmentRevisionData", "EnvironmentRevisionDelta", "EnvironmentRevisionEdit", "EnvironmentRevisionResolveResponse", "EnvironmentRevisionResponse", "EnvironmentRevisionsLog", "EnvironmentRevisionsResponse", "EnvironmentVariant", "EnvironmentVariantCreate", "EnvironmentVariantEdit", "EnvironmentVariantResponse", "EnvironmentVariantsResponse", "EnvironmentsResponse", "ErrorPolicy", "EvaluationMetrics", "EvaluationMetricsCreate", "EvaluationMetricsEdit", "EvaluationMetricsIdsResponse", "EvaluationMetricsQuery", "EvaluationMetricsQueryScenarioIds", "EvaluationMetricsQueryTimestamps", "EvaluationMetricsRefresh", "EvaluationMetricsResponse", "EvaluationQueue", "EvaluationQueueCreate", "EvaluationQueueData", "EvaluationQueueEdit", "EvaluationQueueFlags", "EvaluationQueueIdResponse", "EvaluationQueueIdsResponse", "EvaluationQueueQuery", "EvaluationQueueQueryFlags", "EvaluationQueueResponse", "EvaluationQueueScenariosQuery", "EvaluationQueuesResponse", "EvaluationResult", "EvaluationResultCreate", "EvaluationResultEdit", "EvaluationResultIdResponse", "EvaluationResultIdsResponse", "EvaluationResultQuery", "EvaluationResultResponse", "EvaluationResultsResponse", "EvaluationRun", "EvaluationRunCreate", "EvaluationRunData", "EvaluationRunDataMapping", "EvaluationRunDataMappingColumn", "EvaluationRunDataMappingStep", "EvaluationRunDataStep", "EvaluationRunDataStepInput", "EvaluationRunDataStepOrigin", "EvaluationRunDataStepType", "EvaluationRunEdit", "EvaluationRunFlags", "EvaluationRunIdResponse", "EvaluationRunIdsRequest", "EvaluationRunIdsResponse", "EvaluationRunQuery", "EvaluationRunQueryFlags", "EvaluationRunResponse", "EvaluationRunsResponse", "EvaluationScenario", "EvaluationScenarioCreate", "EvaluationScenarioEdit", "EvaluationScenarioIdResponse", "EvaluationScenarioIdsResponse", "EvaluationScenarioQuery", "EvaluationScenarioResponse", "EvaluationScenariosResponse", "EvaluationStatus", "Evaluator", "EvaluatorArtifactFlags", "EvaluatorArtifactQueryFlags", "EvaluatorCatalogPreset", "EvaluatorCatalogPresetResponse", "EvaluatorCatalogPresetsResponse", "EvaluatorCatalogTemplate", "EvaluatorCatalogTemplateResponse", "EvaluatorCatalogTemplatesResponse", "EvaluatorCatalogType", "EvaluatorCatalogTypesResponse", "EvaluatorCreate", "EvaluatorEdit", "EvaluatorFlags", "EvaluatorFork", "EvaluatorQuery", "EvaluatorResponse", "EvaluatorRevision", "EvaluatorRevisionCommit", "EvaluatorRevisionCreate", "EvaluatorRevisionDataInput", "EvaluatorRevisionDataInputHeadersValue", "EvaluatorRevisionDataInputRuntime", "EvaluatorRevisionDataOutput", "EvaluatorRevisionDataOutputHeadersValue", "EvaluatorRevisionDataOutputRuntime", "EvaluatorRevisionEdit", "EvaluatorRevisionFlags", "EvaluatorRevisionFork", "EvaluatorRevisionQuery", "EvaluatorRevisionQueryFlags", "EvaluatorRevisionResolveResponse", "EvaluatorRevisionResponse", "EvaluatorRevisionsLog", "EvaluatorRevisionsResponse", "EvaluatorTemplate", "EvaluatorTemplatesResponse", "EvaluatorVariant", "EvaluatorVariantCreate", "EvaluatorVariantEdit", "EvaluatorVariantFlags", "EvaluatorVariantFork", "EvaluatorVariantResponse", "EvaluatorVariantsResponse", "EvaluatorsResponse", "ExistenceOperator", "FetchLegacyAnalyticsRequestNewest", "FetchLegacyAnalyticsRequestOldest", "FetchSimpleTestsetToFileRequestFileType", "FetchTestsetRevisionToFileRequestFileType", "FilteringInput", "FilteringInputConditionsItem", "FilteringOutput", "FilteringOutputConditionsItem", "Focus", "Folder", "FolderCreate", "FolderEdit", "FolderIdResponse", "FolderKind", "FolderQuery", "FolderQueryKinds", "FolderResponse", "FoldersResponse", "Format", "Formatting", typing.Any, typing.Any, "Header", "HttpValidationError", "InviteRequest", "InviteRequestRolesItem", "Invocation", "InvocationCreate", "InvocationCreateLinks", "InvocationEdit", "InvocationEditLinks", "InvocationLinkResponse", "InvocationLinks", "InvocationQuery", "InvocationQueryLinks", "InvocationResponse", "InvocationsResponse", "JsonSchemasInput", "JsonSchemasOutput", typing.Any, typing.Any, "LegacyLifecycleDto", "ListApiKeysResponse", "ListOperator", "ListOptions", "LogicalOperator", "MetricSpec", "MetricType", "MetricsBucket", "NumericOperator", "OTelEventInput", "OTelEventInputTimestamp", "OTelEventOutput", "OTelEventOutputTimestamp", "OTelHashInput", "OTelHashOutput", "OTelLinkInput", "OTelLinkOutput", "OTelLinksResponse", "OTelReferenceInput", "OTelReferenceOutput", "OTelSpanKind", "OTelStatusCode", "OTelTracingRequest", "OTelTracingResponse", "OldAnalyticsResponse", "OrganizationDetails", "OrganizationDomainResponse", "OrganizationProviderResponse", "OrganizationUpdate", "OssSrcModelsApiOrganizationModelsOrganization", "Permission", "Plan", "ProjectsResponse", "QueriesResponse", "Query", "QueryApplicationVariantsRequestOrder", "QueryCreate", "QueryEdit", "QueryEnvironmentRevisionsRequestOrder", "QueryEnvironmentVariantsRequestOrder", "QueryEnvironmentsRequestOrder", "QueryEvaluatorVariantsRequestOrder", "QueryFlags", "QueryQueriesRequestOrder", "QueryQueryFlags", "QueryResponse", "QueryRevision", "QueryRevisionCommit", "QueryRevisionCreate", "QueryRevisionDataInput", "QueryRevisionDataOutput", "QueryRevisionEdit", "QueryRevisionQuery", "QueryRevisionResponse", "QueryRevisionsLog", "QueryRevisionsResponse", "QuerySpansAnalyticsRequestNewest", "QuerySpansAnalyticsRequestOldest", "QueryVariant", "QueryVariantCreate", "QueryVariantEdit", "QueryVariantQuery", "QueryVariantResponse", "QueryVariantsResponse", "QueryWorkflowRevisionsRequestOrder", "QueryWorkflowVariantsRequestOrder", "QueryWorkflowsRequestOrder", "Reference", "ReferenceRequestModelInput", "ReferenceRequestModelOutput", "ResolutionInfo", "RevisionFork", "SecretDto", "SecretDtoData", "SecretKind", "SecretResponseDto", "SecretResponseDtoData", "SessionIdsResponse", "SimpleApplication", "SimpleApplicationCreate", "SimpleApplicationDataInput", "SimpleApplicationDataInputHeadersValue", "SimpleApplicationDataInputRuntime", "SimpleApplicationDataOutput", "SimpleApplicationDataOutputHeadersValue", "SimpleApplicationDataOutputRuntime", "SimpleApplicationEdit", "SimpleApplicationFlags", "SimpleApplicationQuery", "SimpleApplicationQueryFlags", "SimpleApplicationResponse", "SimpleApplicationsResponse", "SimpleEnvironment", "SimpleEnvironmentCreate", "SimpleEnvironmentEdit", "SimpleEnvironmentQuery", "SimpleEnvironmentResponse", "SimpleEnvironmentsResponse", "SimpleEvaluation", "SimpleEvaluationCreate", "SimpleEvaluationData", "SimpleEvaluationDataApplicationSteps", "SimpleEvaluationDataApplicationStepsOneValue", "SimpleEvaluationDataEvaluatorSteps", "SimpleEvaluationDataEvaluatorStepsOneValue", "SimpleEvaluationDataQuerySteps", "SimpleEvaluationDataQueryStepsOneValue", "SimpleEvaluationDataTestsetSteps", "SimpleEvaluationDataTestsetStepsOneValue", "SimpleEvaluationEdit", "SimpleEvaluationIdResponse", "SimpleEvaluationQuery", "SimpleEvaluationResponse", "SimpleEvaluationsResponse", "SimpleEvaluator", "SimpleEvaluatorCreate", "SimpleEvaluatorDataInput", "SimpleEvaluatorDataInputHeadersValue", "SimpleEvaluatorDataInputRuntime", "SimpleEvaluatorDataOutput", "SimpleEvaluatorDataOutputHeadersValue", "SimpleEvaluatorDataOutputRuntime", "SimpleEvaluatorEdit", "SimpleEvaluatorFlags", "SimpleEvaluatorQuery", "SimpleEvaluatorQueryFlags", "SimpleEvaluatorResponse", "SimpleEvaluatorsResponse", "SimpleQueriesResponse", "SimpleQuery", "SimpleQueryCreate", "SimpleQueryEdit", "SimpleQueryQuery", "SimpleQueryResponse", "SimpleQueue", "SimpleQueueCreate", "SimpleQueueData", "SimpleQueueDataEvaluators", "SimpleQueueDataEvaluatorsOneValue", "SimpleQueueIdResponse", "SimpleQueueKind", "SimpleQueueQuery", "SimpleQueueResponse", "SimpleQueueScenariosQuery", "SimpleQueueScenariosResponse", "SimpleQueueSettings", "SimpleQueuesResponse", "SimpleTestset", "SimpleTestsetCreate", "SimpleTestsetEdit", "SimpleTestsetQuery", "SimpleTestsetResponse", "SimpleTestsetsResponse", "SimpleTrace", "SimpleTraceChannel", "SimpleTraceCreate", "SimpleTraceCreateLinks", "SimpleTraceEdit", "SimpleTraceEditLinks", "SimpleTraceKind", "SimpleTraceLinkResponse", "SimpleTraceLinks", "SimpleTraceOrigin", "SimpleTraceQuery", "SimpleTraceQueryLinks", "SimpleTraceReferences", "SimpleTraceResponse", "SimpleTracesResponse", "SimpleWorkflow", "SimpleWorkflowCreate", "SimpleWorkflowDataInput", "SimpleWorkflowDataInputHeadersValue", "SimpleWorkflowDataInputRuntime", "SimpleWorkflowDataOutput", "SimpleWorkflowDataOutputHeadersValue", "SimpleWorkflowDataOutputRuntime", "SimpleWorkflowEdit", "SimpleWorkflowFlags", "SimpleWorkflowQuery", "SimpleWorkflowQueryFlags", "SimpleWorkflowResponse", "SimpleWorkflowsResponse", "SpanInput", "SpanInputEndTime", "SpanInputStartTime", "SpanOutput", "SpanOutputEndTime", "SpanOutputStartTime", "SpanResponse", "SpanType", "SpansNodeInput", "SpansNodeInputEndTime", "SpansNodeInputSpansValue", "SpansNodeInputStartTime", "SpansNodeOutput", "SpansNodeOutputEndTime", "SpansNodeOutputSpansValue", "SpansNodeOutputStartTime", "SpansResponse", "SpansTreeInput", "SpansTreeInputSpansValue", "SpansTreeOutput", "SpansTreeOutputSpansValue", "SsoProviderDto", "SsoProviderInfo", "SsoProviderSettingsDto", "SsoProviders", "StandardProviderDto", "StandardProviderKind", "StandardProviderSettingsDto", "Status", "StringOperator", "TestcaseInput", "TestcaseOutput", "TestcaseResponse", "TestcasesResponse", "Testset", "TestsetCreate", "TestsetEdit", "TestsetFlags", "TestsetQuery", "TestsetResponse", "TestsetRevision", "TestsetRevisionCommit", "TestsetRevisionCreate", "TestsetRevisionDataInput", "TestsetRevisionDataOutput", "TestsetRevisionDelta", "TestsetRevisionDeltaColumns", "TestsetRevisionDeltaRows", "TestsetRevisionEdit", "TestsetRevisionQuery", "TestsetRevisionResponse", "TestsetRevisionsLog", "TestsetRevisionsResponse", "TestsetVariant", "TestsetVariantCreate", "TestsetVariantEdit", "TestsetVariantQuery", "TestsetVariantResponse", "TestsetVariantsResponse", "TestsetsResponse", "TextOptions", "ToolAuthScheme", "ToolCallData", "ToolCallFunction", "ToolCallResponse", "ToolCatalogAction", "ToolCatalogActionDetails", "ToolCatalogActionResponse", "ToolCatalogActionResponseAction", "ToolCatalogActionsResponse", "ToolCatalogActionsResponseActionsItem", "ToolCatalogIntegration", "ToolCatalogIntegrationDetails", "ToolCatalogIntegrationResponse", "ToolCatalogIntegrationResponseIntegration", "ToolCatalogIntegrationsResponse", "ToolCatalogIntegrationsResponseIntegrationsItem", "ToolCatalogProvider", "ToolCatalogProviderDetails", "ToolCatalogProviderResponse", "ToolCatalogProviderResponseProvider", "ToolCatalogProvidersResponse", "ToolCatalogProvidersResponseProvidersItem", "ToolConnection", "ToolConnectionCreate", "ToolConnectionCreateData", "ToolConnectionResponse", "ToolConnectionStatus", "ToolConnectionsResponse", "ToolProviderKind", "ToolResult", "ToolResultData", "TraceIdResponse", "TraceIdsResponse", "TraceInput", "TraceInputSpansValue", "TraceOutput", "TraceOutputSpansValue", "TraceRequest", "TraceResponse", "TraceType", "TracesRequest", "TracesResponse", "TracingQuery", "UnprocessableEntityError", "UserIdsResponse", "ValidationError", "ValidationErrorLocItem", "VariantFork", "WebhookDeliveriesResponse", "WebhookDelivery", "WebhookDeliveryCreate", "WebhookDeliveryData", "WebhookDeliveryQuery", "WebhookDeliveryResponse", "WebhookDeliveryResponseInfo", "WebhookEventType", "WebhookProviderDto", "WebhookProviderSettingsDto", "WebhookSubscription", "WebhookSubscriptionCreate", "WebhookSubscriptionData", "WebhookSubscriptionDataAuthMode", "WebhookSubscriptionEdit", "WebhookSubscriptionQuery", "WebhookSubscriptionResponse", "WebhookSubscriptionTestRequestSubscription", "WebhookSubscriptionsResponse", "Windowing", "WindowingOrder", "Workflow", "WorkflowArtifactFlags", "WorkflowCatalogFlags", "WorkflowCatalogPreset", "WorkflowCatalogPresetResponse", "WorkflowCatalogPresetsResponse", "WorkflowCatalogTemplate", "WorkflowCatalogTemplateResponse", "WorkflowCatalogTemplatesResponse", "WorkflowCatalogType", "WorkflowCatalogTypeResponse", "WorkflowCatalogTypesResponse", "WorkflowCreate", "WorkflowEdit", "WorkflowFlags", "WorkflowFork", "WorkflowResponse", "WorkflowRevisionCommit", "WorkflowRevisionCreate", "WorkflowRevisionDataInput", "WorkflowRevisionDataInputHeadersValue", "WorkflowRevisionDataInputRuntime", "WorkflowRevisionDataOutput", "WorkflowRevisionDataOutputHeadersValue", "WorkflowRevisionDataOutputRuntime", "WorkflowRevisionEdit", "WorkflowRevisionFlags", "WorkflowRevisionFork", "WorkflowRevisionInput", "WorkflowRevisionOutput", "WorkflowRevisionResolveResponse", "WorkflowRevisionResponse", "WorkflowRevisionsLog", "WorkflowRevisionsResponse", "WorkflowVariant", "WorkflowVariantCreate", "WorkflowVariantEdit", "WorkflowVariantFlags", "WorkflowVariantFork", "WorkflowVariantResponse", "WorkflowVariantsResponse", "WorkflowsResponse", "Workspace", "WorkspaceMemberResponse", "WorkspacePermission", "WorkspaceResponse", "WorkspaceRole", "access", "annotations", "applications", "billing", "environments", "evaluations", "evaluators", "folders", "invocations", "keys", "legacy", "organizations", "projects", "queries", "secrets", "status", "testcases", "testsets", "tools", "traces", "users", "webhooks", "workflows", "workspaces"] +__all__ = ["AdminAccountCreateOptions", "AdminAccountRead", "AdminAccountsCreate", "AdminAccountsDelete", "AdminAccountsDeleteTarget", "AdminAccountsResponse", "AdminApiKeyCreate", "AdminApiKeyResponse", "AdminDeleteResponse", "AdminDeletedEntities", "AdminDeletedEntity", "AdminOrganizationCreate", "AdminOrganizationMembershipCreate", "AdminOrganizationMembershipRead", "AdminOrganizationRead", "AdminProjectCreate", "AdminProjectMembershipCreate", "AdminProjectMembershipRead", "AdminProjectRead", "AdminSimpleAccountCreate", "AdminSimpleAccountDeleteEntry", "AdminSimpleAccountRead", "AdminSimpleAccountsApiKeysCreate", "AdminSimpleAccountsCreate", "AdminSimpleAccountsDelete", "AdminSimpleAccountsOrganizationsCreate", "AdminSimpleAccountsOrganizationsMembershipsCreate", "AdminSimpleAccountsOrganizationsTransferOwnership", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjects", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjectsZero", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspaces", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspacesZero", "AdminSimpleAccountsOrganizationsTransferOwnershipResponse", "AdminSimpleAccountsProjectsCreate", "AdminSimpleAccountsProjectsMembershipsCreate", "AdminSimpleAccountsResponse", "AdminSimpleAccountsUsersCreate", "AdminSimpleAccountsUsersIdentitiesCreate", "AdminSimpleAccountsUsersResetPassword", "AdminSimpleAccountsWorkspacesCreate", "AdminSimpleAccountsWorkspacesMembershipsCreate", "AdminStructuredError", "AdminSubscriptionCreate", "AdminSubscriptionRead", "AdminUserCreate", "AdminUserIdentityCreate", "AdminUserIdentityRead", "AdminUserIdentityReadStatus", "AdminUserRead", "AdminWorkspaceCreate", "AdminWorkspaceMembershipCreate", "AdminWorkspaceMembershipRead", "AdminWorkspaceRead", "AgentaApi", "AgentaApiEnvironment", "Analytics", "AnalyticsResponse", "Annotation", "AnnotationCreate", "AnnotationCreateLinks", "AnnotationEdit", "AnnotationEditLinks", "AnnotationLinkResponse", "AnnotationLinks", "AnnotationQuery", "AnnotationQueryLinks", "AnnotationResponse", "AnnotationsResponse", "Application", "ApplicationArtifactFlags", "ApplicationArtifactQueryFlags", "ApplicationCatalogPreset", "ApplicationCatalogPresetResponse", "ApplicationCatalogPresetsResponse", "ApplicationCatalogTemplate", "ApplicationCatalogTemplateResponse", "ApplicationCatalogTemplatesResponse", "ApplicationCatalogType", "ApplicationCatalogTypesResponse", "ApplicationCreate", "ApplicationEdit", "ApplicationFlags", "ApplicationFork", "ApplicationQuery", "ApplicationResponse", "ApplicationRevision", "ApplicationRevisionCommit", "ApplicationRevisionCreate", "ApplicationRevisionDataInput", "ApplicationRevisionDataInputHeadersValue", "ApplicationRevisionDataInputRuntime", "ApplicationRevisionDataOutput", "ApplicationRevisionDataOutputHeadersValue", "ApplicationRevisionDataOutputRuntime", "ApplicationRevisionEdit", "ApplicationRevisionFlags", "ApplicationRevisionFork", "ApplicationRevisionQuery", "ApplicationRevisionQueryFlags", "ApplicationRevisionResolveResponse", "ApplicationRevisionResponse", "ApplicationRevisionsLog", "ApplicationRevisionsResponse", "ApplicationVariant", "ApplicationVariantCreate", "ApplicationVariantEdit", "ApplicationVariantFlags", "ApplicationVariantFork", "ApplicationVariantResponse", "ApplicationVariantsResponse", "ApplicationsResponse", "AsyncAgentaApi", "BodyConfigsFetchVariantsConfigsFetchPost", "Bucket", "CollectStatusResponse", "ComparisonOperator", "Condition", "ConditionOperator", "ConditionOptions", "ConditionValue", "ConfigResponseModel", "CreateSimpleTestsetFromFileRequestFileType", "CreateTestsetRevisionFromFileRequestFileType", "CustomModelSettingsDto", "CustomProviderDto", "CustomProviderKind", "CustomProviderSettingsDto", "DictOperator", "DiscoverResponse", "DiscoverResponseMethodsValue", "EditSimpleTestsetFromFileRequestFileType", "EeSrcModelsApiOrganizationModelsOrganization", "EntityRef", "Environment", "EnvironmentCreate", "EnvironmentEdit", "EnvironmentFlags", "EnvironmentQueryFlags", "EnvironmentResponse", "EnvironmentRevision", "EnvironmentRevisionCommit", "EnvironmentRevisionCreate", "EnvironmentRevisionData", "EnvironmentRevisionDelta", "EnvironmentRevisionEdit", "EnvironmentRevisionResolveResponse", "EnvironmentRevisionResponse", "EnvironmentRevisionsLog", "EnvironmentRevisionsResponse", "EnvironmentVariant", "EnvironmentVariantCreate", "EnvironmentVariantEdit", "EnvironmentVariantResponse", "EnvironmentVariantsResponse", "EnvironmentsResponse", "ErrorPolicy", "EvaluationMetrics", "EvaluationMetricsCreate", "EvaluationMetricsEdit", "EvaluationMetricsIdsResponse", "EvaluationMetricsQuery", "EvaluationMetricsQueryScenarioIds", "EvaluationMetricsQueryTimestamps", "EvaluationMetricsRefresh", "EvaluationMetricsResponse", "EvaluationQueue", "EvaluationQueueCreate", "EvaluationQueueData", "EvaluationQueueEdit", "EvaluationQueueFlags", "EvaluationQueueIdResponse", "EvaluationQueueIdsResponse", "EvaluationQueueQuery", "EvaluationQueueQueryFlags", "EvaluationQueueResponse", "EvaluationQueueScenariosQuery", "EvaluationQueuesResponse", "EvaluationResult", "EvaluationResultCreate", "EvaluationResultEdit", "EvaluationResultIdResponse", "EvaluationResultIdsResponse", "EvaluationResultQuery", "EvaluationResultResponse", "EvaluationResultsResponse", "EvaluationRun", "EvaluationRunCreate", "EvaluationRunData", "EvaluationRunDataMapping", "EvaluationRunDataMappingColumn", "EvaluationRunDataMappingStep", "EvaluationRunDataStep", "EvaluationRunDataStepInput", "EvaluationRunDataStepOrigin", "EvaluationRunDataStepType", "EvaluationRunEdit", "EvaluationRunFlags", "EvaluationRunIdResponse", "EvaluationRunIdsRequest", "EvaluationRunIdsResponse", "EvaluationRunQuery", "EvaluationRunQueryFlags", "EvaluationRunResponse", "EvaluationRunsResponse", "EvaluationScenario", "EvaluationScenarioCreate", "EvaluationScenarioEdit", "EvaluationScenarioIdResponse", "EvaluationScenarioIdsResponse", "EvaluationScenarioQuery", "EvaluationScenarioResponse", "EvaluationScenariosResponse", "EvaluationStatus", "Evaluator", "EvaluatorArtifactFlags", "EvaluatorArtifactQueryFlags", "EvaluatorCatalogPreset", "EvaluatorCatalogPresetResponse", "EvaluatorCatalogPresetsResponse", "EvaluatorCatalogTemplate", "EvaluatorCatalogTemplateResponse", "EvaluatorCatalogTemplatesResponse", "EvaluatorCatalogType", "EvaluatorCatalogTypesResponse", "EvaluatorCreate", "EvaluatorEdit", "EvaluatorFlags", "EvaluatorFork", "EvaluatorQuery", "EvaluatorResponse", "EvaluatorRevision", "EvaluatorRevisionCommit", "EvaluatorRevisionCreate", "EvaluatorRevisionDataInput", "EvaluatorRevisionDataInputHeadersValue", "EvaluatorRevisionDataInputRuntime", "EvaluatorRevisionDataOutput", "EvaluatorRevisionDataOutputHeadersValue", "EvaluatorRevisionDataOutputRuntime", "EvaluatorRevisionEdit", "EvaluatorRevisionFlags", "EvaluatorRevisionFork", "EvaluatorRevisionQuery", "EvaluatorRevisionQueryFlags", "EvaluatorRevisionResolveResponse", "EvaluatorRevisionResponse", "EvaluatorRevisionsLog", "EvaluatorRevisionsResponse", "EvaluatorTemplate", "EvaluatorTemplatesResponse", "EvaluatorVariant", "EvaluatorVariantCreate", "EvaluatorVariantEdit", "EvaluatorVariantFlags", "EvaluatorVariantFork", "EvaluatorVariantResponse", "EvaluatorVariantsResponse", "EvaluatorsResponse", "ExistenceOperator", "FetchLegacyAnalyticsRequestNewest", "FetchLegacyAnalyticsRequestOldest", "FetchSimpleTestsetToFileRequestFileType", "FetchTestsetRevisionToFileRequestFileType", "FilteringInput", "FilteringInputConditionsItem", "FilteringOutput", "FilteringOutputConditionsItem", "Focus", "Folder", "FolderCreate", "FolderEdit", "FolderIdResponse", "FolderKind", "FolderQuery", "FolderQueryKinds", "FolderResponse", "FoldersResponse", "Format", "Formatting", typing.Any, typing.Any, "Header", "HttpValidationError", "InviteRequest", "InviteRequestRolesItem", "Invocation", "InvocationCreate", "InvocationCreateLinks", "InvocationEdit", "InvocationEditLinks", "InvocationLinkResponse", "InvocationLinks", "InvocationQuery", "InvocationQueryLinks", "InvocationResponse", "InvocationsResponse", "JsonSchemasInput", "JsonSchemasOutput", typing.Any, typing.Any, "LegacyLifecycleDto", "ListApiKeysResponse", "ListOperator", "ListOptions", "LogicalOperator", "MetricSpec", "MetricType", "MetricsBucket", "NumericOperator", "OTelEventInput", "OTelEventInputTimestamp", "OTelEventOutput", "OTelEventOutputTimestamp", "OTelHashInput", "OTelHashOutput", "OTelLinkInput", "OTelLinkOutput", "OTelLinksResponse", "OTelReferenceInput", "OTelReferenceOutput", "OTelSpanKind", "OTelStatusCode", "OTelTracingRequest", "OTelTracingResponse", "OldAnalyticsResponse", "OrganizationDetails", "OrganizationDomainResponse", "OrganizationProviderResponse", "OrganizationUpdate", "OssSrcModelsApiOrganizationModelsOrganization", "Permission", "ProjectsResponse", "QueriesResponse", "Query", "QueryApplicationVariantsRequestOrder", "QueryCreate", "QueryEdit", "QueryEnvironmentRevisionsRequestOrder", "QueryEnvironmentVariantsRequestOrder", "QueryEnvironmentsRequestOrder", "QueryEvaluatorVariantsRequestOrder", "QueryFlags", "QueryQueriesRequestOrder", "QueryQueryFlags", "QueryResponse", "QueryRevision", "QueryRevisionCommit", "QueryRevisionCreate", "QueryRevisionDataInput", "QueryRevisionDataOutput", "QueryRevisionEdit", "QueryRevisionQuery", "QueryRevisionResponse", "QueryRevisionsLog", "QueryRevisionsResponse", "QuerySpansAnalyticsRequestNewest", "QuerySpansAnalyticsRequestOldest", "QueryVariant", "QueryVariantCreate", "QueryVariantEdit", "QueryVariantQuery", "QueryVariantResponse", "QueryVariantsResponse", "QueryWorkflowRevisionsRequestOrder", "QueryWorkflowVariantsRequestOrder", "QueryWorkflowsRequestOrder", "Reference", "ReferenceRequestModelInput", "ReferenceRequestModelOutput", "ResolutionInfo", "RevisionFork", "SecretDto", "SecretDtoData", "SecretKind", "SecretResponseDto", "SecretResponseDtoData", "SessionIdsResponse", "SimpleApplication", "SimpleApplicationCreate", "SimpleApplicationDataInput", "SimpleApplicationDataInputHeadersValue", "SimpleApplicationDataInputRuntime", "SimpleApplicationDataOutput", "SimpleApplicationDataOutputHeadersValue", "SimpleApplicationDataOutputRuntime", "SimpleApplicationEdit", "SimpleApplicationFlags", "SimpleApplicationQuery", "SimpleApplicationQueryFlags", "SimpleApplicationResponse", "SimpleApplicationsResponse", "SimpleEnvironment", "SimpleEnvironmentCreate", "SimpleEnvironmentEdit", "SimpleEnvironmentQuery", "SimpleEnvironmentResponse", "SimpleEnvironmentsResponse", "SimpleEvaluation", "SimpleEvaluationCreate", "SimpleEvaluationData", "SimpleEvaluationDataApplicationSteps", "SimpleEvaluationDataApplicationStepsOneValue", "SimpleEvaluationDataEvaluatorSteps", "SimpleEvaluationDataEvaluatorStepsOneValue", "SimpleEvaluationDataQuerySteps", "SimpleEvaluationDataQueryStepsOneValue", "SimpleEvaluationDataTestsetSteps", "SimpleEvaluationDataTestsetStepsOneValue", "SimpleEvaluationEdit", "SimpleEvaluationIdResponse", "SimpleEvaluationQuery", "SimpleEvaluationResponse", "SimpleEvaluationsResponse", "SimpleEvaluator", "SimpleEvaluatorCreate", "SimpleEvaluatorDataInput", "SimpleEvaluatorDataInputHeadersValue", "SimpleEvaluatorDataInputRuntime", "SimpleEvaluatorDataOutput", "SimpleEvaluatorDataOutputHeadersValue", "SimpleEvaluatorDataOutputRuntime", "SimpleEvaluatorEdit", "SimpleEvaluatorFlags", "SimpleEvaluatorQuery", "SimpleEvaluatorQueryFlags", "SimpleEvaluatorResponse", "SimpleEvaluatorsResponse", "SimpleQueriesResponse", "SimpleQuery", "SimpleQueryCreate", "SimpleQueryEdit", "SimpleQueryQuery", "SimpleQueryResponse", "SimpleQueue", "SimpleQueueCreate", "SimpleQueueData", "SimpleQueueDataEvaluators", "SimpleQueueDataEvaluatorsOneValue", "SimpleQueueIdResponse", "SimpleQueueKind", "SimpleQueueQuery", "SimpleQueueResponse", "SimpleQueueScenariosQuery", "SimpleQueueScenariosResponse", "SimpleQueueSettings", "SimpleQueuesResponse", "SimpleTestset", "SimpleTestsetCreate", "SimpleTestsetEdit", "SimpleTestsetQuery", "SimpleTestsetResponse", "SimpleTestsetsResponse", "SimpleTrace", "SimpleTraceChannel", "SimpleTraceCreate", "SimpleTraceCreateLinks", "SimpleTraceEdit", "SimpleTraceEditLinks", "SimpleTraceKind", "SimpleTraceLinkResponse", "SimpleTraceLinks", "SimpleTraceOrigin", "SimpleTraceQuery", "SimpleTraceQueryLinks", "SimpleTraceReferences", "SimpleTraceResponse", "SimpleTracesResponse", "SimpleWorkflow", "SimpleWorkflowCreate", "SimpleWorkflowDataInput", "SimpleWorkflowDataInputHeadersValue", "SimpleWorkflowDataInputRuntime", "SimpleWorkflowDataOutput", "SimpleWorkflowDataOutputHeadersValue", "SimpleWorkflowDataOutputRuntime", "SimpleWorkflowEdit", "SimpleWorkflowFlags", "SimpleWorkflowQuery", "SimpleWorkflowQueryFlags", "SimpleWorkflowResponse", "SimpleWorkflowsResponse", "SpanInput", "SpanInputEndTime", "SpanInputStartTime", "SpanOutput", "SpanOutputEndTime", "SpanOutputStartTime", "SpanResponse", "SpanType", "SpansNodeInput", "SpansNodeInputEndTime", "SpansNodeInputSpansValue", "SpansNodeInputStartTime", "SpansNodeOutput", "SpansNodeOutputEndTime", "SpansNodeOutputSpansValue", "SpansNodeOutputStartTime", "SpansResponse", "SpansTreeInput", "SpansTreeInputSpansValue", "SpansTreeOutput", "SpansTreeOutputSpansValue", "SsoProviderDto", "SsoProviderInfo", "SsoProviderSettingsDto", "SsoProviders", "StandardProviderDto", "StandardProviderKind", "StandardProviderSettingsDto", "Status", "StringOperator", "TestcaseInput", "TestcaseOutput", "TestcaseResponse", "TestcasesResponse", "Testset", "TestsetCreate", "TestsetEdit", "TestsetFlags", "TestsetQuery", "TestsetResponse", "TestsetRevision", "TestsetRevisionCommit", "TestsetRevisionCreate", "TestsetRevisionDataInput", "TestsetRevisionDataOutput", "TestsetRevisionDelta", "TestsetRevisionDeltaColumns", "TestsetRevisionDeltaRows", "TestsetRevisionEdit", "TestsetRevisionQuery", "TestsetRevisionResponse", "TestsetRevisionsLog", "TestsetRevisionsResponse", "TestsetVariant", "TestsetVariantCreate", "TestsetVariantEdit", "TestsetVariantQuery", "TestsetVariantResponse", "TestsetVariantsResponse", "TestsetsResponse", "TextOptions", "ToolAuthScheme", "ToolCallData", "ToolCallFunction", "ToolCallResponse", "ToolCatalogAction", "ToolCatalogActionDetails", "ToolCatalogActionResponse", "ToolCatalogActionResponseAction", "ToolCatalogActionsResponse", "ToolCatalogActionsResponseActionsItem", "ToolCatalogIntegration", "ToolCatalogIntegrationDetails", "ToolCatalogIntegrationResponse", "ToolCatalogIntegrationResponseIntegration", "ToolCatalogIntegrationsResponse", "ToolCatalogIntegrationsResponseIntegrationsItem", "ToolCatalogProvider", "ToolCatalogProviderDetails", "ToolCatalogProviderResponse", "ToolCatalogProviderResponseProvider", "ToolCatalogProvidersResponse", "ToolCatalogProvidersResponseProvidersItem", "ToolConnection", "ToolConnectionCreate", "ToolConnectionCreateData", "ToolConnectionResponse", "ToolConnectionStatus", "ToolConnectionsResponse", "ToolProviderKind", "ToolResult", "ToolResultData", "TraceIdResponse", "TraceIdsResponse", "TraceInput", "TraceInputSpansValue", "TraceOutput", "TraceOutputSpansValue", "TraceRequest", "TraceResponse", "TraceType", "TracesRequest", "TracesResponse", "TracingQuery", "UnprocessableEntityError", "UserIdsResponse", "ValidationError", "ValidationErrorLocItem", "VariantFork", "WebhookDeliveriesResponse", "WebhookDelivery", "WebhookDeliveryCreate", "WebhookDeliveryData", "WebhookDeliveryQuery", "WebhookDeliveryResponse", "WebhookDeliveryResponseInfo", "WebhookEventType", "WebhookProviderDto", "WebhookProviderSettingsDto", "WebhookSubscription", "WebhookSubscriptionCreate", "WebhookSubscriptionData", "WebhookSubscriptionDataAuthMode", "WebhookSubscriptionEdit", "WebhookSubscriptionQuery", "WebhookSubscriptionResponse", "WebhookSubscriptionTestRequestSubscription", "WebhookSubscriptionsResponse", "Windowing", "WindowingOrder", "Workflow", "WorkflowArtifactFlags", "WorkflowCatalogFlags", "WorkflowCatalogPreset", "WorkflowCatalogPresetResponse", "WorkflowCatalogPresetsResponse", "WorkflowCatalogTemplate", "WorkflowCatalogTemplateResponse", "WorkflowCatalogTemplatesResponse", "WorkflowCatalogType", "WorkflowCatalogTypeResponse", "WorkflowCatalogTypesResponse", "WorkflowCreate", "WorkflowEdit", "WorkflowFlags", "WorkflowFork", "WorkflowResponse", "WorkflowRevisionCommit", "WorkflowRevisionCreate", "WorkflowRevisionDataInput", "WorkflowRevisionDataInputHeadersValue", "WorkflowRevisionDataInputRuntime", "WorkflowRevisionDataOutput", "WorkflowRevisionDataOutputHeadersValue", "WorkflowRevisionDataOutputRuntime", "WorkflowRevisionEdit", "WorkflowRevisionFlags", "WorkflowRevisionFork", "WorkflowRevisionInput", "WorkflowRevisionOutput", "WorkflowRevisionResolveResponse", "WorkflowRevisionResponse", "WorkflowRevisionsLog", "WorkflowRevisionsResponse", "WorkflowVariant", "WorkflowVariantCreate", "WorkflowVariantEdit", "WorkflowVariantFlags", "WorkflowVariantFork", "WorkflowVariantResponse", "WorkflowVariantsResponse", "WorkflowsResponse", "Workspace", "WorkspaceMemberResponse", "WorkspacePermission", "WorkspaceResponse", "access", "annotations", "applications", "billing", "environments", "evaluations", "evaluators", "folders", "invocations", "keys", "legacy", "organizations", "projects", "queries", "secrets", "status", "testcases", "testsets", "tools", "traces", "users", "webhooks", "workflows", "workspaces"] diff --git a/clients/python/agenta_client/billing/client.py b/clients/python/agenta_client/billing/client.py index 834eff315e..eb4967e957 100644 --- a/clients/python/agenta_client/billing/client.py +++ b/clients/python/agenta_client/billing/client.py @@ -4,7 +4,6 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions -from ..types.plan import Plan from .raw_client import AsyncRawBillingClient, RawBillingClient @@ -71,11 +70,11 @@ def create_portal(self, *, request_options: typing.Optional[RequestOptions] = No _response = self._raw_client.create_portal(request_options=request_options) return _response.data - def create_checkout(self, *, plan: Plan, success_url: str, request_options: typing.Optional[RequestOptions] = None) -> typing.Any: + def create_checkout(self, *, plan: str, success_url: str, request_options: typing.Optional[RequestOptions] = None) -> typing.Any: """ Parameters ---------- - plan : Plan + plan : str success_url : str @@ -95,7 +94,7 @@ def create_checkout(self, *, plan: Plan, success_url: str, request_options: typi api_key="YOUR_API_KEY", ) client.billing.create_checkout( - plan="cloud_v0_hobby", + plan="plan", success_url="success_url", ) """ @@ -126,11 +125,11 @@ def fetch_plans(self, *, request_options: typing.Optional[RequestOptions] = None _response = self._raw_client.fetch_plans(request_options=request_options) return _response.data - def switch_plans(self, *, plan: Plan, request_options: typing.Optional[RequestOptions] = None) -> typing.Any: + def switch_plans(self, *, plan: str, request_options: typing.Optional[RequestOptions] = None) -> typing.Any: """ Parameters ---------- - plan : Plan + plan : str request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -148,7 +147,7 @@ def switch_plans(self, *, plan: Plan, request_options: typing.Optional[RequestOp api_key="YOUR_API_KEY", ) client.billing.switch_plans( - plan="cloud_v0_hobby", + plan="plan", ) """ _response = self._raw_client.switch_plans(plan=plan, request_options=request_options) @@ -304,11 +303,11 @@ async def main() -> None: _response = await self._raw_client.create_portal(request_options=request_options) return _response.data - async def create_checkout(self, *, plan: Plan, success_url: str, request_options: typing.Optional[RequestOptions] = None) -> typing.Any: + async def create_checkout(self, *, plan: str, success_url: str, request_options: typing.Optional[RequestOptions] = None) -> typing.Any: """ Parameters ---------- - plan : Plan + plan : str success_url : str @@ -333,7 +332,7 @@ async def create_checkout(self, *, plan: Plan, success_url: str, request_options async def main() -> None: await client.billing.create_checkout( - plan="cloud_v0_hobby", + plan="plan", success_url="success_url", ) @@ -375,11 +374,11 @@ async def main() -> None: _response = await self._raw_client.fetch_plans(request_options=request_options) return _response.data - async def switch_plans(self, *, plan: Plan, request_options: typing.Optional[RequestOptions] = None) -> typing.Any: + async def switch_plans(self, *, plan: str, request_options: typing.Optional[RequestOptions] = None) -> typing.Any: """ Parameters ---------- - plan : Plan + plan : str request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -402,7 +401,7 @@ async def switch_plans(self, *, plan: Plan, request_options: typing.Optional[Req async def main() -> None: await client.billing.switch_plans( - plan="cloud_v0_hobby", + plan="plan", ) diff --git a/clients/python/agenta_client/billing/raw_client.py b/clients/python/agenta_client/billing/raw_client.py index 950788c377..e46470834a 100644 --- a/clients/python/agenta_client/billing/raw_client.py +++ b/clients/python/agenta_client/billing/raw_client.py @@ -10,7 +10,6 @@ from ..core.request_options import RequestOptions from ..errors.unprocessable_entity_error import UnprocessableEntityError from ..types.http_validation_error import HttpValidationError -from ..types.plan import Plan class RawBillingClient: @@ -81,11 +80,11 @@ def create_portal(self, *, request_options: typing.Optional[RequestOptions] = No raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - def create_checkout(self, *, plan: Plan, success_url: str, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[typing.Any]: + def create_checkout(self, *, plan: str, success_url: str, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[typing.Any]: """ Parameters ---------- - plan : Plan + plan : str success_url : str @@ -159,11 +158,11 @@ def fetch_plans(self, *, request_options: typing.Optional[RequestOptions] = None raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - def switch_plans(self, *, plan: Plan, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[typing.Any]: + def switch_plans(self, *, plan: str, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[typing.Any]: """ Parameters ---------- - plan : Plan + plan : str request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -366,11 +365,11 @@ async def create_portal(self, *, request_options: typing.Optional[RequestOptions raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - async def create_checkout(self, *, plan: Plan, success_url: str, request_options: typing.Optional[RequestOptions] = None) -> AsyncHttpResponse[typing.Any]: + async def create_checkout(self, *, plan: str, success_url: str, request_options: typing.Optional[RequestOptions] = None) -> AsyncHttpResponse[typing.Any]: """ Parameters ---------- - plan : Plan + plan : str success_url : str @@ -444,11 +443,11 @@ async def fetch_plans(self, *, request_options: typing.Optional[RequestOptions] raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - async def switch_plans(self, *, plan: Plan, request_options: typing.Optional[RequestOptions] = None) -> AsyncHttpResponse[typing.Any]: + async def switch_plans(self, *, plan: str, request_options: typing.Optional[RequestOptions] = None) -> AsyncHttpResponse[typing.Any]: """ Parameters ---------- - plan : Plan + plan : str request_options : typing.Optional[RequestOptions] Request-specific configuration. diff --git a/clients/python/agenta_client/types/__init__.py b/clients/python/agenta_client/types/__init__.py index c55656462b..f451c27269 100644 --- a/clients/python/agenta_client/types/__init__.py +++ b/clients/python/agenta_client/types/__init__.py @@ -326,7 +326,6 @@ from .organization_update import OrganizationUpdate from .oss_src_models_api_organization_models_organization import OssSrcModelsApiOrganizationModelsOrganization from .permission import Permission - from .plan import Plan from .projects_response import ProjectsResponse from .queries_response import QueriesResponse from .query import Query @@ -640,8 +639,7 @@ from .workspace_member_response import WorkspaceMemberResponse from .workspace_permission import WorkspacePermission from .workspace_response import WorkspaceResponse - from .workspace_role import WorkspaceRole -_dynamic_imports: typing.Dict[str, str] = {"AdminAccountCreateOptions": ".admin_account_create_options", "AdminAccountRead": ".admin_account_read", "AdminAccountsCreate": ".admin_accounts_create", "AdminAccountsDelete": ".admin_accounts_delete", "AdminAccountsDeleteTarget": ".admin_accounts_delete_target", "AdminAccountsResponse": ".admin_accounts_response", "AdminApiKeyCreate": ".admin_api_key_create", "AdminApiKeyResponse": ".admin_api_key_response", "AdminDeleteResponse": ".admin_delete_response", "AdminDeletedEntities": ".admin_deleted_entities", "AdminDeletedEntity": ".admin_deleted_entity", "AdminOrganizationCreate": ".admin_organization_create", "AdminOrganizationMembershipCreate": ".admin_organization_membership_create", "AdminOrganizationMembershipRead": ".admin_organization_membership_read", "AdminOrganizationRead": ".admin_organization_read", "AdminProjectCreate": ".admin_project_create", "AdminProjectMembershipCreate": ".admin_project_membership_create", "AdminProjectMembershipRead": ".admin_project_membership_read", "AdminProjectRead": ".admin_project_read", "AdminSimpleAccountCreate": ".admin_simple_account_create", "AdminSimpleAccountDeleteEntry": ".admin_simple_account_delete_entry", "AdminSimpleAccountRead": ".admin_simple_account_read", "AdminSimpleAccountsApiKeysCreate": ".admin_simple_accounts_api_keys_create", "AdminSimpleAccountsCreate": ".admin_simple_accounts_create", "AdminSimpleAccountsDelete": ".admin_simple_accounts_delete", "AdminSimpleAccountsOrganizationsCreate": ".admin_simple_accounts_organizations_create", "AdminSimpleAccountsOrganizationsMembershipsCreate": ".admin_simple_accounts_organizations_memberships_create", "AdminSimpleAccountsOrganizationsTransferOwnership": ".admin_simple_accounts_organizations_transfer_ownership", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjects": ".admin_simple_accounts_organizations_transfer_ownership_include_projects", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjectsZero": ".admin_simple_accounts_organizations_transfer_ownership_include_projects_zero", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspaces": ".admin_simple_accounts_organizations_transfer_ownership_include_workspaces", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspacesZero": ".admin_simple_accounts_organizations_transfer_ownership_include_workspaces_zero", "AdminSimpleAccountsOrganizationsTransferOwnershipResponse": ".admin_simple_accounts_organizations_transfer_ownership_response", "AdminSimpleAccountsProjectsCreate": ".admin_simple_accounts_projects_create", "AdminSimpleAccountsProjectsMembershipsCreate": ".admin_simple_accounts_projects_memberships_create", "AdminSimpleAccountsResponse": ".admin_simple_accounts_response", "AdminSimpleAccountsUsersCreate": ".admin_simple_accounts_users_create", "AdminSimpleAccountsUsersIdentitiesCreate": ".admin_simple_accounts_users_identities_create", "AdminSimpleAccountsUsersResetPassword": ".admin_simple_accounts_users_reset_password", "AdminSimpleAccountsWorkspacesCreate": ".admin_simple_accounts_workspaces_create", "AdminSimpleAccountsWorkspacesMembershipsCreate": ".admin_simple_accounts_workspaces_memberships_create", "AdminStructuredError": ".admin_structured_error", "AdminSubscriptionCreate": ".admin_subscription_create", "AdminSubscriptionRead": ".admin_subscription_read", "AdminUserCreate": ".admin_user_create", "AdminUserIdentityCreate": ".admin_user_identity_create", "AdminUserIdentityRead": ".admin_user_identity_read", "AdminUserIdentityReadStatus": ".admin_user_identity_read_status", "AdminUserRead": ".admin_user_read", "AdminWorkspaceCreate": ".admin_workspace_create", "AdminWorkspaceMembershipCreate": ".admin_workspace_membership_create", "AdminWorkspaceMembershipRead": ".admin_workspace_membership_read", "AdminWorkspaceRead": ".admin_workspace_read", "Analytics": ".analytics", "AnalyticsResponse": ".analytics_response", "Annotation": ".annotation", "AnnotationCreate": ".annotation_create", "AnnotationCreateLinks": ".annotation_create_links", "AnnotationEdit": ".annotation_edit", "AnnotationEditLinks": ".annotation_edit_links", "AnnotationLinkResponse": ".annotation_link_response", "AnnotationLinks": ".annotation_links", "AnnotationQuery": ".annotation_query", "AnnotationQueryLinks": ".annotation_query_links", "AnnotationResponse": ".annotation_response", "AnnotationsResponse": ".annotations_response", "Application": ".application", "ApplicationArtifactFlags": ".application_artifact_flags", "ApplicationArtifactQueryFlags": ".application_artifact_query_flags", "ApplicationCatalogPreset": ".application_catalog_preset", "ApplicationCatalogPresetResponse": ".application_catalog_preset_response", "ApplicationCatalogPresetsResponse": ".application_catalog_presets_response", "ApplicationCatalogTemplate": ".application_catalog_template", "ApplicationCatalogTemplateResponse": ".application_catalog_template_response", "ApplicationCatalogTemplatesResponse": ".application_catalog_templates_response", "ApplicationCatalogType": ".application_catalog_type", "ApplicationCatalogTypesResponse": ".application_catalog_types_response", "ApplicationCreate": ".application_create", "ApplicationEdit": ".application_edit", "ApplicationFlags": ".application_flags", "ApplicationFork": ".application_fork", "ApplicationQuery": ".application_query", "ApplicationResponse": ".application_response", "ApplicationRevision": ".application_revision", "ApplicationRevisionCommit": ".application_revision_commit", "ApplicationRevisionCreate": ".application_revision_create", "ApplicationRevisionDataInput": ".application_revision_data_input", "ApplicationRevisionDataInputHeadersValue": ".application_revision_data_input_headers_value", "ApplicationRevisionDataInputRuntime": ".application_revision_data_input_runtime", "ApplicationRevisionDataOutput": ".application_revision_data_output", "ApplicationRevisionDataOutputHeadersValue": ".application_revision_data_output_headers_value", "ApplicationRevisionDataOutputRuntime": ".application_revision_data_output_runtime", "ApplicationRevisionEdit": ".application_revision_edit", "ApplicationRevisionFlags": ".application_revision_flags", "ApplicationRevisionFork": ".application_revision_fork", "ApplicationRevisionQuery": ".application_revision_query", "ApplicationRevisionQueryFlags": ".application_revision_query_flags", "ApplicationRevisionResolveResponse": ".application_revision_resolve_response", "ApplicationRevisionResponse": ".application_revision_response", "ApplicationRevisionsLog": ".application_revisions_log", "ApplicationRevisionsResponse": ".application_revisions_response", "ApplicationVariant": ".application_variant", "ApplicationVariantCreate": ".application_variant_create", "ApplicationVariantEdit": ".application_variant_edit", "ApplicationVariantFlags": ".application_variant_flags", "ApplicationVariantFork": ".application_variant_fork", "ApplicationVariantResponse": ".application_variant_response", "ApplicationVariantsResponse": ".application_variants_response", "ApplicationsResponse": ".applications_response", "BodyConfigsFetchVariantsConfigsFetchPost": ".body_configs_fetch_variants_configs_fetch_post", "Bucket": ".bucket", "CollectStatusResponse": ".collect_status_response", "ComparisonOperator": ".comparison_operator", "Condition": ".condition", "ConditionOperator": ".condition_operator", "ConditionOptions": ".condition_options", "ConditionValue": ".condition_value", "ConfigResponseModel": ".config_response_model", "CustomModelSettingsDto": ".custom_model_settings_dto", "CustomProviderDto": ".custom_provider_dto", "CustomProviderKind": ".custom_provider_kind", "CustomProviderSettingsDto": ".custom_provider_settings_dto", "DictOperator": ".dict_operator", "DiscoverResponse": ".discover_response", "DiscoverResponseMethodsValue": ".discover_response_methods_value", "EeSrcModelsApiOrganizationModelsOrganization": ".ee_src_models_api_organization_models_organization", "EntityRef": ".entity_ref", "Environment": ".environment", "EnvironmentCreate": ".environment_create", "EnvironmentEdit": ".environment_edit", "EnvironmentFlags": ".environment_flags", "EnvironmentQueryFlags": ".environment_query_flags", "EnvironmentResponse": ".environment_response", "EnvironmentRevision": ".environment_revision", "EnvironmentRevisionCommit": ".environment_revision_commit", "EnvironmentRevisionCreate": ".environment_revision_create", "EnvironmentRevisionData": ".environment_revision_data", "EnvironmentRevisionDelta": ".environment_revision_delta", "EnvironmentRevisionEdit": ".environment_revision_edit", "EnvironmentRevisionResolveResponse": ".environment_revision_resolve_response", "EnvironmentRevisionResponse": ".environment_revision_response", "EnvironmentRevisionsLog": ".environment_revisions_log", "EnvironmentRevisionsResponse": ".environment_revisions_response", "EnvironmentVariant": ".environment_variant", "EnvironmentVariantCreate": ".environment_variant_create", "EnvironmentVariantEdit": ".environment_variant_edit", "EnvironmentVariantResponse": ".environment_variant_response", "EnvironmentVariantsResponse": ".environment_variants_response", "EnvironmentsResponse": ".environments_response", "ErrorPolicy": ".error_policy", "EvaluationMetrics": ".evaluation_metrics", "EvaluationMetricsCreate": ".evaluation_metrics_create", "EvaluationMetricsEdit": ".evaluation_metrics_edit", "EvaluationMetricsIdsResponse": ".evaluation_metrics_ids_response", "EvaluationMetricsQuery": ".evaluation_metrics_query", "EvaluationMetricsQueryScenarioIds": ".evaluation_metrics_query_scenario_ids", "EvaluationMetricsQueryTimestamps": ".evaluation_metrics_query_timestamps", "EvaluationMetricsRefresh": ".evaluation_metrics_refresh", "EvaluationMetricsResponse": ".evaluation_metrics_response", "EvaluationQueue": ".evaluation_queue", "EvaluationQueueCreate": ".evaluation_queue_create", "EvaluationQueueData": ".evaluation_queue_data", "EvaluationQueueEdit": ".evaluation_queue_edit", "EvaluationQueueFlags": ".evaluation_queue_flags", "EvaluationQueueIdResponse": ".evaluation_queue_id_response", "EvaluationQueueIdsResponse": ".evaluation_queue_ids_response", "EvaluationQueueQuery": ".evaluation_queue_query", "EvaluationQueueQueryFlags": ".evaluation_queue_query_flags", "EvaluationQueueResponse": ".evaluation_queue_response", "EvaluationQueueScenariosQuery": ".evaluation_queue_scenarios_query", "EvaluationQueuesResponse": ".evaluation_queues_response", "EvaluationResult": ".evaluation_result", "EvaluationResultCreate": ".evaluation_result_create", "EvaluationResultEdit": ".evaluation_result_edit", "EvaluationResultIdResponse": ".evaluation_result_id_response", "EvaluationResultIdsResponse": ".evaluation_result_ids_response", "EvaluationResultQuery": ".evaluation_result_query", "EvaluationResultResponse": ".evaluation_result_response", "EvaluationResultsResponse": ".evaluation_results_response", "EvaluationRun": ".evaluation_run", "EvaluationRunCreate": ".evaluation_run_create", "EvaluationRunData": ".evaluation_run_data", "EvaluationRunDataMapping": ".evaluation_run_data_mapping", "EvaluationRunDataMappingColumn": ".evaluation_run_data_mapping_column", "EvaluationRunDataMappingStep": ".evaluation_run_data_mapping_step", "EvaluationRunDataStep": ".evaluation_run_data_step", "EvaluationRunDataStepInput": ".evaluation_run_data_step_input", "EvaluationRunDataStepOrigin": ".evaluation_run_data_step_origin", "EvaluationRunDataStepType": ".evaluation_run_data_step_type", "EvaluationRunEdit": ".evaluation_run_edit", "EvaluationRunFlags": ".evaluation_run_flags", "EvaluationRunIdResponse": ".evaluation_run_id_response", "EvaluationRunIdsRequest": ".evaluation_run_ids_request", "EvaluationRunIdsResponse": ".evaluation_run_ids_response", "EvaluationRunQuery": ".evaluation_run_query", "EvaluationRunQueryFlags": ".evaluation_run_query_flags", "EvaluationRunResponse": ".evaluation_run_response", "EvaluationRunsResponse": ".evaluation_runs_response", "EvaluationScenario": ".evaluation_scenario", "EvaluationScenarioCreate": ".evaluation_scenario_create", "EvaluationScenarioEdit": ".evaluation_scenario_edit", "EvaluationScenarioIdResponse": ".evaluation_scenario_id_response", "EvaluationScenarioIdsResponse": ".evaluation_scenario_ids_response", "EvaluationScenarioQuery": ".evaluation_scenario_query", "EvaluationScenarioResponse": ".evaluation_scenario_response", "EvaluationScenariosResponse": ".evaluation_scenarios_response", "EvaluationStatus": ".evaluation_status", "Evaluator": ".evaluator", "EvaluatorArtifactFlags": ".evaluator_artifact_flags", "EvaluatorArtifactQueryFlags": ".evaluator_artifact_query_flags", "EvaluatorCatalogPreset": ".evaluator_catalog_preset", "EvaluatorCatalogPresetResponse": ".evaluator_catalog_preset_response", "EvaluatorCatalogPresetsResponse": ".evaluator_catalog_presets_response", "EvaluatorCatalogTemplate": ".evaluator_catalog_template", "EvaluatorCatalogTemplateResponse": ".evaluator_catalog_template_response", "EvaluatorCatalogTemplatesResponse": ".evaluator_catalog_templates_response", "EvaluatorCatalogType": ".evaluator_catalog_type", "EvaluatorCatalogTypesResponse": ".evaluator_catalog_types_response", "EvaluatorCreate": ".evaluator_create", "EvaluatorEdit": ".evaluator_edit", "EvaluatorFlags": ".evaluator_flags", "EvaluatorFork": ".evaluator_fork", "EvaluatorQuery": ".evaluator_query", "EvaluatorResponse": ".evaluator_response", "EvaluatorRevision": ".evaluator_revision", "EvaluatorRevisionCommit": ".evaluator_revision_commit", "EvaluatorRevisionCreate": ".evaluator_revision_create", "EvaluatorRevisionDataInput": ".evaluator_revision_data_input", "EvaluatorRevisionDataInputHeadersValue": ".evaluator_revision_data_input_headers_value", "EvaluatorRevisionDataInputRuntime": ".evaluator_revision_data_input_runtime", "EvaluatorRevisionDataOutput": ".evaluator_revision_data_output", "EvaluatorRevisionDataOutputHeadersValue": ".evaluator_revision_data_output_headers_value", "EvaluatorRevisionDataOutputRuntime": ".evaluator_revision_data_output_runtime", "EvaluatorRevisionEdit": ".evaluator_revision_edit", "EvaluatorRevisionFlags": ".evaluator_revision_flags", "EvaluatorRevisionFork": ".evaluator_revision_fork", "EvaluatorRevisionQuery": ".evaluator_revision_query", "EvaluatorRevisionQueryFlags": ".evaluator_revision_query_flags", "EvaluatorRevisionResolveResponse": ".evaluator_revision_resolve_response", "EvaluatorRevisionResponse": ".evaluator_revision_response", "EvaluatorRevisionsLog": ".evaluator_revisions_log", "EvaluatorRevisionsResponse": ".evaluator_revisions_response", "EvaluatorTemplate": ".evaluator_template", "EvaluatorTemplatesResponse": ".evaluator_templates_response", "EvaluatorVariant": ".evaluator_variant", "EvaluatorVariantCreate": ".evaluator_variant_create", "EvaluatorVariantEdit": ".evaluator_variant_edit", "EvaluatorVariantFlags": ".evaluator_variant_flags", "EvaluatorVariantFork": ".evaluator_variant_fork", "EvaluatorVariantResponse": ".evaluator_variant_response", "EvaluatorVariantsResponse": ".evaluator_variants_response", "EvaluatorsResponse": ".evaluators_response", "ExistenceOperator": ".existence_operator", "FilteringInput": ".filtering_input", "FilteringInputConditionsItem": ".filtering_input_conditions_item", "FilteringOutput": ".filtering_output", "FilteringOutputConditionsItem": ".filtering_output_conditions_item", "Focus": ".focus", "Folder": ".folder", "FolderCreate": ".folder_create", "FolderEdit": ".folder_edit", "FolderIdResponse": ".folder_id_response", "FolderKind": ".folder_kind", "FolderQuery": ".folder_query", "FolderQueryKinds": ".folder_query_kinds", "FolderResponse": ".folder_response", "FoldersResponse": ".folders_response", "Format": ".format", "Formatting": ".formatting", typing.Any: ".full_json_input", typing.Any: ".full_json_output", "Header": ".header", "HttpValidationError": ".http_validation_error", "InviteRequest": ".invite_request", "InviteRequestRolesItem": ".invite_request_roles_item", "Invocation": ".invocation", "InvocationCreate": ".invocation_create", "InvocationCreateLinks": ".invocation_create_links", "InvocationEdit": ".invocation_edit", "InvocationEditLinks": ".invocation_edit_links", "InvocationLinkResponse": ".invocation_link_response", "InvocationLinks": ".invocation_links", "InvocationQuery": ".invocation_query", "InvocationQueryLinks": ".invocation_query_links", "InvocationResponse": ".invocation_response", "InvocationsResponse": ".invocations_response", "JsonSchemasInput": ".json_schemas_input", "JsonSchemasOutput": ".json_schemas_output", typing.Any: ".label_json_input", typing.Any: ".label_json_output", "LegacyLifecycleDto": ".legacy_lifecycle_dto", "ListApiKeysResponse": ".list_api_keys_response", "ListOperator": ".list_operator", "ListOptions": ".list_options", "LogicalOperator": ".logical_operator", "MetricSpec": ".metric_spec", "MetricType": ".metric_type", "MetricsBucket": ".metrics_bucket", "NumericOperator": ".numeric_operator", "OTelEventInput": ".o_tel_event_input", "OTelEventInputTimestamp": ".o_tel_event_input_timestamp", "OTelEventOutput": ".o_tel_event_output", "OTelEventOutputTimestamp": ".o_tel_event_output_timestamp", "OTelHashInput": ".o_tel_hash_input", "OTelHashOutput": ".o_tel_hash_output", "OTelLinkInput": ".o_tel_link_input", "OTelLinkOutput": ".o_tel_link_output", "OTelLinksResponse": ".o_tel_links_response", "OTelReferenceInput": ".o_tel_reference_input", "OTelReferenceOutput": ".o_tel_reference_output", "OTelSpanKind": ".o_tel_span_kind", "OTelStatusCode": ".o_tel_status_code", "OTelTracingRequest": ".o_tel_tracing_request", "OTelTracingResponse": ".o_tel_tracing_response", "OldAnalyticsResponse": ".old_analytics_response", "OrganizationDetails": ".organization_details", "OrganizationDomainResponse": ".organization_domain_response", "OrganizationProviderResponse": ".organization_provider_response", "OrganizationUpdate": ".organization_update", "OssSrcModelsApiOrganizationModelsOrganization": ".oss_src_models_api_organization_models_organization", "Permission": ".permission", "Plan": ".plan", "ProjectsResponse": ".projects_response", "QueriesResponse": ".queries_response", "Query": ".query", "QueryCreate": ".query_create", "QueryEdit": ".query_edit", "QueryFlags": ".query_flags", "QueryQueryFlags": ".query_query_flags", "QueryResponse": ".query_response", "QueryRevision": ".query_revision", "QueryRevisionCommit": ".query_revision_commit", "QueryRevisionCreate": ".query_revision_create", "QueryRevisionDataInput": ".query_revision_data_input", "QueryRevisionDataOutput": ".query_revision_data_output", "QueryRevisionEdit": ".query_revision_edit", "QueryRevisionQuery": ".query_revision_query", "QueryRevisionResponse": ".query_revision_response", "QueryRevisionsLog": ".query_revisions_log", "QueryRevisionsResponse": ".query_revisions_response", "QueryVariant": ".query_variant", "QueryVariantCreate": ".query_variant_create", "QueryVariantEdit": ".query_variant_edit", "QueryVariantQuery": ".query_variant_query", "QueryVariantResponse": ".query_variant_response", "QueryVariantsResponse": ".query_variants_response", "Reference": ".reference", "ReferenceRequestModelInput": ".reference_request_model_input", "ReferenceRequestModelOutput": ".reference_request_model_output", "ResolutionInfo": ".resolution_info", "RevisionFork": ".revision_fork", "SecretDto": ".secret_dto", "SecretDtoData": ".secret_dto_data", "SecretKind": ".secret_kind", "SecretResponseDto": ".secret_response_dto", "SecretResponseDtoData": ".secret_response_dto_data", "SessionIdsResponse": ".session_ids_response", "SimpleApplication": ".simple_application", "SimpleApplicationCreate": ".simple_application_create", "SimpleApplicationDataInput": ".simple_application_data_input", "SimpleApplicationDataInputHeadersValue": ".simple_application_data_input_headers_value", "SimpleApplicationDataInputRuntime": ".simple_application_data_input_runtime", "SimpleApplicationDataOutput": ".simple_application_data_output", "SimpleApplicationDataOutputHeadersValue": ".simple_application_data_output_headers_value", "SimpleApplicationDataOutputRuntime": ".simple_application_data_output_runtime", "SimpleApplicationEdit": ".simple_application_edit", "SimpleApplicationFlags": ".simple_application_flags", "SimpleApplicationQuery": ".simple_application_query", "SimpleApplicationQueryFlags": ".simple_application_query_flags", "SimpleApplicationResponse": ".simple_application_response", "SimpleApplicationsResponse": ".simple_applications_response", "SimpleEnvironment": ".simple_environment", "SimpleEnvironmentCreate": ".simple_environment_create", "SimpleEnvironmentEdit": ".simple_environment_edit", "SimpleEnvironmentQuery": ".simple_environment_query", "SimpleEnvironmentResponse": ".simple_environment_response", "SimpleEnvironmentsResponse": ".simple_environments_response", "SimpleEvaluation": ".simple_evaluation", "SimpleEvaluationCreate": ".simple_evaluation_create", "SimpleEvaluationData": ".simple_evaluation_data", "SimpleEvaluationDataApplicationSteps": ".simple_evaluation_data_application_steps", "SimpleEvaluationDataApplicationStepsOneValue": ".simple_evaluation_data_application_steps_one_value", "SimpleEvaluationDataEvaluatorSteps": ".simple_evaluation_data_evaluator_steps", "SimpleEvaluationDataEvaluatorStepsOneValue": ".simple_evaluation_data_evaluator_steps_one_value", "SimpleEvaluationDataQuerySteps": ".simple_evaluation_data_query_steps", "SimpleEvaluationDataQueryStepsOneValue": ".simple_evaluation_data_query_steps_one_value", "SimpleEvaluationDataTestsetSteps": ".simple_evaluation_data_testset_steps", "SimpleEvaluationDataTestsetStepsOneValue": ".simple_evaluation_data_testset_steps_one_value", "SimpleEvaluationEdit": ".simple_evaluation_edit", "SimpleEvaluationIdResponse": ".simple_evaluation_id_response", "SimpleEvaluationQuery": ".simple_evaluation_query", "SimpleEvaluationResponse": ".simple_evaluation_response", "SimpleEvaluationsResponse": ".simple_evaluations_response", "SimpleEvaluator": ".simple_evaluator", "SimpleEvaluatorCreate": ".simple_evaluator_create", "SimpleEvaluatorDataInput": ".simple_evaluator_data_input", "SimpleEvaluatorDataInputHeadersValue": ".simple_evaluator_data_input_headers_value", "SimpleEvaluatorDataInputRuntime": ".simple_evaluator_data_input_runtime", "SimpleEvaluatorDataOutput": ".simple_evaluator_data_output", "SimpleEvaluatorDataOutputHeadersValue": ".simple_evaluator_data_output_headers_value", "SimpleEvaluatorDataOutputRuntime": ".simple_evaluator_data_output_runtime", "SimpleEvaluatorEdit": ".simple_evaluator_edit", "SimpleEvaluatorFlags": ".simple_evaluator_flags", "SimpleEvaluatorQuery": ".simple_evaluator_query", "SimpleEvaluatorQueryFlags": ".simple_evaluator_query_flags", "SimpleEvaluatorResponse": ".simple_evaluator_response", "SimpleEvaluatorsResponse": ".simple_evaluators_response", "SimpleQueriesResponse": ".simple_queries_response", "SimpleQuery": ".simple_query", "SimpleQueryCreate": ".simple_query_create", "SimpleQueryEdit": ".simple_query_edit", "SimpleQueryQuery": ".simple_query_query", "SimpleQueryResponse": ".simple_query_response", "SimpleQueue": ".simple_queue", "SimpleQueueCreate": ".simple_queue_create", "SimpleQueueData": ".simple_queue_data", "SimpleQueueDataEvaluators": ".simple_queue_data_evaluators", "SimpleQueueDataEvaluatorsOneValue": ".simple_queue_data_evaluators_one_value", "SimpleQueueIdResponse": ".simple_queue_id_response", "SimpleQueueKind": ".simple_queue_kind", "SimpleQueueQuery": ".simple_queue_query", "SimpleQueueResponse": ".simple_queue_response", "SimpleQueueScenariosQuery": ".simple_queue_scenarios_query", "SimpleQueueScenariosResponse": ".simple_queue_scenarios_response", "SimpleQueueSettings": ".simple_queue_settings", "SimpleQueuesResponse": ".simple_queues_response", "SimpleTestset": ".simple_testset", "SimpleTestsetCreate": ".simple_testset_create", "SimpleTestsetEdit": ".simple_testset_edit", "SimpleTestsetQuery": ".simple_testset_query", "SimpleTestsetResponse": ".simple_testset_response", "SimpleTestsetsResponse": ".simple_testsets_response", "SimpleTrace": ".simple_trace", "SimpleTraceChannel": ".simple_trace_channel", "SimpleTraceCreate": ".simple_trace_create", "SimpleTraceCreateLinks": ".simple_trace_create_links", "SimpleTraceEdit": ".simple_trace_edit", "SimpleTraceEditLinks": ".simple_trace_edit_links", "SimpleTraceKind": ".simple_trace_kind", "SimpleTraceLinkResponse": ".simple_trace_link_response", "SimpleTraceLinks": ".simple_trace_links", "SimpleTraceOrigin": ".simple_trace_origin", "SimpleTraceQuery": ".simple_trace_query", "SimpleTraceQueryLinks": ".simple_trace_query_links", "SimpleTraceReferences": ".simple_trace_references", "SimpleTraceResponse": ".simple_trace_response", "SimpleTracesResponse": ".simple_traces_response", "SimpleWorkflow": ".simple_workflow", "SimpleWorkflowCreate": ".simple_workflow_create", "SimpleWorkflowDataInput": ".simple_workflow_data_input", "SimpleWorkflowDataInputHeadersValue": ".simple_workflow_data_input_headers_value", "SimpleWorkflowDataInputRuntime": ".simple_workflow_data_input_runtime", "SimpleWorkflowDataOutput": ".simple_workflow_data_output", "SimpleWorkflowDataOutputHeadersValue": ".simple_workflow_data_output_headers_value", "SimpleWorkflowDataOutputRuntime": ".simple_workflow_data_output_runtime", "SimpleWorkflowEdit": ".simple_workflow_edit", "SimpleWorkflowFlags": ".simple_workflow_flags", "SimpleWorkflowQuery": ".simple_workflow_query", "SimpleWorkflowQueryFlags": ".simple_workflow_query_flags", "SimpleWorkflowResponse": ".simple_workflow_response", "SimpleWorkflowsResponse": ".simple_workflows_response", "SpanInput": ".span_input", "SpanInputEndTime": ".span_input_end_time", "SpanInputStartTime": ".span_input_start_time", "SpanOutput": ".span_output", "SpanOutputEndTime": ".span_output_end_time", "SpanOutputStartTime": ".span_output_start_time", "SpanResponse": ".span_response", "SpanType": ".span_type", "SpansNodeInput": ".spans_node_input", "SpansNodeInputEndTime": ".spans_node_input_end_time", "SpansNodeInputSpansValue": ".spans_node_input_spans_value", "SpansNodeInputStartTime": ".spans_node_input_start_time", "SpansNodeOutput": ".spans_node_output", "SpansNodeOutputEndTime": ".spans_node_output_end_time", "SpansNodeOutputSpansValue": ".spans_node_output_spans_value", "SpansNodeOutputStartTime": ".spans_node_output_start_time", "SpansResponse": ".spans_response", "SpansTreeInput": ".spans_tree_input", "SpansTreeInputSpansValue": ".spans_tree_input_spans_value", "SpansTreeOutput": ".spans_tree_output", "SpansTreeOutputSpansValue": ".spans_tree_output_spans_value", "SsoProviderDto": ".sso_provider_dto", "SsoProviderInfo": ".sso_provider_info", "SsoProviderSettingsDto": ".sso_provider_settings_dto", "SsoProviders": ".sso_providers", "StandardProviderDto": ".standard_provider_dto", "StandardProviderKind": ".standard_provider_kind", "StandardProviderSettingsDto": ".standard_provider_settings_dto", "Status": ".status", "StringOperator": ".string_operator", "TestcaseInput": ".testcase_input", "TestcaseOutput": ".testcase_output", "TestcaseResponse": ".testcase_response", "TestcasesResponse": ".testcases_response", "Testset": ".testset", "TestsetCreate": ".testset_create", "TestsetEdit": ".testset_edit", "TestsetFlags": ".testset_flags", "TestsetQuery": ".testset_query", "TestsetResponse": ".testset_response", "TestsetRevision": ".testset_revision", "TestsetRevisionCommit": ".testset_revision_commit", "TestsetRevisionCreate": ".testset_revision_create", "TestsetRevisionDataInput": ".testset_revision_data_input", "TestsetRevisionDataOutput": ".testset_revision_data_output", "TestsetRevisionDelta": ".testset_revision_delta", "TestsetRevisionDeltaColumns": ".testset_revision_delta_columns", "TestsetRevisionDeltaRows": ".testset_revision_delta_rows", "TestsetRevisionEdit": ".testset_revision_edit", "TestsetRevisionQuery": ".testset_revision_query", "TestsetRevisionResponse": ".testset_revision_response", "TestsetRevisionsLog": ".testset_revisions_log", "TestsetRevisionsResponse": ".testset_revisions_response", "TestsetVariant": ".testset_variant", "TestsetVariantCreate": ".testset_variant_create", "TestsetVariantEdit": ".testset_variant_edit", "TestsetVariantQuery": ".testset_variant_query", "TestsetVariantResponse": ".testset_variant_response", "TestsetVariantsResponse": ".testset_variants_response", "TestsetsResponse": ".testsets_response", "TextOptions": ".text_options", "ToolAuthScheme": ".tool_auth_scheme", "ToolCallData": ".tool_call_data", "ToolCallFunction": ".tool_call_function", "ToolCallResponse": ".tool_call_response", "ToolCatalogAction": ".tool_catalog_action", "ToolCatalogActionDetails": ".tool_catalog_action_details", "ToolCatalogActionResponse": ".tool_catalog_action_response", "ToolCatalogActionResponseAction": ".tool_catalog_action_response_action", "ToolCatalogActionsResponse": ".tool_catalog_actions_response", "ToolCatalogActionsResponseActionsItem": ".tool_catalog_actions_response_actions_item", "ToolCatalogIntegration": ".tool_catalog_integration", "ToolCatalogIntegrationDetails": ".tool_catalog_integration_details", "ToolCatalogIntegrationResponse": ".tool_catalog_integration_response", "ToolCatalogIntegrationResponseIntegration": ".tool_catalog_integration_response_integration", "ToolCatalogIntegrationsResponse": ".tool_catalog_integrations_response", "ToolCatalogIntegrationsResponseIntegrationsItem": ".tool_catalog_integrations_response_integrations_item", "ToolCatalogProvider": ".tool_catalog_provider", "ToolCatalogProviderDetails": ".tool_catalog_provider_details", "ToolCatalogProviderResponse": ".tool_catalog_provider_response", "ToolCatalogProviderResponseProvider": ".tool_catalog_provider_response_provider", "ToolCatalogProvidersResponse": ".tool_catalog_providers_response", "ToolCatalogProvidersResponseProvidersItem": ".tool_catalog_providers_response_providers_item", "ToolConnection": ".tool_connection", "ToolConnectionCreate": ".tool_connection_create", "ToolConnectionCreateData": ".tool_connection_create_data", "ToolConnectionResponse": ".tool_connection_response", "ToolConnectionStatus": ".tool_connection_status", "ToolConnectionsResponse": ".tool_connections_response", "ToolProviderKind": ".tool_provider_kind", "ToolResult": ".tool_result", "ToolResultData": ".tool_result_data", "TraceIdResponse": ".trace_id_response", "TraceIdsResponse": ".trace_ids_response", "TraceInput": ".trace_input", "TraceInputSpansValue": ".trace_input_spans_value", "TraceOutput": ".trace_output", "TraceOutputSpansValue": ".trace_output_spans_value", "TraceRequest": ".trace_request", "TraceResponse": ".trace_response", "TraceType": ".trace_type", "TracesRequest": ".traces_request", "TracesResponse": ".traces_response", "TracingQuery": ".tracing_query", "UserIdsResponse": ".user_ids_response", "ValidationError": ".validation_error", "ValidationErrorLocItem": ".validation_error_loc_item", "VariantFork": ".variant_fork", "WebhookDeliveriesResponse": ".webhook_deliveries_response", "WebhookDelivery": ".webhook_delivery", "WebhookDeliveryCreate": ".webhook_delivery_create", "WebhookDeliveryData": ".webhook_delivery_data", "WebhookDeliveryQuery": ".webhook_delivery_query", "WebhookDeliveryResponse": ".webhook_delivery_response", "WebhookDeliveryResponseInfo": ".webhook_delivery_response_info", "WebhookEventType": ".webhook_event_type", "WebhookProviderDto": ".webhook_provider_dto", "WebhookProviderSettingsDto": ".webhook_provider_settings_dto", "WebhookSubscription": ".webhook_subscription", "WebhookSubscriptionCreate": ".webhook_subscription_create", "WebhookSubscriptionData": ".webhook_subscription_data", "WebhookSubscriptionDataAuthMode": ".webhook_subscription_data_auth_mode", "WebhookSubscriptionEdit": ".webhook_subscription_edit", "WebhookSubscriptionQuery": ".webhook_subscription_query", "WebhookSubscriptionResponse": ".webhook_subscription_response", "WebhookSubscriptionsResponse": ".webhook_subscriptions_response", "Windowing": ".windowing", "WindowingOrder": ".windowing_order", "Workflow": ".workflow", "WorkflowArtifactFlags": ".workflow_artifact_flags", "WorkflowCatalogFlags": ".workflow_catalog_flags", "WorkflowCatalogPreset": ".workflow_catalog_preset", "WorkflowCatalogPresetResponse": ".workflow_catalog_preset_response", "WorkflowCatalogPresetsResponse": ".workflow_catalog_presets_response", "WorkflowCatalogTemplate": ".workflow_catalog_template", "WorkflowCatalogTemplateResponse": ".workflow_catalog_template_response", "WorkflowCatalogTemplatesResponse": ".workflow_catalog_templates_response", "WorkflowCatalogType": ".workflow_catalog_type", "WorkflowCatalogTypeResponse": ".workflow_catalog_type_response", "WorkflowCatalogTypesResponse": ".workflow_catalog_types_response", "WorkflowCreate": ".workflow_create", "WorkflowEdit": ".workflow_edit", "WorkflowFlags": ".workflow_flags", "WorkflowFork": ".workflow_fork", "WorkflowResponse": ".workflow_response", "WorkflowRevisionCommit": ".workflow_revision_commit", "WorkflowRevisionCreate": ".workflow_revision_create", "WorkflowRevisionDataInput": ".workflow_revision_data_input", "WorkflowRevisionDataInputHeadersValue": ".workflow_revision_data_input_headers_value", "WorkflowRevisionDataInputRuntime": ".workflow_revision_data_input_runtime", "WorkflowRevisionDataOutput": ".workflow_revision_data_output", "WorkflowRevisionDataOutputHeadersValue": ".workflow_revision_data_output_headers_value", "WorkflowRevisionDataOutputRuntime": ".workflow_revision_data_output_runtime", "WorkflowRevisionEdit": ".workflow_revision_edit", "WorkflowRevisionFlags": ".workflow_revision_flags", "WorkflowRevisionFork": ".workflow_revision_fork", "WorkflowRevisionInput": ".workflow_revision_input", "WorkflowRevisionOutput": ".workflow_revision_output", "WorkflowRevisionResolveResponse": ".workflow_revision_resolve_response", "WorkflowRevisionResponse": ".workflow_revision_response", "WorkflowRevisionsLog": ".workflow_revisions_log", "WorkflowRevisionsResponse": ".workflow_revisions_response", "WorkflowVariant": ".workflow_variant", "WorkflowVariantCreate": ".workflow_variant_create", "WorkflowVariantEdit": ".workflow_variant_edit", "WorkflowVariantFlags": ".workflow_variant_flags", "WorkflowVariantFork": ".workflow_variant_fork", "WorkflowVariantResponse": ".workflow_variant_response", "WorkflowVariantsResponse": ".workflow_variants_response", "WorkflowsResponse": ".workflows_response", "Workspace": ".workspace", "WorkspaceMemberResponse": ".workspace_member_response", "WorkspacePermission": ".workspace_permission", "WorkspaceResponse": ".workspace_response", "WorkspaceRole": ".workspace_role"} +_dynamic_imports: typing.Dict[str, str] = {"AdminAccountCreateOptions": ".admin_account_create_options", "AdminAccountRead": ".admin_account_read", "AdminAccountsCreate": ".admin_accounts_create", "AdminAccountsDelete": ".admin_accounts_delete", "AdminAccountsDeleteTarget": ".admin_accounts_delete_target", "AdminAccountsResponse": ".admin_accounts_response", "AdminApiKeyCreate": ".admin_api_key_create", "AdminApiKeyResponse": ".admin_api_key_response", "AdminDeleteResponse": ".admin_delete_response", "AdminDeletedEntities": ".admin_deleted_entities", "AdminDeletedEntity": ".admin_deleted_entity", "AdminOrganizationCreate": ".admin_organization_create", "AdminOrganizationMembershipCreate": ".admin_organization_membership_create", "AdminOrganizationMembershipRead": ".admin_organization_membership_read", "AdminOrganizationRead": ".admin_organization_read", "AdminProjectCreate": ".admin_project_create", "AdminProjectMembershipCreate": ".admin_project_membership_create", "AdminProjectMembershipRead": ".admin_project_membership_read", "AdminProjectRead": ".admin_project_read", "AdminSimpleAccountCreate": ".admin_simple_account_create", "AdminSimpleAccountDeleteEntry": ".admin_simple_account_delete_entry", "AdminSimpleAccountRead": ".admin_simple_account_read", "AdminSimpleAccountsApiKeysCreate": ".admin_simple_accounts_api_keys_create", "AdminSimpleAccountsCreate": ".admin_simple_accounts_create", "AdminSimpleAccountsDelete": ".admin_simple_accounts_delete", "AdminSimpleAccountsOrganizationsCreate": ".admin_simple_accounts_organizations_create", "AdminSimpleAccountsOrganizationsMembershipsCreate": ".admin_simple_accounts_organizations_memberships_create", "AdminSimpleAccountsOrganizationsTransferOwnership": ".admin_simple_accounts_organizations_transfer_ownership", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjects": ".admin_simple_accounts_organizations_transfer_ownership_include_projects", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjectsZero": ".admin_simple_accounts_organizations_transfer_ownership_include_projects_zero", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspaces": ".admin_simple_accounts_organizations_transfer_ownership_include_workspaces", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspacesZero": ".admin_simple_accounts_organizations_transfer_ownership_include_workspaces_zero", "AdminSimpleAccountsOrganizationsTransferOwnershipResponse": ".admin_simple_accounts_organizations_transfer_ownership_response", "AdminSimpleAccountsProjectsCreate": ".admin_simple_accounts_projects_create", "AdminSimpleAccountsProjectsMembershipsCreate": ".admin_simple_accounts_projects_memberships_create", "AdminSimpleAccountsResponse": ".admin_simple_accounts_response", "AdminSimpleAccountsUsersCreate": ".admin_simple_accounts_users_create", "AdminSimpleAccountsUsersIdentitiesCreate": ".admin_simple_accounts_users_identities_create", "AdminSimpleAccountsUsersResetPassword": ".admin_simple_accounts_users_reset_password", "AdminSimpleAccountsWorkspacesCreate": ".admin_simple_accounts_workspaces_create", "AdminSimpleAccountsWorkspacesMembershipsCreate": ".admin_simple_accounts_workspaces_memberships_create", "AdminStructuredError": ".admin_structured_error", "AdminSubscriptionCreate": ".admin_subscription_create", "AdminSubscriptionRead": ".admin_subscription_read", "AdminUserCreate": ".admin_user_create", "AdminUserIdentityCreate": ".admin_user_identity_create", "AdminUserIdentityRead": ".admin_user_identity_read", "AdminUserIdentityReadStatus": ".admin_user_identity_read_status", "AdminUserRead": ".admin_user_read", "AdminWorkspaceCreate": ".admin_workspace_create", "AdminWorkspaceMembershipCreate": ".admin_workspace_membership_create", "AdminWorkspaceMembershipRead": ".admin_workspace_membership_read", "AdminWorkspaceRead": ".admin_workspace_read", "Analytics": ".analytics", "AnalyticsResponse": ".analytics_response", "Annotation": ".annotation", "AnnotationCreate": ".annotation_create", "AnnotationCreateLinks": ".annotation_create_links", "AnnotationEdit": ".annotation_edit", "AnnotationEditLinks": ".annotation_edit_links", "AnnotationLinkResponse": ".annotation_link_response", "AnnotationLinks": ".annotation_links", "AnnotationQuery": ".annotation_query", "AnnotationQueryLinks": ".annotation_query_links", "AnnotationResponse": ".annotation_response", "AnnotationsResponse": ".annotations_response", "Application": ".application", "ApplicationArtifactFlags": ".application_artifact_flags", "ApplicationArtifactQueryFlags": ".application_artifact_query_flags", "ApplicationCatalogPreset": ".application_catalog_preset", "ApplicationCatalogPresetResponse": ".application_catalog_preset_response", "ApplicationCatalogPresetsResponse": ".application_catalog_presets_response", "ApplicationCatalogTemplate": ".application_catalog_template", "ApplicationCatalogTemplateResponse": ".application_catalog_template_response", "ApplicationCatalogTemplatesResponse": ".application_catalog_templates_response", "ApplicationCatalogType": ".application_catalog_type", "ApplicationCatalogTypesResponse": ".application_catalog_types_response", "ApplicationCreate": ".application_create", "ApplicationEdit": ".application_edit", "ApplicationFlags": ".application_flags", "ApplicationFork": ".application_fork", "ApplicationQuery": ".application_query", "ApplicationResponse": ".application_response", "ApplicationRevision": ".application_revision", "ApplicationRevisionCommit": ".application_revision_commit", "ApplicationRevisionCreate": ".application_revision_create", "ApplicationRevisionDataInput": ".application_revision_data_input", "ApplicationRevisionDataInputHeadersValue": ".application_revision_data_input_headers_value", "ApplicationRevisionDataInputRuntime": ".application_revision_data_input_runtime", "ApplicationRevisionDataOutput": ".application_revision_data_output", "ApplicationRevisionDataOutputHeadersValue": ".application_revision_data_output_headers_value", "ApplicationRevisionDataOutputRuntime": ".application_revision_data_output_runtime", "ApplicationRevisionEdit": ".application_revision_edit", "ApplicationRevisionFlags": ".application_revision_flags", "ApplicationRevisionFork": ".application_revision_fork", "ApplicationRevisionQuery": ".application_revision_query", "ApplicationRevisionQueryFlags": ".application_revision_query_flags", "ApplicationRevisionResolveResponse": ".application_revision_resolve_response", "ApplicationRevisionResponse": ".application_revision_response", "ApplicationRevisionsLog": ".application_revisions_log", "ApplicationRevisionsResponse": ".application_revisions_response", "ApplicationVariant": ".application_variant", "ApplicationVariantCreate": ".application_variant_create", "ApplicationVariantEdit": ".application_variant_edit", "ApplicationVariantFlags": ".application_variant_flags", "ApplicationVariantFork": ".application_variant_fork", "ApplicationVariantResponse": ".application_variant_response", "ApplicationVariantsResponse": ".application_variants_response", "ApplicationsResponse": ".applications_response", "BodyConfigsFetchVariantsConfigsFetchPost": ".body_configs_fetch_variants_configs_fetch_post", "Bucket": ".bucket", "CollectStatusResponse": ".collect_status_response", "ComparisonOperator": ".comparison_operator", "Condition": ".condition", "ConditionOperator": ".condition_operator", "ConditionOptions": ".condition_options", "ConditionValue": ".condition_value", "ConfigResponseModel": ".config_response_model", "CustomModelSettingsDto": ".custom_model_settings_dto", "CustomProviderDto": ".custom_provider_dto", "CustomProviderKind": ".custom_provider_kind", "CustomProviderSettingsDto": ".custom_provider_settings_dto", "DictOperator": ".dict_operator", "DiscoverResponse": ".discover_response", "DiscoverResponseMethodsValue": ".discover_response_methods_value", "EeSrcModelsApiOrganizationModelsOrganization": ".ee_src_models_api_organization_models_organization", "EntityRef": ".entity_ref", "Environment": ".environment", "EnvironmentCreate": ".environment_create", "EnvironmentEdit": ".environment_edit", "EnvironmentFlags": ".environment_flags", "EnvironmentQueryFlags": ".environment_query_flags", "EnvironmentResponse": ".environment_response", "EnvironmentRevision": ".environment_revision", "EnvironmentRevisionCommit": ".environment_revision_commit", "EnvironmentRevisionCreate": ".environment_revision_create", "EnvironmentRevisionData": ".environment_revision_data", "EnvironmentRevisionDelta": ".environment_revision_delta", "EnvironmentRevisionEdit": ".environment_revision_edit", "EnvironmentRevisionResolveResponse": ".environment_revision_resolve_response", "EnvironmentRevisionResponse": ".environment_revision_response", "EnvironmentRevisionsLog": ".environment_revisions_log", "EnvironmentRevisionsResponse": ".environment_revisions_response", "EnvironmentVariant": ".environment_variant", "EnvironmentVariantCreate": ".environment_variant_create", "EnvironmentVariantEdit": ".environment_variant_edit", "EnvironmentVariantResponse": ".environment_variant_response", "EnvironmentVariantsResponse": ".environment_variants_response", "EnvironmentsResponse": ".environments_response", "ErrorPolicy": ".error_policy", "EvaluationMetrics": ".evaluation_metrics", "EvaluationMetricsCreate": ".evaluation_metrics_create", "EvaluationMetricsEdit": ".evaluation_metrics_edit", "EvaluationMetricsIdsResponse": ".evaluation_metrics_ids_response", "EvaluationMetricsQuery": ".evaluation_metrics_query", "EvaluationMetricsQueryScenarioIds": ".evaluation_metrics_query_scenario_ids", "EvaluationMetricsQueryTimestamps": ".evaluation_metrics_query_timestamps", "EvaluationMetricsRefresh": ".evaluation_metrics_refresh", "EvaluationMetricsResponse": ".evaluation_metrics_response", "EvaluationQueue": ".evaluation_queue", "EvaluationQueueCreate": ".evaluation_queue_create", "EvaluationQueueData": ".evaluation_queue_data", "EvaluationQueueEdit": ".evaluation_queue_edit", "EvaluationQueueFlags": ".evaluation_queue_flags", "EvaluationQueueIdResponse": ".evaluation_queue_id_response", "EvaluationQueueIdsResponse": ".evaluation_queue_ids_response", "EvaluationQueueQuery": ".evaluation_queue_query", "EvaluationQueueQueryFlags": ".evaluation_queue_query_flags", "EvaluationQueueResponse": ".evaluation_queue_response", "EvaluationQueueScenariosQuery": ".evaluation_queue_scenarios_query", "EvaluationQueuesResponse": ".evaluation_queues_response", "EvaluationResult": ".evaluation_result", "EvaluationResultCreate": ".evaluation_result_create", "EvaluationResultEdit": ".evaluation_result_edit", "EvaluationResultIdResponse": ".evaluation_result_id_response", "EvaluationResultIdsResponse": ".evaluation_result_ids_response", "EvaluationResultQuery": ".evaluation_result_query", "EvaluationResultResponse": ".evaluation_result_response", "EvaluationResultsResponse": ".evaluation_results_response", "EvaluationRun": ".evaluation_run", "EvaluationRunCreate": ".evaluation_run_create", "EvaluationRunData": ".evaluation_run_data", "EvaluationRunDataMapping": ".evaluation_run_data_mapping", "EvaluationRunDataMappingColumn": ".evaluation_run_data_mapping_column", "EvaluationRunDataMappingStep": ".evaluation_run_data_mapping_step", "EvaluationRunDataStep": ".evaluation_run_data_step", "EvaluationRunDataStepInput": ".evaluation_run_data_step_input", "EvaluationRunDataStepOrigin": ".evaluation_run_data_step_origin", "EvaluationRunDataStepType": ".evaluation_run_data_step_type", "EvaluationRunEdit": ".evaluation_run_edit", "EvaluationRunFlags": ".evaluation_run_flags", "EvaluationRunIdResponse": ".evaluation_run_id_response", "EvaluationRunIdsRequest": ".evaluation_run_ids_request", "EvaluationRunIdsResponse": ".evaluation_run_ids_response", "EvaluationRunQuery": ".evaluation_run_query", "EvaluationRunQueryFlags": ".evaluation_run_query_flags", "EvaluationRunResponse": ".evaluation_run_response", "EvaluationRunsResponse": ".evaluation_runs_response", "EvaluationScenario": ".evaluation_scenario", "EvaluationScenarioCreate": ".evaluation_scenario_create", "EvaluationScenarioEdit": ".evaluation_scenario_edit", "EvaluationScenarioIdResponse": ".evaluation_scenario_id_response", "EvaluationScenarioIdsResponse": ".evaluation_scenario_ids_response", "EvaluationScenarioQuery": ".evaluation_scenario_query", "EvaluationScenarioResponse": ".evaluation_scenario_response", "EvaluationScenariosResponse": ".evaluation_scenarios_response", "EvaluationStatus": ".evaluation_status", "Evaluator": ".evaluator", "EvaluatorArtifactFlags": ".evaluator_artifact_flags", "EvaluatorArtifactQueryFlags": ".evaluator_artifact_query_flags", "EvaluatorCatalogPreset": ".evaluator_catalog_preset", "EvaluatorCatalogPresetResponse": ".evaluator_catalog_preset_response", "EvaluatorCatalogPresetsResponse": ".evaluator_catalog_presets_response", "EvaluatorCatalogTemplate": ".evaluator_catalog_template", "EvaluatorCatalogTemplateResponse": ".evaluator_catalog_template_response", "EvaluatorCatalogTemplatesResponse": ".evaluator_catalog_templates_response", "EvaluatorCatalogType": ".evaluator_catalog_type", "EvaluatorCatalogTypesResponse": ".evaluator_catalog_types_response", "EvaluatorCreate": ".evaluator_create", "EvaluatorEdit": ".evaluator_edit", "EvaluatorFlags": ".evaluator_flags", "EvaluatorFork": ".evaluator_fork", "EvaluatorQuery": ".evaluator_query", "EvaluatorResponse": ".evaluator_response", "EvaluatorRevision": ".evaluator_revision", "EvaluatorRevisionCommit": ".evaluator_revision_commit", "EvaluatorRevisionCreate": ".evaluator_revision_create", "EvaluatorRevisionDataInput": ".evaluator_revision_data_input", "EvaluatorRevisionDataInputHeadersValue": ".evaluator_revision_data_input_headers_value", "EvaluatorRevisionDataInputRuntime": ".evaluator_revision_data_input_runtime", "EvaluatorRevisionDataOutput": ".evaluator_revision_data_output", "EvaluatorRevisionDataOutputHeadersValue": ".evaluator_revision_data_output_headers_value", "EvaluatorRevisionDataOutputRuntime": ".evaluator_revision_data_output_runtime", "EvaluatorRevisionEdit": ".evaluator_revision_edit", "EvaluatorRevisionFlags": ".evaluator_revision_flags", "EvaluatorRevisionFork": ".evaluator_revision_fork", "EvaluatorRevisionQuery": ".evaluator_revision_query", "EvaluatorRevisionQueryFlags": ".evaluator_revision_query_flags", "EvaluatorRevisionResolveResponse": ".evaluator_revision_resolve_response", "EvaluatorRevisionResponse": ".evaluator_revision_response", "EvaluatorRevisionsLog": ".evaluator_revisions_log", "EvaluatorRevisionsResponse": ".evaluator_revisions_response", "EvaluatorTemplate": ".evaluator_template", "EvaluatorTemplatesResponse": ".evaluator_templates_response", "EvaluatorVariant": ".evaluator_variant", "EvaluatorVariantCreate": ".evaluator_variant_create", "EvaluatorVariantEdit": ".evaluator_variant_edit", "EvaluatorVariantFlags": ".evaluator_variant_flags", "EvaluatorVariantFork": ".evaluator_variant_fork", "EvaluatorVariantResponse": ".evaluator_variant_response", "EvaluatorVariantsResponse": ".evaluator_variants_response", "EvaluatorsResponse": ".evaluators_response", "ExistenceOperator": ".existence_operator", "FilteringInput": ".filtering_input", "FilteringInputConditionsItem": ".filtering_input_conditions_item", "FilteringOutput": ".filtering_output", "FilteringOutputConditionsItem": ".filtering_output_conditions_item", "Focus": ".focus", "Folder": ".folder", "FolderCreate": ".folder_create", "FolderEdit": ".folder_edit", "FolderIdResponse": ".folder_id_response", "FolderKind": ".folder_kind", "FolderQuery": ".folder_query", "FolderQueryKinds": ".folder_query_kinds", "FolderResponse": ".folder_response", "FoldersResponse": ".folders_response", "Format": ".format", "Formatting": ".formatting", typing.Any: ".full_json_input", typing.Any: ".full_json_output", "Header": ".header", "HttpValidationError": ".http_validation_error", "InviteRequest": ".invite_request", "InviteRequestRolesItem": ".invite_request_roles_item", "Invocation": ".invocation", "InvocationCreate": ".invocation_create", "InvocationCreateLinks": ".invocation_create_links", "InvocationEdit": ".invocation_edit", "InvocationEditLinks": ".invocation_edit_links", "InvocationLinkResponse": ".invocation_link_response", "InvocationLinks": ".invocation_links", "InvocationQuery": ".invocation_query", "InvocationQueryLinks": ".invocation_query_links", "InvocationResponse": ".invocation_response", "InvocationsResponse": ".invocations_response", "JsonSchemasInput": ".json_schemas_input", "JsonSchemasOutput": ".json_schemas_output", typing.Any: ".label_json_input", typing.Any: ".label_json_output", "LegacyLifecycleDto": ".legacy_lifecycle_dto", "ListApiKeysResponse": ".list_api_keys_response", "ListOperator": ".list_operator", "ListOptions": ".list_options", "LogicalOperator": ".logical_operator", "MetricSpec": ".metric_spec", "MetricType": ".metric_type", "MetricsBucket": ".metrics_bucket", "NumericOperator": ".numeric_operator", "OTelEventInput": ".o_tel_event_input", "OTelEventInputTimestamp": ".o_tel_event_input_timestamp", "OTelEventOutput": ".o_tel_event_output", "OTelEventOutputTimestamp": ".o_tel_event_output_timestamp", "OTelHashInput": ".o_tel_hash_input", "OTelHashOutput": ".o_tel_hash_output", "OTelLinkInput": ".o_tel_link_input", "OTelLinkOutput": ".o_tel_link_output", "OTelLinksResponse": ".o_tel_links_response", "OTelReferenceInput": ".o_tel_reference_input", "OTelReferenceOutput": ".o_tel_reference_output", "OTelSpanKind": ".o_tel_span_kind", "OTelStatusCode": ".o_tel_status_code", "OTelTracingRequest": ".o_tel_tracing_request", "OTelTracingResponse": ".o_tel_tracing_response", "OldAnalyticsResponse": ".old_analytics_response", "OrganizationDetails": ".organization_details", "OrganizationDomainResponse": ".organization_domain_response", "OrganizationProviderResponse": ".organization_provider_response", "OrganizationUpdate": ".organization_update", "OssSrcModelsApiOrganizationModelsOrganization": ".oss_src_models_api_organization_models_organization", "Permission": ".permission", "ProjectsResponse": ".projects_response", "QueriesResponse": ".queries_response", "Query": ".query", "QueryCreate": ".query_create", "QueryEdit": ".query_edit", "QueryFlags": ".query_flags", "QueryQueryFlags": ".query_query_flags", "QueryResponse": ".query_response", "QueryRevision": ".query_revision", "QueryRevisionCommit": ".query_revision_commit", "QueryRevisionCreate": ".query_revision_create", "QueryRevisionDataInput": ".query_revision_data_input", "QueryRevisionDataOutput": ".query_revision_data_output", "QueryRevisionEdit": ".query_revision_edit", "QueryRevisionQuery": ".query_revision_query", "QueryRevisionResponse": ".query_revision_response", "QueryRevisionsLog": ".query_revisions_log", "QueryRevisionsResponse": ".query_revisions_response", "QueryVariant": ".query_variant", "QueryVariantCreate": ".query_variant_create", "QueryVariantEdit": ".query_variant_edit", "QueryVariantQuery": ".query_variant_query", "QueryVariantResponse": ".query_variant_response", "QueryVariantsResponse": ".query_variants_response", "Reference": ".reference", "ReferenceRequestModelInput": ".reference_request_model_input", "ReferenceRequestModelOutput": ".reference_request_model_output", "ResolutionInfo": ".resolution_info", "RevisionFork": ".revision_fork", "SecretDto": ".secret_dto", "SecretDtoData": ".secret_dto_data", "SecretKind": ".secret_kind", "SecretResponseDto": ".secret_response_dto", "SecretResponseDtoData": ".secret_response_dto_data", "SessionIdsResponse": ".session_ids_response", "SimpleApplication": ".simple_application", "SimpleApplicationCreate": ".simple_application_create", "SimpleApplicationDataInput": ".simple_application_data_input", "SimpleApplicationDataInputHeadersValue": ".simple_application_data_input_headers_value", "SimpleApplicationDataInputRuntime": ".simple_application_data_input_runtime", "SimpleApplicationDataOutput": ".simple_application_data_output", "SimpleApplicationDataOutputHeadersValue": ".simple_application_data_output_headers_value", "SimpleApplicationDataOutputRuntime": ".simple_application_data_output_runtime", "SimpleApplicationEdit": ".simple_application_edit", "SimpleApplicationFlags": ".simple_application_flags", "SimpleApplicationQuery": ".simple_application_query", "SimpleApplicationQueryFlags": ".simple_application_query_flags", "SimpleApplicationResponse": ".simple_application_response", "SimpleApplicationsResponse": ".simple_applications_response", "SimpleEnvironment": ".simple_environment", "SimpleEnvironmentCreate": ".simple_environment_create", "SimpleEnvironmentEdit": ".simple_environment_edit", "SimpleEnvironmentQuery": ".simple_environment_query", "SimpleEnvironmentResponse": ".simple_environment_response", "SimpleEnvironmentsResponse": ".simple_environments_response", "SimpleEvaluation": ".simple_evaluation", "SimpleEvaluationCreate": ".simple_evaluation_create", "SimpleEvaluationData": ".simple_evaluation_data", "SimpleEvaluationDataApplicationSteps": ".simple_evaluation_data_application_steps", "SimpleEvaluationDataApplicationStepsOneValue": ".simple_evaluation_data_application_steps_one_value", "SimpleEvaluationDataEvaluatorSteps": ".simple_evaluation_data_evaluator_steps", "SimpleEvaluationDataEvaluatorStepsOneValue": ".simple_evaluation_data_evaluator_steps_one_value", "SimpleEvaluationDataQuerySteps": ".simple_evaluation_data_query_steps", "SimpleEvaluationDataQueryStepsOneValue": ".simple_evaluation_data_query_steps_one_value", "SimpleEvaluationDataTestsetSteps": ".simple_evaluation_data_testset_steps", "SimpleEvaluationDataTestsetStepsOneValue": ".simple_evaluation_data_testset_steps_one_value", "SimpleEvaluationEdit": ".simple_evaluation_edit", "SimpleEvaluationIdResponse": ".simple_evaluation_id_response", "SimpleEvaluationQuery": ".simple_evaluation_query", "SimpleEvaluationResponse": ".simple_evaluation_response", "SimpleEvaluationsResponse": ".simple_evaluations_response", "SimpleEvaluator": ".simple_evaluator", "SimpleEvaluatorCreate": ".simple_evaluator_create", "SimpleEvaluatorDataInput": ".simple_evaluator_data_input", "SimpleEvaluatorDataInputHeadersValue": ".simple_evaluator_data_input_headers_value", "SimpleEvaluatorDataInputRuntime": ".simple_evaluator_data_input_runtime", "SimpleEvaluatorDataOutput": ".simple_evaluator_data_output", "SimpleEvaluatorDataOutputHeadersValue": ".simple_evaluator_data_output_headers_value", "SimpleEvaluatorDataOutputRuntime": ".simple_evaluator_data_output_runtime", "SimpleEvaluatorEdit": ".simple_evaluator_edit", "SimpleEvaluatorFlags": ".simple_evaluator_flags", "SimpleEvaluatorQuery": ".simple_evaluator_query", "SimpleEvaluatorQueryFlags": ".simple_evaluator_query_flags", "SimpleEvaluatorResponse": ".simple_evaluator_response", "SimpleEvaluatorsResponse": ".simple_evaluators_response", "SimpleQueriesResponse": ".simple_queries_response", "SimpleQuery": ".simple_query", "SimpleQueryCreate": ".simple_query_create", "SimpleQueryEdit": ".simple_query_edit", "SimpleQueryQuery": ".simple_query_query", "SimpleQueryResponse": ".simple_query_response", "SimpleQueue": ".simple_queue", "SimpleQueueCreate": ".simple_queue_create", "SimpleQueueData": ".simple_queue_data", "SimpleQueueDataEvaluators": ".simple_queue_data_evaluators", "SimpleQueueDataEvaluatorsOneValue": ".simple_queue_data_evaluators_one_value", "SimpleQueueIdResponse": ".simple_queue_id_response", "SimpleQueueKind": ".simple_queue_kind", "SimpleQueueQuery": ".simple_queue_query", "SimpleQueueResponse": ".simple_queue_response", "SimpleQueueScenariosQuery": ".simple_queue_scenarios_query", "SimpleQueueScenariosResponse": ".simple_queue_scenarios_response", "SimpleQueueSettings": ".simple_queue_settings", "SimpleQueuesResponse": ".simple_queues_response", "SimpleTestset": ".simple_testset", "SimpleTestsetCreate": ".simple_testset_create", "SimpleTestsetEdit": ".simple_testset_edit", "SimpleTestsetQuery": ".simple_testset_query", "SimpleTestsetResponse": ".simple_testset_response", "SimpleTestsetsResponse": ".simple_testsets_response", "SimpleTrace": ".simple_trace", "SimpleTraceChannel": ".simple_trace_channel", "SimpleTraceCreate": ".simple_trace_create", "SimpleTraceCreateLinks": ".simple_trace_create_links", "SimpleTraceEdit": ".simple_trace_edit", "SimpleTraceEditLinks": ".simple_trace_edit_links", "SimpleTraceKind": ".simple_trace_kind", "SimpleTraceLinkResponse": ".simple_trace_link_response", "SimpleTraceLinks": ".simple_trace_links", "SimpleTraceOrigin": ".simple_trace_origin", "SimpleTraceQuery": ".simple_trace_query", "SimpleTraceQueryLinks": ".simple_trace_query_links", "SimpleTraceReferences": ".simple_trace_references", "SimpleTraceResponse": ".simple_trace_response", "SimpleTracesResponse": ".simple_traces_response", "SimpleWorkflow": ".simple_workflow", "SimpleWorkflowCreate": ".simple_workflow_create", "SimpleWorkflowDataInput": ".simple_workflow_data_input", "SimpleWorkflowDataInputHeadersValue": ".simple_workflow_data_input_headers_value", "SimpleWorkflowDataInputRuntime": ".simple_workflow_data_input_runtime", "SimpleWorkflowDataOutput": ".simple_workflow_data_output", "SimpleWorkflowDataOutputHeadersValue": ".simple_workflow_data_output_headers_value", "SimpleWorkflowDataOutputRuntime": ".simple_workflow_data_output_runtime", "SimpleWorkflowEdit": ".simple_workflow_edit", "SimpleWorkflowFlags": ".simple_workflow_flags", "SimpleWorkflowQuery": ".simple_workflow_query", "SimpleWorkflowQueryFlags": ".simple_workflow_query_flags", "SimpleWorkflowResponse": ".simple_workflow_response", "SimpleWorkflowsResponse": ".simple_workflows_response", "SpanInput": ".span_input", "SpanInputEndTime": ".span_input_end_time", "SpanInputStartTime": ".span_input_start_time", "SpanOutput": ".span_output", "SpanOutputEndTime": ".span_output_end_time", "SpanOutputStartTime": ".span_output_start_time", "SpanResponse": ".span_response", "SpanType": ".span_type", "SpansNodeInput": ".spans_node_input", "SpansNodeInputEndTime": ".spans_node_input_end_time", "SpansNodeInputSpansValue": ".spans_node_input_spans_value", "SpansNodeInputStartTime": ".spans_node_input_start_time", "SpansNodeOutput": ".spans_node_output", "SpansNodeOutputEndTime": ".spans_node_output_end_time", "SpansNodeOutputSpansValue": ".spans_node_output_spans_value", "SpansNodeOutputStartTime": ".spans_node_output_start_time", "SpansResponse": ".spans_response", "SpansTreeInput": ".spans_tree_input", "SpansTreeInputSpansValue": ".spans_tree_input_spans_value", "SpansTreeOutput": ".spans_tree_output", "SpansTreeOutputSpansValue": ".spans_tree_output_spans_value", "SsoProviderDto": ".sso_provider_dto", "SsoProviderInfo": ".sso_provider_info", "SsoProviderSettingsDto": ".sso_provider_settings_dto", "SsoProviders": ".sso_providers", "StandardProviderDto": ".standard_provider_dto", "StandardProviderKind": ".standard_provider_kind", "StandardProviderSettingsDto": ".standard_provider_settings_dto", "Status": ".status", "StringOperator": ".string_operator", "TestcaseInput": ".testcase_input", "TestcaseOutput": ".testcase_output", "TestcaseResponse": ".testcase_response", "TestcasesResponse": ".testcases_response", "Testset": ".testset", "TestsetCreate": ".testset_create", "TestsetEdit": ".testset_edit", "TestsetFlags": ".testset_flags", "TestsetQuery": ".testset_query", "TestsetResponse": ".testset_response", "TestsetRevision": ".testset_revision", "TestsetRevisionCommit": ".testset_revision_commit", "TestsetRevisionCreate": ".testset_revision_create", "TestsetRevisionDataInput": ".testset_revision_data_input", "TestsetRevisionDataOutput": ".testset_revision_data_output", "TestsetRevisionDelta": ".testset_revision_delta", "TestsetRevisionDeltaColumns": ".testset_revision_delta_columns", "TestsetRevisionDeltaRows": ".testset_revision_delta_rows", "TestsetRevisionEdit": ".testset_revision_edit", "TestsetRevisionQuery": ".testset_revision_query", "TestsetRevisionResponse": ".testset_revision_response", "TestsetRevisionsLog": ".testset_revisions_log", "TestsetRevisionsResponse": ".testset_revisions_response", "TestsetVariant": ".testset_variant", "TestsetVariantCreate": ".testset_variant_create", "TestsetVariantEdit": ".testset_variant_edit", "TestsetVariantQuery": ".testset_variant_query", "TestsetVariantResponse": ".testset_variant_response", "TestsetVariantsResponse": ".testset_variants_response", "TestsetsResponse": ".testsets_response", "TextOptions": ".text_options", "ToolAuthScheme": ".tool_auth_scheme", "ToolCallData": ".tool_call_data", "ToolCallFunction": ".tool_call_function", "ToolCallResponse": ".tool_call_response", "ToolCatalogAction": ".tool_catalog_action", "ToolCatalogActionDetails": ".tool_catalog_action_details", "ToolCatalogActionResponse": ".tool_catalog_action_response", "ToolCatalogActionResponseAction": ".tool_catalog_action_response_action", "ToolCatalogActionsResponse": ".tool_catalog_actions_response", "ToolCatalogActionsResponseActionsItem": ".tool_catalog_actions_response_actions_item", "ToolCatalogIntegration": ".tool_catalog_integration", "ToolCatalogIntegrationDetails": ".tool_catalog_integration_details", "ToolCatalogIntegrationResponse": ".tool_catalog_integration_response", "ToolCatalogIntegrationResponseIntegration": ".tool_catalog_integration_response_integration", "ToolCatalogIntegrationsResponse": ".tool_catalog_integrations_response", "ToolCatalogIntegrationsResponseIntegrationsItem": ".tool_catalog_integrations_response_integrations_item", "ToolCatalogProvider": ".tool_catalog_provider", "ToolCatalogProviderDetails": ".tool_catalog_provider_details", "ToolCatalogProviderResponse": ".tool_catalog_provider_response", "ToolCatalogProviderResponseProvider": ".tool_catalog_provider_response_provider", "ToolCatalogProvidersResponse": ".tool_catalog_providers_response", "ToolCatalogProvidersResponseProvidersItem": ".tool_catalog_providers_response_providers_item", "ToolConnection": ".tool_connection", "ToolConnectionCreate": ".tool_connection_create", "ToolConnectionCreateData": ".tool_connection_create_data", "ToolConnectionResponse": ".tool_connection_response", "ToolConnectionStatus": ".tool_connection_status", "ToolConnectionsResponse": ".tool_connections_response", "ToolProviderKind": ".tool_provider_kind", "ToolResult": ".tool_result", "ToolResultData": ".tool_result_data", "TraceIdResponse": ".trace_id_response", "TraceIdsResponse": ".trace_ids_response", "TraceInput": ".trace_input", "TraceInputSpansValue": ".trace_input_spans_value", "TraceOutput": ".trace_output", "TraceOutputSpansValue": ".trace_output_spans_value", "TraceRequest": ".trace_request", "TraceResponse": ".trace_response", "TraceType": ".trace_type", "TracesRequest": ".traces_request", "TracesResponse": ".traces_response", "TracingQuery": ".tracing_query", "UserIdsResponse": ".user_ids_response", "ValidationError": ".validation_error", "ValidationErrorLocItem": ".validation_error_loc_item", "VariantFork": ".variant_fork", "WebhookDeliveriesResponse": ".webhook_deliveries_response", "WebhookDelivery": ".webhook_delivery", "WebhookDeliveryCreate": ".webhook_delivery_create", "WebhookDeliveryData": ".webhook_delivery_data", "WebhookDeliveryQuery": ".webhook_delivery_query", "WebhookDeliveryResponse": ".webhook_delivery_response", "WebhookDeliveryResponseInfo": ".webhook_delivery_response_info", "WebhookEventType": ".webhook_event_type", "WebhookProviderDto": ".webhook_provider_dto", "WebhookProviderSettingsDto": ".webhook_provider_settings_dto", "WebhookSubscription": ".webhook_subscription", "WebhookSubscriptionCreate": ".webhook_subscription_create", "WebhookSubscriptionData": ".webhook_subscription_data", "WebhookSubscriptionDataAuthMode": ".webhook_subscription_data_auth_mode", "WebhookSubscriptionEdit": ".webhook_subscription_edit", "WebhookSubscriptionQuery": ".webhook_subscription_query", "WebhookSubscriptionResponse": ".webhook_subscription_response", "WebhookSubscriptionsResponse": ".webhook_subscriptions_response", "Windowing": ".windowing", "WindowingOrder": ".windowing_order", "Workflow": ".workflow", "WorkflowArtifactFlags": ".workflow_artifact_flags", "WorkflowCatalogFlags": ".workflow_catalog_flags", "WorkflowCatalogPreset": ".workflow_catalog_preset", "WorkflowCatalogPresetResponse": ".workflow_catalog_preset_response", "WorkflowCatalogPresetsResponse": ".workflow_catalog_presets_response", "WorkflowCatalogTemplate": ".workflow_catalog_template", "WorkflowCatalogTemplateResponse": ".workflow_catalog_template_response", "WorkflowCatalogTemplatesResponse": ".workflow_catalog_templates_response", "WorkflowCatalogType": ".workflow_catalog_type", "WorkflowCatalogTypeResponse": ".workflow_catalog_type_response", "WorkflowCatalogTypesResponse": ".workflow_catalog_types_response", "WorkflowCreate": ".workflow_create", "WorkflowEdit": ".workflow_edit", "WorkflowFlags": ".workflow_flags", "WorkflowFork": ".workflow_fork", "WorkflowResponse": ".workflow_response", "WorkflowRevisionCommit": ".workflow_revision_commit", "WorkflowRevisionCreate": ".workflow_revision_create", "WorkflowRevisionDataInput": ".workflow_revision_data_input", "WorkflowRevisionDataInputHeadersValue": ".workflow_revision_data_input_headers_value", "WorkflowRevisionDataInputRuntime": ".workflow_revision_data_input_runtime", "WorkflowRevisionDataOutput": ".workflow_revision_data_output", "WorkflowRevisionDataOutputHeadersValue": ".workflow_revision_data_output_headers_value", "WorkflowRevisionDataOutputRuntime": ".workflow_revision_data_output_runtime", "WorkflowRevisionEdit": ".workflow_revision_edit", "WorkflowRevisionFlags": ".workflow_revision_flags", "WorkflowRevisionFork": ".workflow_revision_fork", "WorkflowRevisionInput": ".workflow_revision_input", "WorkflowRevisionOutput": ".workflow_revision_output", "WorkflowRevisionResolveResponse": ".workflow_revision_resolve_response", "WorkflowRevisionResponse": ".workflow_revision_response", "WorkflowRevisionsLog": ".workflow_revisions_log", "WorkflowRevisionsResponse": ".workflow_revisions_response", "WorkflowVariant": ".workflow_variant", "WorkflowVariantCreate": ".workflow_variant_create", "WorkflowVariantEdit": ".workflow_variant_edit", "WorkflowVariantFlags": ".workflow_variant_flags", "WorkflowVariantFork": ".workflow_variant_fork", "WorkflowVariantResponse": ".workflow_variant_response", "WorkflowVariantsResponse": ".workflow_variants_response", "WorkflowsResponse": ".workflows_response", "Workspace": ".workspace", "WorkspaceMemberResponse": ".workspace_member_response", "WorkspacePermission": ".workspace_permission", "WorkspaceResponse": ".workspace_response"} def __getattr__(attr_name: str) -> typing.Any: module_name = _dynamic_imports.get(attr_name) if module_name is None: @@ -659,4 +657,4 @@ def __getattr__(attr_name: str) -> typing.Any: def __dir__(): lazy_attrs = list(_dynamic_imports.keys()) return sorted(lazy_attrs) -__all__ = ["AdminAccountCreateOptions", "AdminAccountRead", "AdminAccountsCreate", "AdminAccountsDelete", "AdminAccountsDeleteTarget", "AdminAccountsResponse", "AdminApiKeyCreate", "AdminApiKeyResponse", "AdminDeleteResponse", "AdminDeletedEntities", "AdminDeletedEntity", "AdminOrganizationCreate", "AdminOrganizationMembershipCreate", "AdminOrganizationMembershipRead", "AdminOrganizationRead", "AdminProjectCreate", "AdminProjectMembershipCreate", "AdminProjectMembershipRead", "AdminProjectRead", "AdminSimpleAccountCreate", "AdminSimpleAccountDeleteEntry", "AdminSimpleAccountRead", "AdminSimpleAccountsApiKeysCreate", "AdminSimpleAccountsCreate", "AdminSimpleAccountsDelete", "AdminSimpleAccountsOrganizationsCreate", "AdminSimpleAccountsOrganizationsMembershipsCreate", "AdminSimpleAccountsOrganizationsTransferOwnership", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjects", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjectsZero", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspaces", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspacesZero", "AdminSimpleAccountsOrganizationsTransferOwnershipResponse", "AdminSimpleAccountsProjectsCreate", "AdminSimpleAccountsProjectsMembershipsCreate", "AdminSimpleAccountsResponse", "AdminSimpleAccountsUsersCreate", "AdminSimpleAccountsUsersIdentitiesCreate", "AdminSimpleAccountsUsersResetPassword", "AdminSimpleAccountsWorkspacesCreate", "AdminSimpleAccountsWorkspacesMembershipsCreate", "AdminStructuredError", "AdminSubscriptionCreate", "AdminSubscriptionRead", "AdminUserCreate", "AdminUserIdentityCreate", "AdminUserIdentityRead", "AdminUserIdentityReadStatus", "AdminUserRead", "AdminWorkspaceCreate", "AdminWorkspaceMembershipCreate", "AdminWorkspaceMembershipRead", "AdminWorkspaceRead", "Analytics", "AnalyticsResponse", "Annotation", "AnnotationCreate", "AnnotationCreateLinks", "AnnotationEdit", "AnnotationEditLinks", "AnnotationLinkResponse", "AnnotationLinks", "AnnotationQuery", "AnnotationQueryLinks", "AnnotationResponse", "AnnotationsResponse", "Application", "ApplicationArtifactFlags", "ApplicationArtifactQueryFlags", "ApplicationCatalogPreset", "ApplicationCatalogPresetResponse", "ApplicationCatalogPresetsResponse", "ApplicationCatalogTemplate", "ApplicationCatalogTemplateResponse", "ApplicationCatalogTemplatesResponse", "ApplicationCatalogType", "ApplicationCatalogTypesResponse", "ApplicationCreate", "ApplicationEdit", "ApplicationFlags", "ApplicationFork", "ApplicationQuery", "ApplicationResponse", "ApplicationRevision", "ApplicationRevisionCommit", "ApplicationRevisionCreate", "ApplicationRevisionDataInput", "ApplicationRevisionDataInputHeadersValue", "ApplicationRevisionDataInputRuntime", "ApplicationRevisionDataOutput", "ApplicationRevisionDataOutputHeadersValue", "ApplicationRevisionDataOutputRuntime", "ApplicationRevisionEdit", "ApplicationRevisionFlags", "ApplicationRevisionFork", "ApplicationRevisionQuery", "ApplicationRevisionQueryFlags", "ApplicationRevisionResolveResponse", "ApplicationRevisionResponse", "ApplicationRevisionsLog", "ApplicationRevisionsResponse", "ApplicationVariant", "ApplicationVariantCreate", "ApplicationVariantEdit", "ApplicationVariantFlags", "ApplicationVariantFork", "ApplicationVariantResponse", "ApplicationVariantsResponse", "ApplicationsResponse", "BodyConfigsFetchVariantsConfigsFetchPost", "Bucket", "CollectStatusResponse", "ComparisonOperator", "Condition", "ConditionOperator", "ConditionOptions", "ConditionValue", "ConfigResponseModel", "CustomModelSettingsDto", "CustomProviderDto", "CustomProviderKind", "CustomProviderSettingsDto", "DictOperator", "DiscoverResponse", "DiscoverResponseMethodsValue", "EeSrcModelsApiOrganizationModelsOrganization", "EntityRef", "Environment", "EnvironmentCreate", "EnvironmentEdit", "EnvironmentFlags", "EnvironmentQueryFlags", "EnvironmentResponse", "EnvironmentRevision", "EnvironmentRevisionCommit", "EnvironmentRevisionCreate", "EnvironmentRevisionData", "EnvironmentRevisionDelta", "EnvironmentRevisionEdit", "EnvironmentRevisionResolveResponse", "EnvironmentRevisionResponse", "EnvironmentRevisionsLog", "EnvironmentRevisionsResponse", "EnvironmentVariant", "EnvironmentVariantCreate", "EnvironmentVariantEdit", "EnvironmentVariantResponse", "EnvironmentVariantsResponse", "EnvironmentsResponse", "ErrorPolicy", "EvaluationMetrics", "EvaluationMetricsCreate", "EvaluationMetricsEdit", "EvaluationMetricsIdsResponse", "EvaluationMetricsQuery", "EvaluationMetricsQueryScenarioIds", "EvaluationMetricsQueryTimestamps", "EvaluationMetricsRefresh", "EvaluationMetricsResponse", "EvaluationQueue", "EvaluationQueueCreate", "EvaluationQueueData", "EvaluationQueueEdit", "EvaluationQueueFlags", "EvaluationQueueIdResponse", "EvaluationQueueIdsResponse", "EvaluationQueueQuery", "EvaluationQueueQueryFlags", "EvaluationQueueResponse", "EvaluationQueueScenariosQuery", "EvaluationQueuesResponse", "EvaluationResult", "EvaluationResultCreate", "EvaluationResultEdit", "EvaluationResultIdResponse", "EvaluationResultIdsResponse", "EvaluationResultQuery", "EvaluationResultResponse", "EvaluationResultsResponse", "EvaluationRun", "EvaluationRunCreate", "EvaluationRunData", "EvaluationRunDataMapping", "EvaluationRunDataMappingColumn", "EvaluationRunDataMappingStep", "EvaluationRunDataStep", "EvaluationRunDataStepInput", "EvaluationRunDataStepOrigin", "EvaluationRunDataStepType", "EvaluationRunEdit", "EvaluationRunFlags", "EvaluationRunIdResponse", "EvaluationRunIdsRequest", "EvaluationRunIdsResponse", "EvaluationRunQuery", "EvaluationRunQueryFlags", "EvaluationRunResponse", "EvaluationRunsResponse", "EvaluationScenario", "EvaluationScenarioCreate", "EvaluationScenarioEdit", "EvaluationScenarioIdResponse", "EvaluationScenarioIdsResponse", "EvaluationScenarioQuery", "EvaluationScenarioResponse", "EvaluationScenariosResponse", "EvaluationStatus", "Evaluator", "EvaluatorArtifactFlags", "EvaluatorArtifactQueryFlags", "EvaluatorCatalogPreset", "EvaluatorCatalogPresetResponse", "EvaluatorCatalogPresetsResponse", "EvaluatorCatalogTemplate", "EvaluatorCatalogTemplateResponse", "EvaluatorCatalogTemplatesResponse", "EvaluatorCatalogType", "EvaluatorCatalogTypesResponse", "EvaluatorCreate", "EvaluatorEdit", "EvaluatorFlags", "EvaluatorFork", "EvaluatorQuery", "EvaluatorResponse", "EvaluatorRevision", "EvaluatorRevisionCommit", "EvaluatorRevisionCreate", "EvaluatorRevisionDataInput", "EvaluatorRevisionDataInputHeadersValue", "EvaluatorRevisionDataInputRuntime", "EvaluatorRevisionDataOutput", "EvaluatorRevisionDataOutputHeadersValue", "EvaluatorRevisionDataOutputRuntime", "EvaluatorRevisionEdit", "EvaluatorRevisionFlags", "EvaluatorRevisionFork", "EvaluatorRevisionQuery", "EvaluatorRevisionQueryFlags", "EvaluatorRevisionResolveResponse", "EvaluatorRevisionResponse", "EvaluatorRevisionsLog", "EvaluatorRevisionsResponse", "EvaluatorTemplate", "EvaluatorTemplatesResponse", "EvaluatorVariant", "EvaluatorVariantCreate", "EvaluatorVariantEdit", "EvaluatorVariantFlags", "EvaluatorVariantFork", "EvaluatorVariantResponse", "EvaluatorVariantsResponse", "EvaluatorsResponse", "ExistenceOperator", "FilteringInput", "FilteringInputConditionsItem", "FilteringOutput", "FilteringOutputConditionsItem", "Focus", "Folder", "FolderCreate", "FolderEdit", "FolderIdResponse", "FolderKind", "FolderQuery", "FolderQueryKinds", "FolderResponse", "FoldersResponse", "Format", "Formatting", typing.Any, typing.Any, "Header", "HttpValidationError", "InviteRequest", "InviteRequestRolesItem", "Invocation", "InvocationCreate", "InvocationCreateLinks", "InvocationEdit", "InvocationEditLinks", "InvocationLinkResponse", "InvocationLinks", "InvocationQuery", "InvocationQueryLinks", "InvocationResponse", "InvocationsResponse", "JsonSchemasInput", "JsonSchemasOutput", typing.Any, typing.Any, "LegacyLifecycleDto", "ListApiKeysResponse", "ListOperator", "ListOptions", "LogicalOperator", "MetricSpec", "MetricType", "MetricsBucket", "NumericOperator", "OTelEventInput", "OTelEventInputTimestamp", "OTelEventOutput", "OTelEventOutputTimestamp", "OTelHashInput", "OTelHashOutput", "OTelLinkInput", "OTelLinkOutput", "OTelLinksResponse", "OTelReferenceInput", "OTelReferenceOutput", "OTelSpanKind", "OTelStatusCode", "OTelTracingRequest", "OTelTracingResponse", "OldAnalyticsResponse", "OrganizationDetails", "OrganizationDomainResponse", "OrganizationProviderResponse", "OrganizationUpdate", "OssSrcModelsApiOrganizationModelsOrganization", "Permission", "Plan", "ProjectsResponse", "QueriesResponse", "Query", "QueryCreate", "QueryEdit", "QueryFlags", "QueryQueryFlags", "QueryResponse", "QueryRevision", "QueryRevisionCommit", "QueryRevisionCreate", "QueryRevisionDataInput", "QueryRevisionDataOutput", "QueryRevisionEdit", "QueryRevisionQuery", "QueryRevisionResponse", "QueryRevisionsLog", "QueryRevisionsResponse", "QueryVariant", "QueryVariantCreate", "QueryVariantEdit", "QueryVariantQuery", "QueryVariantResponse", "QueryVariantsResponse", "Reference", "ReferenceRequestModelInput", "ReferenceRequestModelOutput", "ResolutionInfo", "RevisionFork", "SecretDto", "SecretDtoData", "SecretKind", "SecretResponseDto", "SecretResponseDtoData", "SessionIdsResponse", "SimpleApplication", "SimpleApplicationCreate", "SimpleApplicationDataInput", "SimpleApplicationDataInputHeadersValue", "SimpleApplicationDataInputRuntime", "SimpleApplicationDataOutput", "SimpleApplicationDataOutputHeadersValue", "SimpleApplicationDataOutputRuntime", "SimpleApplicationEdit", "SimpleApplicationFlags", "SimpleApplicationQuery", "SimpleApplicationQueryFlags", "SimpleApplicationResponse", "SimpleApplicationsResponse", "SimpleEnvironment", "SimpleEnvironmentCreate", "SimpleEnvironmentEdit", "SimpleEnvironmentQuery", "SimpleEnvironmentResponse", "SimpleEnvironmentsResponse", "SimpleEvaluation", "SimpleEvaluationCreate", "SimpleEvaluationData", "SimpleEvaluationDataApplicationSteps", "SimpleEvaluationDataApplicationStepsOneValue", "SimpleEvaluationDataEvaluatorSteps", "SimpleEvaluationDataEvaluatorStepsOneValue", "SimpleEvaluationDataQuerySteps", "SimpleEvaluationDataQueryStepsOneValue", "SimpleEvaluationDataTestsetSteps", "SimpleEvaluationDataTestsetStepsOneValue", "SimpleEvaluationEdit", "SimpleEvaluationIdResponse", "SimpleEvaluationQuery", "SimpleEvaluationResponse", "SimpleEvaluationsResponse", "SimpleEvaluator", "SimpleEvaluatorCreate", "SimpleEvaluatorDataInput", "SimpleEvaluatorDataInputHeadersValue", "SimpleEvaluatorDataInputRuntime", "SimpleEvaluatorDataOutput", "SimpleEvaluatorDataOutputHeadersValue", "SimpleEvaluatorDataOutputRuntime", "SimpleEvaluatorEdit", "SimpleEvaluatorFlags", "SimpleEvaluatorQuery", "SimpleEvaluatorQueryFlags", "SimpleEvaluatorResponse", "SimpleEvaluatorsResponse", "SimpleQueriesResponse", "SimpleQuery", "SimpleQueryCreate", "SimpleQueryEdit", "SimpleQueryQuery", "SimpleQueryResponse", "SimpleQueue", "SimpleQueueCreate", "SimpleQueueData", "SimpleQueueDataEvaluators", "SimpleQueueDataEvaluatorsOneValue", "SimpleQueueIdResponse", "SimpleQueueKind", "SimpleQueueQuery", "SimpleQueueResponse", "SimpleQueueScenariosQuery", "SimpleQueueScenariosResponse", "SimpleQueueSettings", "SimpleQueuesResponse", "SimpleTestset", "SimpleTestsetCreate", "SimpleTestsetEdit", "SimpleTestsetQuery", "SimpleTestsetResponse", "SimpleTestsetsResponse", "SimpleTrace", "SimpleTraceChannel", "SimpleTraceCreate", "SimpleTraceCreateLinks", "SimpleTraceEdit", "SimpleTraceEditLinks", "SimpleTraceKind", "SimpleTraceLinkResponse", "SimpleTraceLinks", "SimpleTraceOrigin", "SimpleTraceQuery", "SimpleTraceQueryLinks", "SimpleTraceReferences", "SimpleTraceResponse", "SimpleTracesResponse", "SimpleWorkflow", "SimpleWorkflowCreate", "SimpleWorkflowDataInput", "SimpleWorkflowDataInputHeadersValue", "SimpleWorkflowDataInputRuntime", "SimpleWorkflowDataOutput", "SimpleWorkflowDataOutputHeadersValue", "SimpleWorkflowDataOutputRuntime", "SimpleWorkflowEdit", "SimpleWorkflowFlags", "SimpleWorkflowQuery", "SimpleWorkflowQueryFlags", "SimpleWorkflowResponse", "SimpleWorkflowsResponse", "SpanInput", "SpanInputEndTime", "SpanInputStartTime", "SpanOutput", "SpanOutputEndTime", "SpanOutputStartTime", "SpanResponse", "SpanType", "SpansNodeInput", "SpansNodeInputEndTime", "SpansNodeInputSpansValue", "SpansNodeInputStartTime", "SpansNodeOutput", "SpansNodeOutputEndTime", "SpansNodeOutputSpansValue", "SpansNodeOutputStartTime", "SpansResponse", "SpansTreeInput", "SpansTreeInputSpansValue", "SpansTreeOutput", "SpansTreeOutputSpansValue", "SsoProviderDto", "SsoProviderInfo", "SsoProviderSettingsDto", "SsoProviders", "StandardProviderDto", "StandardProviderKind", "StandardProviderSettingsDto", "Status", "StringOperator", "TestcaseInput", "TestcaseOutput", "TestcaseResponse", "TestcasesResponse", "Testset", "TestsetCreate", "TestsetEdit", "TestsetFlags", "TestsetQuery", "TestsetResponse", "TestsetRevision", "TestsetRevisionCommit", "TestsetRevisionCreate", "TestsetRevisionDataInput", "TestsetRevisionDataOutput", "TestsetRevisionDelta", "TestsetRevisionDeltaColumns", "TestsetRevisionDeltaRows", "TestsetRevisionEdit", "TestsetRevisionQuery", "TestsetRevisionResponse", "TestsetRevisionsLog", "TestsetRevisionsResponse", "TestsetVariant", "TestsetVariantCreate", "TestsetVariantEdit", "TestsetVariantQuery", "TestsetVariantResponse", "TestsetVariantsResponse", "TestsetsResponse", "TextOptions", "ToolAuthScheme", "ToolCallData", "ToolCallFunction", "ToolCallResponse", "ToolCatalogAction", "ToolCatalogActionDetails", "ToolCatalogActionResponse", "ToolCatalogActionResponseAction", "ToolCatalogActionsResponse", "ToolCatalogActionsResponseActionsItem", "ToolCatalogIntegration", "ToolCatalogIntegrationDetails", "ToolCatalogIntegrationResponse", "ToolCatalogIntegrationResponseIntegration", "ToolCatalogIntegrationsResponse", "ToolCatalogIntegrationsResponseIntegrationsItem", "ToolCatalogProvider", "ToolCatalogProviderDetails", "ToolCatalogProviderResponse", "ToolCatalogProviderResponseProvider", "ToolCatalogProvidersResponse", "ToolCatalogProvidersResponseProvidersItem", "ToolConnection", "ToolConnectionCreate", "ToolConnectionCreateData", "ToolConnectionResponse", "ToolConnectionStatus", "ToolConnectionsResponse", "ToolProviderKind", "ToolResult", "ToolResultData", "TraceIdResponse", "TraceIdsResponse", "TraceInput", "TraceInputSpansValue", "TraceOutput", "TraceOutputSpansValue", "TraceRequest", "TraceResponse", "TraceType", "TracesRequest", "TracesResponse", "TracingQuery", "UserIdsResponse", "ValidationError", "ValidationErrorLocItem", "VariantFork", "WebhookDeliveriesResponse", "WebhookDelivery", "WebhookDeliveryCreate", "WebhookDeliveryData", "WebhookDeliveryQuery", "WebhookDeliveryResponse", "WebhookDeliveryResponseInfo", "WebhookEventType", "WebhookProviderDto", "WebhookProviderSettingsDto", "WebhookSubscription", "WebhookSubscriptionCreate", "WebhookSubscriptionData", "WebhookSubscriptionDataAuthMode", "WebhookSubscriptionEdit", "WebhookSubscriptionQuery", "WebhookSubscriptionResponse", "WebhookSubscriptionsResponse", "Windowing", "WindowingOrder", "Workflow", "WorkflowArtifactFlags", "WorkflowCatalogFlags", "WorkflowCatalogPreset", "WorkflowCatalogPresetResponse", "WorkflowCatalogPresetsResponse", "WorkflowCatalogTemplate", "WorkflowCatalogTemplateResponse", "WorkflowCatalogTemplatesResponse", "WorkflowCatalogType", "WorkflowCatalogTypeResponse", "WorkflowCatalogTypesResponse", "WorkflowCreate", "WorkflowEdit", "WorkflowFlags", "WorkflowFork", "WorkflowResponse", "WorkflowRevisionCommit", "WorkflowRevisionCreate", "WorkflowRevisionDataInput", "WorkflowRevisionDataInputHeadersValue", "WorkflowRevisionDataInputRuntime", "WorkflowRevisionDataOutput", "WorkflowRevisionDataOutputHeadersValue", "WorkflowRevisionDataOutputRuntime", "WorkflowRevisionEdit", "WorkflowRevisionFlags", "WorkflowRevisionFork", "WorkflowRevisionInput", "WorkflowRevisionOutput", "WorkflowRevisionResolveResponse", "WorkflowRevisionResponse", "WorkflowRevisionsLog", "WorkflowRevisionsResponse", "WorkflowVariant", "WorkflowVariantCreate", "WorkflowVariantEdit", "WorkflowVariantFlags", "WorkflowVariantFork", "WorkflowVariantResponse", "WorkflowVariantsResponse", "WorkflowsResponse", "Workspace", "WorkspaceMemberResponse", "WorkspacePermission", "WorkspaceResponse", "WorkspaceRole"] +__all__ = ["AdminAccountCreateOptions", "AdminAccountRead", "AdminAccountsCreate", "AdminAccountsDelete", "AdminAccountsDeleteTarget", "AdminAccountsResponse", "AdminApiKeyCreate", "AdminApiKeyResponse", "AdminDeleteResponse", "AdminDeletedEntities", "AdminDeletedEntity", "AdminOrganizationCreate", "AdminOrganizationMembershipCreate", "AdminOrganizationMembershipRead", "AdminOrganizationRead", "AdminProjectCreate", "AdminProjectMembershipCreate", "AdminProjectMembershipRead", "AdminProjectRead", "AdminSimpleAccountCreate", "AdminSimpleAccountDeleteEntry", "AdminSimpleAccountRead", "AdminSimpleAccountsApiKeysCreate", "AdminSimpleAccountsCreate", "AdminSimpleAccountsDelete", "AdminSimpleAccountsOrganizationsCreate", "AdminSimpleAccountsOrganizationsMembershipsCreate", "AdminSimpleAccountsOrganizationsTransferOwnership", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjects", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeProjectsZero", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspaces", "AdminSimpleAccountsOrganizationsTransferOwnershipIncludeWorkspacesZero", "AdminSimpleAccountsOrganizationsTransferOwnershipResponse", "AdminSimpleAccountsProjectsCreate", "AdminSimpleAccountsProjectsMembershipsCreate", "AdminSimpleAccountsResponse", "AdminSimpleAccountsUsersCreate", "AdminSimpleAccountsUsersIdentitiesCreate", "AdminSimpleAccountsUsersResetPassword", "AdminSimpleAccountsWorkspacesCreate", "AdminSimpleAccountsWorkspacesMembershipsCreate", "AdminStructuredError", "AdminSubscriptionCreate", "AdminSubscriptionRead", "AdminUserCreate", "AdminUserIdentityCreate", "AdminUserIdentityRead", "AdminUserIdentityReadStatus", "AdminUserRead", "AdminWorkspaceCreate", "AdminWorkspaceMembershipCreate", "AdminWorkspaceMembershipRead", "AdminWorkspaceRead", "Analytics", "AnalyticsResponse", "Annotation", "AnnotationCreate", "AnnotationCreateLinks", "AnnotationEdit", "AnnotationEditLinks", "AnnotationLinkResponse", "AnnotationLinks", "AnnotationQuery", "AnnotationQueryLinks", "AnnotationResponse", "AnnotationsResponse", "Application", "ApplicationArtifactFlags", "ApplicationArtifactQueryFlags", "ApplicationCatalogPreset", "ApplicationCatalogPresetResponse", "ApplicationCatalogPresetsResponse", "ApplicationCatalogTemplate", "ApplicationCatalogTemplateResponse", "ApplicationCatalogTemplatesResponse", "ApplicationCatalogType", "ApplicationCatalogTypesResponse", "ApplicationCreate", "ApplicationEdit", "ApplicationFlags", "ApplicationFork", "ApplicationQuery", "ApplicationResponse", "ApplicationRevision", "ApplicationRevisionCommit", "ApplicationRevisionCreate", "ApplicationRevisionDataInput", "ApplicationRevisionDataInputHeadersValue", "ApplicationRevisionDataInputRuntime", "ApplicationRevisionDataOutput", "ApplicationRevisionDataOutputHeadersValue", "ApplicationRevisionDataOutputRuntime", "ApplicationRevisionEdit", "ApplicationRevisionFlags", "ApplicationRevisionFork", "ApplicationRevisionQuery", "ApplicationRevisionQueryFlags", "ApplicationRevisionResolveResponse", "ApplicationRevisionResponse", "ApplicationRevisionsLog", "ApplicationRevisionsResponse", "ApplicationVariant", "ApplicationVariantCreate", "ApplicationVariantEdit", "ApplicationVariantFlags", "ApplicationVariantFork", "ApplicationVariantResponse", "ApplicationVariantsResponse", "ApplicationsResponse", "BodyConfigsFetchVariantsConfigsFetchPost", "Bucket", "CollectStatusResponse", "ComparisonOperator", "Condition", "ConditionOperator", "ConditionOptions", "ConditionValue", "ConfigResponseModel", "CustomModelSettingsDto", "CustomProviderDto", "CustomProviderKind", "CustomProviderSettingsDto", "DictOperator", "DiscoverResponse", "DiscoverResponseMethodsValue", "EeSrcModelsApiOrganizationModelsOrganization", "EntityRef", "Environment", "EnvironmentCreate", "EnvironmentEdit", "EnvironmentFlags", "EnvironmentQueryFlags", "EnvironmentResponse", "EnvironmentRevision", "EnvironmentRevisionCommit", "EnvironmentRevisionCreate", "EnvironmentRevisionData", "EnvironmentRevisionDelta", "EnvironmentRevisionEdit", "EnvironmentRevisionResolveResponse", "EnvironmentRevisionResponse", "EnvironmentRevisionsLog", "EnvironmentRevisionsResponse", "EnvironmentVariant", "EnvironmentVariantCreate", "EnvironmentVariantEdit", "EnvironmentVariantResponse", "EnvironmentVariantsResponse", "EnvironmentsResponse", "ErrorPolicy", "EvaluationMetrics", "EvaluationMetricsCreate", "EvaluationMetricsEdit", "EvaluationMetricsIdsResponse", "EvaluationMetricsQuery", "EvaluationMetricsQueryScenarioIds", "EvaluationMetricsQueryTimestamps", "EvaluationMetricsRefresh", "EvaluationMetricsResponse", "EvaluationQueue", "EvaluationQueueCreate", "EvaluationQueueData", "EvaluationQueueEdit", "EvaluationQueueFlags", "EvaluationQueueIdResponse", "EvaluationQueueIdsResponse", "EvaluationQueueQuery", "EvaluationQueueQueryFlags", "EvaluationQueueResponse", "EvaluationQueueScenariosQuery", "EvaluationQueuesResponse", "EvaluationResult", "EvaluationResultCreate", "EvaluationResultEdit", "EvaluationResultIdResponse", "EvaluationResultIdsResponse", "EvaluationResultQuery", "EvaluationResultResponse", "EvaluationResultsResponse", "EvaluationRun", "EvaluationRunCreate", "EvaluationRunData", "EvaluationRunDataMapping", "EvaluationRunDataMappingColumn", "EvaluationRunDataMappingStep", "EvaluationRunDataStep", "EvaluationRunDataStepInput", "EvaluationRunDataStepOrigin", "EvaluationRunDataStepType", "EvaluationRunEdit", "EvaluationRunFlags", "EvaluationRunIdResponse", "EvaluationRunIdsRequest", "EvaluationRunIdsResponse", "EvaluationRunQuery", "EvaluationRunQueryFlags", "EvaluationRunResponse", "EvaluationRunsResponse", "EvaluationScenario", "EvaluationScenarioCreate", "EvaluationScenarioEdit", "EvaluationScenarioIdResponse", "EvaluationScenarioIdsResponse", "EvaluationScenarioQuery", "EvaluationScenarioResponse", "EvaluationScenariosResponse", "EvaluationStatus", "Evaluator", "EvaluatorArtifactFlags", "EvaluatorArtifactQueryFlags", "EvaluatorCatalogPreset", "EvaluatorCatalogPresetResponse", "EvaluatorCatalogPresetsResponse", "EvaluatorCatalogTemplate", "EvaluatorCatalogTemplateResponse", "EvaluatorCatalogTemplatesResponse", "EvaluatorCatalogType", "EvaluatorCatalogTypesResponse", "EvaluatorCreate", "EvaluatorEdit", "EvaluatorFlags", "EvaluatorFork", "EvaluatorQuery", "EvaluatorResponse", "EvaluatorRevision", "EvaluatorRevisionCommit", "EvaluatorRevisionCreate", "EvaluatorRevisionDataInput", "EvaluatorRevisionDataInputHeadersValue", "EvaluatorRevisionDataInputRuntime", "EvaluatorRevisionDataOutput", "EvaluatorRevisionDataOutputHeadersValue", "EvaluatorRevisionDataOutputRuntime", "EvaluatorRevisionEdit", "EvaluatorRevisionFlags", "EvaluatorRevisionFork", "EvaluatorRevisionQuery", "EvaluatorRevisionQueryFlags", "EvaluatorRevisionResolveResponse", "EvaluatorRevisionResponse", "EvaluatorRevisionsLog", "EvaluatorRevisionsResponse", "EvaluatorTemplate", "EvaluatorTemplatesResponse", "EvaluatorVariant", "EvaluatorVariantCreate", "EvaluatorVariantEdit", "EvaluatorVariantFlags", "EvaluatorVariantFork", "EvaluatorVariantResponse", "EvaluatorVariantsResponse", "EvaluatorsResponse", "ExistenceOperator", "FilteringInput", "FilteringInputConditionsItem", "FilteringOutput", "FilteringOutputConditionsItem", "Focus", "Folder", "FolderCreate", "FolderEdit", "FolderIdResponse", "FolderKind", "FolderQuery", "FolderQueryKinds", "FolderResponse", "FoldersResponse", "Format", "Formatting", typing.Any, typing.Any, "Header", "HttpValidationError", "InviteRequest", "InviteRequestRolesItem", "Invocation", "InvocationCreate", "InvocationCreateLinks", "InvocationEdit", "InvocationEditLinks", "InvocationLinkResponse", "InvocationLinks", "InvocationQuery", "InvocationQueryLinks", "InvocationResponse", "InvocationsResponse", "JsonSchemasInput", "JsonSchemasOutput", typing.Any, typing.Any, "LegacyLifecycleDto", "ListApiKeysResponse", "ListOperator", "ListOptions", "LogicalOperator", "MetricSpec", "MetricType", "MetricsBucket", "NumericOperator", "OTelEventInput", "OTelEventInputTimestamp", "OTelEventOutput", "OTelEventOutputTimestamp", "OTelHashInput", "OTelHashOutput", "OTelLinkInput", "OTelLinkOutput", "OTelLinksResponse", "OTelReferenceInput", "OTelReferenceOutput", "OTelSpanKind", "OTelStatusCode", "OTelTracingRequest", "OTelTracingResponse", "OldAnalyticsResponse", "OrganizationDetails", "OrganizationDomainResponse", "OrganizationProviderResponse", "OrganizationUpdate", "OssSrcModelsApiOrganizationModelsOrganization", "Permission", "ProjectsResponse", "QueriesResponse", "Query", "QueryCreate", "QueryEdit", "QueryFlags", "QueryQueryFlags", "QueryResponse", "QueryRevision", "QueryRevisionCommit", "QueryRevisionCreate", "QueryRevisionDataInput", "QueryRevisionDataOutput", "QueryRevisionEdit", "QueryRevisionQuery", "QueryRevisionResponse", "QueryRevisionsLog", "QueryRevisionsResponse", "QueryVariant", "QueryVariantCreate", "QueryVariantEdit", "QueryVariantQuery", "QueryVariantResponse", "QueryVariantsResponse", "Reference", "ReferenceRequestModelInput", "ReferenceRequestModelOutput", "ResolutionInfo", "RevisionFork", "SecretDto", "SecretDtoData", "SecretKind", "SecretResponseDto", "SecretResponseDtoData", "SessionIdsResponse", "SimpleApplication", "SimpleApplicationCreate", "SimpleApplicationDataInput", "SimpleApplicationDataInputHeadersValue", "SimpleApplicationDataInputRuntime", "SimpleApplicationDataOutput", "SimpleApplicationDataOutputHeadersValue", "SimpleApplicationDataOutputRuntime", "SimpleApplicationEdit", "SimpleApplicationFlags", "SimpleApplicationQuery", "SimpleApplicationQueryFlags", "SimpleApplicationResponse", "SimpleApplicationsResponse", "SimpleEnvironment", "SimpleEnvironmentCreate", "SimpleEnvironmentEdit", "SimpleEnvironmentQuery", "SimpleEnvironmentResponse", "SimpleEnvironmentsResponse", "SimpleEvaluation", "SimpleEvaluationCreate", "SimpleEvaluationData", "SimpleEvaluationDataApplicationSteps", "SimpleEvaluationDataApplicationStepsOneValue", "SimpleEvaluationDataEvaluatorSteps", "SimpleEvaluationDataEvaluatorStepsOneValue", "SimpleEvaluationDataQuerySteps", "SimpleEvaluationDataQueryStepsOneValue", "SimpleEvaluationDataTestsetSteps", "SimpleEvaluationDataTestsetStepsOneValue", "SimpleEvaluationEdit", "SimpleEvaluationIdResponse", "SimpleEvaluationQuery", "SimpleEvaluationResponse", "SimpleEvaluationsResponse", "SimpleEvaluator", "SimpleEvaluatorCreate", "SimpleEvaluatorDataInput", "SimpleEvaluatorDataInputHeadersValue", "SimpleEvaluatorDataInputRuntime", "SimpleEvaluatorDataOutput", "SimpleEvaluatorDataOutputHeadersValue", "SimpleEvaluatorDataOutputRuntime", "SimpleEvaluatorEdit", "SimpleEvaluatorFlags", "SimpleEvaluatorQuery", "SimpleEvaluatorQueryFlags", "SimpleEvaluatorResponse", "SimpleEvaluatorsResponse", "SimpleQueriesResponse", "SimpleQuery", "SimpleQueryCreate", "SimpleQueryEdit", "SimpleQueryQuery", "SimpleQueryResponse", "SimpleQueue", "SimpleQueueCreate", "SimpleQueueData", "SimpleQueueDataEvaluators", "SimpleQueueDataEvaluatorsOneValue", "SimpleQueueIdResponse", "SimpleQueueKind", "SimpleQueueQuery", "SimpleQueueResponse", "SimpleQueueScenariosQuery", "SimpleQueueScenariosResponse", "SimpleQueueSettings", "SimpleQueuesResponse", "SimpleTestset", "SimpleTestsetCreate", "SimpleTestsetEdit", "SimpleTestsetQuery", "SimpleTestsetResponse", "SimpleTestsetsResponse", "SimpleTrace", "SimpleTraceChannel", "SimpleTraceCreate", "SimpleTraceCreateLinks", "SimpleTraceEdit", "SimpleTraceEditLinks", "SimpleTraceKind", "SimpleTraceLinkResponse", "SimpleTraceLinks", "SimpleTraceOrigin", "SimpleTraceQuery", "SimpleTraceQueryLinks", "SimpleTraceReferences", "SimpleTraceResponse", "SimpleTracesResponse", "SimpleWorkflow", "SimpleWorkflowCreate", "SimpleWorkflowDataInput", "SimpleWorkflowDataInputHeadersValue", "SimpleWorkflowDataInputRuntime", "SimpleWorkflowDataOutput", "SimpleWorkflowDataOutputHeadersValue", "SimpleWorkflowDataOutputRuntime", "SimpleWorkflowEdit", "SimpleWorkflowFlags", "SimpleWorkflowQuery", "SimpleWorkflowQueryFlags", "SimpleWorkflowResponse", "SimpleWorkflowsResponse", "SpanInput", "SpanInputEndTime", "SpanInputStartTime", "SpanOutput", "SpanOutputEndTime", "SpanOutputStartTime", "SpanResponse", "SpanType", "SpansNodeInput", "SpansNodeInputEndTime", "SpansNodeInputSpansValue", "SpansNodeInputStartTime", "SpansNodeOutput", "SpansNodeOutputEndTime", "SpansNodeOutputSpansValue", "SpansNodeOutputStartTime", "SpansResponse", "SpansTreeInput", "SpansTreeInputSpansValue", "SpansTreeOutput", "SpansTreeOutputSpansValue", "SsoProviderDto", "SsoProviderInfo", "SsoProviderSettingsDto", "SsoProviders", "StandardProviderDto", "StandardProviderKind", "StandardProviderSettingsDto", "Status", "StringOperator", "TestcaseInput", "TestcaseOutput", "TestcaseResponse", "TestcasesResponse", "Testset", "TestsetCreate", "TestsetEdit", "TestsetFlags", "TestsetQuery", "TestsetResponse", "TestsetRevision", "TestsetRevisionCommit", "TestsetRevisionCreate", "TestsetRevisionDataInput", "TestsetRevisionDataOutput", "TestsetRevisionDelta", "TestsetRevisionDeltaColumns", "TestsetRevisionDeltaRows", "TestsetRevisionEdit", "TestsetRevisionQuery", "TestsetRevisionResponse", "TestsetRevisionsLog", "TestsetRevisionsResponse", "TestsetVariant", "TestsetVariantCreate", "TestsetVariantEdit", "TestsetVariantQuery", "TestsetVariantResponse", "TestsetVariantsResponse", "TestsetsResponse", "TextOptions", "ToolAuthScheme", "ToolCallData", "ToolCallFunction", "ToolCallResponse", "ToolCatalogAction", "ToolCatalogActionDetails", "ToolCatalogActionResponse", "ToolCatalogActionResponseAction", "ToolCatalogActionsResponse", "ToolCatalogActionsResponseActionsItem", "ToolCatalogIntegration", "ToolCatalogIntegrationDetails", "ToolCatalogIntegrationResponse", "ToolCatalogIntegrationResponseIntegration", "ToolCatalogIntegrationsResponse", "ToolCatalogIntegrationsResponseIntegrationsItem", "ToolCatalogProvider", "ToolCatalogProviderDetails", "ToolCatalogProviderResponse", "ToolCatalogProviderResponseProvider", "ToolCatalogProvidersResponse", "ToolCatalogProvidersResponseProvidersItem", "ToolConnection", "ToolConnectionCreate", "ToolConnectionCreateData", "ToolConnectionResponse", "ToolConnectionStatus", "ToolConnectionsResponse", "ToolProviderKind", "ToolResult", "ToolResultData", "TraceIdResponse", "TraceIdsResponse", "TraceInput", "TraceInputSpansValue", "TraceOutput", "TraceOutputSpansValue", "TraceRequest", "TraceResponse", "TraceType", "TracesRequest", "TracesResponse", "TracingQuery", "UserIdsResponse", "ValidationError", "ValidationErrorLocItem", "VariantFork", "WebhookDeliveriesResponse", "WebhookDelivery", "WebhookDeliveryCreate", "WebhookDeliveryData", "WebhookDeliveryQuery", "WebhookDeliveryResponse", "WebhookDeliveryResponseInfo", "WebhookEventType", "WebhookProviderDto", "WebhookProviderSettingsDto", "WebhookSubscription", "WebhookSubscriptionCreate", "WebhookSubscriptionData", "WebhookSubscriptionDataAuthMode", "WebhookSubscriptionEdit", "WebhookSubscriptionQuery", "WebhookSubscriptionResponse", "WebhookSubscriptionsResponse", "Windowing", "WindowingOrder", "Workflow", "WorkflowArtifactFlags", "WorkflowCatalogFlags", "WorkflowCatalogPreset", "WorkflowCatalogPresetResponse", "WorkflowCatalogPresetsResponse", "WorkflowCatalogTemplate", "WorkflowCatalogTemplateResponse", "WorkflowCatalogTemplatesResponse", "WorkflowCatalogType", "WorkflowCatalogTypeResponse", "WorkflowCatalogTypesResponse", "WorkflowCreate", "WorkflowEdit", "WorkflowFlags", "WorkflowFork", "WorkflowResponse", "WorkflowRevisionCommit", "WorkflowRevisionCreate", "WorkflowRevisionDataInput", "WorkflowRevisionDataInputHeadersValue", "WorkflowRevisionDataInputRuntime", "WorkflowRevisionDataOutput", "WorkflowRevisionDataOutputHeadersValue", "WorkflowRevisionDataOutputRuntime", "WorkflowRevisionEdit", "WorkflowRevisionFlags", "WorkflowRevisionFork", "WorkflowRevisionInput", "WorkflowRevisionOutput", "WorkflowRevisionResolveResponse", "WorkflowRevisionResponse", "WorkflowRevisionsLog", "WorkflowRevisionsResponse", "WorkflowVariant", "WorkflowVariantCreate", "WorkflowVariantEdit", "WorkflowVariantFlags", "WorkflowVariantFork", "WorkflowVariantResponse", "WorkflowVariantsResponse", "WorkflowsResponse", "Workspace", "WorkspaceMemberResponse", "WorkspacePermission", "WorkspaceResponse"] diff --git a/clients/python/agenta_client/types/plan.py b/clients/python/agenta_client/types/plan.py deleted file mode 100644 index f51273d675..0000000000 --- a/clients/python/agenta_client/types/plan.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -Plan = typing.Union[typing.Literal["cloud_v0_hobby", "cloud_v0_pro", "cloud_v0_business", "cloud_v0_humanity_labs", "cloud_v0_x_labs", "cloud_v0_agenta_ai", "self_hosted_enterprise"], typing.Any] diff --git a/clients/python/agenta_client/types/workspace_permission.py b/clients/python/agenta_client/types/workspace_permission.py index 7ba19c020d..1636896c69 100644 --- a/clients/python/agenta_client/types/workspace_permission.py +++ b/clients/python/agenta_client/types/workspace_permission.py @@ -5,11 +5,10 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .permission import Permission -from .workspace_role import WorkspaceRole class WorkspacePermission(UniversalBaseModel): - role_name: WorkspaceRole + role_name: str role_description: typing.Optional[str] = None permissions: typing.Optional[typing.List[Permission]] = None diff --git a/clients/python/agenta_client/types/workspace_role.py b/clients/python/agenta_client/types/workspace_role.py deleted file mode 100644 index 4ded6cc66f..0000000000 --- a/clients/python/agenta_client/types/workspace_role.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -WorkspaceRole = typing.Union[typing.Literal["owner", "admin", "developer", "editor", "annotator", "viewer"], typing.Any] diff --git a/docs/design/ee-self-hosting/research.md b/docs/design/ee-self-hosting/research.md index 1fa58f463c..776112cfe7 100644 --- a/docs/design/ee-self-hosting/research.md +++ b/docs/design/ee-self-hosting/research.md @@ -137,7 +137,8 @@ api/ee/src/ │ └── service.py # flush_spans (retention enforcement) ├── crons/ │ ├── meters.sh / meters.txt # Cron: POST /admin/billing/usage/report -│ └── spans.sh / spans.txt # Cron: POST /admin/billing/usage/flush +│ ├── spans.sh / spans.txt # Cron: POST /admin/spans/flush +│ └── events.sh / events.txt # Cron: POST /admin/events/flush ├── dbs/postgres/ │ ├── meters/ # Meter DB entities + DAO │ ├── organizations/ # SSO providers DAO @@ -518,9 +519,18 @@ Only `TRACES` and `USERS` are reported to Stripe (defined in `REPORTS` list). If Stripe is disabled, `MetersService.report()` returns early — no Stripe calls. -### Span retention +### Span and event retention -A cron job calls `POST /admin/billing/usage/flush`. This deletes old spans based on the plan's retention period defined in the entitlement quotas (e.g., Hobby = 30 days, Pro = 90 days, Business = 365 days). +Spans and events are independent retention domains; each has its own admin +endpoint and its own cron schedule. + +- `POST /admin/spans/flush` deletes old spans based on the plan's + `Counter.TRACES.retention` (e.g., Hobby = 30 days, Pro = 90 days, + Business = 365 days). Triggered by `spans.sh` at `0,30 * * * *`. +- `POST /admin/events/flush` deletes old events based on the plan's + `Counter.EVENTS.retention`. Default is no retention (kept forever); + opt in via overlay or full plan override. Triggered by `events.sh` at + `7,37 * * * *`. ### Observations for self-hosting @@ -583,7 +593,8 @@ All billing endpoints are defined in `api/ee/src/apis/fastapi/billing/router.py` | POST | `/subscription/cancel` | Admin: cancel by org ID | Yes | | POST | `/usage/report` | Sync meters to Stripe (cron) | Yes (no-ops if disabled) | | POST | `/usage/report/unlock` | Force-release report lock | No | -| POST | `/usage/flush` | Span retention cleanup (cron) | No | +| POST | `/admin/spans/flush` | Span retention cleanup (cron) | No | +| POST | `/admin/events/flush` | Event retention cleanup (cron) | No | ### OSS endpoints with entitlement coupling diff --git a/docs/designs/data-retention/README.md b/docs/designs/data-retention/README.md index ed3fb6ecbc..300d2e1a42 100644 --- a/docs/designs/data-retention/README.md +++ b/docs/designs/data-retention/README.md @@ -16,11 +16,25 @@ for each plan. - A cron triggers the retention job via the admin billing endpoint. ## Runtime flow -1. Cron calls the admin endpoint `/admin/billing/usage/flush`. -2. The tracing service enumerates plans with finite retention. + +Spans and events are independent retention domains; each has its own admin +endpoint, its own cron, and its own Redis lock so the two flushes never block +each other. + +Spans: + +1. Cron calls the admin endpoint `/admin/spans/flush`. +2. The tracing service enumerates plans with finite `Counter.TRACES.retention`. 3. For each plan, it batches projects and deletes traces older than the cutoff. 4. Logs include per-plan and total deletion counts. +Events: + +1. Cron calls the admin endpoint `/admin/events/flush`. +2. The events retention service enumerates plans with finite `Counter.EVENTS.retention`. +3. For each plan, it batches projects and deletes events older than the cutoff. +4. Logs include per-plan and total deletion counts. + ## Operational notes - Retention runs should be idempotent and safe to re-run. - Deletions are limited per batch to keep runtime bounded. diff --git a/docs/designs/data-retention/data-retention-periods.initial.specs.md b/docs/designs/data-retention/data-retention-periods.initial.specs.md index 4787ef9a99..10883c6296 100644 --- a/docs/designs/data-retention/data-retention-periods.initial.specs.md +++ b/docs/designs/data-retention/data-retention-periods.initial.specs.md @@ -315,9 +315,15 @@ Key points: ## Entrypoints -- Admin endpoint: `POST /admin/billing/usage/flush` in `ee/src/apis/fastapi/billing/router.py`. -- Cron: `ee/src/crons/spans.sh` calls the endpoint (30 minute timeout). -- Locking: `acquire_lock`/`release_lock` guard the flush to avoid overlaps. +Spans and events are independent retention domains; each has its own admin +endpoint, cron, and Redis lock namespace. + +- Spans admin endpoint: `POST /admin/spans/flush` in `ee/src/apis/fastapi/spans/router.py`. +- Spans cron: `ee/src/crons/spans.sh` (30 minute timeout). +- Spans lock namespace: `spans:flush`. +- Events admin endpoint: `POST /admin/events/flush` in `ee/src/apis/fastapi/events/router.py`. +- Events cron: `ee/src/crons/events.sh` (30 minute timeout). +- Events lock namespace: `events:flush`. --- diff --git a/docs/designs/dynamic-access-and-billing/findings.md b/docs/designs/dynamic-access-and-billing/findings.md new file mode 100644 index 0000000000..1f08a428b2 --- /dev/null +++ b/docs/designs/dynamic-access-and-billing/findings.md @@ -0,0 +1,214 @@ +# Findings: Dynamic Access and Billing + +Origin scan of branch `feat/add-access-controls-in-env-vars` (commits `c33134f45..da0548d5e`) against the `proposal.md` and `gap.md` in this folder. Code was read independently before reconciling against `tasks.md`. All findings have been resolved; see [Closed Findings](#closed-findings). + +## Sources + +- `docs/designs/dynamic-access-and-billing/{research,gap,proposal,tasks}.md` +- `api/oss/src/utils/env.py` +- `api/ee/src/core/entitlements/{controls.py,types.py,service.py}` +- `api/ee/src/core/subscriptions/{settings.py,service.py,types.py}` +- `api/ee/src/apis/fastapi/billing/router.py` +- `api/ee/src/utils/{entitlements.py,permissions.py}` +- `api/ee/src/services/{converters.py,db_manager_ee.py,workspace_manager.py,throttling_service.py,admin_manager.py,db_manager_ee.py}` +- `api/ee/src/routers/workspace_router.py` +- `api/ee/src/models/{shared_models.py,db_models.py,api/workspace_models.py,api/api_models.py}` +- `api/ee/src/core/tracing/service.py` +- `api/ee/src/core/meters/service.py` +- `api/oss/src/core/{accounts,auth}/service.py` +- `api/oss/src/routers/workspace_router.py` +- `api/ee/databases/postgres/migrations/core/versions/{a9f3e8b7c5d1_clean_up_organizations.py,a1b2c3d4e5f7_unify_org_member_role_to_viewer.py,7990f1e12f47_create_free_plans.py}` +- `api/ee/tests/pytest/unit/{test_access_controls.py,test_controls_env_override.py,test_billing_settings.py,test_billing_router.py}` +- `web/oss/src/lib/{Types.ts,helpers/useEntitlements.ts}`, `web/ee/src/services/billing/types.d.ts`, `web/ee/src/components/SidebarBanners/state/atoms.ts` +- `docs/docs/self-host/{02-configuration.mdx,04-dynamic-access-controls.mdx,05-dynamic-billing-settings.mdx}` + +## Summary + +Initial scan surfaced 13 findings: one P0 (project-scope RBAC regression), four P1 (closed-enum holdouts and validation gaps), and the rest P2/P3 hygiene. All have been resolved on this branch — see fixes inline below. EE unit suite (102 tests) green after the changes. + +## Rules + +- Severity uses `P0`/`P1`/`P2`/`P3` (proposal-blockers, gap-from-proposal, real-but-bounded, hygiene). +- Confidence is `high` when code lines directly confirm the behavior, `medium` when a regression is implied by code paths I traced but did not run. +- Findings tagged `Category: Correctness` are functional regressions; `Consistency` are spec-vs-implementation drift; `Migration` are operational risks at upgrade time. + +## Notes + +- `controls.py` and `settings.py` parse env at import time. Changing `env.access_controls.*` / `env.billing.*` after import does not re-trigger validation. Tests work around this via subprocess. +- `WorkspaceRole(str, Enum)` enables `role == "owner"`-style comparisons everywhere; that is why `_project_is_owner` still works after the refactor. +- Per `CLAUDE.md`, all new env access must funnel through `oss.src.utils.env.env`; the implementation respects that. + +## Open Findings + +(none) + +## Closed Findings + +### FIND-001 — [CLOSED] WorkspaceMember response model still uses closed `WorkspaceRole` enum + +- ID: FIND-001 +- Origin: scan +- Lens: verification +- Severity: P1 +- Confidence: high +- Status: fixed +- Category: Consistency +- Summary: `WorkspacePermission.role_name: WorkspaceRole` and `InviteRequest.roles: List[WorkspaceRole]` (renamed from `OrganizationMembersResponse.roles` — the actual field) blocked serialization of env-defined role slugs. +- Resolution: Switched `WorkspacePermission.role_name` to `str` in both [api/ee/src/models/api/workspace_models.py](api/ee/src/models/api/workspace_models.py) and [api/ee/src/core/workspaces/types.py](api/ee/src/core/workspaces/types.py); switched `InviteRequest.roles` to `List[str]` in [api/ee/src/models/api/api_models.py](api/ee/src/models/api/api_models.py). Validation against the effective scope catalog now happens at the API boundary (see FIND-003 for the assignment validation). +- Sources: proposal.md "Refactor Imports". + +### FIND-002 — [CLOSED] Project-scope defaults drop workspace-role permissions (RBAC regression) + +- ID: FIND-002 +- Origin: scan +- Lens: verification +- Severity: P0 +- Confidence: high +- Status: fixed +- Category: Correctness +- Summary: `_default_roles()["project"]` returned minima-only (`owner`/`viewer`), but `project_members.role` is populated with workspace-role slugs (`admin`/`developer`/`editor`/`annotator`) by every project-membership writer. `_project_has_permission` resolved `get_role_permissions("project", "admin")` → `[]`, stripping non-owner project members of every permission. +- Resolution: Extended the project-scope code defaults to mirror the workspace-scope default extras ([api/ee/src/core/entitlements/controls.py:215-243](api/ee/src/core/entitlements/controls.py#L215-L243)). Tests updated: [test_access_controls.py:53-66](api/ee/tests/pytest/unit/test_access_controls.py#L53-L66) now asserts project-scope mirrors the full `WorkspaceRole` set; the env-override path replaces the default extras when the project scope is explicitly overridden. +- Sources: gap.md "Workspace roles are also too static"; proposal.md "Refactor Imports". + +### FIND-003 — [CLOSED] `workspace_router.update_user_roles` still validated against `WorkspaceRole.is_valid_role` + +- ID: FIND-003 +- Origin: scan +- Lens: verification +- Severity: P1 +- Confidence: high +- Status: fixed +- Category: Consistency +- Summary: Even after env-defined roles were returned by `GET /workspace/roles/`, the assignment path rejected anything not in the closed `WorkspaceRole` enum. +- Resolution: Replaced the enum check with `get_role("workspace", payload.role)` in [api/ee/src/routers/workspace_router.py:91-96](api/ee/src/routers/workspace_router.py#L91-L96). Removed the unused `WorkspaceRole` import from that module and from [api/ee/src/models/api/workspace_models.py](api/ee/src/models/api/workspace_models.py). +- Sources: tasks.md "Update `WorkspaceRole` runtime usage". + +### FIND-004 — [CLOSED] `db_manager_ee.get_all_workspace_roles()` still returned `list(WorkspaceRole)` + +- ID: FIND-004 +- Origin: scan +- Lens: verification +- Severity: P2 +- Confidence: high +- Status: fixed +- Category: Consistency +- Summary: The DB-manager and workspace-manager wrappers were unchanged after the refactor; any direct caller (admin tooling, integration tests) still saw the closed enum. +- Resolution: Both [db_manager_ee.get_all_workspace_roles](api/ee/src/services/db_manager_ee.py) and [workspace_manager.get_all_workspace_roles](api/ee/src/services/workspace_manager.py) now return `get_roles("workspace")` directly. The local import of `controls.get_roles` inside `db_manager_ee` avoids any potential import cycle. +- Sources: tasks.md "Update role discovery APIs to return `get_roles()`". + +### FIND-005 — [CLOSED] `get_free_plan()` fallback ignored effective plan set + +- ID: FIND-005 +- Origin: scan +- Lens: verification +- Severity: P1 +- Confidence: high +- Status: fixed +- Category: Soundness +- Summary: When operators set a custom `AGENTA_ACCESS_PLANS` without `cloud_v0_hobby`, the unguarded literal fallback in `get_free_plan()` would write a non-existent plan during cancel/downgrade. +- Resolution: `_build_settings()` now raises at startup when (a) no pricing entry is marked `"free": true` AND (b) `cloud_v0_hobby` is not in the effective plan set ([api/ee/src/core/subscriptions/settings.py](api/ee/src/core/subscriptions/settings.py)). Loud failure beats silent corruption. +- Sources: proposal.md "Acceptable fallback behavior". + +### FIND-006 — [CLOSED] `get_default_plan()` did not validate against the effective plan set + +- ID: FIND-006 +- Origin: scan +- Lens: verification +- Severity: P1 +- Confidence: high +- Status: fixed +- Category: Soundness +- Summary: `subscriptions.types.get_default_plan()` returned `env.agenta.default_plan` raw if set, skipping the proposal-mandated membership check. +- Resolution: Validation is performed once at startup inside `_build_settings()` ([api/ee/src/core/subscriptions/settings.py](api/ee/src/core/subscriptions/settings.py)) — a non-matching `AGENTA_DEFAULT_PLAN` now fails the API boot with a clear error. Keeps `get_default_plan()` itself dependency-free. +- Sources: proposal.md "Organization Onboarding". + +### FIND-007 — [CLOSED] Admin `start_plan` accepted arbitrary plan strings + +- ID: FIND-007 +- Origin: scan +- Lens: verification +- Severity: P2 +- Confidence: high +- Status: fixed +- Category: Soundness +- Summary: The admin account-create flow no longer cast the plan through the `Plan` enum, so unknown slugs reached `start_plan` unchecked. +- Resolution: Added a `plan not in _ee_get_plans()` guard in [api/oss/src/core/accounts/service.py](api/oss/src/core/accounts/service.py) that raises `AdminValidationError` before `start_plan`. Validation lives at the admin boundary; `start_plan` still trusts validated input from internal callers. +- Sources: proposal.md "Subscription plan values read from DB or Stripe metadata must exist in the effective plan set". + +### FIND-008 — [CLOSED] `AGENTA_BILLING_PRICING.stripe.meters` keys were not validated against `Counter`/`Gauge` + +- ID: FIND-008 +- Origin: scan +- Lens: verification +- Severity: P2 +- Confidence: high +- Status: fixed +- Category: Validation +- Summary: Typos in meter keys silently disabled Stripe reporting via `get_stripe_meter_price()`. +- Resolution: Added `_VALID_METER_KEYS` (`Counter` ∪ `Gauge`) and reject unknown keys with the allowed list in the error message ([api/ee/src/core/subscriptions/settings.py](api/ee/src/core/subscriptions/settings.py)). +- Sources: research.md "Validation Needs". + +### FIND-009 — [CLOSED] `AGENTA_BILLING_CATALOG` entries passed through with no schema validation + +- ID: FIND-009 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: high +- Status: fixed +- Category: Consistency +- Summary: The parser only checked `isinstance(entry, dict)`; docs advertised required fields (`title`, `description`, `type`, `features`) that weren't enforced. +- Resolution: Added a Pydantic `_CatalogEntry` model with `extra="allow"` so operators can still extend the payload, but `title`/`description`/`type`/`features` are now required and `type` must be `"standard"` or `"custom"`. Tests in [test_billing_settings.py](api/ee/tests/pytest/unit/test_billing_settings.py) and [test_controls_env_override.py](api/ee/tests/pytest/unit/test_controls_env_override.py) updated to use the full schema. +- Sources: docs/docs/self-host/05-dynamic-billing-settings.mdx. + +### FIND-010 — [CLOSED] Default plan literal `cloud_v0_hobby` referenced in multiple migrations + +- ID: FIND-010 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: high +- Status: fixed +- Category: Migration +- Summary: Migrations seed `subscriptions.plan = 'cloud_v0_hobby'`; on an upgrade with a custom plan map that omits it, runtime would fail every entitlement check for those orgs. +- Resolution: Comments in both migrations ([a9f3e8b7c5d1_clean_up_organizations.py](api/ee/databases/postgres/migrations/core/versions/a9f3e8b7c5d1_clean_up_organizations.py), [7990f1e12f47_create_free_plans.py](api/ee/databases/postgres/migrations/core/versions/7990f1e12f47_create_free_plans.py)) call out the operator constraint, and the FIND-005 guard in `_build_settings()` now refuses to start the API if the constraint is violated — so the failure surface moves from "silently broken org subscriptions" to "loud startup error". +- Sources: gap.md "Multi-process consistency". + +### FIND-011 — [CLOSED] `_PlanOverride` rejected plans with only a `description` + +- ID: FIND-011 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: high +- Status: fixed +- Category: Consistency +- Summary: research.md described description-only plans as valid; the parser rejected them. +- Resolution: Dropped the `"must define at least one of..."` guard from `_parse_plans_override` ([api/ee/src/core/entitlements/controls.py](api/ee/src/core/entitlements/controls.py)) — display-only plans now resolve with an empty entitlement map. `fetch_usage` distinguishes "unknown plan" (None → 404) from "plan exists but enforces nothing" (`{}` → empty usage) ([api/ee/src/apis/fastapi/billing/router.py](api/ee/src/apis/fastapi/billing/router.py)). Tests in [test_access_controls.py](api/ee/tests/pytest/unit/test_access_controls.py) and [test_controls_env_override.py](api/ee/tests/pytest/unit/test_controls_env_override.py) updated. +- Sources: research.md "Recommended Override Shape". + +### FIND-012 — [CLOSED] Workspace-scope `viewer` minima silently overrides any env override + +- ID: FIND-012 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: high +- Status: wontfix +- Category: Consistency +- Summary: The minima `viewer` permission set is fixed at code-default and cannot be redefined from env. +- Resolution: Behavior is intentional and matches the documented contract ([docs/docs/self-host/04-dynamic-access-controls.mdx:168-180](docs/docs/self-host/04-dynamic-access-controls.mdx#L168-L180)). Tests assert this lock-in. Closing as wontfix — no operator demand for viewer-permission overrides yet; reopen if that changes. +- Sources: docs/docs/self-host/04-dynamic-access-controls.mdx "Platform minima". + +### FIND-013 — [CLOSED] Throttling middleware no-opped on unknown plan + +- ID: FIND-013 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: high +- Status: fixed +- Category: Soundness +- Summary: Misconfigured / orphaned subscriptions used to bypass throttling entirely with only a warning log. +- Resolution: `throttling_middleware` now falls back to the free-plan throttle bucket when the org's plan is unknown or carries no throttles ([api/ee/src/services/throttling_service.py](api/ee/src/services/throttling_service.py)). If the free plan also has no throttles defined (e.g. unusual self-host config), the request still goes through — but at least the safe-default path is exercised first, and the log entry now identifies the fallback explicitly. +- Sources: research.md "Failure Behavior". diff --git a/docs/designs/dynamic-access-and-billing/gap.md b/docs/designs/dynamic-access-and-billing/gap.md new file mode 100644 index 0000000000..8c4cfae37e --- /dev/null +++ b/docs/designs/dynamic-access-and-billing/gap.md @@ -0,0 +1,160 @@ +# Gap Analysis: Env-Backed Plans and Entitlements + +This document records the gaps the work set out to close. Each gap is +annotated with a Resolution line pointing at the shipped fix. The gaps +section freezes the pre-change state of the system. + +## Functional Gaps + +- Runtime source of truth was hard-coded constants. + - `CATALOG` and `ENTITLEMENTS` were imported directly in multiple modules. + - There was no single accessor layer where env overrides could be + applied safely. + - **Resolution:** introduced `ee.src.core.entitlements.controls` and + `ee.src.core.subscriptions.settings` as the accessor surfaces; + `CATALOG`/`ENTITLEMENTS` renamed to `DEFAULT_CATALOG`/ + `DEFAULT_ENTITLEMENTS` and routed exclusively through accessors at + runtime. + +- Subscription defaults were only partially configurable. + - `AGENTA_DEFAULT_PLAN` existed. + - `FREE_PLAN`, `REVERSE_TRIAL_PLAN`, `REVERSE_TRIAL_DAYS` were + hard-coded. + - **Resolution:** free plan now derived from `AGENTA_BILLING_PRICING`'s + `"free": true` marker; trial driven by `AGENTA_BILLING_TRIAL_PLAN` + + `AGENTA_BILLING_TRIAL_DAYS` (both required together). + `AGENTA_DEFAULT_PLAN` renamed canonically to + `AGENTA_ACCESS_DEFAULT_PLAN`, moved from `env.agenta` to + `env.access_controls`, legacy name still honored. + +- Plan identity was too static. + - Backend `Plan` enum in subscription types prevented env-defined slugs. + - **Resolution:** `SubscriptionDTO.plan: str`; runtime validation + against `get_plans()` at API boundaries; `DefaultPlan` enum retained + as code-default fallback only. + +- No effective access-controls consistency check existed. + - Catalog/pricing/plans needed to agree but nothing enforced it. + - **Resolution:** `settings._build_settings()` validates that every + `AGENTA_BILLING_CATALOG[*].plan` and `AGENTA_BILLING_PRICING[slug]` + exists in the effective plan map; startup fails on mismatch. + +- Display pricing and Stripe pricing were separate. + - `CATALOG.price` (UI) and `env.stripe.pricing` (Stripe) could diverge. + - **Resolution:** `STRIPE_PRICING` / `AGENTA_PRICING` removed from + `StripeConfig`. Stripe line items now live under + `AGENTA_BILLING_PRICING`. Conversion script + `migrate_stripe_pricing.py` ships in this folder. + +- Frontend plan typing was inconsistent. + - The `Plan` union included `cloud_v0_enterprise`. + - **Resolution:** runtime `Plan = string` in + `web/ee/src/services/billing/types.d.ts`; `DefaultPlan` enum kept + only as a labeled constant set for code conditionals. + +- Workspace roles were too static. + - `WorkspaceRole` was a closed enum. + - `get_all_workspace_roles()` returned `list(WorkspaceRole)`. + - **Resolution:** role identity surfaced via `controls.get_roles(scope)`; + response models (`WorkspacePermission.role_name`, `InviteRequest.roles`) + widened to `str`; assignment validation uses + `controls.get_role("workspace", slug)`; `db_manager_ee` and + `workspace_manager` role-discovery functions return the effective + catalog. **Project scope inherits the workspace default extras** so + existing `project_members.role` values keep resolving to their + historical permission sets. + +- Span retention lived under `/admin/billing/usage/flush`. + - Billing is not the right owner; events were not retainable at all. + - **Resolution:** old endpoint removed (hard cut). Two independent + admin endpoints: `POST /admin/spans/flush` and + `POST /admin/events/flush`. Each owns its own service, DAO, cron, + and Redis lock namespace. `Counter.EVENTS` added to the entitlement + system; default `Quota(monthly=True)` on every plan preserves + pre-change behavior (no flush by default). + +## Safety Gaps + +- No validation boundary for nested entitlement data. + - **Resolution:** `_PlanOverride` Pydantic model in `controls.py` + validates flag/counter/gauge/throttle keys against their enums and + rejects unknown fields (`extra="forbid"`). + +- No validation boundary for env-defined roles. + - **Resolution:** `_RoleOverride` Pydantic model; permissions must + exist in `Permission` enum or be the wildcard `*`; `owner` and + `viewer` minima cannot be redefined (platform-synthesized per scope). + +- Cache behavior could hide changes temporarily. + - **Resolution:** subscription plan cache invalidation unchanged; + entitlement controls parse once at import time (subprocess-driven + tests confirm); frontend 10-minute cache documented as expected + catch-up window. + +- Multi-process consistency. + - **Resolution:** startup log `[access-controls] plans=... roles=... + overlay=... hash=...` exposes a 12-char hash of the effective + controls so operators can grep across worker logs to verify all + processes loaded the same config. + +- `get_default_plan()` did not validate against effective plan set. + - **Resolution:** validated in `_build_settings()` at startup + (FIND-006). + +- `get_free_plan()` fallback ignored effective plan set. + - **Resolution:** startup fails when no `"free": true` marker exists + and `cloud_v0_hobby` is missing from the effective plan map (FIND-005). + +- Throttle middleware passed unknown plans through unthrottled. + - **Resolution:** falls back to free-plan throttles when the org's + plan is unknown or carries no throttles (FIND-013). + +## Product Gaps + +- Changing catalog copy is easy and low risk (UI-only). +- Changing enforced limits is higher risk: quota checks, metering, + usage reporting, retention (spans + events), throttling, organization + feature access. +- Changing roles is medium/high risk: invite flows, role update flows, + workspace member serialization, frontend permission checks, + owner/admin safety invariants. + +- No operator-visible controls version. + - **Resolution:** controls hash logged at startup (above). + +- Self-hosted operators needed per-knob tweaks without restating the + whole plan. + - **Resolution:** `AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY` — partial + entitlement patch for the default plan only. Quotas field-merge, + flags per-key replace, throttles category-keyed per-entry merge. + +## Testing Gaps + +- No dedicated test surface for entitlement controls parsing/merging. + - **Resolution:** `api/ee/tests/pytest/unit/test_access_controls.py` + (parser-level), `test_controls_env_override.py` (subprocess-driven + end-to-end env overrides), `test_billing_settings.py` (catalog + + pricing parsers), `test_events_retention.py` (events flush logic), + `test_admin_retention_routers.py` (spans + events admin endpoint + lock + handler). +- No regression test proving defaults are stable when no env override is + present. + - **Resolution:** `TestNoOverride.test_no_env_uses_defaults` and + related defaults-state classes. + +## Documentation Gaps + +- Operators had no documented JSON schema. + - **Resolution:** + [docs/docs/self-host/04-dynamic-access-controls.mdx](../../docs/self-host/04-dynamic-access-controls.mdx) + and + [docs/docs/self-host/05-dynamic-billing-settings.mdx](../../docs/self-host/05-dynamic-billing-settings.mdx). +- No documented restart requirement. + - **Resolution:** restart warnings called out in both user-facing docs. +- Retention split was undocumented. + - **Resolution:** + [docs/designs/data-retention/README.md](../data-retention/README.md) + and + [docs/designs/data-retention/data-retention-periods.initial.specs.md](../data-retention/data-retention-periods.initial.specs.md) + cover the two independent admin endpoints, crons, and lock + namespaces. diff --git a/docs/designs/dynamic-access-and-billing/migrate_stripe_pricing.py b/docs/designs/dynamic-access-and-billing/migrate_stripe_pricing.py new file mode 100644 index 0000000000..80498891d3 --- /dev/null +++ b/docs/designs/dynamic-access-and-billing/migrate_stripe_pricing.py @@ -0,0 +1,187 @@ +#!/usr/bin/env python3 +"""Convert the legacy `STRIPE_PRICING` / `AGENTA_PRICING` env value to the +canonical `AGENTA_BILLING_PRICING` shape consumed by +`ee.src.core.subscriptions.settings`. + +Old (flat) shape — one entry per plan, top-level keys are meter slugs: + + { + "cloud_v0_pro": { + "base": {"price": "price_base_1", "quantity": 1}, + "users": {"price": "price_users_1", "quantity": 1}, + "traces": {"price": "price_traces_1"} + } + } + +New (canonical) shape — `line_items` is what Stripe sees on checkout; +`meters` is how `meters/service.py` finds the price ID for a given meter +(counter/gauge slug) when reporting usage. + + { + "cloud_v0_pro": { + "stripe": { + "line_items": [ + {"price": "price_base_1", "quantity": 1}, + {"price": "price_users_1", "quantity": 1}, + {"price": "price_traces_1"} + ], + "meters": { + "users": {"price": "price_users_1"}, + "traces": {"price": "price_traces_1"} + } + } + }, + "cloud_v0_hobby": {"free": true} + } + +Usage: + + # From a file + python migrate_stripe_pricing.py --in stripe_pricing.json --out billing_pricing.json + + # From an env var (with optional --free to mark a plan as the free fallback) + STRIPE_PRICING='{"cloud_v0_pro": {...}}' python migrate_stripe_pricing.py \\ + --env STRIPE_PRICING --free cloud_v0_hobby + +The `--free ` flag adds `{"free": true}` for the given plan slug if it +isn't already present — there must be exactly one free plan in the canonical +pricing for downgrade/cancel flows to work. + +`line_items` is the list of meter sub-entries that have a `"price"` field. +Meters without a price (e.g. retention buckets) are skipped. The `quantity` +defaults to 1 for entries that don't specify one; pass `--no-default-quantity` +to disable that. +""" + +import argparse +import json +import os +import sys +from typing import Any + + +# Top-level keys in a legacy plan entry that are treated as Stripe-billable +# meters. Everything that has a `price` is a line item; the entries we map into +# `stripe.meters` are the ones reported on by `meters/service.py` (gauges + +# tiered counters with per-unit prices). +_METER_KEYS_FOR_REPORTING = {"users", "traces"} + + +def _convert_plan( + slug: str, + old: dict[str, Any], + *, + default_quantity: bool, +) -> dict[str, Any]: + line_items: list[dict[str, Any]] = [] + meters: dict[str, dict[str, str]] = {} + + for meter_key, meter_block in old.items(): + if not isinstance(meter_block, dict): + raise ValueError( + f"{slug}.{meter_key}: expected object, got {type(meter_block).__name__}" + ) + + price = meter_block.get("price") + if not price: + # No price ID → not a Stripe line item; skip. + continue + + item: dict[str, Any] = {"price": price} + if "quantity" in meter_block: + item["quantity"] = meter_block["quantity"] + elif default_quantity: + item["quantity"] = 1 + line_items.append(item) + + if meter_key in _METER_KEYS_FOR_REPORTING: + meters[meter_key] = {"price": price} + + out: dict[str, Any] = {"stripe": {"line_items": line_items}} + if meters: + out["stripe"]["meters"] = meters + return out + + +def convert( + legacy: dict[str, Any], + *, + free_slug: str | None = None, + default_quantity: bool = True, +) -> dict[str, Any]: + if not isinstance(legacy, dict): + raise ValueError("Top-level legacy pricing must be a JSON object") + + result: dict[str, Any] = {} + for slug, plan_block in legacy.items(): + if not isinstance(plan_block, dict): + raise ValueError(f"{slug}: plan entry must be a JSON object") + result[slug] = _convert_plan( + slug, plan_block, default_quantity=default_quantity + ) + + if free_slug: + if free_slug not in result: + result[free_slug] = {} + result[free_slug]["free"] = True + + return result + + +def _read_input(args: argparse.Namespace) -> dict[str, Any]: + if args.env: + raw = os.environ.get(args.env) + if not raw: + raise SystemExit(f"env var {args.env} is empty or unset") + return json.loads(raw) + if args.in_file: + with open(args.in_file, "r") as fh: + return json.load(fh) + raw = sys.stdin.read() + if not raw.strip(): + raise SystemExit("no input provided (use --env, --in, or stdin)") + return json.loads(raw) + + +def _write_output(args: argparse.Namespace, data: dict[str, Any]) -> None: + text = json.dumps(data, indent=2 if args.pretty else None, sort_keys=True) + if args.out_file: + with open(args.out_file, "w") as fh: + fh.write(text) + fh.write("\n") + else: + print(text) + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__.split("\n\n")[0]) + parser.add_argument( + "--env", help="Read JSON from this env var (e.g. STRIPE_PRICING)" + ) + parser.add_argument("--in", dest="in_file", help="Read JSON from this file") + parser.add_argument( + "--out", dest="out_file", help="Write JSON to this file (default: stdout)" + ) + parser.add_argument( + "--free", dest="free_slug", help="Mark this plan slug as the free fallback" + ) + parser.add_argument( + "--no-default-quantity", + dest="default_quantity", + action="store_false", + help="Do not inject quantity=1 for line items that omit it", + ) + parser.add_argument("--pretty", action="store_true", help="Indent JSON output") + args = parser.parse_args() + + legacy = _read_input(args) + converted = convert( + legacy, + free_slug=args.free_slug, + default_quantity=args.default_quantity, + ) + _write_output(args, converted) + + +if __name__ == "__main__": + main() diff --git a/docs/designs/dynamic-access-and-billing/proposal.md b/docs/designs/dynamic-access-and-billing/proposal.md new file mode 100644 index 0000000000..f18eb564f5 --- /dev/null +++ b/docs/designs/dynamic-access-and-billing/proposal.md @@ -0,0 +1,401 @@ +# Proposal: Env-Backed Access Controls, Billing Settings, and Retention Split + +## Summary + +A typed access-controls layer loads code defaults, optionally applies +environment overrides, validates the result, and exposes accessor functions +to billing, entitlement checks, throttling, retention, and usage reporting. + +Code defaults remain the fallback. Operators change plans, plan copy, +entitlement values, roles, and per-domain retention periods by setting +environment variables and restarting the API process. Self-hosted operators +who only want a small tweak on the default plan use a partial overlay. + +This document was revised after implementation to reflect what shipped. +Code samples match the actual `env.py` field types (decoded JSON, not raw +strings). + +## Env Layout + +`env.py` carries the env-driven JSON decoded into Pydantic-typed dicts / +lists at startup. Downstream modules consume already-decoded structures and +never re-parse strings. + +```python +class AccessControls(BaseModel): + plans: dict | None = _load_json_env_dict("AGENTA_ACCESS_PLANS") + roles: dict | None = _load_json_env_dict("AGENTA_ACCESS_ROLES") + default_plan: str | None = ( + os.getenv("AGENTA_ACCESS_DEFAULT_PLAN") + or os.getenv("AGENTA_DEFAULT_PLAN") + or None + ) + default_plan_overlay: dict | None = _load_json_env_dict( + "AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY" + ) + + model_config = ConfigDict(extra="ignore") + + +class BillingSettings(BaseModel): + catalog: list | None = _load_json_env_list("AGENTA_BILLING_CATALOG") + pricing: dict | None = _load_json_env_dict("AGENTA_BILLING_PRICING") + trial_plan: str | None = os.getenv("AGENTA_BILLING_TRIAL_PLAN") or None + trial_days: int | None = _load_int_env("AGENTA_BILLING_TRIAL_DAYS") + + model_config = ConfigDict(extra="ignore") +``` + +`EnvironSettings` adds: + +```python +access_controls: AccessControls = AccessControls() +billing: BillingSettings = BillingSettings() +``` + +**Default plan location.** `AGENTA_ACCESS_DEFAULT_PLAN` lives under +`access_controls`, not `agenta`. The legacy `AGENTA_DEFAULT_PLAN` reads +through as a fallback — canonical name wins when both are set. Rationale: +the default plan is part of the access-controls surface (used at signup +even when Stripe is disabled). + +## Access Controls + +### `AGENTA_ACCESS_PLANS` + +JSON object keyed by plan slug. The set of keys is the effective plan +domain — every other plan reference (catalog, pricing, trial plan, default +plan, subscription rows) must point to one of these slugs. + +Each plan entry may define any subset of `flags`, `counters`, `gauges`, +`throttles`. A plan with no entitlements (or only a `description`) is +allowed; it represents a display-only / custom plan that enforces nothing +server-side. `fetch_usage` distinguishes "unknown plan" (404) from "plan +exists but enforces nothing" (empty usage map). + +Abbreviated example: + +```json +{ + "cloud_v0_pro": { + "description": "Production team plan.", + "counters": { + "traces": {"free": 50000, "monthly": true, "retention": 131040}, + "events": {"monthly": true}, + "credits": {"limit": 500, "free": 500, "monthly": true, "strict": true} + }, + "gauges": { + "users": {"limit": 5, "free": 5, "strict": true} + } + } +} +``` + +### `AGENTA_ACCESS_ROLES` + +JSON object keyed by scope (`organization`, `workspace`, `project`). Each +scope is a non-empty list of role entries. The `owner` and `viewer` minima +are platform-synthesized for every scope — overrides may add roles but +cannot redefine the minima. + +Example: + +```json +{ + "project": [ + { + "role": "reviewer", + "description": "Can inspect runs and annotate traces.", + "permissions": ["read_system", "view_evaluation_runs", "edit_annotations"] + } + ] +} +``` + +Project scope inherits the code-default `WorkspaceRole` extras +(`admin`/`developer`/`editor`/`annotator`) by default so existing +`project_members.role` values keep resolving to their historical permission +sets. Overriding the project scope replaces those extras (minima always +re-applied). + +If an operator wants the smaller "tweak one role" case without restating +the whole scope catalog, use `AGENTA_ACCESS_ROLES_OVERLAY` (below) instead. + +### `AGENTA_ACCESS_ROLES_OVERLAY` + +Partial role-catalog patch. Symmetric to +`AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY` for plans. + +Today the overlay accepts only the `project` scope key, and the patch is +applied to both `workspace` and `project` because they share the same +default role set in the code defaults. Setting `workspace` or +`organization` as a top-level key fails startup — silent ignore would +mislead operators. + +Each role-slug entry may set `permissions`, `description`, or both: + +- Slug exists on the scope: per-field replace (`permissions` swaps the + array; `description` swaps the string; fields not set are preserved). +- Slug does not exist: appended as a new role; both `permissions` and + `description` must be supplied. +- `owner` and `viewer` minima: rejected at startup (platform-managed). + +Example — add one new role to both scopes: + +```json +{ + "project": { + "auditor": { + "description": "Audit-only access.", + "permissions": ["read_system"] + } + } +} +``` + +### `AGENTA_ACCESS_DEFAULT_PLAN` + +Plan slug used at signup. Must be in the effective plan set if specified. +Validated at startup in `_build_settings()`. + +If unset: + +- Stripe enabled → `cloud_v0_hobby`. +- Stripe disabled → `self_hosted_enterprise`. + +Legacy `AGENTA_DEFAULT_PLAN` is still honored as a fallback read at the env +layer. + +### `AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY` + +Partial entitlement patch applied to the default plan only. Same top-level +keys and units as a plan entry in `AGENTA_ACCESS_PLANS`, with one +divergence: `throttles` is a map keyed by category slug (`"standard"`, +`"core_fast"`, …) instead of a list, so per-category patches don't require +restating the whole throttle list. + +Merge semantics: + +- `description` replaces. +- `flags` per-key replace. +- `counters` / `gauges` per-quota field merge (overlay keeps existing + `free`/`limit`/`monthly`/`strict` if not specified). Pass `null` to clear. +- `throttles[category]` looks up the existing single-category throttle on + the base plan and field-merges its `bucket`. Multi-category or + endpoint-keyed throttles can't be addressed via overlay — operators who + need that should use `AGENTA_ACCESS_PLANS`. + +Example — bump trace retention to 30 days (43200 minutes) and raise the +standard throttle rate without touching capacity: + +```json +{ + "counters": {"traces": {"retention": 43200}}, + "throttles": {"standard": {"bucket": {"rate": 7200}}} +} +``` + +## Billing Settings + +### `AGENTA_BILLING_CATALOG` + +JSON array of catalog entries served by `/billing/plans`. Each entry is +validated via the `_CatalogEntry` Pydantic model with `extra="allow"` — +operators may add fields that the frontend renders, but the required +fields (`title`, `description`, `type`, `features`) are enforced. + +`type` must be `"standard"` or `"custom"`. Entries with a `plan` field +must reference a slug in the effective plan set. + +### `AGENTA_BILLING_PRICING` + +JSON object keyed by plan slug. Each slug must be in the effective plan +set. At most one entry may carry `"free": true` (the downgrade/cancel +fallback). `stripe.line_items` is what Stripe checkout/subscription create +sees; `stripe.meters` maps `Counter`/`Gauge` slugs to per-meter price IDs +for usage reporting. + +Meter keys must be valid `Counter` or `Gauge` slugs (`users`, `traces`, +…) — typos fail startup. + +Example: + +```json +{ + "cloud_v0_hobby": {"free": true}, + "cloud_v0_pro": { + "stripe": { + "line_items": [{"price": "price_123", "quantity": 1}], + "meters": {"users": {"price": "price_users"}} + } + } +} +``` + +### Trial vars + +`AGENTA_BILLING_TRIAL_PLAN` and `AGENTA_BILLING_TRIAL_DAYS` must be set +together (or neither). Trial plan must be in the effective plan set; days +must be a positive integer. + +## Modules + +### `api/ee/src/core/entitlements/controls.py` + +The single runtime source of truth for plans + roles. Parses env at import +time and exposes: + +- `get_plans() / get_plan(slug) / get_plan_entitlements(slug) / get_plan_description(slug)` +- `get_roles(scope) / get_role(scope, slug) / get_role_permissions(scope, slug) / get_role_description(scope, slug)` +- `get_controls_hash()` — short hash of the effective controls, logged at + startup so multi-worker deployments can verify consistency. + +The overlay merge is applied here after the base plan map is built, before +the public dicts are frozen. + +### `api/ee/src/core/subscriptions/settings.py` + +Billing-mechanics accessors: + +- `get_catalog() / get_catalog_plan(slug)` +- `get_pricing() / get_pricing_plan(slug) / get_stripe_line_items(slug) / get_stripe_meter_price(plan, meter)` +- `get_free_plan() / get_trial_plan() / get_trial_days() / trial_enabled()` + +`_build_settings()` performs cross-cutting validation: catalog ⊆ +effective plans, pricing ⊆ effective plans, default plan ∈ effective plans, +free-plan fallback resolvable. + +### `api/ee/src/core/subscriptions/types.py` + +`get_default_plan()` reads `env.access_controls.default_plan` and falls +back to the Stripe-on/off code default. + +## Refactored Imports + +Direct imports of `CATALOG`, `ENTITLEMENTS`, `FREE_PLAN`, +`REVERSE_TRIAL_PLAN`, `REVERSE_TRIAL_DAYS` are gone from runtime code. +Constants in `entitlements/types.py` were renamed to `DEFAULT_CATALOG` / +`DEFAULT_ENTITLEMENTS` to signal their fallback role. + +The closed `Plan` enum is gone from subscription types; `SubscriptionDTO.plan` +is `str`. `WorkspaceRole` remains as a code-default seed but is no longer +used at API boundaries — response models use `str`, validation uses +`controls.get_role`. + +## Failure Behavior + +Invalid controls fail startup with a clear message: + +- Invalid JSON → fail. +- Empty object where non-empty required → fail. +- Unknown enum slugs (flag/counter/gauge/throttle category/permission) → + fail. +- Catalog or pricing referencing a plan not in the effective plan map → + fail. +- Multiple `"free": true` plans → fail. +- Trial: only one of `_TRIAL_PLAN`/`_TRIAL_DAYS` set → fail. +- Default plan not in effective set → fail. +- Free-plan fallback unreachable (no `"free": true` and `cloud_v0_hobby` + not in effective set) → fail. +- Overlay targeting a plan not in the effective set → fail. +- Overlay throttle category with no matching single-category throttle on + the base plan → fail. +- Reserved role slugs (`owner`, `viewer`) redefined → fail. +- Roles overlay with a top-level key other than `project` → fail. +- Roles overlay adding a new role without `permissions` → fail. + +## Retention Split + +Span retention used to live at `POST /admin/billing/usage/flush`. Billing +is not the right owner once events become retainable. Hard cut shipped: + +| Domain | Endpoint | Cron | Lock namespace | +| --- | --- | --- | --- | +| Spans | `POST /admin/spans/flush` | `crons/spans.sh` at `0,30 * * * *` | `spans:flush` | +| Events | `POST /admin/events/flush` | `crons/events.sh` at `7,37 * * * *` | `events:flush` | + +Spans and events are completely independent: separate DAOs +(`TracingDAO`, `EventsRetentionDAO`), separate services (`TracingService.flush_spans`, +`EventsRetentionService.flush_events`), separate routers +(`SpansAdminRouter`, `EventsAdminRouter`), separate cron files, separate +Redis locks. The two flushes can run concurrently. + +`Counter.EVENTS` is part of the entitlement system; the events flush job +walks the effective plan map and respects each plan's +`Counter.EVENTS.retention`. Defaults: `Quota(monthly=True)` on every plan +(no retention by default — events are kept forever unless an operator +opts in via overlay or full plan override). + +## Stripe Implications + +- `AGENTA_BILLING_CATALOG[].price` remains display/product pricing for + `/billing/plans`. +- `AGENTA_BILLING_PRICING[plan].stripe.line_items` drives Stripe checkout + and subscription switching. +- Stripe line items are optional for plans that aren't directly + purchasable (custom / self-hosted). +- Paid checkout/switch fails clearly if the selected plan has no Stripe + line items. +- Legacy `STRIPE_PRICING` / `AGENTA_PRICING` were removed. A converter + script (`migrate_stripe_pricing.py` in this folder) translates legacy + values to the new shape. + +## Organization Onboarding + +`AGENTA_ACCESS_DEFAULT_PLAN`, `AGENTA_BILLING_PRICING`, +`AGENTA_BILLING_TRIAL_PLAN`, and `AGENTA_BILLING_TRIAL_DAYS` are not +access definitions; they choose which effective plan slug is used during +signup, cancellation, and payment/trial flows. + +| Stripe enabled? | Trial configured? | Onboarding plan | +| --- | --- | --- | +| Yes | Yes | Reverse-trial on `AGENTA_BILLING_TRIAL_PLAN` for `_TRIAL_DAYS` days, then downgrade to free. | +| Yes | No | Direct onboarding on the free plan (`AGENTA_BILLING_PRICING` entry marked `"free": true`). | +| No | (ignored) | Direct onboarding on `get_default_plan()`. | + +## Security and Operations + +Treat `AGENTA_ACCESS_*` and `AGENTA_BILLING_*` as privileged deployment +controls — they affect enforcement and payment behavior, not just copy. + +- Store JSON in deployment secret management, not source-controlled env + files. +- Validate in staging before production. +- Restart all API workers and background workers after changes — each + process parses env at import time. +- Logs at startup include `[access-controls] plans=… roles=… overlay=… + hash=…` and `[billing-settings] catalog=… pricing=… free_plan=… + trial=…`. Grep across worker logs to verify all processes loaded the + same config. + +## Frontend Implications + +No frontend rebuild required for plan / catalog / role changes. + +- Runtime `Plan = string` in `web/ee/src/services/billing/types.d.ts`. + `DefaultPlan` enum kept for code-side conditionals only + (`plan === DefaultPlan.Hobby`). +- Role serialization widened to `str`; env-defined roles serialize cleanly + through `WorkspacePermission.role_name: str` and `InviteRequest.roles: + List[str]`. +- `/billing/plans` is cached for 10 minutes browser-side; expected + catch-up window after deployment. + +## Testing Strategy + +Implemented: + +- `test_access_controls.py` — parser-level unit tests for plans, roles, + and overlay merge. +- `test_controls_env_override.py` — subprocess-driven end-to-end env + override tests (plans, roles, catalog, pricing, trial, default plan, + overlay). +- `test_billing_settings.py` — catalog + pricing parsers, accessors in + defaults state. +- `test_billing_router.py` — billing handler behavior. +- `test_events_retention.py` — events flush service (plan iteration, + pagination, per-plan failure isolation). +- `test_admin_retention_routers.py` — spans + events admin endpoints + (lock namespaces, busy-lock skip, handler shape). + +EE unit suite: 133 tests, all passing. diff --git a/docs/designs/dynamic-access-and-billing/research.md b/docs/designs/dynamic-access-and-billing/research.md new file mode 100644 index 0000000000..1a81fd8764 --- /dev/null +++ b/docs/designs/dynamic-access-and-billing/research.md @@ -0,0 +1,308 @@ +# Research: Environment-Configured Plans and Entitlements + +## Goal + +Make plan slugs, entitlement limits, catalog copy, and role permissions +configurable without rebuilding the API/frontend image. If no environment +override exists, the product keeps using the code-defined defaults that +match prior behavior. + +A secondary goal that emerged during implementation: self-hosted operators +should be able to tweak individual values on the default plan (trace +retention, a throttle rate, one flag) without having to restate the entire +plan. That goal is served by `AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY`. + +## Pre-existing System + +Before this work, plan and entitlement controls were split across a few EE +modules with no env-driven layer: + +- `api/ee/src/core/subscriptions/types.py` + - Defined the `Plan` enum and the hard-coded constants + `FREE_PLAN = Plan.CLOUD_V0_HOBBY`, `REVERSE_TRIAL_PLAN = Plan.CLOUD_V0_PRO`, + `REVERSE_TRIAL_DAYS = 14`. + - Defined `get_default_plan()`, backed by `env.agenta.default_plan` / + `AGENTA_DEFAULT_PLAN`. +- `api/ee/src/core/entitlements/types.py` + - Defined typed entitlement keys: `Flag`, `Counter`, `Gauge`, `Tracker`, + `Quota`, `Throttle`. + - Defined `CATALOG` (now `DEFAULT_CATALOG`) and `ENTITLEMENTS` + (now `DEFAULT_ENTITLEMENTS`). +- `api/ee/src/apis/fastapi/billing/router.py` + - Imported `CATALOG` and `ENTITLEMENTS` directly. + - `GET /billing/plans` filtered `CATALOG`; `GET /billing/usage` read + limits from `ENTITLEMENTS`. + - Checkout and switching used the `Plan` enum and `env.stripe.pricing`. +- `api/ee/src/utils/entitlements.py`, `services/throttling_service.py`, + `core/tracing/service.py` — all imported `ENTITLEMENTS` directly. +- `api/ee/src/models/shared_models.py` + - Defined `WorkspaceRole` as a closed enum. + - Defined `Permission.default_permissions(role)` as the static + role-to-permission map. +- `web/ee/src/state/billing/atoms.ts` + - Fetched `/billing/plans` (cached 10 minutes). Frontend plan cards + already API-driven for title, description, price, features. + +Span retention ran via a single admin endpoint at +`POST /admin/billing/usage/flush` triggered by `crons/spans.sh`. + +## Environment Pattern + +The API centralizes environment settings in `api/oss/src/utils/env.py` via +the shared `env` object. The contributor guide requires new API env +variables to be added there; feature code avoids direct `os.getenv(...)`. + +Relevant existing nesting on `EnvironSettings`: + +- `env.stripe.*` (Stripe credentials) +- `env.agenta.*` (general Agenta config) +- new: `env.access_controls.*` (this work) +- new: `env.billing.*` (this work) + +All env-driven JSON is parsed at the env layer at process startup; downstream +modules consume already-decoded dicts/lists. + +## Important Distinctions + +There are three control surfaces: + +1. **Display catalog** (`/billing/plans` shape) — titles, descriptions, + feature bullets, prices, retention copy, `standard` vs `custom`. + Owned by **billing**. +2. **Enforced entitlements** — flags, counters, gauges, quotas, retention, + throttles. Owned by **access controls**. +3. **Workspace/project/organization roles** — slugs, descriptions, and + role-to-permission mappings. Owned by **access controls**. Permissions + themselves remain code-defined. + +Catalog and plans must agree on the effective plan slug set (otherwise the +UI advertises plans the server cannot enforce). Roles and plans are +independent: changing one does not affect the other. + +## Coupling and Constraints + +Plan identifiers were code-defined through the `Plan` enum living in +subscription types. That conflicted with the goal of runtime-defined plan +slugs. The shipped solution: + +- Plan identity moved to a string-based slug type in + `api/ee/src/core/entitlements/types.py` (with `DefaultPlan` enum kept as + code-default fallback). +- `AGENTA_ACCESS_PLANS` defines the effective plan set; validation checks + catalog and pricing references against that set, not against a Python enum. +- `subscriptions.types.SubscriptionDTO.plan: str` (no enum constraint), + validated at API boundaries against `get_plans()`. + +`env.stripe.pricing` (legacy `STRIPE_PRICING` / `AGENTA_PRICING`) was +dropped. Stripe line items now live under `AGENTA_BILLING_PRICING` next to +the display catalog. A converter script (`migrate_stripe_pricing.py` in +this folder) translates legacy values to the new shape. + +The frontend already consumes `/billing/plans`, so no rebuild is needed +for catalog changes. The 10-minute cache is unchanged; running browsers +catch up after at most one cache cycle. + +## Runtime Behavior + +JSON env vars are read once at process startup and validated immediately. +Restarting the API container picks up changes; no image rebuild needed. + +`controls.py` and `settings.py` parse env at import time. Mutating +`env.access_controls.*` / `env.billing.*` after import has no effect — +this is why tests use subprocesses to exercise overrides. + +If live mutation without process restart were ever required, env vars are +the wrong storage; a database or remote config service would be needed. + +## Shipped Override Surface + +### Access controls (`env.access_controls`) + +| Variable | Type | Purpose | +| --- | --- | --- | +| `AGENTA_ACCESS_PLANS` | JSON object | Plan slugs → entitlements (flags/counters/gauges/throttles). Effective plan set is the keys. | +| `AGENTA_ACCESS_ROLES` | JSON object | Scope → list of custom roles. `owner` and `viewer` minima always present. | +| `AGENTA_ACCESS_ROLES_OVERLAY` | JSON object | Per-role patch applied to workspace + project scopes (only `project` key accepted today). Add a single role or tweak an existing role's permissions/description without restating the catalog. | +| `AGENTA_ACCESS_DEFAULT_PLAN` | string | Plan slug assigned to new orgs on signup. Falls back to legacy `AGENTA_DEFAULT_PLAN`, then to a code default. | +| `AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY` | JSON object | Partial entitlement patch applied to the default plan only. Same shape as a plan entry except `throttles` is a category-keyed map. | + +### Billing settings (`env.billing`) + +| Variable | Type | Purpose | +| --- | --- | --- | +| `AGENTA_BILLING_CATALOG` | JSON array | Per-plan display metadata for `/billing/plans`. | +| `AGENTA_BILLING_PRICING` | JSON object | Stripe line items, per-meter price IDs, free-plan marker. | +| `AGENTA_BILLING_TRIAL_PLAN` | string | Plan slug for reverse-trial. | +| `AGENTA_BILLING_TRIAL_DAYS` | integer | Trial length in days. Both trial vars must be set together. | + +### Pydantic representation + +`env.access_controls.plans` is `dict | None`, `env.access_controls.roles` +is `dict | None`, `env.access_controls.default_plan_overlay` is +`dict | None`, `env.billing.catalog` is `list | None`, `env.billing.pricing` +is `dict | None`. JSON is decoded at the env layer; downstream modules +never re-parse strings. + +`AGENTA_ACCESS_DEFAULT_PLAN` reads canonical → legacy fallback: + +```python +default_plan: str | None = ( + os.getenv("AGENTA_ACCESS_DEFAULT_PLAN") + or os.getenv("AGENTA_DEFAULT_PLAN") + or None +) +``` + +Canonical wins if both are set. + +### Default-plan overlay + +Targets whatever `get_default_plan()` resolves to. Shape mirrors a plan +entry with one divergence: `throttles` is a map keyed by category slug so +per-category patches don't require restating the whole throttle list. + +Merge semantics: + +- `description` replaces. +- `flags` per-key replace. +- `counters` / `gauges` per-quota field merge (overlay keeps existing + `free`/`limit`/`monthly`/`strict` if not specified). +- `throttles[category]` looks up the existing single-category throttle and + field-merges its `bucket`. Multi-category or endpoint-keyed throttles + cannot be addressed via overlay — operators who need that use + `AGENTA_ACCESS_PLANS`. + +## Retention Job Split + +The original system had a single admin endpoint +(`POST /admin/billing/usage/flush`) that flushed spans only. As `events` +joined the entitlement system as a retainable counter, the endpoint moved +out of `billing` because retention is not a billing concern. + +Shipped layout: + +- `POST /admin/spans/flush` — calls `TracingService.flush_spans()`. + Triggered by `crons/spans.sh` at `0,30 * * * *`. Lock namespace + `spans:flush`. +- `POST /admin/events/flush` — calls + `EventsRetentionService.flush_events()`. Triggered by `crons/events.sh` + at `7,37 * * * *`. Lock namespace `events:flush`. + +Spans and events are completely independent retention domains: separate +DAOs, separate services, separate endpoints, separate crons, separate +Redis locks. The two flushes can run concurrently without blocking each +other. + +## Validation (Shipped Behavior) + +All validation runs at API startup; failures are fail-fast. + +### `AGENTA_ACCESS_PLANS` + +- Must be a non-empty JSON object. +- Plan map keys are non-empty unique slugs. +- Plan entries may be empty (display-only plans with no enforced + entitlements are allowed). +- Tracker names: `flags`, `counters`, `gauges`, `throttles`. +- Flag / counter / gauge keys must be valid `Flag` / `Counter` / `Gauge` + enum members. +- Throttles validated via Pydantic `Throttle` model (categories ∈ + `Category` enum; modes ∈ `Mode` enum). +- `description` is optional and operator-facing; user-facing descriptions + belong to the catalog. + +### `AGENTA_ACCESS_ROLES` + +- Must be a non-empty JSON object. +- Scopes ∈ `{organization, workspace, project}`. +- Each scope is a non-empty list of roles. +- Role slugs are non-empty and unique within a scope. +- Cannot redefine `owner` or `viewer` (platform synthesizes them). +- Each permission slug must exist in `Permission` (or be the wildcard `*`). + +### `AGENTA_ACCESS_DEFAULT_PLAN` + +- If set, must reference a slug in the effective plan map. Validated in + `subscriptions/settings.py` at startup. + +### `AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY` + +- Non-empty JSON object. +- Target plan slug must exist in the effective plan map. +- Each flag / counter / gauge / throttle category key validated upfront. +- Throttle overlay must match a single-category throttle on the base plan + (multi-category not supported via overlay). + +### `AGENTA_BILLING_CATALOG` + +- JSON array of entries. +- Each entry validated via Pydantic `_CatalogEntry`: required `title`, + `description`, `type`, `features`; optional `plan`, `price`, `retention`. +- `type` ∈ `{standard, custom}`. +- `extra="allow"` — operators may add fields the frontend renders directly. +- If `entry.plan` is set, it must exist in the effective plan map. + +### `AGENTA_BILLING_PRICING` + +- JSON object keyed by plan slug; every slug must be in the effective plan + map. +- At most one entry marked `"free": true`. +- `stripe.line_items` must be a list. +- `stripe.meters` keys must be valid `Counter` or `Gauge` slugs. +- Free plan derivation: pricing's `"free": true` entry → fallback to + `cloud_v0_hobby` only if it exists in the effective plan map (otherwise + startup fails). + +### Trial vars + +- `AGENTA_BILLING_TRIAL_PLAN` and `AGENTA_BILLING_TRIAL_DAYS` must be set + together (or both unset). +- Trial plan must be in the effective plan map. +- Trial days must be a positive integer. + +## Decisions Made During Implementation + +These weren't in the original research but emerged from `scan-codebase` / +`resolve-findings`: + +- **Project scope inherits the workspace role default extras.** The closed + `WorkspaceRole` enum used to be the read-side source for project member + permissions. After the refactor, `controls._default_roles()["project"]` + exposes the same set so existing `project_members.role` values + (`admin`/`developer`/`editor`/`annotator`) keep resolving to their + historical permission sets. Env overrides on the project scope replace + those extras (preserving the minima). +- **Description-only plans allowed.** `_PlanOverride` does not require any + of `flags`/`counters`/`gauges`/`throttles`. Display-only plans (custom / + self-hosted) with empty entitlement maps are valid. `fetch_usage` + distinguishes "unknown plan" (`None` → 404) from "plan exists but + enforces nothing" (`{}` → empty usage object). +- **Free-plan fallback validated.** When `AGENTA_BILLING_PRICING` has no + `"free": true` entry, `get_free_plan()` falls back to `cloud_v0_hobby` + only if it exists in the effective plan map; otherwise the API refuses + to start (FIND-005). +- **`get_default_plan()` validated against effective plan set** at startup + (FIND-006). +- **Default plan moved out of `env.agenta`.** Previously + `env.agenta.default_plan`; now `env.access_controls.default_plan` since + it's part of the access-controls surface (used even when Stripe is + disabled). +- **`Counter.EVENTS` added.** Events are not metered today (no write-path + hop), but the retention dimension applies. Default `Quota(monthly=True)` + on every plan — no retention by default to match pre-change behavior. +- **Throttle middleware falls back to free-plan throttles** for unknown + plans instead of letting requests through unthrottled (FIND-013). + +## Frontend Implications + +No frontend rebuild required for catalog or plan-slug changes. The +runtime `Plan` union widened to `string` ([web/ee/src/services/billing/types.d.ts](../../../web/ee/src/services/billing/types.d.ts)); +the `DefaultPlan` enum is preserved only for code-side conditionals +(`plan === DefaultPlan.Hobby` etc.). + +Role serialization widened too: response models use `str` instead of the +closed `WorkspaceRole` enum, so env-defined custom roles serialize +cleanly. + +The browser-side 10-minute cache on `/billing/plans` means catalog changes +take up to that long to appear in running tabs. diff --git a/docs/designs/dynamic-access-and-billing/tasks.md b/docs/designs/dynamic-access-and-billing/tasks.md new file mode 100644 index 0000000000..b5efbf9506 --- /dev/null +++ b/docs/designs/dynamic-access-and-billing/tasks.md @@ -0,0 +1,187 @@ +# Tasks: Env-Backed Plans and Entitlements + +Status: complete. All initial tasks shipped; the post-initial sections +record work that emerged after `scan-codebase` / `triage-findings` / +`resolve-findings` and user-driven design changes. + +## Controls Surface (initial) + +- [x] Replace the closed `Plan` enum in `api/ee/src/core/subscriptions/types.py` with a runtime-valid plan slug type. +- [x] Move code-default plan slugs into `api/ee/src/core/entitlements/types.py` (`DefaultPlan` enum, used as fallback only). +- [x] Update subscription, billing, throttling, and client imports to use the access plan slug type. +- [x] Add `AccessControls` to `api/oss/src/utils/env.py`. +- [x] Add `AGENTA_ACCESS_PLANS`. +- [x] Add `AGENTA_ACCESS_ROLES`. +- [x] Add billing settings to `api/oss/src/utils/env.py`. +- [x] Add `AGENTA_BILLING_CATALOG`. +- [x] Move Stripe line items from `STRIPE_PRICING` / `AGENTA_PRICING` to `AGENTA_BILLING_PRICING` and remove legacy usage from `StripeConfig`. +- [x] Add support for a free-plan marker in `AGENTA_BILLING_PRICING`. +- [x] Add `AGENTA_BILLING_TRIAL_PLAN`. +- [x] Add `AGENTA_BILLING_TRIAL_DAYS`. +- [x] Preserve current default-plan loading and fallback behavior (Stripe-on/off code fallback). + +## Access and Billing Builders (initial) + +- [x] Create `api/ee/src/core/entitlements/controls.py` for access controls. +- [x] Create billing settings helpers in `api/ee/src/core/subscriptions/settings.py`. +- [x] Define Pydantic models for plans (`_PlanOverride`), catalog entries (`_CatalogEntry`), roles (`_RoleOverride`). +- [x] Implement startup parsing of `env.billing.catalog`, `env.billing.pricing`, `env.access_controls.plans`, `env.access_controls.roles`. +- [x] Implement fallback to code defaults when catalog/pricing/plans JSON env vars are absent or empty. +- [x] Implement validation that env overrides provide consistent catalog, pricing, and plans. +- [x] Implement derivation of effective plan slugs from plan map keys. +- [x] Implement validation that catalog plan slugs exist in the effective plans map. +- [x] Expose `get_plans()`. +- [x] Expose `get_plan(slug)`. +- [x] Expose `get_plan_entitlements(slug)`. +- [x] Expose `get_plan_description(slug)`. +- [x] Expose `get_roles(scope)`. +- [x] Expose `get_role(scope, slug)`. +- [x] Expose `get_role_permissions(scope, slug)`. +- [x] Expose `get_role_description(scope, slug)`. +- [x] Add billing settings accessors: `get_catalog()`, `get_catalog_plan(slug)`, `get_pricing()`, `get_pricing_plan(slug)`, `get_stripe_line_items(slug)`, `get_stripe_meter_price(plan, meter)`, `get_free_plan()`, `get_trial_plan()`, `get_trial_days()`, `trial_enabled()`. +- [x] Keep `get_default_plan()` (now reads from `env.access_controls.default_plan` — see post-initial section). +- [x] Log whether defaults or env overrides are active with a stable controls hash. + +## Runtime Refactor (initial) + +- [x] Update `api/ee/src/apis/fastapi/billing/router.py` to use billing `get_catalog()` and access-control `get_plan_entitlements()`. +- [x] Update `api/ee/src/utils/entitlements.py` to use `get_plan_entitlements()`. +- [x] Update `api/ee/src/services/throttling_service.py` to use `get_plan_entitlements()`. +- [x] Update `api/ee/src/core/tracing/service.py` to use `get_plan_entitlements()` via `get_plans()` iteration. +- [x] Update `api/ee/src/core/entitlements/service.py` to use controls accessors. +- [x] Update `api/ee/src/core/subscriptions/service.py` to use billing `get_free_plan()`, `get_trial_plan()`, `get_trial_days()`. +- [x] Update `WorkspaceRole` runtime usage to accept access-control role slugs instead of a closed enum. +- [x] Update `Permission.default_permissions(role)` callers to use `get_role_permissions(scope, role)`. +- [x] Update `WorkspaceRole.get_description(role)` callers to use `get_role_description(scope, role)`. +- [x] Update role discovery APIs to return `get_roles()`. +- [x] Keep code defaults for catalog/plans/roles as the no-env fallback. + +## Tests (initial) + +- [x] Controls unit tests for no env override. +- [x] Integration-style settings tests for catalog/plans/pricing override (subprocess-driven). +- [x] Settings tests proving catalog-only override fails validation. +- [x] Settings tests proving plans-only override fails validation when billing catalog/pricing is required. +- [x] Controls unit tests for invalid JSON. +- [x] Controls unit tests for duplicate/empty plan slugs. +- [x] Controls unit tests for catalog referencing a plan missing from plans. +- [x] Controls unit tests for invalid tracker/key. +- [x] Billing settings unit tests for free/trial env behavior. +- [x] Controls unit tests for roles env override. +- [x] Controls unit tests for roles env override with unknown permission. +- [x] Controls unit tests for duplicate/empty role slugs. +- [x] Controls unit tests for required owner/default role behavior. +- [x] Billing router tests proving `/billing/plans` returns overridden catalog data (via subprocess override tests). +- [x] Checkout/switch tests proving Stripe line items are read from `AGENTA_BILLING_PRICING`. +- [x] Checkout/switch tests proving paid plans without Stripe line items fail clearly. +- [x] Usage tests proving limits come from effective entitlements. +- [x] Access tests proving role discovery and member serialization use effective roles. + +## Frontend and Docs (initial) + +- [x] Change frontend runtime billing plan fields to string plan slugs while keeping `DefaultPlan` constants for known default plans. +- [x] Change frontend runtime role fields to string role slugs. +- [x] Confirm the pricing modal handles overridden catalog fields without layout or behavior regressions. +- [x] Document `AGENTA_BILLING_CATALOG`, `AGENTA_BILLING_PRICING`, `AGENTA_ACCESS_PLANS`, `AGENTA_ACCESS_ROLES` with examples in + [docs/docs/self-host/04-dynamic-access-controls.mdx](../../docs/self-host/04-dynamic-access-controls.mdx) + and + [docs/docs/self-host/05-dynamic-billing-settings.mdx](../../docs/self-host/05-dynamic-billing-settings.mdx). +- [x] Document the catalog/pricing split. +- [x] Document restart requirements for API and worker processes. + +## Findings Resolution (post-scan) + +`scan-codebase` surfaced 13 findings against the initial implementation +([findings.md](findings.md)). All resolved on this branch: + +- [x] FIND-001 — `WorkspacePermission.role_name: str` (response models opened). +- [x] FIND-002 — project scope mirrors workspace role default extras. +- [x] FIND-003 — `workspace_router.update_user_roles` validates via `get_role("workspace", slug)`. +- [x] FIND-004 — `db_manager_ee.get_all_workspace_roles` and `workspace_manager.get_all_workspace_roles` return `get_roles("workspace")`. +- [x] FIND-005 — `get_free_plan()` fallback validated against effective plan set; fails startup when unreachable. +- [x] FIND-006 — `get_default_plan()` validated against effective plan set at startup. +- [x] FIND-007 — admin `start_plan` validates plan via `get_plans()`. +- [x] FIND-008 — `AGENTA_BILLING_PRICING.stripe.meters` keys validated against `Counter` / `Gauge` enums. +- [x] FIND-009 — `_CatalogEntry` Pydantic model with required fields + `type ∈ {standard, custom}`. +- [x] FIND-010 — migration comments call out the operator constraint on `cloud_v0_hobby`; FIND-005 guard catches mismatches at startup. +- [x] FIND-011 — plans with only a `description` (or empty entry) allowed; `fetch_usage` distinguishes unknown plan vs. empty entitlements. +- [x] FIND-012 — closed as `wontfix`. Workspace `viewer` minima permissions are code-fixed by design and documented. +- [x] FIND-013 — throttle middleware falls back to free-plan throttles on unknown plans. + +## Default-Plan Relocation + Overlay (post-initial) + +User-driven design change: ergonomic per-knob tweaks for self-hosted +operators without requiring full plan overrides. + +- [x] Move `default_plan` from `env.agenta` to `env.access_controls`. +- [x] Canonical env var name: `AGENTA_ACCESS_DEFAULT_PLAN`. +- [x] Preserve legacy `AGENTA_DEFAULT_PLAN` as fallback read (canonical wins). +- [x] Update all readers (`subscriptions/types.py`, `subscriptions/settings.py`, `controls.py`). +- [x] Add `AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY` to `env.py`. +- [x] Define `_DefaultPlanOverlay` Pydantic model in `controls.py`. +- [x] Implement quota field-merge (`_merge_quota`). +- [x] Implement throttle field-merge keyed by category (`_merge_throttle`, throttles-as-map shape). +- [x] Apply overlay after base plan map is built; validate target plan and throttle-category presence. +- [x] Tests for overlay parse + apply (unit) and end-to-end env wiring (subprocess). +- [x] Document overlay shape, merge semantics, and examples in + [docs/docs/self-host/04-dynamic-access-controls.mdx](../../docs/self-host/04-dynamic-access-controls.mdx). + +## Events Counter + Retention Split (post-initial) + +User-driven design change: events become a retainable domain; retention +moves out of billing. + +- [x] Add `Counter.EVENTS` to `entitlements/types.py`. +- [x] Add default `Quota(monthly=True)` (no retention) to all seven plans in `DEFAULT_ENTITLEMENTS`. +- [x] Add `Counter.EVENTS` to `CONSTRAINTS[Constraint.READ_ONLY]`. +- [x] New `EventsRetentionDAO` at `api/ee/src/dbs/postgres/events/dao.py` (independent from OSS `EventsDAO`). +- [x] New `EventsRetentionService.flush_events` at `api/ee/src/core/events/retention.py`. +- [x] New admin router `EventsAdminRouter` at `api/ee/src/apis/fastapi/events/router.py` → `POST /admin/events/flush`. +- [x] Split spans admin handler out of `BillingRouter` into `SpansAdminRouter` at `api/ee/src/apis/fastapi/spans/router.py` → `POST /admin/spans/flush`. +- [x] Hard cut on `POST /admin/billing/usage/flush` (no compat shim). +- [x] Drop `tracing_service` constructor arg from `BillingRouter`. +- [x] Mount two new admin routers in `ee/src/main.py`. +- [x] Update `crons/spans.sh` URL to `/admin/spans/flush`. +- [x] New `crons/events.sh` + `crons/events.txt` (schedule `7,37 * * * *`, offset from spans `0,30` and meters `15,45`). +- [x] Dockerfile updates (`Dockerfile.dev`, `Dockerfile.gh`) to COPY + chmod the new files. +- [x] `docker-compose.dev.yml` volume mount for `events.sh`. +- [x] Tests: `test_events_retention.py` (service logic), `test_admin_retention_routers.py` (lock + handler). +- [x] Doc updates: + - [docs/designs/data-retention/README.md](../data-retention/README.md) + - [docs/designs/data-retention/data-retention-periods.initial.specs.md](../data-retention/data-retention-periods.initial.specs.md) + - [docs/design/ee-self-hosting/research.md](../../design/ee-self-hosting/research.md) + - [docs/openapi-cleanup/endpoints.md](../../openapi-cleanup/endpoints.md) + - [docs/docs/self-host/04-dynamic-access-controls.mdx](../../docs/self-host/04-dynamic-access-controls.mdx) (events counter row) + +## Roles Overlay (post-initial) + +User-driven design change: symmetric overlay for the role catalog so +operators can tweak a single existing role (e.g. give `editor` one +extra permission) or add a single new role without restating the full +`AGENTA_ACCESS_ROLES` payload. + +- [x] Rename "legacy extras" → "default extras" everywhere (terminology + cleanup — the workspace roles are code defaults, not legacy). +- [x] Add `AGENTA_ACCESS_ROLES_OVERLAY` field to `env.access_controls`. +- [x] Define `_RoleOverlayEntry` Pydantic model in `controls.py`. +- [x] Implement `_parse_roles_overlay` (only `project` key accepted; rejects + reserved minima slugs; validates permissions). +- [x] Implement `_apply_roles_overlay` (patches both workspace and project + scopes from the same `project` payload; per-field replace for existing + roles; appends new roles when both fields supplied). +- [x] Wire into `_build_controls`; log `roles_overlay=env|none` at startup. +- [x] Tests: parser unit tests + apply unit tests + subprocess env-wired + end-to-end tests (16 new tests). +- [x] Doc updates: + - [docs/docs/self-host/02-configuration.mdx](../../docs/self-host/02-configuration.mdx) (table row). + - [docs/docs/self-host/04-dynamic-access-controls.mdx](../../docs/self-host/04-dynamic-access-controls.mdx) (new section with shape, merge table, examples). +- [x] Env example files updated: + - [hosting/docker-compose/ee/env.ee.dev.example](../../../hosting/docker-compose/ee/env.ee.dev.example) + - [hosting/docker-compose/ee/env.ee.gh.example](../../../hosting/docker-compose/ee/env.ee.gh.example) + +## Validation + +- [x] `ruff format` clean. +- [x] `ruff check` clean. +- [x] EE unit suite green (156 tests). +- [ ] Full unit/integration/acceptance suites in `api`, `sdk`, `services`, `web` — run manually by the maintainer. diff --git a/docs/docs/reference/api/agenta-api.info.mdx b/docs/docs/reference/api/agenta-api.info.mdx index 58352cf7f3..82387808f4 100644 --- a/docs/docs/reference/api/agenta-api.info.mdx +++ b/docs/docs/reference/api/agenta-api.info.mdx @@ -22,7 +22,6 @@ import Export from "@theme/ApiExplorer/Export"; diff --git a/docs/docs/reference/api/call-tool.api.mdx b/docs/docs/reference/api/call-tool.api.mdx index 1effe7bf85..22a7a34474 100644 --- a/docs/docs/reference/api/call-tool.api.mdx +++ b/docs/docs/reference/api/call-tool.api.mdx @@ -47,9 +47,7 @@ Call a tool action with a connection. Request - + diff --git a/docs/docs/reference/api/cancel-plan.api.mdx b/docs/docs/reference/api/cancel-plan.api.mdx index 764f39b644..9a9703c813 100644 --- a/docs/docs/reference/api/cancel-plan.api.mdx +++ b/docs/docs/reference/api/cancel-plan.api.mdx @@ -39,9 +39,7 @@ import Translate from "@docusaurus/Translate"; Cancel Subscription User Route - + diff --git a/docs/docs/reference/api/close-runs.api.mdx b/docs/docs/reference/api/close-runs.api.mdx index e04738b92e..6bb819a207 100644 --- a/docs/docs/reference/api/close-runs.api.mdx +++ b/docs/docs/reference/api/close-runs.api.mdx @@ -47,9 +47,7 @@ Close Runs Request - + diff --git a/docs/docs/reference/api/commit-application-revision.api.mdx b/docs/docs/reference/api/commit-application-revision.api.mdx index c228362769..04d12243c3 100644 --- a/docs/docs/reference/api/commit-application-revision.api.mdx +++ b/docs/docs/reference/api/commit-application-revision.api.mdx @@ -52,9 +52,7 @@ See [Versioning](/reference/api-guide/versioning#committing-a-revision). Request - + diff --git a/docs/docs/reference/api/commit-environment-revision.api.mdx b/docs/docs/reference/api/commit-environment-revision.api.mdx index 9f895a4051..599b52852d 100644 --- a/docs/docs/reference/api/commit-environment-revision.api.mdx +++ b/docs/docs/reference/api/commit-environment-revision.api.mdx @@ -47,9 +47,7 @@ Commit Environment Revision Request - + diff --git a/docs/docs/reference/api/commit-evaluator-revision.api.mdx b/docs/docs/reference/api/commit-evaluator-revision.api.mdx index afb6e85ec7..e650a05537 100644 --- a/docs/docs/reference/api/commit-evaluator-revision.api.mdx +++ b/docs/docs/reference/api/commit-evaluator-revision.api.mdx @@ -51,9 +51,7 @@ schemas, parameters). A committed revision is immutable. Request - + diff --git a/docs/docs/reference/api/commit-query-revision.api.mdx b/docs/docs/reference/api/commit-query-revision.api.mdx index 905fdb9619..39a2415e3f 100644 --- a/docs/docs/reference/api/commit-query-revision.api.mdx +++ b/docs/docs/reference/api/commit-query-revision.api.mdx @@ -47,9 +47,7 @@ Commit Query Revision Request - + diff --git a/docs/docs/reference/api/commit-testset-revision.api.mdx b/docs/docs/reference/api/commit-testset-revision.api.mdx index 82762a65ce..59c1f54d01 100644 --- a/docs/docs/reference/api/commit-testset-revision.api.mdx +++ b/docs/docs/reference/api/commit-testset-revision.api.mdx @@ -47,9 +47,7 @@ Commit Testset Revision Request - + diff --git a/docs/docs/reference/api/configs-fetch-variants-configs-fetch-post.api.mdx b/docs/docs/reference/api/configs-fetch-variants-configs-fetch-post.api.mdx index d5ff3c69cf..cec41797d4 100644 --- a/docs/docs/reference/api/configs-fetch-variants-configs-fetch-post.api.mdx +++ b/docs/docs/reference/api/configs-fetch-variants-configs-fetch-post.api.mdx @@ -35,7 +35,7 @@ import Translate from "@docusaurus/Translate"; -:::caution deprecated +:::caution[deprecated] This endpoint has been deprecated and may be replaced or removed in future versions of the API. @@ -51,9 +51,7 @@ Configs Fetch Request - + diff --git a/docs/docs/reference/api/create-accounts-admin-accounts-post.api.mdx b/docs/docs/reference/api/create-accounts-admin-accounts-post.api.mdx index de9cca943b..66bdd0b072 100644 --- a/docs/docs/reference/api/create-accounts-admin-accounts-post.api.mdx +++ b/docs/docs/reference/api/create-accounts-admin-accounts-post.api.mdx @@ -47,9 +47,7 @@ Create accounts Request - + diff --git a/docs/docs/reference/api/create-annotation.api.mdx b/docs/docs/reference/api/create-annotation.api.mdx index 34b60044ce..576a4da2f2 100644 --- a/docs/docs/reference/api/create-annotation.api.mdx +++ b/docs/docs/reference/api/create-annotation.api.mdx @@ -47,9 +47,7 @@ Create Annotation Request - + diff --git a/docs/docs/reference/api/create-api-key-admin-simple-accounts-api-keys-post.api.mdx b/docs/docs/reference/api/create-api-key-admin-simple-accounts-api-keys-post.api.mdx index 88fe71476a..c80db049d1 100644 --- a/docs/docs/reference/api/create-api-key-admin-simple-accounts-api-keys-post.api.mdx +++ b/docs/docs/reference/api/create-api-key-admin-simple-accounts-api-keys-post.api.mdx @@ -47,9 +47,7 @@ Create API keys Request - + diff --git a/docs/docs/reference/api/create-api-key.api.mdx b/docs/docs/reference/api/create-api-key.api.mdx index e7be818300..92fd08fa7d 100644 --- a/docs/docs/reference/api/create-api-key.api.mdx +++ b/docs/docs/reference/api/create-api-key.api.mdx @@ -45,9 +45,7 @@ Args: Returns: str: The created API key. - + diff --git a/docs/docs/reference/api/create-application-revision.api.mdx b/docs/docs/reference/api/create-application-revision.api.mdx index e8d159d05d..c2d1a797b1 100644 --- a/docs/docs/reference/api/create-application-revision.api.mdx +++ b/docs/docs/reference/api/create-application-revision.api.mdx @@ -51,9 +51,7 @@ as the variant's tip and assigns a version number. Request - + diff --git a/docs/docs/reference/api/create-application-variant.api.mdx b/docs/docs/reference/api/create-application-variant.api.mdx index e16d113cd7..da86c75f10 100644 --- a/docs/docs/reference/api/create-application-variant.api.mdx +++ b/docs/docs/reference/api/create-application-variant.api.mdx @@ -52,9 +52,7 @@ you want the new variant to inherit an existing revision history. Request - + diff --git a/docs/docs/reference/api/create-checkout.ParamsDetails.json b/docs/docs/reference/api/create-checkout.ParamsDetails.json index bbb4259c61..2f8c628121 100644 --- a/docs/docs/reference/api/create-checkout.ParamsDetails.json +++ b/docs/docs/reference/api/create-checkout.ParamsDetails.json @@ -1 +1 @@ -{"parameters":[{"name":"plan","in":"query","required":true,"schema":{"type":"string","enum":["cloud_v0_hobby","cloud_v0_pro","cloud_v0_business","cloud_v0_humanity_labs","cloud_v0_x_labs","cloud_v0_agenta_ai","self_hosted_enterprise"],"title":"Plan"}},{"name":"success_url","in":"query","required":true,"schema":{"type":"string","title":"Success Url"}}]} \ No newline at end of file +{"parameters":[{"name":"plan","in":"query","required":true,"schema":{"type":"string","title":"Plan"}},{"name":"success_url","in":"query","required":true,"schema":{"type":"string","title":"Success Url"}}]} \ No newline at end of file diff --git a/docs/docs/reference/api/create-checkout.api.mdx b/docs/docs/reference/api/create-checkout.api.mdx index 4fb010e662..8f261a9a06 100644 --- a/docs/docs/reference/api/create-checkout.api.mdx +++ b/docs/docs/reference/api/create-checkout.api.mdx @@ -5,7 +5,7 @@ description: "Create Checkout User Route" sidebar_label: "Create Checkout User Route" hide_title: true hide_table_of_contents: true -api: eJy1VU1r20AQ/StiTi2IyA096VQ3LSSkJSYfvQRjxquxtclKu91dhbhm/3uZXcmW6yTQQk+J5nvfezPegse1g/IePkulZLuGeQ7akEUvdXtRQQnCEnpaiJrEo+485GDQYkOeLCduocWGoASjsIUcZAsl/OzIbiAHSz87aamC0tuOcnCipgah3ILfGE5y3nLTHKjtGh5DKN1Vi6fJotbLJZfYGYzV489l52RLzo1tdddgK/1moXB54Hg+suCaWo8LlJCDI7Va1Np5qhbUerLGSkeMhJde8ZgzflsI+e6xrhOCnFt0Vv37m4fqN6lYdmcVhDDnEs7o1pHjrNPJhP9U5ISVhmnZp6w6lV33wfw63XpqPYejMUqKyGLx4Dhnu58khBBy+Hh6elz4BypZxbTsq7Xa/kVVMJaV42WauyKPUvF/0lPjjgOUFgdebDdXq6ioQ6AY9t4iW09rshDmIR9saC1uRmh+02lACDk0bv0W8N/JOVwT7Iq9HhrByG7ZG5hw00VABvdFNIQchH8eldHLBxJ+VOaMsXz2rKWjmL1w7iM2afw+biTGPUWJodeh+JIoeKnZEHJ+ezs7Kpj0cSiMs3gGsrP+DGR3jmx2rTvPwmvI15qPhdEuXQhfQwnFMh2VguE0VAw3xBVx6+zTcEJ4jUoo0MjIdvqsvTdlUSgtUPF2JvecM0Vnpd/E1Ons4pI254QVWSjv5+OAG5ZmEtth2I4gNPKSGLJ+r6edr7WVv5KC+s2uU1aIxK/0mPdpPCPZdHYBfwJ24OIdQhElM3SKbshHj3VlUaS7dIKSIaImbhB4wubTzsOEM3KpzeTkw8mETQx9g+2oxZuUHQy7w4PFWRiFMq5PHG3bs3kPPZvMXeST3zUwCjmwRpknDt1ul+jozqoQ2JxuI9NVSYdLxSJfoXJ0NMfu2MC7634f3meQvzzfI232PzxPqDoOiQr6D20OT/6+25w/rOR2UX/5oBd+bkqdCkHGj7KO7ihX2S3R7OrmFkL4DckAmFk= +api: eJy1VFtr2zAU/ivmPG0g6qzsyU/LukFDNxradC8hFEU5idXKlirJZZnRfx9HshN7aQtj7Cnx0bnpu6gFz3cOiiV8lkrJegcrBtqg5V7qeraBAoRF7vFelCgedeOBgeGWV+jRUmELNa8QCjCK18BA1lDAU4N2DwwsPjXS4gYKbxtk4ESJFYeiBb83VOS8paEMvPSKAnPqEgI7tHWNEOjcfWPVv3e/Tc2yO6sghBW1cEbXDh1VnU8m9LNBJ6w0BMCxZNuo7KZLBgZC1x5rT+ncGCVFxCt/cFTTHjcJIQQGH8/PTxv/4EpuYln21Vpt/6IrGEsceZn23qDnUtE/6bFypwlKi9Epr/fX28jdGCiCvYvI2uMOLYRVYH2MW8v3AzS/6bQgBAaV270F/Hd0ju8QDs1eT41gZAs6DUS4aSIg/fEsBgID4X8O2uj1Awo/aHNBWP70pKWTnKNwlhGbtH6Xtzr2OFKUGHodii+JgpeG9SmXi8X8pGHSx1gYF9Fw2UVnuOzOoc1udONJeBX6UpMtjXbJi76EAvJ1sm9OcBrMe7e6HBg4tM+9WclGBeTcyMh2+iy9N0WeKy24KrXz6XhFlaKx0u9j6XQ+u8L9JfINWiiWq2HCLUkziW2cdiCIG3mFBFnn62njS23lr6SgztllqgqR+K0e8j7dYe15Np3P4E/ARkfkIS6iZPpJ8RjY4LKuyHMew2dcEkRYRQeBR159OpwQ4YRcGjM5+3A2oRBBX/F6MOJNykbLHvAgceZGcRntE1drOzaX0LFJ3EU+6V49o8CANEo8UWrbrrnDO6tCoHB6G4mujXR8rUjkW64cnuxxeGzg3U3nh/cZsJf3e8T98Yl/5qqhlKig/zBm/OQfp63ow0oaF/XHer3QdVPpVAg0flB18o5Sl4OJ5te3CwjhN7D5Yfk= sidebar_class_name: "post api-method" info_path: reference/api/agenta-api custom_edit_url: null diff --git a/docs/docs/reference/api/create-environment-revision.api.mdx b/docs/docs/reference/api/create-environment-revision.api.mdx index 38a01145ec..03600c1f7f 100644 --- a/docs/docs/reference/api/create-environment-revision.api.mdx +++ b/docs/docs/reference/api/create-environment-revision.api.mdx @@ -47,9 +47,7 @@ Create Environment Revision Request - + diff --git a/docs/docs/reference/api/create-environment-variant.api.mdx b/docs/docs/reference/api/create-environment-variant.api.mdx index 924aab1f71..f2cc5a3c21 100644 --- a/docs/docs/reference/api/create-environment-variant.api.mdx +++ b/docs/docs/reference/api/create-environment-variant.api.mdx @@ -47,9 +47,7 @@ Create Environment Variant Request - + diff --git a/docs/docs/reference/api/create-evaluator-revision.api.mdx b/docs/docs/reference/api/create-evaluator-revision.api.mdx index 5b00ea038f..a30b5dc2a6 100644 --- a/docs/docs/reference/api/create-evaluator-revision.api.mdx +++ b/docs/docs/reference/api/create-evaluator-revision.api.mdx @@ -51,9 +51,7 @@ to insert a revision without the commit semantics. Request - + diff --git a/docs/docs/reference/api/create-evaluator-variant.api.mdx b/docs/docs/reference/api/create-evaluator-variant.api.mdx index 4a1c1f80d8..c347d60e43 100644 --- a/docs/docs/reference/api/create-evaluator-variant.api.mdx +++ b/docs/docs/reference/api/create-evaluator-variant.api.mdx @@ -51,9 +51,7 @@ See the Versioning guide. Request - + diff --git a/docs/docs/reference/api/create-folder.api.mdx b/docs/docs/reference/api/create-folder.api.mdx index b36d78e5f7..121e951dd0 100644 --- a/docs/docs/reference/api/create-folder.api.mdx +++ b/docs/docs/reference/api/create-folder.api.mdx @@ -54,9 +54,7 @@ within the project, otherwise the call returns `409`. Passing a Request - + diff --git a/docs/docs/reference/api/create-invocation.api.mdx b/docs/docs/reference/api/create-invocation.api.mdx index e0eaad37e7..6eb51c32b6 100644 --- a/docs/docs/reference/api/create-invocation.api.mdx +++ b/docs/docs/reference/api/create-invocation.api.mdx @@ -47,9 +47,7 @@ Create Invocation Request - + diff --git a/docs/docs/reference/api/create-metrics.api.mdx b/docs/docs/reference/api/create-metrics.api.mdx index 90701f1f68..df51f00772 100644 --- a/docs/docs/reference/api/create-metrics.api.mdx +++ b/docs/docs/reference/api/create-metrics.api.mdx @@ -47,9 +47,7 @@ Create Metrics Request - + diff --git a/docs/docs/reference/api/create-organization-admin-simple-accounts-organizations-post.api.mdx b/docs/docs/reference/api/create-organization-admin-simple-accounts-organizations-post.api.mdx index 84c532ece3..e9ed98f68c 100644 --- a/docs/docs/reference/api/create-organization-admin-simple-accounts-organizations-post.api.mdx +++ b/docs/docs/reference/api/create-organization-admin-simple-accounts-organizations-post.api.mdx @@ -47,9 +47,7 @@ Create organizations Request - + diff --git a/docs/docs/reference/api/create-organization-domain.api.mdx b/docs/docs/reference/api/create-organization-domain.api.mdx index 2a96fa249c..3078cd0a27 100644 --- a/docs/docs/reference/api/create-organization-domain.api.mdx +++ b/docs/docs/reference/api/create-organization-domain.api.mdx @@ -54,9 +54,7 @@ The user must add a DNS TXT record to verify ownership. Request - + diff --git a/docs/docs/reference/api/create-organization-membership-admin-simple-accounts-organizations-memberships-post.api.mdx b/docs/docs/reference/api/create-organization-membership-admin-simple-accounts-organizations-memberships-post.api.mdx index 42b500e94f..ac31cb7534 100644 --- a/docs/docs/reference/api/create-organization-membership-admin-simple-accounts-organizations-memberships-post.api.mdx +++ b/docs/docs/reference/api/create-organization-membership-admin-simple-accounts-organizations-memberships-post.api.mdx @@ -47,9 +47,7 @@ Create organization memberships Request - + diff --git a/docs/docs/reference/api/create-organization-provider.api.mdx b/docs/docs/reference/api/create-organization-provider.api.mdx index 63a3239052..f148c9a068 100644 --- a/docs/docs/reference/api/create-organization-provider.api.mdx +++ b/docs/docs/reference/api/create-organization-provider.api.mdx @@ -51,9 +51,7 @@ Supported provider types: Request - + diff --git a/docs/docs/reference/api/create-organization.api.mdx b/docs/docs/reference/api/create-organization.api.mdx index 8b05b97843..0a35dfe95e 100644 --- a/docs/docs/reference/api/create-organization.api.mdx +++ b/docs/docs/reference/api/create-organization.api.mdx @@ -47,9 +47,7 @@ Create a new organization. Request - + diff --git a/docs/docs/reference/api/create-portal.api.mdx b/docs/docs/reference/api/create-portal.api.mdx index c1b63c0093..7a70db312b 100644 --- a/docs/docs/reference/api/create-portal.api.mdx +++ b/docs/docs/reference/api/create-portal.api.mdx @@ -39,9 +39,7 @@ import Translate from "@docusaurus/Translate"; Create Portal User Route - + diff --git a/docs/docs/reference/api/create-project-admin-simple-accounts-projects-post.api.mdx b/docs/docs/reference/api/create-project-admin-simple-accounts-projects-post.api.mdx index 1fad59b071..d5cccb607a 100644 --- a/docs/docs/reference/api/create-project-admin-simple-accounts-projects-post.api.mdx +++ b/docs/docs/reference/api/create-project-admin-simple-accounts-projects-post.api.mdx @@ -47,9 +47,7 @@ Create projects Request - + diff --git a/docs/docs/reference/api/create-project-membership-admin-simple-accounts-projects-memberships-post.api.mdx b/docs/docs/reference/api/create-project-membership-admin-simple-accounts-projects-memberships-post.api.mdx index 24da03aa6c..a5420f0c82 100644 --- a/docs/docs/reference/api/create-project-membership-admin-simple-accounts-projects-memberships-post.api.mdx +++ b/docs/docs/reference/api/create-project-membership-admin-simple-accounts-projects-memberships-post.api.mdx @@ -47,9 +47,7 @@ Create project memberships Request - + diff --git a/docs/docs/reference/api/create-project.api.mdx b/docs/docs/reference/api/create-project.api.mdx index 80f0cfeb4e..b0ad8ef33f 100644 --- a/docs/docs/reference/api/create-project.api.mdx +++ b/docs/docs/reference/api/create-project.api.mdx @@ -47,9 +47,7 @@ Create Project Request - + diff --git a/docs/docs/reference/api/create-query-revision.api.mdx b/docs/docs/reference/api/create-query-revision.api.mdx index 03d933c6a7..614c8b03c1 100644 --- a/docs/docs/reference/api/create-query-revision.api.mdx +++ b/docs/docs/reference/api/create-query-revision.api.mdx @@ -47,9 +47,7 @@ Create Query Revision Request - + diff --git a/docs/docs/reference/api/create-query-variant.api.mdx b/docs/docs/reference/api/create-query-variant.api.mdx index 5271b35144..351a0db171 100644 --- a/docs/docs/reference/api/create-query-variant.api.mdx +++ b/docs/docs/reference/api/create-query-variant.api.mdx @@ -47,9 +47,7 @@ Create Query Variant Request - + diff --git a/docs/docs/reference/api/create-queues.api.mdx b/docs/docs/reference/api/create-queues.api.mdx index 48fda329bb..8b4ae1a2a5 100644 --- a/docs/docs/reference/api/create-queues.api.mdx +++ b/docs/docs/reference/api/create-queues.api.mdx @@ -47,9 +47,7 @@ Create Queues Request - + diff --git a/docs/docs/reference/api/create-results.api.mdx b/docs/docs/reference/api/create-results.api.mdx index 3ae2fc9453..ca1f5e8610 100644 --- a/docs/docs/reference/api/create-results.api.mdx +++ b/docs/docs/reference/api/create-results.api.mdx @@ -47,9 +47,7 @@ Create Results Request - + diff --git a/docs/docs/reference/api/create-runs.api.mdx b/docs/docs/reference/api/create-runs.api.mdx index 67cf4a739b..7db64132a2 100644 --- a/docs/docs/reference/api/create-runs.api.mdx +++ b/docs/docs/reference/api/create-runs.api.mdx @@ -47,9 +47,7 @@ Create Runs Request - + diff --git a/docs/docs/reference/api/create-scenarios.api.mdx b/docs/docs/reference/api/create-scenarios.api.mdx index f59666a643..270740d54a 100644 --- a/docs/docs/reference/api/create-scenarios.api.mdx +++ b/docs/docs/reference/api/create-scenarios.api.mdx @@ -47,9 +47,7 @@ Create Scenarios Request - + diff --git a/docs/docs/reference/api/create-secret.api.mdx b/docs/docs/reference/api/create-secret.api.mdx index c76fa7400b..34e3d422a7 100644 --- a/docs/docs/reference/api/create-secret.api.mdx +++ b/docs/docs/reference/api/create-secret.api.mdx @@ -47,9 +47,7 @@ Create Secret Request - + diff --git a/docs/docs/reference/api/create-simple-accounts-admin-simple-accounts-post.api.mdx b/docs/docs/reference/api/create-simple-accounts-admin-simple-accounts-post.api.mdx index 94846207f8..ba3f751538 100644 --- a/docs/docs/reference/api/create-simple-accounts-admin-simple-accounts-post.api.mdx +++ b/docs/docs/reference/api/create-simple-accounts-admin-simple-accounts-post.api.mdx @@ -47,9 +47,7 @@ Create simple accounts Request - + diff --git a/docs/docs/reference/api/create-simple-evaluation.api.mdx b/docs/docs/reference/api/create-simple-evaluation.api.mdx index 425b7dfd5f..58a6f6b24c 100644 --- a/docs/docs/reference/api/create-simple-evaluation.api.mdx +++ b/docs/docs/reference/api/create-simple-evaluation.api.mdx @@ -47,9 +47,7 @@ Create Evaluation Request - + diff --git a/docs/docs/reference/api/create-simple-queue.api.mdx b/docs/docs/reference/api/create-simple-queue.api.mdx index 8175fa504a..1d2ef6b85d 100644 --- a/docs/docs/reference/api/create-simple-queue.api.mdx +++ b/docs/docs/reference/api/create-simple-queue.api.mdx @@ -47,9 +47,7 @@ Create Queue Request - + diff --git a/docs/docs/reference/api/create-simple-testset-from-file.api.mdx b/docs/docs/reference/api/create-simple-testset-from-file.api.mdx index fdbca2480d..52647e7915 100644 --- a/docs/docs/reference/api/create-simple-testset-from-file.api.mdx +++ b/docs/docs/reference/api/create-simple-testset-from-file.api.mdx @@ -47,9 +47,7 @@ Create Simple Testset From File Request - + diff --git a/docs/docs/reference/api/create-simple-trace.api.mdx b/docs/docs/reference/api/create-simple-trace.api.mdx index 4c6895b002..bd8380e0e8 100644 --- a/docs/docs/reference/api/create-simple-trace.api.mdx +++ b/docs/docs/reference/api/create-simple-trace.api.mdx @@ -85,9 +85,7 @@ for when to use `references` vs. `links`. Request - + diff --git a/docs/docs/reference/api/create-testset-revision.api.mdx b/docs/docs/reference/api/create-testset-revision.api.mdx index 443ea61d25..7fc303a430 100644 --- a/docs/docs/reference/api/create-testset-revision.api.mdx +++ b/docs/docs/reference/api/create-testset-revision.api.mdx @@ -51,9 +51,7 @@ testcases and the revision together. Request - + diff --git a/docs/docs/reference/api/create-testset-variant.api.mdx b/docs/docs/reference/api/create-testset-variant.api.mdx index 1ee7791996..ad7b255d1d 100644 --- a/docs/docs/reference/api/create-testset-variant.api.mdx +++ b/docs/docs/reference/api/create-testset-variant.api.mdx @@ -51,9 +51,7 @@ separate from the main one). Request - + diff --git a/docs/docs/reference/api/create-tool-connection.api.mdx b/docs/docs/reference/api/create-tool-connection.api.mdx index bb0ba2f94b..334f78fe3d 100644 --- a/docs/docs/reference/api/create-tool-connection.api.mdx +++ b/docs/docs/reference/api/create-tool-connection.api.mdx @@ -47,9 +47,7 @@ Create a new tool connection. Request - + diff --git a/docs/docs/reference/api/create-trace-tracing.api.mdx b/docs/docs/reference/api/create-trace-tracing.api.mdx index 61489bbfde..cdf5a7d15d 100644 --- a/docs/docs/reference/api/create-trace-tracing.api.mdx +++ b/docs/docs/reference/api/create-trace-tracing.api.mdx @@ -35,7 +35,7 @@ import Translate from "@docusaurus/Translate"; -:::caution deprecated +:::caution[deprecated] This endpoint has been deprecated and may be replaced or removed in future versions of the API. @@ -64,9 +64,7 @@ one-span payload). Request - + diff --git a/docs/docs/reference/api/create-trace.api.mdx b/docs/docs/reference/api/create-trace.api.mdx index 9721c52b81..2c365526a9 100644 --- a/docs/docs/reference/api/create-trace.api.mdx +++ b/docs/docs/reference/api/create-trace.api.mdx @@ -60,9 +60,7 @@ traces in one call, use `POST /traces/ingest` (plural). Request - + diff --git a/docs/docs/reference/api/create-user-admin-simple-accounts-users-post.api.mdx b/docs/docs/reference/api/create-user-admin-simple-accounts-users-post.api.mdx index 3adafc040e..d4ea280740 100644 --- a/docs/docs/reference/api/create-user-admin-simple-accounts-users-post.api.mdx +++ b/docs/docs/reference/api/create-user-admin-simple-accounts-users-post.api.mdx @@ -47,9 +47,7 @@ Create users Request - + diff --git a/docs/docs/reference/api/create-user-identity-admin-simple-accounts-users-identities-post.api.mdx b/docs/docs/reference/api/create-user-identity-admin-simple-accounts-users-identities-post.api.mdx index 08c091bfae..b4d7c3c4f2 100644 --- a/docs/docs/reference/api/create-user-identity-admin-simple-accounts-users-identities-post.api.mdx +++ b/docs/docs/reference/api/create-user-identity-admin-simple-accounts-users-identities-post.api.mdx @@ -47,9 +47,7 @@ Create user identities Request - + diff --git a/docs/docs/reference/api/create-webhook-delivery.api.mdx b/docs/docs/reference/api/create-webhook-delivery.api.mdx index 1a81a0d966..be5b28dfbb 100644 --- a/docs/docs/reference/api/create-webhook-delivery.api.mdx +++ b/docs/docs/reference/api/create-webhook-delivery.api.mdx @@ -47,9 +47,7 @@ Create Delivery Request - + diff --git a/docs/docs/reference/api/create-webhook-subscription.api.mdx b/docs/docs/reference/api/create-webhook-subscription.api.mdx index 9f95fd2440..bd68880f8a 100644 --- a/docs/docs/reference/api/create-webhook-subscription.api.mdx +++ b/docs/docs/reference/api/create-webhook-subscription.api.mdx @@ -47,9 +47,7 @@ Create Subscription Request - + diff --git a/docs/docs/reference/api/create-workflow-revision.api.mdx b/docs/docs/reference/api/create-workflow-revision.api.mdx index 04658ea517..289f212b29 100644 --- a/docs/docs/reference/api/create-workflow-revision.api.mdx +++ b/docs/docs/reference/api/create-workflow-revision.api.mdx @@ -47,9 +47,7 @@ Create Workflow Revision Request - + diff --git a/docs/docs/reference/api/create-workflow-variant.api.mdx b/docs/docs/reference/api/create-workflow-variant.api.mdx index d6b6ea50d9..439bce3ea0 100644 --- a/docs/docs/reference/api/create-workflow-variant.api.mdx +++ b/docs/docs/reference/api/create-workflow-variant.api.mdx @@ -53,9 +53,7 @@ See: [Versioning](/reference/api-guide/versioning). Request - + diff --git a/docs/docs/reference/api/create-workflow.api.mdx b/docs/docs/reference/api/create-workflow.api.mdx index 86ae18eb0b..03276d085b 100644 --- a/docs/docs/reference/api/create-workflow.api.mdx +++ b/docs/docs/reference/api/create-workflow.api.mdx @@ -55,9 +55,7 @@ See: [Workflows](/reference/api-guide/workflows), Request - + diff --git a/docs/docs/reference/api/create-workspace-admin-simple-accounts-workspaces-post.api.mdx b/docs/docs/reference/api/create-workspace-admin-simple-accounts-workspaces-post.api.mdx index 62ad78e50c..2614f8a9c2 100644 --- a/docs/docs/reference/api/create-workspace-admin-simple-accounts-workspaces-post.api.mdx +++ b/docs/docs/reference/api/create-workspace-admin-simple-accounts-workspaces-post.api.mdx @@ -47,9 +47,7 @@ Create workspaces Request - + diff --git a/docs/docs/reference/api/create-workspace-membership-admin-simple-accounts-workspaces-memberships-post.api.mdx b/docs/docs/reference/api/create-workspace-membership-admin-simple-accounts-workspaces-memberships-post.api.mdx index ac57178547..f0b12e2ea6 100644 --- a/docs/docs/reference/api/create-workspace-membership-admin-simple-accounts-workspaces-memberships-post.api.mdx +++ b/docs/docs/reference/api/create-workspace-membership-admin-simple-accounts-workspaces-memberships-post.api.mdx @@ -47,9 +47,7 @@ Create workspace memberships Request - + diff --git a/docs/docs/reference/api/create-workspace.StatusCodes.json b/docs/docs/reference/api/create-workspace.StatusCodes.json index 0039e31328..d1bc726c7f 100644 --- a/docs/docs/reference/api/create-workspace.StatusCodes.json +++ b/docs/docs/reference/api/create-workspace.StatusCodes.json @@ -1 +1 @@ -{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"organization":{"type":"string","title":"Organization"},"members":{"anyOf":[{"items":{"properties":{"user":{"additionalProperties":true,"type":"object","title":"User"},"roles":{"items":{"properties":{"role_name":{"type":"string","enum":["owner","admin","developer","editor","annotator","viewer"],"title":"WorkspaceRole"},"role_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Description"},"permissions":{"anyOf":[{"items":{"type":"string","enum":["read_system","view_applications","edit_application","create_app_variant","delete_app_variant","modify_variant_configurations","delete_application_variant","run_service","view_webhooks","edit_webhooks","view_secret","edit_secret","view_spans","edit_spans","view_folders","edit_folders","view_api_keys","edit_api_keys","view_app_environment_deployment","edit_app_environment_deployment","create_app_environment_deployment","view_testset","edit_testset","create_testset","delete_testset","view_evaluation","run_evaluations","edit_evaluation","create_evaluation","delete_evaluation","deploy_application","view_workspace","edit_workspace","create_workspace","delete_workspace","modify_user_roles","add_new_user_to_workspace","edit_organization","delete_organization","add_new_user_to_organization","reset_password","view_billing","edit_billing","view_workflows","edit_workflows","run_workflows","view_evaluators","edit_evaluators","view_environments","edit_environments","deploy_environments","view_queries","edit_queries","view_testsets","edit_testsets","view_annotations","edit_annotations","view_invocations","edit_invocations","view_evaluation_runs","edit_evaluation_runs","view_evaluation_scenarios","edit_evaluation_scenarios","view_evaluation_results","edit_evaluation_results","view_evaluation_metrics","edit_evaluation_metrics","view_evaluation_queues","edit_evaluation_queues","view_tools","edit_tools","run_tools"],"title":"Permission"},"type":"array"},{"type":"null"}],"title":"Permissions"}},"type":"object","required":["role_name"],"title":"WorkspacePermission"},"type":"array","title":"Roles"}},"type":"object","required":["user","roles"],"title":"WorkspaceMemberResponse"},"type":"array"},{"type":"null"}],"title":"Members"}},"type":"object","required":["id","type","organization"],"title":"WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file +{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"organization":{"type":"string","title":"Organization"},"members":{"anyOf":[{"items":{"properties":{"user":{"additionalProperties":true,"type":"object","title":"User"},"roles":{"items":{"properties":{"role_name":{"type":"string","title":"Role Name"},"role_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Description"},"permissions":{"anyOf":[{"items":{"type":"string","enum":["read_system","view_applications","edit_application","create_app_variant","delete_app_variant","modify_variant_configurations","delete_application_variant","run_service","view_webhooks","edit_webhooks","view_secret","edit_secret","view_spans","edit_spans","view_folders","edit_folders","view_api_keys","edit_api_keys","view_app_environment_deployment","edit_app_environment_deployment","create_app_environment_deployment","view_testset","edit_testset","create_testset","delete_testset","view_evaluation","run_evaluations","edit_evaluation","create_evaluation","delete_evaluation","deploy_application","view_workspace","edit_workspace","create_workspace","delete_workspace","modify_user_roles","add_new_user_to_workspace","edit_organization","delete_organization","add_new_user_to_organization","reset_password","view_billing","edit_billing","view_workflows","edit_workflows","run_workflows","view_evaluators","edit_evaluators","view_environments","edit_environments","deploy_environments","view_queries","edit_queries","view_testsets","edit_testsets","view_annotations","edit_annotations","view_invocations","edit_invocations","view_evaluation_runs","edit_evaluation_runs","view_evaluation_scenarios","edit_evaluation_scenarios","view_evaluation_results","edit_evaluation_results","view_evaluation_metrics","edit_evaluation_metrics","view_evaluation_queues","edit_evaluation_queues","view_tools","edit_tools","run_tools"],"title":"Permission"},"type":"array"},{"type":"null"}],"title":"Permissions"}},"type":"object","required":["role_name"],"title":"WorkspacePermission"},"type":"array","title":"Roles"}},"type":"object","required":["user","roles"],"title":"WorkspaceMemberResponse"},"type":"array"},{"type":"null"}],"title":"Members"}},"type":"object","required":["id","type","organization"],"title":"WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file diff --git a/docs/docs/reference/api/create-workspace.api.mdx b/docs/docs/reference/api/create-workspace.api.mdx index f91f69a321..76c7d56d74 100644 --- a/docs/docs/reference/api/create-workspace.api.mdx +++ b/docs/docs/reference/api/create-workspace.api.mdx @@ -5,7 +5,7 @@ description: "Create Workspace" sidebar_label: "Create Workspace" hide_title: true hide_table_of_contents: true -api: eJzdWEtvGzcQ/ivCnFpgG7lBTzrVTQLESN0IjtMcDGFBLUcSYy5Jk1wpqqD/Hgy5D+5qJadGT/XFy3lxOPPNcKgDeLZ2MHuAj3bNlPiHeaGVg0UG2qANqxsOMygsMo/5TttHZ1iBkIFhlpXo0ZL+ARQrEWagEzu54JCBUDADw/wGMrD4VAmLHGbeVpiBKzZYMpgdwO8NqTtvhVpDBl54SYTUr8kNh+NxEc2g839ovifdodVCK4/KE4sZI0URtKdfnVZE6zY1lk7pBTpaxRMcgKn9x1U4U9+pY9ZSVCUlkCeNm3+R7jEDjq6wwtB+LzX1NjFxzGqxl5m6J/qxNQJ6+RULn0T3TUjrlzarxyNJW3RGKxej8vrqiv71DgafqqJA51aVnNzVwvDiuEds8Zz5S0CIrvLJtaeoVIb/gM7nKFXrCH5JlrCV/W8xkPUK80cLjvRKLJehxtPthcfSnWaycmiDIOeC9JmcJ/xYnOeg+Jl0CXxaRmNn9iB+3qRpeAhUVUndTO8UWsiA8VIooJRsUZIVkuHC68BUSnsWv7cCd2ghiVtbFHdaYuNY/h/kluxNBgk2aEvhXOi944E+d1KLjOdu7zyW9THypPZcfd6URoUauzkzJt8yK5jyIUYST4il5mK1bwh5odVKrCvbGu+UGvOJsq1U7tBuRbgvgm87XG60fmz9StaB77Cw6Btuu4o8w7oDNYvAWWnJCaM1r1vW8RD5I+6TWLTrJl45qq2wWpWofM7RSL2nzyR65yWSYJ6VCft4dN51h+uWtYWOUEe1IwR93DJZNSmk2HaE9mw9mdpuj1abHtDI1QFGYrqS+z7mKyGMzAS19ZRUI4haQx5rm8qS5wp3kej16Ta9ZtWaHVCHVgZsiw59bphzO215c6KlkLKuINqoW7bnXUm9c+l5GwKFPF2nSdF2mALdATCBRSfVp9UpGFCD9lOFVmCr2C1TULkBqjpwxybX6wU9UpASaqsHHaNPGgAwt9UY5hryUNoVqJgVekwl5Z3sgq6SfnSjljPUKdFbUYzpdJyhzlOFFY6ptIwYa61lF+h6QaiI30mPn7f9vLu+gVnL9hevhnlyDYyNbd2g+5Dcg2OX1gUH+jfR8xuFS725l8f2ug0TQjsH/psD39bDxXM+hIdEEBgMMqMXdutJmGZ/e/36dID9m0nB46PinbVhBHjh9MrRMyEvDCxSFz3uD8wMQnlc0zi0OJ+8P+vqDDOaW18a6W7RObbGdJI8JxqCMWlmRqFMFQfsZkgOhGMGhf+WmDl9V1Asv/ln80qxie7Xckk+uxTFDJ0PxduYgksPnff39/MTgxEffWDEZ8bkS3qDod9oegQb7Xx4+PoNzGCaAtFND4OX73Ha3mrUJmgOap7KlZWkz4wISY/LjfdmNp1KXTC50c5H9oI0i8oKvw+q1/ObD7h/j4zTpP2wSAU+EUIj5vpibZ6YER+QIlc/1q8rv9G2uzLDU30TtSg0hP277q397hsrjcTurdzhpx/EDlYDhINQK50C6nqNyrPJ9fzmxEiPRcXJCp9sHdmQJeFzs+mUBfIrJqbUqMtQmuCRlb+3HPKDchG3uXr166urMINr50umki1GsDCY/+vzEdanRjIRqjE4dKhh8tDrV4SE2elPJAlSFhlQ9knxcFgyh5+tPB6JTBc/gWCRQRixlxTAhwNw4eibw2zFpMMTH9u+Bj/d1aX386TLTd/3BiiKUEL3IK0gg0fcj/y4E/rTpgHjoZZ6Ezf85T7268bKSVMl7EeN66JA4y/KLpI6nH/8dA8ZLOuff0rNSceyHXUXtosea+Ob51SgHUAyta6oD84g2qS/72kUuHo= +api: eJzdWEtvGzcQ/ivCnFpgG7lBTzrVTQLESNMIjtMcDGFBLUcSYy7JkFwrqqD/Hgy5u+SuHk6NnuqLxXlxOPPNcLh78GztYHYPH+yaKfEP80IrB4sCtEEbVjccZlBZZB7LrbYPzrAKoQDDLKvRoyX9PShWI8xAZ3ZKwaEAoWAGhvkNFGDxayMscph522ABrtpgzWC2B78zpO68FWoNBXjhJRFyvyY3HA6HRTSDzv+h+Y50x1YrrTwqTyxmjBRV0J5+cVoRLW1qLJ3SC3S0iifYA1O7D6twpqFTh6KnqEZKIE86N/8i3UMBHF1lhaH9nmvqdWbiULRizzN1R/RDbwT08gtWPovuq5DWz31WDweStuiMVi5G5eXVFf0bHAw+NlWFzq0aObltheHZcY/Y4iXzl4AQXeWTa09RaQz/AZ1PUarVEfySLGGr+N9ioBgU5o8WHOnVWC9DjefbC4+1O85k49AGQc4F6TM5z/ixOM9B8RPpEvi0jMbO7EH8skvTuUPcaomTLh9B4z9ISjA6yoxBWwvnQtM8HaGxi6iamhquRcZLt3MeayjgUeC2zIrGkSQXPqdRhcU2zIwpH5kVTFEEOUo8Itaai9WuI5SVViuxbmxvPCl15jNl26jSoX0UodEH37a43Gj90PuVrQPfYWXRd9x+FXmGpQN1i8BZackJXC0vLdt4iPIBd1ks+nUXrxLVo7Ba1ah8ydFIvaOfWfTOS2TBPCsT9vHovEuHS8vWQiK0UU2EoI+PTDZdCim2idCfbSDT2h3QWtMjGrk6wkhMV3ZRx3xlhBOXeWs9J7UIopouY1EWVNilwm0ken28zaDL9GZH1LGVEduiQ18a5txWW96daCmkbCuINkrL/rwrqbcuP29HoJDn6zwp2o5ToBMAM1gkqSGtTcGIGrS/NmgF9oppmYPKjVCVwK2U9qNeMCAFKaEe9ahjDEkjAJa2OYW5jjyWdhUqZoU+pZLzjnZB10h/cqOeM9ap0VtRndJJnLHO1wYbPKXSM2KstZYp0O2CUBF/Zz1+3vfzdO8Cs5btLl4N8+waODVvpQn1PrvAMgP9CHbBgeFN9PRG4TbuLtRTe70PV3s/wP2bA79vp4KnfAgvgCAwmkBO+ZM8CWPoby9fHk+efzMpeHwNvLFW2+ePnRw9E/LCpCF1NeD+wMwglMc1zTGL88n7s63OMFy59aUx5j06x9aYj4DnREMwJt2wJ5Rp4mTcTbeBcCig8t8yM8cPAorlN/9kXik20f1WLstnSlHM0PlQvI4puPRCeXt3Nz8yGPExBEZ8H0w+5zcY+o2m16vRzocXq9/ADKY5EN10P3qyHqb9rUZtguag7o3bWEn6zIiQ9LjceG9m06nUFZMb7XxkL0izaqzwu6B6Pb95h7u3yDiNyPeLXOAjITRibijW54kZ8Q4pcu0r+7rxG23TlRne2JuoRaEh7N+mR/Kbb6w2EtMjN+FnGMQEqxHCQaiVzgF1vUbl2eR6fnNkZMCi4mSVz7aObCiy8LnZdMoC+QUTU2rUdShN8Mjq33sO+UG5iNtcvfj1xVWYwbXzNVPZFiewMJr/2/MR1qdGMhGqMTi0b2FyP+hXhITZ8beNDCmLAij7pLjfL5nDT1YeDkSmi59AsCggjNhLCuD9Hrhw9JvDbMWkwyMf+74GP922pffzJOVm6HsHFEUooXuQVlDAA+5OfJUJ/WnTgXHfSr2KG/5yF/t1Z+WoqRL2o8Z1VaHxF2UXWR3OP3y8gwKW7XebWnPSsWxL3YVto8fa+O45FWh7kEytG+qDM4g26e87v6uf+A== sidebar_class_name: "post api-method" info_path: reference/api/agenta-api custom_edit_url: null diff --git a/docs/docs/reference/api/delete-accounts-admin-accounts-delete.api.mdx b/docs/docs/reference/api/delete-accounts-admin-accounts-delete.api.mdx index 3a03350d70..33c25c5547 100644 --- a/docs/docs/reference/api/delete-accounts-admin-accounts-delete.api.mdx +++ b/docs/docs/reference/api/delete-accounts-admin-accounts-delete.api.mdx @@ -47,9 +47,7 @@ Delete accounts Request - + diff --git a/docs/docs/reference/api/delete-metrics.api.mdx b/docs/docs/reference/api/delete-metrics.api.mdx index 0e9da4e342..6b53ba18eb 100644 --- a/docs/docs/reference/api/delete-metrics.api.mdx +++ b/docs/docs/reference/api/delete-metrics.api.mdx @@ -47,9 +47,7 @@ Delete Metrics Request - + diff --git a/docs/docs/reference/api/delete-queues.api.mdx b/docs/docs/reference/api/delete-queues.api.mdx index 8e198c3ce1..3b487e7e8b 100644 --- a/docs/docs/reference/api/delete-queues.api.mdx +++ b/docs/docs/reference/api/delete-queues.api.mdx @@ -47,9 +47,7 @@ Delete Queues Request - + diff --git a/docs/docs/reference/api/delete-results.api.mdx b/docs/docs/reference/api/delete-results.api.mdx index 77f1f26060..fd35b388d2 100644 --- a/docs/docs/reference/api/delete-results.api.mdx +++ b/docs/docs/reference/api/delete-results.api.mdx @@ -47,9 +47,7 @@ Delete Results Request - + diff --git a/docs/docs/reference/api/delete-runs.api.mdx b/docs/docs/reference/api/delete-runs.api.mdx index eb3ef75e96..267a99f9ec 100644 --- a/docs/docs/reference/api/delete-runs.api.mdx +++ b/docs/docs/reference/api/delete-runs.api.mdx @@ -47,9 +47,7 @@ Delete Runs Request - + diff --git a/docs/docs/reference/api/delete-scenarios.api.mdx b/docs/docs/reference/api/delete-scenarios.api.mdx index 884a29cffd..aea82da282 100644 --- a/docs/docs/reference/api/delete-scenarios.api.mdx +++ b/docs/docs/reference/api/delete-scenarios.api.mdx @@ -47,9 +47,7 @@ Delete Scenarios Request - + diff --git a/docs/docs/reference/api/delete-simple-accounts-admin-simple-accounts-delete.api.mdx b/docs/docs/reference/api/delete-simple-accounts-admin-simple-accounts-delete.api.mdx index 7c71608adb..12acc6b032 100644 --- a/docs/docs/reference/api/delete-simple-accounts-admin-simple-accounts-delete.api.mdx +++ b/docs/docs/reference/api/delete-simple-accounts-admin-simple-accounts-delete.api.mdx @@ -47,9 +47,7 @@ Delete simple accounts Request - + diff --git a/docs/docs/reference/api/delete-trace-tracing.api.mdx b/docs/docs/reference/api/delete-trace-tracing.api.mdx index 31aee2d79a..94c192c6e0 100644 --- a/docs/docs/reference/api/delete-trace-tracing.api.mdx +++ b/docs/docs/reference/api/delete-trace-tracing.api.mdx @@ -35,7 +35,7 @@ import Translate from "@docusaurus/Translate"; -:::caution deprecated +:::caution[deprecated] This endpoint has been deprecated and may be replaced or removed in future versions of the API. diff --git a/docs/docs/reference/api/deploy-application-revision.api.mdx b/docs/docs/reference/api/deploy-application-revision.api.mdx index 79a69b37ba..f1e4db1feb 100644 --- a/docs/docs/reference/api/deploy-application-revision.api.mdx +++ b/docs/docs/reference/api/deploy-application-revision.api.mdx @@ -53,9 +53,7 @@ See the [Applications guide](/reference/api-guide/applications#deployment). Request - + diff --git a/docs/docs/reference/api/deploy-evaluator-revision.api.mdx b/docs/docs/reference/api/deploy-evaluator-revision.api.mdx index a42a4ceb95..58176fc4d1 100644 --- a/docs/docs/reference/api/deploy-evaluator-revision.api.mdx +++ b/docs/docs/reference/api/deploy-evaluator-revision.api.mdx @@ -54,9 +54,7 @@ guide for the deployment model. Request - + diff --git a/docs/docs/reference/api/deploy-workflow-revision.api.mdx b/docs/docs/reference/api/deploy-workflow-revision.api.mdx index 9f6c22c8f6..cd1748c8f9 100644 --- a/docs/docs/reference/api/deploy-workflow-revision.api.mdx +++ b/docs/docs/reference/api/deploy-workflow-revision.api.mdx @@ -47,9 +47,7 @@ Deploy Workflow Revision Request - + diff --git a/docs/docs/reference/api/discover-access.api.mdx b/docs/docs/reference/api/discover-access.api.mdx index 403c3873df..93086d43f5 100644 --- a/docs/docs/reference/api/discover-access.api.mdx +++ b/docs/docs/reference/api/discover-access.api.mdx @@ -54,9 +54,7 @@ Returns minimal information needed for authentication flow. Request - + diff --git a/docs/docs/reference/api/edit-metrics.api.mdx b/docs/docs/reference/api/edit-metrics.api.mdx index 8521ecbc7a..f04607d85f 100644 --- a/docs/docs/reference/api/edit-metrics.api.mdx +++ b/docs/docs/reference/api/edit-metrics.api.mdx @@ -47,9 +47,7 @@ Edit Metrics Request - + diff --git a/docs/docs/reference/api/edit-queues.api.mdx b/docs/docs/reference/api/edit-queues.api.mdx index 7125618964..9ca62908cc 100644 --- a/docs/docs/reference/api/edit-queues.api.mdx +++ b/docs/docs/reference/api/edit-queues.api.mdx @@ -47,9 +47,7 @@ Edit Queues Request - + diff --git a/docs/docs/reference/api/edit-results.api.mdx b/docs/docs/reference/api/edit-results.api.mdx index 57bd4d0b0b..004503b04f 100644 --- a/docs/docs/reference/api/edit-results.api.mdx +++ b/docs/docs/reference/api/edit-results.api.mdx @@ -47,9 +47,7 @@ Edit Results Request - + diff --git a/docs/docs/reference/api/edit-runs.api.mdx b/docs/docs/reference/api/edit-runs.api.mdx index 6432735178..a80076f0d4 100644 --- a/docs/docs/reference/api/edit-runs.api.mdx +++ b/docs/docs/reference/api/edit-runs.api.mdx @@ -47,9 +47,7 @@ Edit Runs Request - + diff --git a/docs/docs/reference/api/edit-scenarios.api.mdx b/docs/docs/reference/api/edit-scenarios.api.mdx index c656c7ca12..2f45408787 100644 --- a/docs/docs/reference/api/edit-scenarios.api.mdx +++ b/docs/docs/reference/api/edit-scenarios.api.mdx @@ -47,9 +47,7 @@ Edit Scenarios Request - + diff --git a/docs/docs/reference/api/edit-trace-tracing.api.mdx b/docs/docs/reference/api/edit-trace-tracing.api.mdx index e5c5011cbd..2926bb01e0 100644 --- a/docs/docs/reference/api/edit-trace-tracing.api.mdx +++ b/docs/docs/reference/api/edit-trace-tracing.api.mdx @@ -35,7 +35,7 @@ import Translate from "@docusaurus/Translate"; -:::caution deprecated +:::caution[deprecated] This endpoint has been deprecated and may be replaced or removed in future versions of the API. diff --git a/docs/docs/reference/api/fetch-plans.api.mdx b/docs/docs/reference/api/fetch-plans.api.mdx index 93855f68d1..1de7963ade 100644 --- a/docs/docs/reference/api/fetch-plans.api.mdx +++ b/docs/docs/reference/api/fetch-plans.api.mdx @@ -39,9 +39,7 @@ import Translate from "@docusaurus/Translate"; Fetch Plan User Route - + diff --git a/docs/docs/reference/api/fetch-subscription.api.mdx b/docs/docs/reference/api/fetch-subscription.api.mdx index 2e50104556..ca8ff09577 100644 --- a/docs/docs/reference/api/fetch-subscription.api.mdx +++ b/docs/docs/reference/api/fetch-subscription.api.mdx @@ -39,9 +39,7 @@ import Translate from "@docusaurus/Translate"; Fetch Subscription User Route - + diff --git a/docs/docs/reference/api/fetch-trace-tracing.api.mdx b/docs/docs/reference/api/fetch-trace-tracing.api.mdx index aa96495e3e..0a5a5082ee 100644 --- a/docs/docs/reference/api/fetch-trace-tracing.api.mdx +++ b/docs/docs/reference/api/fetch-trace-tracing.api.mdx @@ -35,7 +35,7 @@ import Translate from "@docusaurus/Translate"; -:::caution deprecated +:::caution[deprecated] This endpoint has been deprecated and may be replaced or removed in future versions of the API. diff --git a/docs/docs/reference/api/fetch-usage.api.mdx b/docs/docs/reference/api/fetch-usage.api.mdx index ce2de94980..08f1e660ed 100644 --- a/docs/docs/reference/api/fetch-usage.api.mdx +++ b/docs/docs/reference/api/fetch-usage.api.mdx @@ -39,9 +39,7 @@ import Translate from "@docusaurus/Translate"; Fetch Usage User Route - + diff --git a/docs/docs/reference/api/fetch-user-profile.api.mdx b/docs/docs/reference/api/fetch-user-profile.api.mdx index 807dd7f592..f823b80099 100644 --- a/docs/docs/reference/api/fetch-user-profile.api.mdx +++ b/docs/docs/reference/api/fetch-user-profile.api.mdx @@ -39,9 +39,7 @@ import Translate from "@docusaurus/Translate"; User Profile - + diff --git a/docs/docs/reference/api/fork-workflow-variant.api.mdx b/docs/docs/reference/api/fork-workflow-variant.api.mdx index 6e77e74a94..7d5dc343cf 100644 --- a/docs/docs/reference/api/fork-workflow-variant.api.mdx +++ b/docs/docs/reference/api/fork-workflow-variant.api.mdx @@ -47,9 +47,7 @@ Fork Workflow Variant Request - + diff --git a/docs/docs/reference/api/get-all-workspace-permissions.api.mdx b/docs/docs/reference/api/get-all-workspace-permissions.api.mdx index 33fc3656e2..e2f208a08d 100644 --- a/docs/docs/reference/api/get-all-workspace-permissions.api.mdx +++ b/docs/docs/reference/api/get-all-workspace-permissions.api.mdx @@ -47,9 +47,7 @@ Returns: Raises: HTTPException: If there is an error retrieving the workspace permissions. - + diff --git a/docs/docs/reference/api/get-all-workspace-roles.api.mdx b/docs/docs/reference/api/get-all-workspace-roles.api.mdx index 56b9d730cb..0bed0814cd 100644 --- a/docs/docs/reference/api/get-all-workspace-roles.api.mdx +++ b/docs/docs/reference/api/get-all-workspace-roles.api.mdx @@ -47,9 +47,7 @@ Returns: Raises: HTTPException: If an error occurs while retrieving the workspace roles. - + diff --git a/docs/docs/reference/api/get-projects.api.mdx b/docs/docs/reference/api/get-projects.api.mdx index d4a6e8d236..ddd0356464 100644 --- a/docs/docs/reference/api/get-projects.api.mdx +++ b/docs/docs/reference/api/get-projects.api.mdx @@ -39,9 +39,7 @@ import Translate from "@docusaurus/Translate"; Get Projects - + diff --git a/docs/docs/reference/api/get-workspace.api.mdx b/docs/docs/reference/api/get-workspace.api.mdx index 0dcfae4975..784505c27c 100644 --- a/docs/docs/reference/api/get-workspace.api.mdx +++ b/docs/docs/reference/api/get-workspace.api.mdx @@ -47,9 +47,7 @@ Returns: Raises: HTTPException: If the user does not have permission to perform this action. - + diff --git a/docs/docs/reference/api/handle-events.api.mdx b/docs/docs/reference/api/handle-events.api.mdx index 8eea23523e..0dc1dd12ff 100644 --- a/docs/docs/reference/api/handle-events.api.mdx +++ b/docs/docs/reference/api/handle-events.api.mdx @@ -39,9 +39,7 @@ import Translate from "@docusaurus/Translate"; Handle Events - + diff --git a/docs/docs/reference/api/health-check.api.mdx b/docs/docs/reference/api/health-check.api.mdx index cc84bd121a..11ff03d2fd 100644 --- a/docs/docs/reference/api/health-check.api.mdx +++ b/docs/docs/reference/api/health-check.api.mdx @@ -39,9 +39,7 @@ import Translate from "@docusaurus/Translate"; Health Check - + diff --git a/docs/docs/reference/api/ingest-spans.api.mdx b/docs/docs/reference/api/ingest-spans.api.mdx index 0328546524..a2fc22c2d4 100644 --- a/docs/docs/reference/api/ingest-spans.api.mdx +++ b/docs/docs/reference/api/ingest-spans.api.mdx @@ -35,7 +35,7 @@ import Translate from "@docusaurus/Translate"; -:::caution deprecated +:::caution[deprecated] This endpoint has been deprecated and may be replaced or removed in future versions of the API. @@ -107,9 +107,7 @@ for what `count < N submitted` means. Request - + diff --git a/docs/docs/reference/api/ingest-traces.api.mdx b/docs/docs/reference/api/ingest-traces.api.mdx index 5df0c0a02b..0adc6b4233 100644 --- a/docs/docs/reference/api/ingest-traces.api.mdx +++ b/docs/docs/reference/api/ingest-traces.api.mdx @@ -35,7 +35,7 @@ import Translate from "@docusaurus/Translate"; -:::caution deprecated +:::caution[deprecated] This endpoint has been deprecated and may be replaced or removed in future versions of the API. @@ -62,9 +62,7 @@ for what `count` means here. Request - + diff --git a/docs/docs/reference/api/list-api-keys.api.mdx b/docs/docs/reference/api/list-api-keys.api.mdx index 76b065b2c4..7c98201e1e 100644 --- a/docs/docs/reference/api/list-api-keys.api.mdx +++ b/docs/docs/reference/api/list-api-keys.api.mdx @@ -45,9 +45,7 @@ Args: Returns: List[ListAPIKeysResponse]: A list of API Keys associated with the user. - + diff --git a/docs/docs/reference/api/list-application-catalog-types.api.mdx b/docs/docs/reference/api/list-application-catalog-types.api.mdx index 73bcd4352c..acb281b283 100644 --- a/docs/docs/reference/api/list-application-catalog-types.api.mdx +++ b/docs/docs/reference/api/list-application-catalog-types.api.mdx @@ -44,9 +44,7 @@ template schemas (for example `message`, `prompt-template`). Types are read-only and version with the product. See the [Applications guide](/reference/api-guide/applications#catalog). - + diff --git a/docs/docs/reference/api/list-evaluator-catalog-types.api.mdx b/docs/docs/reference/api/list-evaluator-catalog-types.api.mdx index a40e8eb52c..933eca1c14 100644 --- a/docs/docs/reference/api/list-evaluator-catalog-types.api.mdx +++ b/docs/docs/reference/api/list-evaluator-catalog-types.api.mdx @@ -44,9 +44,7 @@ rendering a catalog UI or validating that a template's schema is supported. See the Evaluators guide for how the catalog relates to user-owned evaluator artifacts. - + diff --git a/docs/docs/reference/api/list-organization-domains.api.mdx b/docs/docs/reference/api/list-organization-domains.api.mdx index cf26f2971b..155225ba9b 100644 --- a/docs/docs/reference/api/list-organization-domains.api.mdx +++ b/docs/docs/reference/api/list-organization-domains.api.mdx @@ -39,9 +39,7 @@ import Translate from "@docusaurus/Translate"; List all domains for the organization. - + diff --git a/docs/docs/reference/api/list-organization-providers.api.mdx b/docs/docs/reference/api/list-organization-providers.api.mdx index 449489cb95..63b9b41d29 100644 --- a/docs/docs/reference/api/list-organization-providers.api.mdx +++ b/docs/docs/reference/api/list-organization-providers.api.mdx @@ -39,9 +39,7 @@ import Translate from "@docusaurus/Translate"; List all SSO providers for the organization. - + diff --git a/docs/docs/reference/api/list-organizations.api.mdx b/docs/docs/reference/api/list-organizations.api.mdx index 530e641f11..c0c3ef46b8 100644 --- a/docs/docs/reference/api/list-organizations.api.mdx +++ b/docs/docs/reference/api/list-organizations.api.mdx @@ -45,9 +45,7 @@ Returns: Raises: HTTPException: If there is an error retrieving the organizations from the database. - + diff --git a/docs/docs/reference/api/list-secrets.api.mdx b/docs/docs/reference/api/list-secrets.api.mdx index b9d670913c..91b690305f 100644 --- a/docs/docs/reference/api/list-secrets.api.mdx +++ b/docs/docs/reference/api/list-secrets.api.mdx @@ -39,9 +39,7 @@ import Translate from "@docusaurus/Translate"; List Secrets - + diff --git a/docs/docs/reference/api/list-workflow-catalog-types.api.mdx b/docs/docs/reference/api/list-workflow-catalog-types.api.mdx index 38d5ea0d99..84bc2215e7 100644 --- a/docs/docs/reference/api/list-workflow-catalog-types.api.mdx +++ b/docs/docs/reference/api/list-workflow-catalog-types.api.mdx @@ -45,9 +45,7 @@ type keys exist before building a schema. See: [Workflows](/reference/api-guide/workflows). - + diff --git a/docs/docs/reference/api/log-application-revisions.api.mdx b/docs/docs/reference/api/log-application-revisions.api.mdx index 64eabae7c6..6cf30f14f1 100644 --- a/docs/docs/reference/api/log-application-revisions.api.mdx +++ b/docs/docs/reference/api/log-application-revisions.api.mdx @@ -52,9 +52,7 @@ are returned newest-first and include the full revision record. Request - + diff --git a/docs/docs/reference/api/log-environment-revisions.api.mdx b/docs/docs/reference/api/log-environment-revisions.api.mdx index ff4cb2f966..b12a975df5 100644 --- a/docs/docs/reference/api/log-environment-revisions.api.mdx +++ b/docs/docs/reference/api/log-environment-revisions.api.mdx @@ -47,9 +47,7 @@ Log Environment Revisions Request - + diff --git a/docs/docs/reference/api/log-evaluator-revisions.api.mdx b/docs/docs/reference/api/log-evaluator-revisions.api.mdx index ee0384c366..c389441afb 100644 --- a/docs/docs/reference/api/log-evaluator-revisions.api.mdx +++ b/docs/docs/reference/api/log-evaluator-revisions.api.mdx @@ -51,9 +51,7 @@ endpoint to fetch a specific revision's full payload. Request - + diff --git a/docs/docs/reference/api/log-query-revisions.api.mdx b/docs/docs/reference/api/log-query-revisions.api.mdx index bc638d6fc6..c714e5eb80 100644 --- a/docs/docs/reference/api/log-query-revisions.api.mdx +++ b/docs/docs/reference/api/log-query-revisions.api.mdx @@ -47,9 +47,7 @@ Log Query Revisions Request - + diff --git a/docs/docs/reference/api/log-testset-revisions.api.mdx b/docs/docs/reference/api/log-testset-revisions.api.mdx index e36e168e1f..a32959a3fd 100644 --- a/docs/docs/reference/api/log-testset-revisions.api.mdx +++ b/docs/docs/reference/api/log-testset-revisions.api.mdx @@ -47,9 +47,7 @@ Log Testset Revisions Request - + diff --git a/docs/docs/reference/api/log-workflow-revisions.api.mdx b/docs/docs/reference/api/log-workflow-revisions.api.mdx index 2e40366303..90e196a1bc 100644 --- a/docs/docs/reference/api/log-workflow-revisions.api.mdx +++ b/docs/docs/reference/api/log-workflow-revisions.api.mdx @@ -47,9 +47,7 @@ Log Workflow Revisions Request - + diff --git a/docs/docs/reference/api/open-runs.api.mdx b/docs/docs/reference/api/open-runs.api.mdx index 5afe8fd3f2..c3e055bb05 100644 --- a/docs/docs/reference/api/open-runs.api.mdx +++ b/docs/docs/reference/api/open-runs.api.mdx @@ -47,9 +47,7 @@ Open Runs Request - + diff --git a/docs/docs/reference/api/otlp-ingest.api.mdx b/docs/docs/reference/api/otlp-ingest.api.mdx index a163b681ad..afadb18261 100644 --- a/docs/docs/reference/api/otlp-ingest.api.mdx +++ b/docs/docs/reference/api/otlp-ingest.api.mdx @@ -66,9 +66,7 @@ are queued on a Redis stream and persisted asynchronously — see [Tracing — Async write contract](/reference/api-guide/tracing#async-write-contract-202). - + diff --git a/docs/docs/reference/api/otlp-status.api.mdx b/docs/docs/reference/api/otlp-status.api.mdx index 9ecbb3caa2..5dfd0c0e12 100644 --- a/docs/docs/reference/api/otlp-status.api.mdx +++ b/docs/docs/reference/api/otlp-status.api.mdx @@ -43,9 +43,7 @@ Lightweight readiness probe. Returns `{"status": "ready"}` when the router is mounted. Intended for health checks from OTel collectors before they start exporting traces. - + diff --git a/docs/docs/reference/api/query-analytics.api.mdx b/docs/docs/reference/api/query-analytics.api.mdx index f80f86c220..a03784aded 100644 --- a/docs/docs/reference/api/query-analytics.api.mdx +++ b/docs/docs/reference/api/query-analytics.api.mdx @@ -35,7 +35,7 @@ import Translate from "@docusaurus/Translate"; -:::caution deprecated +:::caution[deprecated] This endpoint has been deprecated and may be replaced or removed in future versions of the API. diff --git a/docs/docs/reference/api/query-annotations.api.mdx b/docs/docs/reference/api/query-annotations.api.mdx index 9bd9228d86..86fbf1fd4e 100644 --- a/docs/docs/reference/api/query-annotations.api.mdx +++ b/docs/docs/reference/api/query-annotations.api.mdx @@ -47,9 +47,7 @@ Query Annotations Request - + diff --git a/docs/docs/reference/api/query-application-revisions.api.mdx b/docs/docs/reference/api/query-application-revisions.api.mdx index 7884b533ba..3a9c918fde 100644 --- a/docs/docs/reference/api/query-application-revisions.api.mdx +++ b/docs/docs/reference/api/query-application-revisions.api.mdx @@ -54,9 +54,7 @@ Set `resolve: true` to inline embedded references in each revision's Request - + diff --git a/docs/docs/reference/api/query-applications.api.mdx b/docs/docs/reference/api/query-applications.api.mdx index 05da71842c..14156cf033 100644 --- a/docs/docs/reference/api/query-applications.api.mdx +++ b/docs/docs/reference/api/query-applications.api.mdx @@ -52,9 +52,7 @@ See [Query Pattern](/reference/api-guide/query-pattern). Request - + diff --git a/docs/docs/reference/api/query-evaluator-revisions.api.mdx b/docs/docs/reference/api/query-evaluator-revisions.api.mdx index 5805177352..0d0be03baf 100644 --- a/docs/docs/reference/api/query-evaluator-revisions.api.mdx +++ b/docs/docs/reference/api/query-evaluator-revisions.api.mdx @@ -52,9 +52,7 @@ each revision's `data`. Request - + diff --git a/docs/docs/reference/api/query-evaluators.api.mdx b/docs/docs/reference/api/query-evaluators.api.mdx index b592257276..e0703bc056 100644 --- a/docs/docs/reference/api/query-evaluators.api.mdx +++ b/docs/docs/reference/api/query-evaluators.api.mdx @@ -52,9 +52,7 @@ guide. Request - + diff --git a/docs/docs/reference/api/query-folders.api.mdx b/docs/docs/reference/api/query-folders.api.mdx index afb0c2cc58..7812df2ff0 100644 --- a/docs/docs/reference/api/query-folders.api.mdx +++ b/docs/docs/reference/api/query-folders.api.mdx @@ -55,9 +55,7 @@ set. Filters include `id`/`ids`, `slug`/`slugs`, `kind`/`kinds`, Request - + diff --git a/docs/docs/reference/api/query-invocations.api.mdx b/docs/docs/reference/api/query-invocations.api.mdx index 914e058f03..17209e88d1 100644 --- a/docs/docs/reference/api/query-invocations.api.mdx +++ b/docs/docs/reference/api/query-invocations.api.mdx @@ -47,9 +47,7 @@ Query Invocations Request - + diff --git a/docs/docs/reference/api/query-metrics.api.mdx b/docs/docs/reference/api/query-metrics.api.mdx index 465966d5ce..e461a62ad6 100644 --- a/docs/docs/reference/api/query-metrics.api.mdx +++ b/docs/docs/reference/api/query-metrics.api.mdx @@ -47,9 +47,7 @@ Query Metrics Request - + diff --git a/docs/docs/reference/api/query-query-revisions.api.mdx b/docs/docs/reference/api/query-query-revisions.api.mdx index 179fee0c77..0c3fa1e506 100644 --- a/docs/docs/reference/api/query-query-revisions.api.mdx +++ b/docs/docs/reference/api/query-query-revisions.api.mdx @@ -47,9 +47,7 @@ Query Query Revisions Request - + diff --git a/docs/docs/reference/api/query-query-variants.api.mdx b/docs/docs/reference/api/query-query-variants.api.mdx index c2372fe59e..5d6af5fd13 100644 --- a/docs/docs/reference/api/query-query-variants.api.mdx +++ b/docs/docs/reference/api/query-query-variants.api.mdx @@ -47,9 +47,7 @@ Query Query Variants Request - + diff --git a/docs/docs/reference/api/query-queues.api.mdx b/docs/docs/reference/api/query-queues.api.mdx index df20ca74d2..d4cc127664 100644 --- a/docs/docs/reference/api/query-queues.api.mdx +++ b/docs/docs/reference/api/query-queues.api.mdx @@ -47,9 +47,7 @@ Query Queues Request - + diff --git a/docs/docs/reference/api/query-results.api.mdx b/docs/docs/reference/api/query-results.api.mdx index bd6f90992c..0e00d752a6 100644 --- a/docs/docs/reference/api/query-results.api.mdx +++ b/docs/docs/reference/api/query-results.api.mdx @@ -47,9 +47,7 @@ Query Results Request - + diff --git a/docs/docs/reference/api/query-runs.api.mdx b/docs/docs/reference/api/query-runs.api.mdx index cb08466fed..13608107ae 100644 --- a/docs/docs/reference/api/query-runs.api.mdx +++ b/docs/docs/reference/api/query-runs.api.mdx @@ -47,9 +47,7 @@ Query Runs Request - + diff --git a/docs/docs/reference/api/query-scenarios.api.mdx b/docs/docs/reference/api/query-scenarios.api.mdx index df3b5603a6..17ddd1239a 100644 --- a/docs/docs/reference/api/query-scenarios.api.mdx +++ b/docs/docs/reference/api/query-scenarios.api.mdx @@ -47,9 +47,7 @@ Query Scenarios Request - + diff --git a/docs/docs/reference/api/query-sessions.api.mdx b/docs/docs/reference/api/query-sessions.api.mdx index 8b73ecab6d..a94c430ef9 100644 --- a/docs/docs/reference/api/query-sessions.api.mdx +++ b/docs/docs/reference/api/query-sessions.api.mdx @@ -35,7 +35,7 @@ import Translate from "@docusaurus/Translate"; -:::caution deprecated +:::caution[deprecated] This endpoint has been deprecated and may be replaced or removed in future versions of the API. @@ -66,9 +66,7 @@ on the next call to continue. Request - + diff --git a/docs/docs/reference/api/query-simple-applications.api.mdx b/docs/docs/reference/api/query-simple-applications.api.mdx index 4bf261f484..5b841fd8fa 100644 --- a/docs/docs/reference/api/query-simple-applications.api.mdx +++ b/docs/docs/reference/api/query-simple-applications.api.mdx @@ -53,9 +53,7 @@ structured query that returns artifacts only, use Request - + diff --git a/docs/docs/reference/api/query-simple-environments.api.mdx b/docs/docs/reference/api/query-simple-environments.api.mdx index 652bb0aa88..4e04d52738 100644 --- a/docs/docs/reference/api/query-simple-environments.api.mdx +++ b/docs/docs/reference/api/query-simple-environments.api.mdx @@ -47,9 +47,7 @@ Query Simple Environments Request - + diff --git a/docs/docs/reference/api/query-simple-evaluations.api.mdx b/docs/docs/reference/api/query-simple-evaluations.api.mdx index a67989e146..589f117f28 100644 --- a/docs/docs/reference/api/query-simple-evaluations.api.mdx +++ b/docs/docs/reference/api/query-simple-evaluations.api.mdx @@ -47,9 +47,7 @@ Query Evaluations Request - + diff --git a/docs/docs/reference/api/query-simple-evaluators.api.mdx b/docs/docs/reference/api/query-simple-evaluators.api.mdx index b977dd66da..57c75e000a 100644 --- a/docs/docs/reference/api/query-simple-evaluators.api.mdx +++ b/docs/docs/reference/api/query-simple-evaluators.api.mdx @@ -52,9 +52,7 @@ guide. Request - + diff --git a/docs/docs/reference/api/query-simple-queries.api.mdx b/docs/docs/reference/api/query-simple-queries.api.mdx index 16192aa6a6..f576552dc8 100644 --- a/docs/docs/reference/api/query-simple-queries.api.mdx +++ b/docs/docs/reference/api/query-simple-queries.api.mdx @@ -47,9 +47,7 @@ Query Simple Queries Request - + diff --git a/docs/docs/reference/api/query-simple-queues.api.mdx b/docs/docs/reference/api/query-simple-queues.api.mdx index e047752fa8..2d5bb63a70 100644 --- a/docs/docs/reference/api/query-simple-queues.api.mdx +++ b/docs/docs/reference/api/query-simple-queues.api.mdx @@ -47,9 +47,7 @@ Query Queues Request - + diff --git a/docs/docs/reference/api/query-simple-testsets.api.mdx b/docs/docs/reference/api/query-simple-testsets.api.mdx index 4b720a17f7..f9081d5ae7 100644 --- a/docs/docs/reference/api/query-simple-testsets.api.mdx +++ b/docs/docs/reference/api/query-simple-testsets.api.mdx @@ -47,9 +47,7 @@ Query Simple Testsets Request - + diff --git a/docs/docs/reference/api/query-simple-traces.api.mdx b/docs/docs/reference/api/query-simple-traces.api.mdx index a473369f53..91e1f74fab 100644 --- a/docs/docs/reference/api/query-simple-traces.api.mdx +++ b/docs/docs/reference/api/query-simple-traces.api.mdx @@ -59,9 +59,7 @@ For span-level queries across all trace types, use Request - + diff --git a/docs/docs/reference/api/query-simple-workflows.api.mdx b/docs/docs/reference/api/query-simple-workflows.api.mdx index 690c46a997..de9ef6b39a 100644 --- a/docs/docs/reference/api/query-simple-workflows.api.mdx +++ b/docs/docs/reference/api/query-simple-workflows.api.mdx @@ -47,9 +47,7 @@ Query Simple Workflows Request - + diff --git a/docs/docs/reference/api/query-spans-rpc.api.mdx b/docs/docs/reference/api/query-spans-rpc.api.mdx index 17fb6f215e..74a019b098 100644 --- a/docs/docs/reference/api/query-spans-rpc.api.mdx +++ b/docs/docs/reference/api/query-spans-rpc.api.mdx @@ -35,7 +35,7 @@ import Translate from "@docusaurus/Translate"; -:::caution deprecated +:::caution[deprecated] This endpoint has been deprecated and may be replaced or removed in future versions of the API. diff --git a/docs/docs/reference/api/query-spans-sessions.api.mdx b/docs/docs/reference/api/query-spans-sessions.api.mdx index fea081e790..fd74750053 100644 --- a/docs/docs/reference/api/query-spans-sessions.api.mdx +++ b/docs/docs/reference/api/query-spans-sessions.api.mdx @@ -47,9 +47,7 @@ Query Sessions Request - + diff --git a/docs/docs/reference/api/query-spans-users.api.mdx b/docs/docs/reference/api/query-spans-users.api.mdx index 4794156f5c..fdc2cc78e5 100644 --- a/docs/docs/reference/api/query-spans-users.api.mdx +++ b/docs/docs/reference/api/query-spans-users.api.mdx @@ -47,9 +47,7 @@ Query Users Request - + diff --git a/docs/docs/reference/api/query-spans.api.mdx b/docs/docs/reference/api/query-spans.api.mdx index b131b8795c..a118df020f 100644 --- a/docs/docs/reference/api/query-spans.api.mdx +++ b/docs/docs/reference/api/query-spans.api.mdx @@ -69,9 +69,7 @@ Returns `{count, spans}`. For the nested per-trace shape, call Request - + diff --git a/docs/docs/reference/api/query-testcases.api.mdx b/docs/docs/reference/api/query-testcases.api.mdx index 64d34369d2..75df43056c 100644 --- a/docs/docs/reference/api/query-testcases.api.mdx +++ b/docs/docs/reference/api/query-testcases.api.mdx @@ -47,9 +47,7 @@ Query Testcases Request - + diff --git a/docs/docs/reference/api/query-testset-revisions.api.mdx b/docs/docs/reference/api/query-testset-revisions.api.mdx index a272799009..4b2c21f5bb 100644 --- a/docs/docs/reference/api/query-testset-revisions.api.mdx +++ b/docs/docs/reference/api/query-testset-revisions.api.mdx @@ -47,9 +47,7 @@ Query Testset Revisions Request - + diff --git a/docs/docs/reference/api/query-testset-variants.api.mdx b/docs/docs/reference/api/query-testset-variants.api.mdx index d3ed3fd512..df57b2d163 100644 --- a/docs/docs/reference/api/query-testset-variants.api.mdx +++ b/docs/docs/reference/api/query-testset-variants.api.mdx @@ -50,9 +50,7 @@ Use `testset_refs` to scope to one or more parent testsets. Use Request - + diff --git a/docs/docs/reference/api/query-testsets.api.mdx b/docs/docs/reference/api/query-testsets.api.mdx index cbbaa2616c..d88914520b 100644 --- a/docs/docs/reference/api/query-testsets.api.mdx +++ b/docs/docs/reference/api/query-testsets.api.mdx @@ -52,9 +52,7 @@ testcases. See the Query Pattern guide for the full body shape. Request - + diff --git a/docs/docs/reference/api/query-traces.api.mdx b/docs/docs/reference/api/query-traces.api.mdx index 2d8e5a75d5..c79cddccb5 100644 --- a/docs/docs/reference/api/query-traces.api.mdx +++ b/docs/docs/reference/api/query-traces.api.mdx @@ -69,9 +69,7 @@ keyed by `trace_id`, call `POST /tracing/spans/query` with Request - + diff --git a/docs/docs/reference/api/query-users.api.mdx b/docs/docs/reference/api/query-users.api.mdx index 80692e31d7..a8f0f40ed0 100644 --- a/docs/docs/reference/api/query-users.api.mdx +++ b/docs/docs/reference/api/query-users.api.mdx @@ -35,7 +35,7 @@ import Translate from "@docusaurus/Translate"; -:::caution deprecated +:::caution[deprecated] This endpoint has been deprecated and may be replaced or removed in future versions of the API. @@ -56,9 +56,7 @@ cursor on subsequent calls. Request - + diff --git a/docs/docs/reference/api/query-webhook-deliveries.api.mdx b/docs/docs/reference/api/query-webhook-deliveries.api.mdx index 83e876482e..820548f9c7 100644 --- a/docs/docs/reference/api/query-webhook-deliveries.api.mdx +++ b/docs/docs/reference/api/query-webhook-deliveries.api.mdx @@ -47,9 +47,7 @@ Query Deliveries Request - + diff --git a/docs/docs/reference/api/query-webhook-subscriptions.api.mdx b/docs/docs/reference/api/query-webhook-subscriptions.api.mdx index 7db71faec9..4a342ed5ec 100644 --- a/docs/docs/reference/api/query-webhook-subscriptions.api.mdx +++ b/docs/docs/reference/api/query-webhook-subscriptions.api.mdx @@ -47,9 +47,7 @@ Query Subscriptions Request - + diff --git a/docs/docs/reference/api/refresh-metrics.api.mdx b/docs/docs/reference/api/refresh-metrics.api.mdx index 7890a61ef3..e0869d738d 100644 --- a/docs/docs/reference/api/refresh-metrics.api.mdx +++ b/docs/docs/reference/api/refresh-metrics.api.mdx @@ -47,9 +47,7 @@ Refresh Metrics Request - + diff --git a/docs/docs/reference/api/reset-password-admin-simple-accounts-reset-password-post.api.mdx b/docs/docs/reference/api/reset-password-admin-simple-accounts-reset-password-post.api.mdx index 5f06384706..3827f187c7 100644 --- a/docs/docs/reference/api/reset-password-admin-simple-accounts-reset-password-post.api.mdx +++ b/docs/docs/reference/api/reset-password-admin-simple-accounts-reset-password-post.api.mdx @@ -47,9 +47,7 @@ Reset user password Request - + diff --git a/docs/docs/reference/api/resolve-application-revision.api.mdx b/docs/docs/reference/api/resolve-application-revision.api.mdx index 5bf3654552..a8fa51a333 100644 --- a/docs/docs/reference/api/resolve-application-revision.api.mdx +++ b/docs/docs/reference/api/resolve-application-revision.api.mdx @@ -53,9 +53,7 @@ self-contained configuration for invocation or export. Request - + diff --git a/docs/docs/reference/api/resolve-environment-revision.api.mdx b/docs/docs/reference/api/resolve-environment-revision.api.mdx index 4002e28e5e..cc611973e5 100644 --- a/docs/docs/reference/api/resolve-environment-revision.api.mdx +++ b/docs/docs/reference/api/resolve-environment-revision.api.mdx @@ -52,9 +52,7 @@ This endpoint: Request - + diff --git a/docs/docs/reference/api/resolve-evaluator-revision.api.mdx b/docs/docs/reference/api/resolve-evaluator-revision.api.mdx index dec4ce7518..2c4077cea4 100644 --- a/docs/docs/reference/api/resolve-evaluator-revision.api.mdx +++ b/docs/docs/reference/api/resolve-evaluator-revision.api.mdx @@ -52,9 +52,7 @@ depth reached, and errors according to `error_policy`. Request - + diff --git a/docs/docs/reference/api/resolve-workflow-revision.api.mdx b/docs/docs/reference/api/resolve-workflow-revision.api.mdx index 6d9ba4a2ed..06af0cf723 100644 --- a/docs/docs/reference/api/resolve-workflow-revision.api.mdx +++ b/docs/docs/reference/api/resolve-workflow-revision.api.mdx @@ -52,9 +52,7 @@ This endpoint: Request - + diff --git a/docs/docs/reference/api/retrieve-application-revision.api.mdx b/docs/docs/reference/api/retrieve-application-revision.api.mdx index e1528f9c7d..8051a894f3 100644 --- a/docs/docs/reference/api/retrieve-application-revision.api.mdx +++ b/docs/docs/reference/api/retrieve-application-revision.api.mdx @@ -54,9 +54,7 @@ Set `resolve: true` to inline embedded references inside `data`. Request - + diff --git a/docs/docs/reference/api/retrieve-environment-revision.api.mdx b/docs/docs/reference/api/retrieve-environment-revision.api.mdx index fe7e799a46..b2c0736b90 100644 --- a/docs/docs/reference/api/retrieve-environment-revision.api.mdx +++ b/docs/docs/reference/api/retrieve-environment-revision.api.mdx @@ -47,9 +47,7 @@ Retrieve Environment Revision Request - + diff --git a/docs/docs/reference/api/retrieve-evaluator-revision.api.mdx b/docs/docs/reference/api/retrieve-evaluator-revision.api.mdx index 65f89eeaab..f281709227 100644 --- a/docs/docs/reference/api/retrieve-evaluator-revision.api.mdx +++ b/docs/docs/reference/api/retrieve-evaluator-revision.api.mdx @@ -55,9 +55,7 @@ returned payload. Request - + diff --git a/docs/docs/reference/api/retrieve-query-revision.api.mdx b/docs/docs/reference/api/retrieve-query-revision.api.mdx index 8c6dcfb8cb..86688d5915 100644 --- a/docs/docs/reference/api/retrieve-query-revision.api.mdx +++ b/docs/docs/reference/api/retrieve-query-revision.api.mdx @@ -47,9 +47,7 @@ Retrieve Query Revision Request - + diff --git a/docs/docs/reference/api/retrieve-testset-revision.api.mdx b/docs/docs/reference/api/retrieve-testset-revision.api.mdx index fe2afda3a0..cdbdc04e3d 100644 --- a/docs/docs/reference/api/retrieve-testset-revision.api.mdx +++ b/docs/docs/reference/api/retrieve-testset-revision.api.mdx @@ -47,9 +47,7 @@ Retrieve Testset Revision Request - + diff --git a/docs/docs/reference/api/retrieve-workflow-revision.api.mdx b/docs/docs/reference/api/retrieve-workflow-revision.api.mdx index 82e1d35d90..09e63b1656 100644 --- a/docs/docs/reference/api/retrieve-workflow-revision.api.mdx +++ b/docs/docs/reference/api/retrieve-workflow-revision.api.mdx @@ -47,9 +47,7 @@ Retrieve Workflow Revision Request - + diff --git a/docs/docs/reference/api/switch-plans.ParamsDetails.json b/docs/docs/reference/api/switch-plans.ParamsDetails.json index f514f7fb19..8f32c4691f 100644 --- a/docs/docs/reference/api/switch-plans.ParamsDetails.json +++ b/docs/docs/reference/api/switch-plans.ParamsDetails.json @@ -1 +1 @@ -{"parameters":[{"name":"plan","in":"query","required":true,"schema":{"type":"string","enum":["cloud_v0_hobby","cloud_v0_pro","cloud_v0_business","cloud_v0_humanity_labs","cloud_v0_x_labs","cloud_v0_agenta_ai","self_hosted_enterprise"],"title":"Plan"}}]} \ No newline at end of file +{"parameters":[{"name":"plan","in":"query","required":true,"schema":{"type":"string","title":"Plan"}}]} \ No newline at end of file diff --git a/docs/docs/reference/api/switch-plans.api.mdx b/docs/docs/reference/api/switch-plans.api.mdx index 99b6cb3dc5..e7f81e4084 100644 --- a/docs/docs/reference/api/switch-plans.api.mdx +++ b/docs/docs/reference/api/switch-plans.api.mdx @@ -5,7 +5,7 @@ description: "Switch Plans User Route" sidebar_label: "Switch Plans User Route" hide_title: true hide_table_of_contents: true -api: eJyVVU1vGjEQ/SurObWSlaVRT3sq/ZCC0iooob0ghLy7A+vUazu2l4Yi//dq7GVZQnLoCZhvv/dmOIDnWwfFEj4LKYXawoqBNmi5F1rNaijA/RG+atZGcuWAgeGWt+jRUtYBFG8RCiAvMBAKCnjq0O6BgcWnTlisofC2QwauarDlUBzA7w0lOW+pIwNUXUszVFJ39Xo3WTe6LKnEYDBWj3+WnRMKnRvbmq7lSvj9WvLyzPF8YeFbVJ6vuQAGDuVm3WjnsV6j8miNFQ4JBi+8pDHn9LYQVvQiZ7Ry6OgR15MJfdToKisMwQUFPHRVhc5tOpnd98HUWCuPylM4N0aKKqKbPzrKOZyACSEEBh+vry8L/+JS1DEt+2attv9RFYwlRr1Ic9fouZD0TXhs3WWA1NWZl6v93SaSfc5bYINFKI9btBBWgR1t3FpOHB5h/K7TgBAYtG77mg6OoT/QOb5FGIq9HRrByBbkDaQ/00VAju5ZNAQGlX8eldHlI1Z+VOYLYfnsIZzmH2JOOl5GbNL4fdxIJyeKEkNvQ/E1UfBas2PIzWIxvyiY9PFCcXE9MxKpy346tNm97jyprkXfaNpgo52Pm+sbKCAv06bncaPztN5xEezuuNWdlRTJjYgsp5+N96bIc6krLmlhkntFmVVnhd/H1Ol8dov7G+Q1WiiWq3HAA0kyiew8bCCGG3GLBFV/V6adb7QVf5Ny+gPTpKwQCd/oMd/TuNnZdD6Dl0CduWh3eBWlcuwU3cBGj3VFnqdTccVFTneqjZsDHnn7afAQ0YRcajO5+nA1IROh3nI1avE2VWeTDmCQIoklEXcmznXoWVxCzyLx2l/mnskVA2KHYg6Hkjv8aWUIZE6HmUiqheOlJElvuHR4McBwWuDdfa/+9xmw1wf7jfvTP8COy45CojB23ArqE3XAjrzRAClnWlVo/Cjr4o5RlUHH87uHBYTwD+uBSWs= +api: eJyVVMtu2zAQ/BVhTy1ARG7Qk051H0CNtIiROL0YQkHTa4spJTHkKo1r8N+LJWVZjpMCPdnenX14ZpZ7ILn1UCzhozZGN1soBbQWnSTdNrM1FOB/a1LVT2tk40GAlU7WSOi4ag+NrBEK4CwI0A0U8NCh24EAhw+ddriGglyHAryqsJZQ7IF2los8OZ4ogDQZDsy5Swgl13rbNh49wy8nE/5Yo1dOW14MCrjtlELvN53JbnowCFBtQ9gQw6W1Rqv4P/J7zzX74wohhCDg/eXleeMf0uh1LMu+ONe6/+gK1jF3pNPeaySpDX/ThLU/B5hWnWRls7veRFpPGQpiiOiGcIsOQhnEISadk7sRjd/atCAEAbXf/ovx7+i93CIMzV6HRjKyBWcDK227SMghPYuBIEDR06hNu7pHRaM2n5jLJ4Jw3H/AHB2zjNyk9XtceexxlCgp9DoVn5MELw07QL4uFvOzhskfzxwXDyFjk/rszqPLbtqO2HU1UtXyrdjWU7wRqqCAfJVuKo+3k6dDAgEe3ePhfjpnGCmtjiqnnxWRLfLctEqaqvWU0iVXqs5p2sXS6Xx2hbuvKNfooFiWY8AtWzKZ7BQ2CCOtvkKmqr/gaUdV6/Sf5Jz+lKtUFaLgm3as93SLDclsOp/Bc6JOUnw7UkWrHCbFNIjRn/VFnssYvpA6BwFYx8sBQll/GDIsNDOXxkwu3l1MOMSs17IZjXhdqpNNBzLYkaySjjcT99r3Ki6hV5F17d/AXslSAKvDmP1+JT3eORMCh9MTyCKttZcrw5beSOPxbIHhaYE3N73732YgXl7sF+6Ob+2jNB1DojEepdM8J/pAHHTjBVLNVCm0NKo6e8e4y+Dj+fXtAkL4Cx+EEws= sidebar_class_name: "post api-method" info_path: reference/api/agenta-api custom_edit_url: null diff --git a/docs/docs/reference/api/test-webhook-subscription.api.mdx b/docs/docs/reference/api/test-webhook-subscription.api.mdx index e1477aafe5..42a8dad840 100644 --- a/docs/docs/reference/api/test-webhook-subscription.api.mdx +++ b/docs/docs/reference/api/test-webhook-subscription.api.mdx @@ -47,9 +47,7 @@ Test Subscription Request - + diff --git a/docs/docs/reference/api/transfer-ownership-admin-simple-accounts-transfer-ownership-post.api.mdx b/docs/docs/reference/api/transfer-ownership-admin-simple-accounts-transfer-ownership-post.api.mdx index 1641d9abc3..37f2b20b1b 100644 --- a/docs/docs/reference/api/transfer-ownership-admin-simple-accounts-transfer-ownership-post.api.mdx +++ b/docs/docs/reference/api/transfer-ownership-admin-simple-accounts-transfer-ownership-post.api.mdx @@ -47,9 +47,7 @@ Transfer organization ownership Request - + diff --git a/docs/docs/reference/api/update-session-identities.api.mdx b/docs/docs/reference/api/update-session-identities.api.mdx index e7b770e925..2c059892fc 100644 --- a/docs/docs/reference/api/update-session-identities.api.mdx +++ b/docs/docs/reference/api/update-session-identities.api.mdx @@ -47,9 +47,7 @@ Update Session Identities Request - + diff --git a/docs/docs/reference/api/update-user-username.api.mdx b/docs/docs/reference/api/update-user-username.api.mdx index 27283359a9..1c2c23e79a 100644 --- a/docs/docs/reference/api/update-user-username.api.mdx +++ b/docs/docs/reference/api/update-user-username.api.mdx @@ -47,9 +47,7 @@ Update User Username Request - + diff --git a/docs/docs/reference/api/update-workspace.StatusCodes.json b/docs/docs/reference/api/update-workspace.StatusCodes.json index 0039e31328..d1bc726c7f 100644 --- a/docs/docs/reference/api/update-workspace.StatusCodes.json +++ b/docs/docs/reference/api/update-workspace.StatusCodes.json @@ -1 +1 @@ -{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"organization":{"type":"string","title":"Organization"},"members":{"anyOf":[{"items":{"properties":{"user":{"additionalProperties":true,"type":"object","title":"User"},"roles":{"items":{"properties":{"role_name":{"type":"string","enum":["owner","admin","developer","editor","annotator","viewer"],"title":"WorkspaceRole"},"role_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Description"},"permissions":{"anyOf":[{"items":{"type":"string","enum":["read_system","view_applications","edit_application","create_app_variant","delete_app_variant","modify_variant_configurations","delete_application_variant","run_service","view_webhooks","edit_webhooks","view_secret","edit_secret","view_spans","edit_spans","view_folders","edit_folders","view_api_keys","edit_api_keys","view_app_environment_deployment","edit_app_environment_deployment","create_app_environment_deployment","view_testset","edit_testset","create_testset","delete_testset","view_evaluation","run_evaluations","edit_evaluation","create_evaluation","delete_evaluation","deploy_application","view_workspace","edit_workspace","create_workspace","delete_workspace","modify_user_roles","add_new_user_to_workspace","edit_organization","delete_organization","add_new_user_to_organization","reset_password","view_billing","edit_billing","view_workflows","edit_workflows","run_workflows","view_evaluators","edit_evaluators","view_environments","edit_environments","deploy_environments","view_queries","edit_queries","view_testsets","edit_testsets","view_annotations","edit_annotations","view_invocations","edit_invocations","view_evaluation_runs","edit_evaluation_runs","view_evaluation_scenarios","edit_evaluation_scenarios","view_evaluation_results","edit_evaluation_results","view_evaluation_metrics","edit_evaluation_metrics","view_evaluation_queues","edit_evaluation_queues","view_tools","edit_tools","run_tools"],"title":"Permission"},"type":"array"},{"type":"null"}],"title":"Permissions"}},"type":"object","required":["role_name"],"title":"WorkspacePermission"},"type":"array","title":"Roles"}},"type":"object","required":["user","roles"],"title":"WorkspaceMemberResponse"},"type":"array"},{"type":"null"}],"title":"Members"}},"type":"object","required":["id","type","organization"],"title":"WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file +{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"organization":{"type":"string","title":"Organization"},"members":{"anyOf":[{"items":{"properties":{"user":{"additionalProperties":true,"type":"object","title":"User"},"roles":{"items":{"properties":{"role_name":{"type":"string","title":"Role Name"},"role_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Description"},"permissions":{"anyOf":[{"items":{"type":"string","enum":["read_system","view_applications","edit_application","create_app_variant","delete_app_variant","modify_variant_configurations","delete_application_variant","run_service","view_webhooks","edit_webhooks","view_secret","edit_secret","view_spans","edit_spans","view_folders","edit_folders","view_api_keys","edit_api_keys","view_app_environment_deployment","edit_app_environment_deployment","create_app_environment_deployment","view_testset","edit_testset","create_testset","delete_testset","view_evaluation","run_evaluations","edit_evaluation","create_evaluation","delete_evaluation","deploy_application","view_workspace","edit_workspace","create_workspace","delete_workspace","modify_user_roles","add_new_user_to_workspace","edit_organization","delete_organization","add_new_user_to_organization","reset_password","view_billing","edit_billing","view_workflows","edit_workflows","run_workflows","view_evaluators","edit_evaluators","view_environments","edit_environments","deploy_environments","view_queries","edit_queries","view_testsets","edit_testsets","view_annotations","edit_annotations","view_invocations","edit_invocations","view_evaluation_runs","edit_evaluation_runs","view_evaluation_scenarios","edit_evaluation_scenarios","view_evaluation_results","edit_evaluation_results","view_evaluation_metrics","edit_evaluation_metrics","view_evaluation_queues","edit_evaluation_queues","view_tools","edit_tools","run_tools"],"title":"Permission"},"type":"array"},{"type":"null"}],"title":"Permissions"}},"type":"object","required":["role_name"],"title":"WorkspacePermission"},"type":"array","title":"Roles"}},"type":"object","required":["user","roles"],"title":"WorkspaceMemberResponse"},"type":"array"},{"type":"null"}],"title":"Members"}},"type":"object","required":["id","type","organization"],"title":"WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file diff --git a/docs/docs/reference/api/update-workspace.api.mdx b/docs/docs/reference/api/update-workspace.api.mdx index c19aa737cf..193e47ebdc 100644 --- a/docs/docs/reference/api/update-workspace.api.mdx +++ b/docs/docs/reference/api/update-workspace.api.mdx @@ -5,7 +5,7 @@ description: "Update Workspace" sidebar_label: "Update Workspace" hide_title: true hide_table_of_contents: true -api: eJzNGGtv2zbwrxj3aQOU2DFadNOnZW2BBl1XI01XYIEh0NLZZkORKknZcQ3/9+FIPShZdrugGJYvMe/Nu+M9tAfLVgbie3ivV0zyr8xyJQ3MI1AFane6ySCGssiYxWSr9IMpWIoQQcE0y9GiJv49SJYjxKACOQnPIAIuIYaC2TVEoPFLyTVmEFtdYgQmXWPOIN6D3RXEbqzmcgURWG4FAUK7RjcZHA5Ro6ux5kco+lQL81rmXgYa+7vKdsTYF5kqaVFaQrGiEDx1No4/GyUJ1mosNPnScjR08rbvgcnd+6XzXNciul8FkaUQQJbUNv5JvIcIMjSp5gXpe6qoV4GIQ1TFN0uYPScwgqXSOdEAkV9Y7uw5reWjFzu6thS4mkwtPmNqoU/WRAAOB6LWaAoljXfbdDKhf52bw4cyTdGYZSlGtxUxPDkwqcbABafS5KWncjfqu+0UT+iFCHh2jpaSL/qfJokne5qoO4Ifok59+N53T3w55gtXakL13GJujiNZGtSOMMs48TMxC/D+9Z5MReKl5FPCCzuhg/BJHab+JVCWORVVtZWoIQKW5VwChWSDgqQQTcatckgplWX+94bjFjXMB8rSrRJYG5b8gNiSvFEvwAXqnBvjWsCwo0/dVCPLErMzFvPqGknw9kx13xBGD9W9JQImG6Y5k9b5SOARMFcZX+5qQJIqueSrUjfCW6ZafMCsS5kY1Bvu2pazbYuLtVIPjV3B2eENphptjW1OHlew9kL1wWGWSmSUoxWuPVb+4MkD7gJfNOfaXwnKDddK5ihtkmEh1I5+Bt47TRE48ySN02PRWNNerj1WElpA5dUW4Phxw0RZh5B82wKau3VoKrkdWCW6ByNTezniwxWMHT5eAaASH4Iq6SGoyiAqDYl/2/Qss0Ti1gOtOlbTKVaN2B60L6WH1mjQJgUzZqt0Vt9owYWoXhApao/NfZdCbU143xpALg/PYVCU7odAtQkYpEVL1YVVIehBHfeXEjXHhrE9hkllelnVJrcvcp1a0AE5Ki43qlcxuqBeAia6HMq5GtynNilKprkaYglxR1rQlMIOKmowfZ4crebpEE+L6fN8KbHEIZYG4X2tlGgdXR0oK/zvoMbPmnretm9gWrPd2dYwC9rA0NjWTsL3QR8calpnDOh2om8rck297stDut65CaGZA//Nhd9Vw8W3bHBrhiPoDTKDDbuxxE2zz6bT4wH2LyZ45neb11q7EeCJ02uGlnFxZmARKu1gv2Nm4NLiisah+eng/VG9TjejmdW5ke4dGsNWGE6Sp0idM0b1zMhlUfoBux6SHeAQQWofAzFHw9xL8uXj8O4RxpV8482v6IJ4tiHyETrtilc+BOcWnTd3d7MjgT4/uonhV4bRp7CDoV0r2sXp7pFfdGMYh3loxvve/n0YN03NjPfhwnyACGgqqvf3UgsSxwruUsAf19YW8XgsVMrEWhnr0XPiTEvN7c6xXs9u3uLuDbKM5u77eUjwgfLVZ2CXrIkaK/hbJD9WW/11addKtw3UrfVrz0WOopdw267mrx9ZXghsV+s2m7oubcDh0gbTyfTZxeTFxfTXu6vn8fOrePrL5eTF1d8+75YqTLvrFUrLRtezmyPhHRQ9YZbawCSPJt2NW008HjMHvmR8TOU8dw8YLLL8twZDdlCMvJrJ5dXlxE3qyticyUDFQMb0toTK3/QixoVg3C/+2hUNn033napGbSU+/p7TJhThO99g5hFQlpCg/X7BDH7U4nAgMI0LlCzzCNxgviCH3u8h44Z+ZxAvmTB4ZHNTDeGn2+rB/jyCaPgudUJJyibqnnSCCB5wN/BlirL8P1TfcZSrqOv6wewrkpde28Wd7zC1iKM2QJZ7jus0xcKepZ0HlWP28Q4iWFQftHKVEYtmWyqHbOutVYWt9z8H24NgclVS4Y7Bi6S/fwCGEB/q +api: eJzNGGtv2zbwrxj3aQOU2DFadNOnZW2BBl1WI01XYIEh0NLZZkORCknFcQ3/9+FIPShZdrugGJYvMe/Ne/FOO7BsZSC+gw96xST/yixX0sA8AlWgdqerDGIoi4xZTDZK35uCpQgRFEyzHC1q4t+BZDlCDCqQk/AMIuASYiiYXUMEGh9KrjGD2OoSIzDpGnMG8Q7stiB2YzWXK4jAcisIENo1uspgv48aXY01P0LR51qY1zL3MtDY31W2Jca+yFRJi9ISihWF4KmzcfzFKEmwVmOhyZeWo6GTt30HTG4/LJ3nuhbR/SqILIUAsqS28U/i3UeQoUk1L0jfc0W9CUTsoyq+WcLsKYERLJXOiQaI/MxyZ89xLZ+82NGlpcDVZGrxBVMLfbImArDfE7VGUyhpvNumkwn969wcPpZpisYsSzG6qYjh2YFJNQYuOJYmrz2Vu1Hfbcd4Qi9EwLNTtJR80f80STzZ80TdEnwfdfrD99Y98eWYL1yrCdVzi7k5jGRpUDvCLOPEz8QswPvqPZqKxEvJp4QXdkQH4ZM6TMcucaMEjup4OI4fEBQntBeZAnXOjXG9e9hDfRNRljn1fY0sS8zWWMwhgkeOmyQoGkOUGbchjCrMFQEBk0emOZPkwQwFHgBzlfHltgYkqZJLvip1I7xlqsUHzLqUiUH9yN1742zb4GKt1H1jV3B2eIOpRltjm5PHFay9UH1wmKUSGSVXhWuPlT94co/bwBfNufZXgvKRayVzlDbJsBBqSz8D7x2nCJx5lMbpsWisaS/XHisJLaDyagtw/PjIRFmHkHzbApq7dWgquR1YJboHI1N7OeLDFcwLPl4BoBIfgirpIajKIKrpxBdlRIWdSNx4oFWHajpdphHbg/al9NAaDdqkYMZslM7qGy24EFUFkaL22Nx3KdTGhPetAeTy8BwGRel+CFSbgEFatFRdWBWCHtRxP5SoOTaM7TFMKtPLqja5pVS21ws6IEfF5aPqdYwuqJeAiS6Hcq4G96lNipJproZYQtyBFjSlsIOKGkyfJ0ereTrE02L6PA8lljjE0iC8r5USraOrA2WF/x30+FnTz9t3F5jWbHvyaZgFz8DQvNWOsHfBAzYfGIJPGNB9ib6tyL3G9YM6pOvaPe3NAPdvLnxdTQXfssHtB46gN4EM2dNa4sbQF9Pp4eT5FxM880vJW62Vfv7YmaFlXJyYNIRKO9jvmBm4tLiiOWZ+PHh/VNXphiuzOjXGXKMxbIXhCHiM1DljVA97XBaln4zr6dYB9hGk9ikQczCFvSZfPg0vDWFcyTfe/IouiGcbIh+h465440NwakN5d3s7OxDo86ObGH7WH30OXzC0a0VLNN098htqDOMwD81411uc9+PmUTPjXbjp7iECmorqxbvUgsSxgrsU8Me1tUU8HguVMrFWxnr0nDjTUnO7dayXs6v3uH2HLKOB+W4eEnykfPUZ2CVrosYK/h7Jj9U6flnatdLtA+r28bXnIkdRJdy0O/XbJ5YXAtuduM2mrksbcLhtwXQyfXE2eXU2/fX24mX88iKe/nI+eXXxt8+7pQrT7nKF0rLR5ezqQHgHRSXMUhuY5NGku3Gricdj5sDnjI+pneeugMEiy39rMGQHxcirmZxfnE/cpK6MzZkMVAxkTG9LqPxNFTEuBON+Y9euafhsuut0NXpW4sMPMW1CEb7z8WQeAWUJCdrtFszgJy32ewLTuEDJMo/ADeYLcujdDjJu6HcG8ZIJgwc2N90QfrqpCvbnEUTDd6kTSlI20etJJ4jgHrcDn5Qoy/9D9R1HuY66rgtmV5G89trObv0LU4s4eAbIcs9xmaZY2JO086BzzD7dQgSL6ktUrjJi0WxD7ZBtvLWqsPX+52A7EEyuSmrcMXiR9PcPMVUHaA== sidebar_class_name: "put api-method" info_path: reference/api/agenta-api custom_edit_url: null diff --git a/docs/docs/reference/api/verify-organization-domain.api.mdx b/docs/docs/reference/api/verify-organization-domain.api.mdx index 3d9b6d5e37..bc164c7a4a 100644 --- a/docs/docs/reference/api/verify-organization-domain.api.mdx +++ b/docs/docs/reference/api/verify-organization-domain.api.mdx @@ -50,9 +50,7 @@ and marks the domain as verified if found. Request - + diff --git a/docs/docs/reference/openapi.json b/docs/docs/reference/openapi.json index 0816a90d26..ed0908105c 100644 --- a/docs/docs/reference/openapi.json +++ b/docs/docs/reference/openapi.json @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"Agenta API","description":"Agenta API","contact":{"name":"Agenta","url":"https://agenta.ai/","email":"team@agenta.ai"},"version":"0.1.0"},"paths":{"/billing/stripe/events/":{"post":{"tags":["Billing"],"summary":"Handle Events","operationId":"handle_events","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/stripe/portals/":{"post":{"tags":["Billing"],"summary":"Create Portal User Route","operationId":"create_portal","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/stripe/checkouts/":{"post":{"tags":["Billing"],"summary":"Create Checkout User Route","operationId":"create_checkout","parameters":[{"name":"plan","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Plan"}},{"name":"success_url","in":"query","required":true,"schema":{"type":"string","title":"Success Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/plans":{"get":{"tags":["Billing"],"summary":"Fetch Plan User Route","operationId":"fetch_plans","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/plans/switch":{"post":{"tags":["Billing"],"summary":"Switch Plans User Route","operationId":"switch_plans","parameters":[{"name":"plan","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Plan"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/subscription":{"get":{"tags":["Billing"],"summary":"Fetch Subscription User Route","operationId":"fetch_subscription","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/subscription/cancel":{"post":{"tags":["Billing"],"summary":"Cancel Subscription User Route","operationId":"cancel_plan","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/usage":{"get":{"tags":["Billing"],"summary":"Fetch Usage User Route","operationId":"fetch_usage","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/organizations/domains/":{"get":{"tags":["Organizations"],"summary":"List Domains","description":"List all domains for the organization.","operationId":"list_organization_domains","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrganizationDomainResponse"},"type":"array","title":"Response List Organization Domains"}}}}}},"post":{"tags":["Organizations"],"summary":"Create Domain","description":"Create a new domain for verification.\n\nThis endpoint initiates the domain verification process by:\n1. Creating a domain record\n2. Generating a unique verification token\n3. Returning DNS configuration instructions\n\nThe user must add a DNS TXT record to verify ownership.","operationId":"create_organization_domain","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/domains/verify":{"post":{"tags":["Organizations"],"summary":"Verify Domain","description":"Verify domain ownership via DNS TXT record.\n\nThis endpoint checks for the presence of the verification TXT record\nand marks the domain as verified if found.","operationId":"verify_organization_domain","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainVerify"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/domains/{domain_id}/refresh":{"post":{"tags":["Organizations"],"summary":"Refresh Domain Token","description":"Refresh the verification token for an unverified domain.\n\nGenerates a new token and resets the 48-hour expiry window.\nThis is useful when the original token has expired.","operationId":"refresh_organization_domain_token","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/domains/{domain_id}/reset":{"post":{"tags":["Organizations"],"summary":"Reset Domain","description":"Reset a verified domain to unverified state for re-verification.\n\nGenerates a new token and marks the domain as unverified.\nThis allows re-verification of already verified domains.","operationId":"reset_organization_domain","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/domains/{domain_id}":{"delete":{"tags":["Organizations"],"summary":"Delete Domain","description":"Delete a domain.","operationId":"delete_organization_domain","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/providers/":{"get":{"tags":["Organizations"],"summary":"List Providers","description":"List all SSO providers for the organization.","operationId":"list_organization_providers","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrganizationProviderResponse"},"type":"array","title":"Response List Organization Providers"}}}}}},"post":{"tags":["Organizations"],"summary":"Create Provider","description":"Create a new SSO provider configuration.\n\nSupported provider types:\n- oidc: OpenID Connect\n- saml: SAML 2.0 (coming soon)","operationId":"create_organization_provider","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/providers/{provider_id}":{"patch":{"tags":["Organizations"],"summary":"Update Provider","description":"Update an SSO provider configuration.","operationId":"update_organization_provider","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","title":"Provider Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organizations"],"summary":"Delete Provider","description":"Delete an SSO provider configuration.","operationId":"delete_organization_provider","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","title":"Provider Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/providers/{provider_id}/test":{"post":{"tags":["Organizations"],"summary":"Test Provider","description":"Test SSO provider connection.\n\nThis endpoint tests the OIDC provider configuration by fetching the\ndiscovery document and validating required endpoints exist.\nIf successful, marks the provider as valid (is_valid=true).\nIf failed, marks as invalid and deactivates (is_valid=false, is_active=false).","operationId":"test_organization_provider","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}":{"get":{"tags":["Organizations"],"summary":"Fetch Organization Details","description":"Return the details of the organization.","operationId":"fetch_organization_details","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDetails"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Organizations"],"summary":"Update Organization","operationId":"patch_organization","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ee__src__models__api__organization_models__Organization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Organizations"],"summary":"Update Organization","operationId":"update_organization","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ee__src__models__api__organization_models__Organization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organizations"],"summary":"Delete Organization","description":"Delete an organization (owner only).","operationId":"delete_organization","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces":{"post":{"tags":["Organizations"],"summary":"Create Workspace","operationId":"create_workspace","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspace"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}":{"put":{"tags":["Organizations"],"summary":"Update Workspace","operationId":"update_workspace","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspace"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/transfer/{new_owner_id}":{"post":{"tags":["Organizations"],"summary":"Transfer Organization Ownership","description":"Transfer organization ownership to another member.","operationId":"transfer_organization_ownership","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"new_owner_id","in":"path","required":true,"schema":{"type":"string","title":"New Owner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations":{"get":{"tags":["Organizations"],"summary":"List Organizations","description":"Returns a list of organizations associated with the user's session.\n\nReturns:\n list[Organization]: A list of organizations associated with the user's session.\n\nRaises:\n HTTPException: If there is an error retrieving the organizations from the database.","operationId":"list_organizations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/oss__src__models__api__organization_models__Organization"},"type":"array","title":"Response List Organizations"}}}}}},"post":{"tags":["Organizations"],"summary":"Create Organization","description":"Create a new organization.","operationId":"create_organization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/permissions":{"get":{"tags":["Workspaces"],"summary":"Get All Workspace Permissions","description":"Get all workspace permissions.\n\nReturns a list of all available workspace permissions.\n\nReturns:\n List[Permission]: A list of Permission objects representing the available workspace permissions.\n\nRaises:\n HTTPException: If there is an error retrieving the workspace permissions.","operationId":"get_all_workspace_permissions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Permission"},"type":"array","title":"Response Get All Workspace Permissions"}}}}}}},"/workspaces/{workspace_id}/roles":{"post":{"tags":["Workspaces"],"summary":"Assign Role To User","description":"Assigns a role to a user in a workspace.\n\nArgs:\n payload (UserRole): The payload containing the organization id, user email, and role to assign.\n workspace_id (str): The ID of the workspace.\n request (Request): The FastAPI request object.\n\nReturns:\n bool: True if the role was successfully assigned, False otherwise.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.\n HTTPException: If there is an error assigning the role to the user.","operationId":"assign_role_to_user","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRole"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Workspaces"],"summary":"Unassign Role From User","description":"Delete a role assignment from a user in a workspace.\n\nArgs:\n workspace_id (str): The ID of the workspace.\n email (str): The email of the user to remove the role from.\n organization_id (str): The ID of the organization.\n role (str): The role to remove from the user.\n request (Request): The FastAPI request object.\n\nReturns:\n bool: True if the role assignment was successfully deleted.\n\nRaises:\n HTTPException: If there is an error in the request or the user does not have permission to perform the action.\n HTTPException: If there is an error in updating the user's roles.","operationId":"unassign_role_from_user","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}},{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"role","in":"query","required":true,"schema":{"type":"string","title":"Role"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/secrets/":{"get":{"tags":["Secrets"],"summary":"List Secrets","operationId":"list_secrets","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SecretResponseDTO"},"type":"array","title":"Response List Secrets"}}}}}},"post":{"tags":["Secrets"],"summary":"Create Secret","operationId":"create_secret","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSecretDTO"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/secrets/{secret_id}":{"get":{"tags":["Secrets"],"summary":"Read Secret","operationId":"read_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Secrets"],"summary":"Update Secret","operationId":"update_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSecretDTO"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Secrets"],"summary":"Delete Secret","operationId":"delete_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/":{"post":{"tags":["Webhooks"],"summary":"Create Subscription","operationId":"create_webhook_subscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/test":{"post":{"tags":["Webhooks"],"summary":"Test Subscription","operationId":"test_webhook_subscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionTestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/{subscription_id}":{"get":{"tags":["Webhooks"],"summary":"Fetch Subscription","operationId":"fetch_webhook_subscription","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subscription Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Webhooks"],"summary":"Edit Subscription","operationId":"edit_webhook_subscription","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subscription Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete Subscription","operationId":"delete_webhook_subscription","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subscription Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/query":{"post":{"tags":["Webhooks"],"summary":"Query Subscriptions","operationId":"query_webhook_subscriptions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/deliveries":{"post":{"tags":["Webhooks"],"summary":"Create Delivery","operationId":"create_webhook_delivery","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/deliveries/{delivery_id}":{"get":{"tags":["Webhooks"],"summary":"Fetch Delivery","operationId":"fetch_webhook_delivery","parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/deliveries/query":{"post":{"tags":["Webhooks"],"summary":"Query Deliveries","operationId":"query_webhook_deliveries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/otlp/v1/traces":{"get":{"tags":["OpenTelemetry"],"summary":"Status check for OTLP","description":"Return the OTLP endpoint liveness status.\n\nLightweight readiness probe. Returns `{\"status\": \"ready\"}` when\nthe router is mounted. Intended for health checks from OTel\ncollectors before they start exporting traces.","operationId":"otlp_status","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectStatusResponse"}}}}}},"post":{"tags":["OpenTelemetry"],"summary":"Ingest traces via OTLP","description":"Ingest traces via the OTLP/HTTP protobuf protocol.\n\nThis endpoint accepts a serialized\n`ExportTraceServiceRequest` protobuf. Point any OTLP/HTTP\ncollector or SDK at `POST /otlp/v1/traces` and spans will flow\ninto the same ingest stream as the Agenta-native endpoints.\n\nUse this when you already have OTel instrumentation emitting\nOTLP. For new integrations that don't need raw OTLP, prefer\n`POST /tracing/spans/ingest` — it takes JSON, accepts Agenta's\nnested shape directly, and surfaces parse failures immediately.\n\n## Content-Type and size limit\n\nBinary protobuf only (`Content-Type: application/x-protobuf`).\nJSON OTLP is not accepted. Requests larger than the configured\nbatch limit (default 4 MB, see `OTLP_MAX_BATCH_BYTES`) return\n`413 Request Entity Too Large`.\n\n## Response\n\nSuccessful ingest returns `200 OK` with a serialized\n`ExportTraceServiceResponse` protobuf. Parse failures on the\nrequest body return `400`; malformed spans return `500`; quota\nexhaustion returns `403`. Like the native ingest paths, spans\nare queued on a Redis stream and persisted asynchronously — see\n[Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202).","operationId":"otlp_ingest","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectStatusResponse"}}}}}}},"/auth/discover":{"post":{"tags":["Access"],"summary":"Discover","description":"Discover authentication methods available for a given email.\n\nThis endpoint does NOT reveal:\n- Organization names\n- User existence (optionally - currently does for UX)\n- Detailed policy information\n\nReturns minimal information needed for authentication flow.","operationId":"discover_access","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/access":{"get":{"tags":["Access"],"summary":"Check Organization Access","description":"Check if the current session satisfies the organization's auth policy.\n\nReturns 200 when access is allowed, 403 with AUTH_UPGRADE_REQUIRED when not.","operationId":"check_organization_access","parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/session/identities":{"patch":{"tags":["Access"],"summary":"Update Session Identities","operationId":"update_session_identities","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionIdentitiesUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/sso/callback/{organization_slug}/{provider_slug}":{"get":{"tags":["Access"],"summary":"Sso Callback Redirect","description":"Custom SSO callback endpoint that redirects to SuperTokens.\n\nThis endpoint:\n1. Accepts clean URL path: /auth/sso/callback/{organization_slug}/{provider_slug}\n2. Validates the organization and provider exist\n3. Builds SuperTokens thirdPartyId: sso:{organization_slug}:{provider_slug}\n4. Redirects to SuperTokens callback: /auth/callback/{thirdPartyId}\n\nSuperTokens then handles:\n1. Exchange code for tokens (using our dynamic provider config)\n2. Get user info\n3. Call our sign_in_up override (creates user_identity, adds user_identities to session)\n4. Redirect to frontend with session cookie","operationId":"sso_callback_redirect","parameters":[{"name":"organization_slug","in":"path","required":true,"schema":{"type":"string","title":"Organization Slug"}},{"name":"provider_slug","in":"path","required":true,"schema":{"type":"string","title":"Provider Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tracing/spans/ingest":{"post":{"tags":["Deprecated"],"summary":"Ingest Spans","description":"Ingest spans into the tracing backend.\n\nUse this endpoint to write full OpenTelemetry-style spans — including\nmulti-span hierarchies (parent → child → grandchild), attributes,\nreferences, events and links. For simple single-span annotations or\nevaluator outputs, prefer `POST /preview/tracing/traces/`\n(`create_simple_trace`) — it's a higher-level helper on top of this\nendpoint.\n\n## Request body\n\nProvide exactly one of:\n\n- `spans`: a flat list of spans. Parent/child relationships are\n expressed via `parent_id` on each span.\n- `traces`: a nested tree keyed by `trace_id` then by span name,\n where each node may contain a `spans` dict of its children. The\n query endpoint (`POST /tracing/spans/query`) returns this shape.\n\nEach span requires `trace_id`, `span_id`, `start_time`, `end_time`.\n`trace_id` must be a 32-char hex UUID, `span_id` a 16-char hex.\nAttributes follow the Agenta convention under the `ag` namespace\n(`ag.type`, `ag.data`, `ag.metrics`, `ag.references`) and may be\nsubmitted either as a flat dotted map (OTel wire format) or as a\nnested object — both are accepted.\n\n## Response\n\nReturns `202 Accepted` with the links (`trace_id` + `span_id`) for\nthe spans that were parsed into the ingest stream. See\n[Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202)\nfor what `count < N submitted` means.\n\n## Example\n\n```json\n{\n \"spans\": [\n {\n \"trace_id\": \"f5a2efb40895881e938e2ebc070beca8\",\n \"span_id\": \"15f3df0731995245\",\n \"span_name\": \"completion_v0\",\n \"span_type\": \"workflow\",\n \"span_kind\": \"SPAN_KIND_SERVER\",\n \"start_time\": \"2026-04-16T18:18:18.491929Z\",\n \"end_time\": \"2026-04-16T18:18:20.415372Z\",\n \"attributes\": {\n \"ag.type.trace\": \"invocation\",\n \"ag.type.span\": \"workflow\",\n \"ag.data.inputs.country\": \"France\",\n \"ag.data.outputs\": \"Paris\"\n }\n }\n ]\n}\n```","operationId":"ingest_spans","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tracing/spans/query":{"post":{"tags":["Deprecated"],"summary":"Query Spans","description":"Query spans and traces in the tracing backend.\n\nUse `focus` in the request body to control the response shape:\n\n- `\"trace\"` (default): returns a nested `traces` tree keyed by\n `trace_id` then by span name. Children hang off their parent's\n `spans` field. Best for rendering a trace waterfall.\n- `\"span\"`: returns a flat `spans` list. Best for paginating or\n filtering across all spans regardless of hierarchy.\n\nUse `oldest` / `newest` (unix seconds) to window the query and\n`limit` to cap the number of traces/spans returned.\n\nThe response preserves the Agenta `ag.*` attribute namespace and\nincludes computed metrics (`ag.metrics.duration`, `ag.metrics.tokens`,\n`ag.metrics.costs`) on each span. The `traces` tree returned here is\nthe same shape that `POST /tracing/spans/ingest` accepts as its\n`traces` field.","operationId":"query_spans_rpc","deprecated":true,"parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tracing/analytics/query":{"post":{"tags":["Deprecated"],"summary":"Fetch Analytics","description":"Aggregate span metrics into time buckets.\n\nRuns filtering and windowing identical to `POST /tracing/spans/query`,\nthen bucketizes the matched spans by time and computes one or more\nmetric summaries per bucket. Use this to build charts of latency,\ncost, token usage, or custom numeric and categorical attributes.\n\n## Request body\n\n- `filtering` — same shape as the query endpoint, scoped to the spans\n that contribute to the analytics.\n- `windowing` — `oldest`/`newest` for the time range and `interval`\n for bucket width (in seconds).\n- `specs` — a list of `MetricSpec` entries describing which\n attributes to summarize and how. Each spec declares a `type`\n (`numeric/continuous`, `numeric/discrete`, `binary`,\n `categorical/single`, `categorical/multiple`, `string`, `json`,\n or `*` for auto) and a dotted `path` into the span (for example\n `attributes.ag.metrics.costs.cumulative.total`).\n\n## Response\n\nBuckets are returned in chronological order. Each bucket carries a\n`metrics` dict keyed by spec path. See [Tracing — the ag.*\nnamespace](/reference/api-guide/tracing#the-ag-attribute-namespace)\nfor the cumulative/incremental metric layout on each span.","operationId":"query_analytics","deprecated":true,"parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}},{"name":"specs","in":"query","required":false,"schema":{"title":"Specs"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tracing/traces/":{"post":{"tags":["Deprecated"],"summary":"Create Trace","description":"Create a trace from one or more spans.\n\nThis is the single-trace counterpart to `POST /tracing/spans/ingest`.\nAccepts the same `OTelTracingRequest` body (either `spans` flat list\nor `traces` nested tree) but requires all spans to share a single\n`trace_id`.\n\nReturns `202 Accepted` with the links for the spans that entered\nthe ingest stream. See [Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202).\n\nMost callers should prefer `POST /tracing/spans/ingest` (no\nsingle-trace restriction) or `POST /simple/traces/` (helper for a\none-span payload).","operationId":"create_trace_tracing","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tracing/traces/{trace_id}":{"get":{"tags":["Deprecated"],"summary":"Fetch Trace","description":"Fetch a single trace by `trace_id`.\n\nReturns the trace as a `traces` map keyed by `trace_id` → span\nname. The response is empty when the trace is not in the current\nproject. `trace_id` must be a 32-char hex UUID; any other format\nreturns `400`.\n\nFor flat-list retrieval across many traces, use\n`POST /tracing/spans/query` with `focus=\"span\"`.","operationId":"fetch_trace_tracing","deprecated":true,"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Deprecated"],"summary":"Edit Trace","description":"Replace the spans of an existing trace.\n\nThe path `trace_id` must match the `trace_id` in the payload.\nMismatches return `400`. The payload must contain exactly one\ntrace; submitting spans from more than one trace returns `400`.\n\nEdit is implemented as a re-ingest: the new spans are written\nthrough the same stream as `POST /tracing/spans/ingest`, and the\n`202 Accepted` response reports how many spans entered the stream.\nThe worker reconciles the trace asynchronously.","operationId":"edit_trace_tracing","deprecated":true,"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Deprecated"],"summary":"Delete Trace","description":"Delete a trace and all its spans.\n\nRemoves every span that shares this `trace_id` within the project.\nReturns `202 Accepted` with the links for the spans that were\nmarked for deletion. `trace_id` must be a 32-char hex UUID.\n\nDeletion is not reversible. For soft-removal semantics on a\nsingle-trace simple annotation, prefer\n`DELETE /simple/traces/{trace_id}`.","operationId":"delete_trace_tracing","deprecated":true,"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tracing/sessions/query":{"post":{"tags":["Deprecated"],"summary":"List Sessions","description":"List distinct session IDs from span attributes.\n\nReturns the distinct values of `ag.session.id` across spans in the\ncurrent project, in a windowed, cursor-paginated form. Use this to\ndrive a session-picker UI before drilling into the spans of each\nsession.\n\nThe `realtime` flag controls the cursor field:\n\n- `false` or unset — paginate by a stable `first_active` cursor\n (safe to iterate under heavy write load).\n- `true` — paginate by `last_active`, reflecting ongoing activity\n but less stable between pages.\n\nThe response includes a `windowing` cursor; pass it as `windowing.next`\non the next call to continue.","operationId":"query_sessions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionsQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tracing/users/query":{"post":{"tags":["Deprecated"],"summary":"List Users","description":"List distinct user IDs from span attributes.\n\nReturns the distinct values of `ag.user.id` across spans in the\ncurrent project. Same pagination and `realtime` semantics as\n`POST /tracing/sessions/query`; pass the returned `windowing.next`\ncursor on subsequent calls.","operationId":"query_users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsersQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tracing/spans/analytics":{"post":{"tags":["Legacy"],"summary":"Fetch Legacy Analytics","description":"Aggregate span metrics using the fixed legacy schema.\n\nReturns time-bucketed aggregates with a fixed set of fields\n(`count`, `duration`, `costs`, `tokens`) split into `total` and\n`errors`. The shape predates `specs`-driven analytics and is kept\nfor the existing observability dashboards that consume it.\n\nNew integrations should prefer `POST /tracing/analytics/query`,\nwhich accepts `specs` and can summarize arbitrary span attributes,\nnot just the four fixed metrics.","operationId":"fetch_legacy_analytics","parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OldAnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces/":{"get":{"tags":["Traces"],"summary":"Fetch Traces","description":"Fetch multiple traces by known IDs.\n\nPoint lookup endpoint. Accepts either repeated query params\n(`?trace_id=a&trace_id=b`) or a comma-separated single param\n(`?trace_ids=a,b`). Results are deduplicated. Returns `400` when\nno IDs are supplied. Use `POST /traces/query` for filter-based\nretrieval.","operationId":"fetch_traces","parameters":[{"name":"trace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Trace Id"}},{"name":"trace_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Traces"],"summary":"Create Trace","description":"Create a single trace from the canonical `Trace` shape.\n\nAccepts one trace (`trace_id` plus a nested `spans` tree) and\nreturns the resulting `trace_id`. The payload is internally\nnormalized into the same ingest pipeline as\n`POST /tracing/spans/ingest`.\n\nReturns `202 Accepted`. The async write contract applies — see\n[Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202).\n\nUse this when you want to operate on whole traces in the\nlist-shaped `Trace` payload. For flat-list ingestion or multiple\ntraces in one call, use `POST /traces/ingest` (plural).","operationId":"create_trace","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces/query":{"post":{"tags":["Traces"],"summary":"Query Traces","description":"Query traces as a list of canonical `Trace` records.\n\nThin wrapper over the shared span-query backend that forces\n`focus = \"trace\"` and returns the list-shaped `Traces` payload\n(one entry per trace, each with its nested `spans` tree). Use this\nto build a table of runs, where each row is a trace.\n\n## Request body\n\n- `filtering` — span-level conditions, same dialect as\n `POST /spans/query`. A trace matches when any of its spans\n matches.\n- `windowing` — cursor pagination and time range.\n- `query_ref`, `query_variant_ref`, `query_revision_ref` — resolve\n filters and windowing from a saved query revision. If the\n revision's stored `formatting.focus` is `span`, this endpoint\n returns `409` — call `POST /spans/query` instead.\n\n## Response\n\nReturns `{count, traces: [...]}`. For the per-trace map shape\nkeyed by `trace_id`, call `POST /tracing/spans/query` with\n`focus=\"trace\"`.","operationId":"query_traces","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracesQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces/{trace_id}":{"get":{"tags":["Traces"],"summary":"Fetch Trace","description":"Fetch a single trace by `trace_id` in the canonical `Trace` shape.\n\nReturns `{count: 1, trace}` when found and `{count: 0}` otherwise.\n`trace_id` must be a 32-char hex UUID; any other format returns\n`400`. The reserved path segments `query` and `ingest` return\n`405` to disambiguate from the sibling query/ingest endpoints.","operationId":"fetch_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Traces"],"summary":"Edit Trace","description":"Replace a trace's spans using the canonical `Trace` shape.\n\nPath `trace_id` must match the `trace_id` inside the payload's\n`trace.trace_id`. Mismatches return `400`. The payload must\ndescribe exactly one trace.\n\nEdit re-ingests the spans through the same stream as\n`POST /tracing/spans/ingest`. Returns `202 Accepted` once the\nspans are queued. The worker reconciles the trace asynchronously.","operationId":"edit_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Traces"],"summary":"Delete Trace","operationId":"delete_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces/ingest":{"post":{"tags":["Deprecated"],"summary":"Ingest Traces","description":"Ingest a batch of traces in the canonical `Traces` list shape.\n\nAccepts a list of trace records (each `trace_id` plus nested\n`spans`). Internally normalized into the same pipeline as\n`POST /tracing/spans/ingest`. Use this when you already hold\ndata in the `Traces` list shape — for example, replaying traces\nfrom another environment.\n\nReturns `202 Accepted` with the list of accepted `trace_ids`. See\n[Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202)\nfor what `count` means here.","operationId":"ingest_traces","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracesRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/spans/":{"get":{"tags":["Traces"],"summary":"Fetch Spans","description":"Fetch spans by known IDs.\n\nPoint lookup endpoint. At least one of `trace_id` or `span_id`\nmust be present. Both accept either repeated query params\n(`?trace_id=a&trace_id=b`) or a comma-separated single param\n(`?trace_ids=a,b`); results are deduplicated.\n\nReturns `400` when neither IDs nor trace IDs are supplied.\nFor filter-based retrieval, use `POST /spans/query`.","operationId":"fetch_spans","parameters":[{"name":"trace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Trace Id"}},{"name":"trace_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Ids"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Span Id"}},{"name":"span_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpansResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/query":{"post":{"tags":["Traces"],"summary":"Query Spans","description":"Query spans as a flat list.\n\nThin wrapper over the shared span-query backend that forces\n`focus = \"span\"`. Use this when you want a paged list of spans\nregardless of trace hierarchy — for example, to surface all LLM\ncalls across traces or to stream spans into an external system.\n\n## Request body\n\n- `filtering` — span-level conditions (fields on `Span` and\n `attributes` paths).\n- `windowing` — cursor pagination and time range (see\n [Query Pattern](/reference/api-guide/query-pattern#windowing)).\n- `query_ref`, `query_variant_ref`, `query_revision_ref` — resolve\n filtering and windowing from a saved query revision. If the\n revision's stored `formatting.focus` is `trace`, this endpoint\n returns `409` — call `POST /traces/query` for that revision.\n\n## Response\n\nReturns `{count, spans}`. For the nested per-trace shape, call\n`POST /traces/query` or `POST /tracing/spans/query` with\n`focus=\"trace\"` instead.","operationId":"query_spans","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpansQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpansResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/analytics/query":{"post":{"tags":["Traces"],"summary":"Query Analytics","operationId":"query_spans_analytics","parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}},{"name":"specs","in":"query","required":false,"schema":{"title":"Specs"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/sessions/query":{"post":{"tags":["Traces"],"summary":"Query Sessions","operationId":"query_spans_sessions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionsQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/users/query":{"post":{"tags":["Traces"],"summary":"Query Users","operationId":"query_spans_users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsersQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/{trace_id}/{span_id}":{"get":{"tags":["Traces"],"summary":"Fetch Span","description":"Fetch a single span by `trace_id` + `span_id`.\n\nReturns `{count: 1, span}` when found and `{count: 0}` otherwise.\nBoth IDs are required path parameters. Use this to drill in on one\nspan from a trace waterfall without pulling the full tree.","operationId":"fetch_span","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"path","required":true,"schema":{"type":"string","title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/traces/":{"post":{"tags":["Traces"],"summary":"Create Trace","description":"Create a single-span \"simple\" trace.\n\nThis endpoint is a higher-level helper for the common case of\nrecording one self-contained event — an evaluator output, a human\nannotation, a feedback entry, a manually-logged inference. It\ncreates one span under a fresh `trace_id` and returns the resulting\nhandle.\n\n## When to use this vs. `/tracing/spans/ingest`\n\n- **Use this endpoint** when you have a single payload to record\n with no internal hierarchy: evaluation results, human feedback,\n manual annotations, or a standalone completion. It takes care of\n `trace_id`/`span_id` generation, attribute namespacing, and link\n wiring for you.\n- **Use `POST /tracing/spans/ingest`** when you need multi-span\n traces (e.g. an agent run with nested tool calls and LLM spans),\n precise control over IDs, timings, or parent/child relationships,\n or when forwarding traces from another OTel-compatible source.\n\n## Request body\n\nSend a `trace` object with:\n\n- `origin` — who produced the trace (`human`, `auto`, `custom`).\n- `kind` — intent (`adhoc`, `eval`, `play`).\n- `channel` — transport that produced it (`sdk`, `api`, `web`, `otlp`).\n- `data` — required dict carrying the actual payload (inputs,\n outputs, or evaluator results).\n- `tags`, `meta` — optional free-form dicts for filtering and\n metadata.\n- `references` — optional links to Agenta entities (application,\n variant, revision, evaluator, testset, etc.).\n- `links` — optional OTel-style links to other traces/spans.\n\nUse `PATCH /preview/tracing/traces/{trace_id}` to update fields\nlater, `GET` to fetch, and `DELETE` to remove. See\n[Tracing — References and links](/reference/api-guide/tracing#references-and-entity-linking)\nfor when to use `references` vs. `links`.","operationId":"create_simple_trace","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceCreateRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/traces/{trace_id}":{"get":{"tags":["Traces"],"summary":"Fetch Trace","description":"Fetch a single \"simple\" trace by `trace_id`.\n\nReturns the high-level `SimpleTrace` view (origin, kind, channel,\ndata, references, links) rather than the raw OTel span shape. Use\nthis for evaluation results, feedback entries, and annotations\ncreated via `POST /simple/traces/`. For the span-level view of the\nsame trace, call `GET /tracing/traces/{trace_id}`.","operationId":"fetch_simple_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Traces"],"summary":"Edit Trace","description":"Update an existing \"simple\" trace.\n\nSupplied fields overwrite the existing trace. Fields not present\nin the request body are left unchanged. `data` is required (the\npayload being recorded); `tags`, `meta`, `references`, and\n`links` are optional.\n\nThis endpoint is intended for annotations and feedback entries,\nwhere the `data.outputs` is the part that typically gets revised.\nFor span-level edits, use `PUT /tracing/traces/{trace_id}`.","operationId":"edit_simple_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Traces"],"summary":"Delete Trace","description":"Delete a \"simple\" trace.\n\nRemoves the single-span trace created via\n`POST /simple/traces/`. Returns the `(trace_id, span_id)` pair\nthat was removed, for logging or downstream cleanup. Use\n`DELETE /tracing/traces/{trace_id}` when operating on a\nmulti-span trace.","operationId":"delete_simple_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/traces/query":{"post":{"tags":["Traces"],"summary":"Query Traces","description":"Query \"simple\" traces.\n\nFilter annotations and feedback by `origin`, `kind`, `channel`,\n`tags`, `meta`, `references`, and `links`. The shape of the\nrequest body is described in the\n[Simple Endpoints](/reference/api-guide/simple-endpoints#query-traces)\nguide, including the distinction between filtering via\n`trace.links` (inbound links on the trace) and the top-level\n`links` (batch GET by the trace's own IDs).\n\nUse this endpoint when building feedback or annotation UIs.\nFor span-level queries across all trace types, use\n`POST /tracing/spans/query`.","operationId":"query_simple_traces","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTracesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invocations/":{"post":{"tags":["Invocations"],"summary":"Create Invocation","operationId":"create_invocation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invocations/{trace_id}":{"get":{"tags":["Invocations"],"summary":"Fetch Invocation","operationId":"fetch_invocation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Invocations"],"summary":"Edit Invocation","operationId":"edit_invocation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Invocations"],"summary":"Delete Invocation","operationId":"delete_invocation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invocations/query":{"post":{"tags":["Invocations"],"summary":"Query Invocations","operationId":"query_invocations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/annotations/":{"post":{"tags":["Annotations"],"summary":"Create Annotation","operationId":"create_annotation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/annotations/{trace_id}":{"get":{"tags":["Annotations"],"summary":"Fetch Annotation","operationId":"fetch_annotation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Annotations"],"summary":"Edit Annotation","operationId":"edit_annotation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Annotations"],"summary":"Delete Annotation","operationId":"delete_annotation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/annotations/query":{"post":{"tags":["Annotations"],"summary":"Query Annotations","operationId":"query_annotations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testcases/":{"get":{"tags":["Testcases"],"summary":"Fetch Testcases","operationId":"fetch_testcases","parameters":[{"name":"testcase_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Testcase Id"}},{"name":"testcase_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testcase Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcasesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testcases/{testcase_id}":{"get":{"tags":["Testcases"],"summary":"Fetch Testcase","operationId":"fetch_testcase","parameters":[{"name":"testcase_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testcase Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testcases/query":{"post":{"tags":["Testcases"],"summary":"Query Testcases","operationId":"query_testcases","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcasesQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcasesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/":{"post":{"tags":["Testsets"],"summary":"Create Testset","description":"Create an empty testset artifact.\n\nOnly creates the artifact row (name, slug, metadata). No variant or\nrevision is created; add testcases by committing a revision with\n`/testsets/revisions/commit`, or use `/simple/testsets/` to create\na testset with seed rows in a single call.","operationId":"create_testset","parameters":[{"name":"testset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/{testset_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Testset","description":"Fetch a testset artifact by ID.\n\nReturns the artifact row only; testcases are stored on revisions and\nmust be fetched via `/testsets/revisions/retrieve` or\n`/testcases/query`.","operationId":"fetch_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Testset","description":"Update metadata on a testset artifact.\n\nOnly artifact-level fields (name, description, slug, flags, tags,\nmeta, folder) are editable here. Testcase changes are committed as\nnew revisions via `/testsets/revisions/commit`.","operationId":"edit_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/{testset_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Testset","description":"Soft-delete a testset artifact.\n\nSets `deleted_at` on the testset. Archived testsets are excluded\nfrom `/testsets/query` unless `include_archived` is true. Use\n`/testsets/{testset_id}/unarchive` to restore.","operationId":"archive_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/{testset_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Testset","description":"Restore a previously archived testset artifact.\n\nClears `deleted_at` on the testset so it shows up in queries again.","operationId":"unarchive_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/query":{"post":{"tags":["Testsets"],"summary":"Query Testsets","description":"List and filter testset artifacts.\n\nFollows the shared query pattern: attribute filters on the testset\nbody, optional `testset_refs` to restrict by id/slug, cursor-based\npagination via `windowing`. Only artifact rows are returned — no\ntestcases. See the Query Pattern guide for the full body shape.","operationId":"query_testsets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/":{"post":{"tags":["Testsets"],"summary":"Create Testset Variant","description":"Create a variant (history branch) on a testset.\n\nMost testsets only need one variant. Create additional variants to\nmaintain parallel revision histories (for example, a staging branch\nseparate from the main one).","operationId":"create_testset_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/{testset_variant_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Testset Variant","description":"Fetch a variant by ID.\n\nReturns the variant row (branch metadata). Use\n`/testsets/revisions/retrieve` to get the latest revision on this\nvariant.","operationId":"fetch_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Testset Variant","description":"Update metadata on a testset variant.\n\nVariants hold only branch-level metadata (name, description, slug,\nflags, tags, meta). Testcase content belongs to revisions.","operationId":"edit_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/{testset_variant_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Testset Variant","description":"Soft-delete a testset variant.\n\nArchiving a variant excludes it from `/testsets/variants/query`\nunless `include_archived` is true. Its revisions stay in place and\ncan still be retrieved by ID.","operationId":"archive_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/{testset_variant_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Testset Variant","description":"Restore a previously archived testset variant.","operationId":"unarchive_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/query":{"post":{"tags":["Testsets"],"summary":"Query Testset Variants","description":"List and filter testset variants.\n\nUse `testset_refs` to scope to one or more parent testsets. Use\n`testset_variant_refs` to restrict by specific variant id/slug.","operationId":"query_testset_variants","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/":{"post":{"tags":["Testsets"],"summary":"Create Testset Revision","description":"Create a new revision on an existing variant.\n\nCreates a revision row without committing content. Most callers\ninstead use `/testsets/revisions/commit`, which writes the\ntestcases and the revision together.","operationId":"create_testset_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Testset Revision","operationId":"fetch_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}},{"name":"include_testcases","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Include full testcase objects. Default (null/true): include testcases. False: return only testcase IDs.","title":"Include Testcases"},"description":"Include full testcase objects. Default (null/true): include testcases. False: return only testcase IDs."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Testset Revision","operationId":"edit_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Testset Revision","operationId":"archive_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Testset Revision","operationId":"unarchive_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}/download":{"post":{"tags":["Testsets"],"summary":"Fetch Testset Revision To File","operationId":"fetch_testset_revision_to_file","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}},{"name":"file_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["csv","json"],"type":"string"},{"type":"null"}],"description":"File type to download. Supported: 'csv' or 'json'. Default: 'csv'.","default":"csv","title":"File Type"},"description":"File type to download. Supported: 'csv' or 'json'. Default: 'csv'."},{"name":"file_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional custom filename for the download.","title":"File Name"},"description":"Optional custom filename for the download."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}/upload":{"post":{"tags":["Testsets"],"summary":"Create Testset Revision From File","operationId":"create_testset_revision_from_file","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_testset_revision_from_file"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/query":{"post":{"tags":["Testsets"],"summary":"Query Testset Revisions","operationId":"query_testset_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/commit":{"post":{"tags":["Testsets"],"summary":"Commit Testset Revision","operationId":"commit_testset_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/retrieve":{"post":{"tags":["Testsets"],"summary":"Retrieve Testset Revision","operationId":"retrieve_testset_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/log":{"post":{"tags":["Testsets"],"summary":"Log Testset Revisions","operationId":"log_testset_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/":{"post":{"tags":["Testsets"],"summary":"Create Simple Testset","operationId":"create_simple_testset","parameters":[{"name":"testset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Simple Testset","operationId":"fetch_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Simple Testset","operationId":"edit_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Simple Testset","operationId":"archive_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Simple Testset","operationId":"unarchive_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}/upload":{"post":{"tags":["Testsets"],"summary":"Edit Simple Testset From File","operationId":"edit_simple_testset_from_file","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_edit_simple_testset_from_file"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}/download":{"post":{"tags":["Testsets"],"summary":"Fetch Simple Testset To File","operationId":"fetch_simple_testset_to_file","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}},{"name":"file_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["csv","json"],"type":"string"},{"type":"null"}],"title":"File Type"}},{"name":"file_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/query":{"post":{"tags":["Testsets"],"summary":"Query Simple Testsets","operationId":"query_simple_testsets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/upload":{"post":{"tags":["Testsets"],"summary":"Create Simple Testset From File","operationId":"create_simple_testset_from_file","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_simple_testset_from_file"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/":{"post":{"tags":["Queries"],"summary":"Create Query","operationId":"create_query","parameters":[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/{query_id}":{"get":{"tags":["Queries"],"summary":"Fetch Query","operationId":"fetch_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Query","operationId":"edit_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/{query_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Query","operationId":"archive_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/{query_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Query","operationId":"unarchive_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/query":{"post":{"tags":["Queries"],"summary":"Query Queries","operationId":"query_queries","parameters":[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}},{"name":"query_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Query Ids"}},{"name":"query_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query Slug"}},{"name":"query_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Query Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/":{"post":{"tags":["Queries"],"summary":"Create Query Variant","operationId":"create_query_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/{query_variant_id}":{"get":{"tags":["Queries"],"summary":"Fetch Query Variant","operationId":"fetch_query_variant","parameters":[{"name":"query_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Query Variant","operationId":"edit_query_variant","parameters":[{"name":"query_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/{query_variant_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Query Variant","operationId":"archive_query_variant","parameters":[{"name":"query_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/{query_variant_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Query Variant","operationId":"unarchive_query_variant","parameters":[{"name":"query_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/query":{"post":{"tags":["Queries"],"summary":"Query Query Variants","operationId":"query_query_variants","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/retrieve":{"post":{"tags":["Queries"],"summary":"Retrieve Query Revision","operationId":"retrieve_query_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/":{"post":{"tags":["Queries"],"summary":"Create Query Revision","operationId":"create_query_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/{query_revision_id}":{"get":{"tags":["Queries"],"summary":"Fetch Query Revision","operationId":"fetch_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Query Revision","operationId":"edit_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/{query_revision_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Query Revision","operationId":"archive_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/{query_revision_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Query Revision","operationId":"unarchive_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/query":{"post":{"tags":["Queries"],"summary":"Query Query Revisions","operationId":"query_query_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/commit":{"post":{"tags":["Queries"],"summary":"Commit Query Revision","operationId":"commit_query_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/log":{"post":{"tags":["Queries"],"summary":"Log Query Revisions","operationId":"log_query_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/":{"post":{"tags":["Queries"],"summary":"Create Simple Query","operationId":"create_simple_query","parameters":[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/{query_id}":{"get":{"tags":["Queries"],"summary":"Fetch Simple Query","operationId":"fetch_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Simple Query","operationId":"edit_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/{query_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Simple Query","operationId":"archive_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/{query_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Simple Query","operationId":"unarchive_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/query":{"post":{"tags":["Queries"],"summary":"Query Simple Queries","operationId":"query_simple_queries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/folders/":{"post":{"tags":["Folders"],"summary":"Create Folder","description":"Create a folder.\n\nThe folder name must match `[\\w -]+` (letters, digits, underscore,\nspace, hyphen); other characters return `400`. The resulting path\n(the slug joined to the parent's path with a dot) must be unique\nwithin the project, otherwise the call returns `409`. Passing a\n`parent_id` that does not exist returns `404`. Paths are capped at\n10 levels of nesting and slugs at 64 characters.","operationId":"create_folder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/folders/{folder_id}":{"get":{"tags":["Folders"],"summary":"Fetch Folder","description":"Fetch one folder by id.\n\nReturns a single `folder` envelope. If the folder does not exist in\nthe caller's project, `count` is `0` and `folder` is omitted.","operationId":"fetch_folder","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Folders"],"summary":"Edit Folder","description":"Rename or move a folder.\n\nUse this endpoint to change a folder's `slug`, `name`, or\n`parent_id`. The `id` in the request body must match the path\nparameter or the call returns `400`. Name and path-uniqueness rules\nfrom create apply: invalid names return `400`, a path collision\nreturns `409`, and a missing `parent_id` returns `404`.","operationId":"edit_folder","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Folders"],"summary":"Delete Folder","description":"Delete a folder and every descendant.\n\nRemoves the folder identified by `folder_id` together with every\nfolder beneath it, in a single transaction. Deletion is\nunconditional; there is no archive or unarchive step. Resources\nthat were assigned to any of the removed folders continue to\nexist and are no longer reachable through the deleted folder.","operationId":"delete_folder","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/folders/query":{"post":{"tags":["Folders"],"summary":"Query Folders","description":"Filter folders inside the caller's project.\n\nFollows the general response envelope described in the\n[Query Pattern](/reference/api-guide/query-pattern) guide, but\ndoes not accept `windowing` or `include_archived` — folders are\nhard-deleted and the response always returns the full filtered\nset. Filters include `id`/`ids`, `slug`/`slugs`, `kind`/`kinds`,\n`parent_id`/`parent_ids` (use `parent_id: null` for root folders),\n`path`/`paths`, and `prefix`/`prefixes` for subtree lookup.","operationId":"query_folders","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoldersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/catalog/types/":{"get":{"tags":["Applications"],"summary":"List Application Catalog Types","description":"List shared catalog types.\n\nCatalog types are reusable JSON-Schema building blocks referenced from\ntemplate schemas (for example `message`, `prompt-template`). Types are\nread-only and version with the product.\nSee the [Applications guide](/reference/api-guide/applications#catalog).","operationId":"list_application_catalog_types","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogTypesResponse"}}}}}}},"/applications/catalog/templates/":{"get":{"tags":["Applications"],"summary":"List Application Catalog Templates","description":"List application templates available in the catalog.\n\nTemplates describe the handler (`uri`) and JSON schemas used to create\na new application. Pass `include_archived=true` to include retired\ntemplates (useful when editing applications created from an old\ntemplate). Templates are global and read-only.","operationId":"list_application_catalog_templates","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogTemplatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/catalog/templates/{template_key}":{"get":{"tags":["Applications"],"summary":"Fetch Application Catalog Template","description":"Fetch one application template by key.\n\nUse this to inspect the exact `uri`, `data`, and JSON Schemas for a\ntemplate before creating an application from it. `template_key` comes\nfrom the `key` field of a template returned by the list endpoint\n(for example `completion`, `chat`, `hook`).","operationId":"fetch_application_catalog_template","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/catalog/templates/{template_key}/presets/":{"get":{"tags":["Applications"],"summary":"List Application Catalog Presets","description":"List presets scoped to a template.\n\nPresets are named parameter sets (for example a curated prompt +\nmodel combination) that scaffold the first revision when creating an\napplication from a template. Pass `include_archived=true` to include\nretired presets.","operationId":"list_application_catalog_presets","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogPresetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/catalog/templates/{template_key}/presets/{preset_key}":{"get":{"tags":["Applications"],"summary":"Fetch Application Catalog Preset","description":"Fetch one preset by key within a template.\n\nReturns the preset's `data` so clients can use it as the payload for a\nfirst revision when creating an application from a template.","operationId":"fetch_application_catalog_preset","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"preset_key","in":"path","required":true,"schema":{"type":"string","title":"Preset Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogPresetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/":{"post":{"tags":["Applications"],"summary":"Create Application","description":"Create an application artifact only.\n\nReturns an empty application without any variants or revisions.\nMost callers should use `POST /simple/applications/` instead — it\ncreates the artifact, a default variant, and a first committed\nrevision in one request.\nSee the [Applications guide](/reference/api-guide/applications).","operationId":"create_application","parameters":[{"name":"application_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/{application_id}":{"get":{"tags":["Applications"],"summary":"Fetch Application","description":"Fetch one application artifact by ID.\n\nReturns artifact-level fields only. To get the current variant,\nrevision, and `data` in a single call, use\n`GET /simple/applications/{application_id}`.","operationId":"fetch_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Applications"],"summary":"Edit Application","description":"Edit artifact-level fields on an application.\n\nEditable fields: `description`, `flags`, `tags`, `meta`. Editing `name`\nis currently disabled and returns `400`. Prompt or model-parameter\nchanges go through `POST /applications/revisions/commit`, not this\nendpoint.","operationId":"edit_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/{application_id}/archive":{"post":{"tags":["Applications"],"summary":"Archive Application","description":"Soft-delete an application.\n\nArchiving sets `deleted_at` on the application and hides it from\nqueries that don't set `include_archived: true`. Its variants and\nrevisions become unreachable from listing but their IDs remain\nresolvable so historical traces stay intact.\nSee [Versioning](/reference/api-guide/versioning#archive-and-unarchive).","operationId":"archive_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/{application_id}/unarchive":{"post":{"tags":["Applications"],"summary":"Unarchive Application","description":"Restore a previously archived application.\n\nClears `deleted_at` and makes the application visible to standard\nqueries again. Safe to call on an already-active application; it is a\nno-op in that case.","operationId":"unarchive_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/query":{"post":{"tags":["Applications"],"summary":"Query Applications","description":"Query application artifacts.\n\nReturns only artifact-level fields; the variant, revision, and `data`\npayload are not included. For one row per application with those\nmerged in, use `POST /simple/applications/query`.\nSee [Query Pattern](/reference/api-guide/query-pattern).","operationId":"query_applications","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/":{"post":{"tags":["Applications"],"summary":"Create Application Variant","description":"Create a new variant on an existing application.\n\nA variant is an independent branch of the application's history. The\nnew variant starts empty — call `POST /applications/revisions/commit`\nto add its first revision. Use `POST /applications/variants/fork` when\nyou want the new variant to inherit an existing revision history.","operationId":"create_application_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/{application_variant_id}":{"get":{"tags":["Applications"],"summary":"Fetch Application Variant","description":"Fetch one variant by ID.\n\nReturns variant-level fields. To get the variant's tip revision and\nits `data`, call `POST /applications/revisions/retrieve` with\n`application_variant_ref`.","operationId":"fetch_application_variant","parameters":[{"name":"application_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Applications"],"summary":"Edit Application Variant","description":"Edit a variant's header fields (`name`, `description`, `tags`, `meta`).\n\nConfiguration changes go through a new commit via\n`POST /applications/revisions/commit`. This endpoint only touches\nvariant-level metadata.","operationId":"edit_application_variant","parameters":[{"name":"application_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/{application_variant_id}/archive":{"post":{"tags":["Applications"],"summary":"Archive Application Variant","description":"Soft-delete a variant.\n\nThe variant and its revisions are hidden from queries unless\n`include_archived: true` is sent. Revision IDs remain resolvable so\nhistorical traces are preserved.","operationId":"archive_application_variant","parameters":[{"name":"application_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/{application_variant_id}/unarchive":{"post":{"tags":["Applications"],"summary":"Unarchive Application Variant","description":"Restore a previously archived variant.","operationId":"unarchive_application_variant","parameters":[{"name":"application_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/query":{"post":{"tags":["Applications"],"summary":"Query Application Variants","description":"Query variants across one or more applications.\n\nFilters are parsed from both query-string parameters and the request\nbody; body values take precedence. Use `application_refs` to scope to\nspecific applications, `application_variant_refs` to narrow to\nspecific variants.\nSee [Query Pattern](/reference/api-guide/query-pattern).","operationId":"query_application_variants","parameters":[{"name":"application_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"}},{"name":"application_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Application Ids"}},{"name":"application_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Slug"}},{"name":"application_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Application Slugs"}},{"name":"application_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"}},{"name":"application_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Application Variant Ids"}},{"name":"application_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Variant Slug"}},{"name":"application_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Application Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/fork":{"post":{"tags":["Applications"],"summary":"Fork Application Variant","description":"Fork an existing variant into a new variant on the same application.\n\nUse this to experiment without touching the source variant's history.\nThe fork copies the source variant's revisions up to the specified\nrevision (or tip) into the new variant, then commits the supplied\n`revision` object on top. Both `variant` and `revision` sub-objects\nin the request must be present; the server returns `count: 0` when\neither is missing. Returns `400 Bad Request` if the fork target is\ninvalid (for example, the source variant or revision cannot be\nlocated in this application's lineage).","operationId":"fork_application_variant","parameters":[{"name":"application_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationForkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/retrieve":{"post":{"tags":["Applications"],"summary":"Retrieve Application Revision","description":"Retrieve one application revision by reference.\n\nAccepts application / variant / revision references for direct lookup,\nor an environment reference (with optional `key`) to resolve the\ncurrently-deployed revision in that environment. Returns the revision\nincluding its `data` payload (URL, parameters, schemas), which clients\nuse to invoke the application.\nSet `resolve: true` to inline embedded references inside `data`.","operationId":"retrieve_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/deploy":{"post":{"tags":["Applications"],"summary":"Deploy Application Revision","description":"Deploy an application revision to an environment.\n\nWrites a reference from the environment revision to the application\nrevision under `key` (default: `{application_slug}.revision`). Clients\nthat subsequently call `/applications/revisions/retrieve` with the\nsame `environment_ref` and `key` resolve to this revision.\nSee the [Applications guide](/reference/api-guide/applications#deployment).","operationId":"deploy_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionDeployRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/":{"post":{"tags":["Applications"],"summary":"Create Application Revision","description":"Create a revision row directly, without the commit workflow.\n\nAdvanced use only. For normal development loops prefer\n`POST /applications/revisions/commit`, which commits the new revision\nas the variant's tip and assigns a version number.","operationId":"create_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/{application_revision_id}":{"get":{"tags":["Applications"],"summary":"Fetch Application Revision","description":"Fetch one revision by its ID.\n\nReturns the revision including its `data` payload. For lookup by\nvariant slug or environment, use `POST /applications/revisions/retrieve`.","operationId":"fetch_application_revision","parameters":[{"name":"application_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Applications"],"summary":"Edit Application Revision","description":"Edit a revision's header fields only.\n\nRevisions are immutable snapshots; `data`, `author`, `date`, and\n`message` cannot be changed. This endpoint updates header fields such\nas `description` and `tags`. To change configuration, commit a new\nrevision with `POST /applications/revisions/commit`.","operationId":"edit_application_revision","parameters":[{"name":"application_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/{application_revision_id}/archive":{"post":{"tags":["Applications"],"summary":"Archive Application Revision","description":"Soft-delete a revision.\n\nArchived revisions are hidden from `/query` and `/log` responses\nunless `include_archived: true` is set. The ID remains resolvable for\ntraces and deployed environment references.","operationId":"archive_application_revision","parameters":[{"name":"application_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/{application_revision_id}/unarchive":{"post":{"tags":["Applications"],"summary":"Unarchive Application Revision","description":"Restore a previously archived revision.","operationId":"unarchive_application_revision","parameters":[{"name":"application_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/query":{"post":{"tags":["Applications"],"summary":"Query Application Revisions","description":"Query revisions across one or more applications or variants.\n\nUse `application_refs` / `application_variant_refs` to scope the\nquery, or filter on commit metadata (`author`, `date`, `message`) via\nthe `application_revision` object. For the ordered history of a\nsingle variant, `POST /applications/revisions/log` is more direct.\nSet `resolve: true` to inline embedded references in each revision's\n`data`.","operationId":"query_application_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/commit":{"post":{"tags":["Applications"],"summary":"Commit Application Revision","description":"Commit a new revision on a variant.\n\nThe new revision becomes the variant's tip and is assigned the next\n`version` number. Revisions are immutable once committed; to change\nconfiguration, commit a new revision.\nSee [Versioning](/reference/api-guide/versioning#committing-a-revision).","operationId":"commit_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/log":{"post":{"tags":["Applications"],"summary":"Log Application Revisions","description":"Return the ordered revision log for a variant.\n\nPass `application_variant_id` to list the full history of that\nvariant; optionally pass `application_revision_id` + `depth` to walk\nback a bounded number of commits from a specific revision. Entries\nare returned newest-first and include the full revision record.","operationId":"log_application_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/resolve":{"post":{"tags":["Applications"],"summary":"Resolve Application Revision","description":"Fetch a revision with embedded references inlined.\n\nWhen a revision's `data` carries references to other entities\n(snippets, linked revisions), this endpoint resolves them in place and\nreturns the fully-inlined configuration along with `resolution_info`\ndescribing what was substituted. Use it when clients need a\nself-contained configuration for invocation or export.","operationId":"resolve_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/":{"post":{"tags":["Applications"],"summary":"Create Simple Application","description":"Create an application end-to-end.\n\nCreates the application artifact, a default variant, and a first\ncommitted revision whose `data` comes from the request. This is the\nrecommended entry point for \"spin up a new application from a\ntemplate\". For more control over variant and revision creation, use\nthe structured endpoints under `/applications/`.\nSee [Simple Endpoints](/reference/api-guide/simple-endpoints).","operationId":"create_simple_application","parameters":[{"name":"application_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/query":{"post":{"tags":["Applications"],"summary":"Query Simple Applications","description":"Query applications with variant, revision, and `data` merged per row.\n\nThis is the shape most clients want for dashboards or invocation\npickers: each row carries `variant_id`, `revision_id`, and `data`\n(URL, parameters, schemas) alongside the artifact fields. For the\nstructured query that returns artifacts only, use\n`POST /applications/query`.","operationId":"query_simple_applications","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/{application_id}":{"get":{"tags":["Applications"],"summary":"Fetch Simple Application","description":"Fetch one application with its current variant, revision, and `data` merged.\n\nThe returned `data` includes the invocation `url`, the `parameters`\nthe revision was committed with, and the JSON `schemas` for inputs,\noutputs, and parameters.","operationId":"fetch_simple_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Applications"],"summary":"Edit Simple Application","description":"Edit an application and commit a new revision if configuration changed.\n\nFields other than `id` in the request body are treated as changes and\nproduce a new committed revision. Supplying `data` changes the\nconfiguration; supplying only header fields (`flags`, `tags`, `meta`)\nstill produces a new revision with the updated header but the\nexisting `data`. Editing the application `name` is currently\ndisabled and returns `400`.","operationId":"edit_simple_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/{application_id}/archive":{"post":{"tags":["Applications"],"summary":"Archive Simple Application","description":"Archive an application through the simple endpoint layer.\n\nEquivalent to `POST /applications/{application_id}/archive`; returns\nthe archived application in the simple shape (with its last known\nvariant, revision, and `data`).","operationId":"archive_simple_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/{application_id}/unarchive":{"post":{"tags":["Applications"],"summary":"Unarchive Simple Application","description":"Unarchive an application through the simple endpoint layer.\n\nEquivalent to `POST /applications/{application_id}/unarchive`, with\nthe response shape of `/simple/applications/`.","operationId":"unarchive_simple_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/types/":{"get":{"tags":["Workflows"],"summary":"List Workflow Catalog Types","description":"List the shared JSON Schema fragments available to workflow schemas.\n\nWorkflow input/output schemas reference these via `x-ag-type-ref` (for\nexample, `message` or `prompt`). Use this endpoint to discover what\ntype keys exist before building a schema.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"list_workflow_catalog_types","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogTypesResponse"}}}}}}},"/workflows/catalog/types/{ag_type}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Catalog Type","description":"Return the JSON Schema for a single shared type key.\n\nReturns 404 when the `ag_type` is not part of the shipped catalog.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow_catalog_type","parameters":[{"name":"ag_type","in":"path","required":true,"schema":{"type":"string","title":"Ag Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/templates/":{"get":{"tags":["Workflows"],"summary":"List Workflow Catalog Templates","description":"List workflow blueprints shipped with the product.\n\nFilter by domain with `is_application`, `is_evaluator`, or\n`is_snippet`. Archived templates are hidden unless `include_archived`\nis true. Templates are global and read-only.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"list_workflow_catalog_templates","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"is_application","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"}},{"name":"is_evaluator","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"}},{"name":"is_snippet","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogTemplatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/templates/{template_key}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Catalog Template","description":"Return a single workflow template by its key.\n\nReturns `count=0` when the template is not found. Templates are global\nmetadata and are not scoped to a project.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow_catalog_template","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/templates/{template_key}/presets/":{"get":{"tags":["Workflows"],"summary":"List Workflow Catalog Presets","description":"List presets defined against a template.\n\nPresets are named parameter sets that can be committed as the first\nrevision of a new variant. Returns an empty list when a template has\nno canned presets.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"list_workflow_catalog_presets","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogPresetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/templates/{template_key}/presets/{preset_key}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Catalog Preset","description":"Return a single preset for a template by key.\n\nReturns `count=0` when the preset is not defined.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow_catalog_preset","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"preset_key","in":"path","required":true,"schema":{"type":"string","title":"Preset Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogPresetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/":{"post":{"tags":["Workflows"],"summary":"Create Workflow","description":"Create a workflow artifact.\n\nCreates the top-level container only; commit a revision on a variant\nbefore the workflow can be retrieved or invoked. Use when you need the\nlower-level primitive — pick `/applications/` for serving logic or\n`/evaluators/` for scoring logic.\n\nSee: [Workflows](/reference/api-guide/workflows),\n[Versioning](/reference/api-guide/versioning).","operationId":"create_workflow","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow","description":"Fetch a workflow artifact by ID.\n\nReturns the artifact only — variants and revisions are not included.\nUse `/workflows/variants/query` and `/workflows/revisions/query` for\nthe child entities.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Workflow","description":"Update artifact-level fields on a workflow.\n\nThe `id` in the body must match the path parameter. Only supplied\nfields are modified. Configuration (parameters, URL, schemas) lives on\nrevisions — commit a new revision to change those.\n\nSee: [Workflows](/reference/api-guide/workflows),\n[Versioning](/reference/api-guide/versioning).","operationId":"edit_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Workflow","description":"Archive a workflow artifact (soft delete).\n\nSets `deleted_at` on the workflow and its variants. Archived\nworkflows are hidden from queries unless `include_archived=true`.\nRevision IDs remain resolvable so historical traces stay intact.\n\nSee: [Versioning](/reference/api-guide/versioning).","operationId":"archive_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Workflow","description":"Restore a previously archived workflow.\n\nClears `deleted_at` on the workflow. Archived variants and revisions\nare restored with the workflow.\n\nSee: [Versioning](/reference/api-guide/versioning).","operationId":"unarchive_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/query":{"post":{"tags":["Workflows"],"summary":"Query Workflows","description":"Query workflow artifacts with filters and pagination.\n\nAccepts the same filters as query parameters or in the request body;\nbody fields win when both are supplied. Results are ordered by\ncreation time; pass `windowing.next` back for the following page.\n\nSee: [Query Pattern](/reference/api-guide/query-pattern).","operationId":"query_workflows","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/":{"post":{"tags":["Workflows"],"summary":"Create Workflow Variant","description":"Create a new variant under an existing workflow.\n\nVariants are branches of an artifact's history; each maintains its own\nrevision log. Variant slugs are unique within the project — reuse of a\nslug already in use returns a 409 conflict.\n\nSee: [Versioning](/reference/api-guide/versioning).","operationId":"create_workflow_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/{workflow_variant_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Variant","description":"Fetch a workflow variant by ID.\n\nReturns the variant metadata only — use\n`/workflows/revisions/retrieve` or `/workflows/revisions/log` for the\nvariant's revisions.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Workflow Variant","description":"Update metadata on a workflow variant.\n\nThe `id` in the body must match the path parameter. Revisions on the\nvariant are not affected — commit a new revision to change data.\n\nSee: [Versioning](/reference/api-guide/versioning).","operationId":"edit_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/{workflow_variant_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Workflow Variant","description":"Archive a workflow variant.\n\nSoft-deletes the variant and its revisions. Archived variants are\nhidden from queries unless `include_archived=true`. See\n[Versioning](/reference/api-guide/versioning).","operationId":"archive_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/{workflow_variant_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Workflow Variant","description":"Restore a previously archived workflow variant.\n\nClears `deleted_at` on the variant and its revisions. See\n[Versioning](/reference/api-guide/versioning).","operationId":"unarchive_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/query":{"post":{"tags":["Workflows"],"summary":"Query Workflow Variants","description":"Query workflow variants with filters and pagination.\n\nScope the query by `workflow_refs` (parent artifact) or\n`workflow_variant_refs` (specific variants). Accepts the same fields\nas query parameters or in the request body.\n\nSee: [Query Pattern](/reference/api-guide/query-pattern).","operationId":"query_workflow_variants","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}},{"name":"workflow_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Variant Ids"}},{"name":"workflow_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Variant Slug"}},{"name":"workflow_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/fork":{"post":{"tags":["Workflows"],"summary":"Fork Workflow Variant","operationId":"fork_workflow_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowForkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/retrieve":{"post":{"tags":["Workflows"],"summary":"Retrieve Workflow Revision","operationId":"retrieve_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/deploy":{"post":{"tags":["Workflows"],"summary":"Deploy Workflow Revision","operationId":"deploy_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionDeployRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/":{"post":{"tags":["Workflows"],"summary":"Create Workflow Revision","operationId":"create_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/{workflow_revision_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Revision","operationId":"fetch_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Workflow Revision","operationId":"edit_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/{workflow_revision_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Workflow Revision","operationId":"archive_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/{workflow_revision_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Workflow Revision","operationId":"unarchive_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/query":{"post":{"tags":["Workflows"],"summary":"Query Workflow Revisions","operationId":"query_workflow_revisions","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}},{"name":"workflow_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Variant Ids"}},{"name":"workflow_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Variant Slug"}},{"name":"workflow_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Variant Slugs"}},{"name":"workflow_revision_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"}},{"name":"workflow_revision_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Revision Ids"}},{"name":"workflow_revision_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Revision Slug"}},{"name":"workflow_revision_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Revision Slugs"}},{"name":"workflow_revision_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Revision Version"}},{"name":"workflow_revision_versions","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Revision Versions"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/commit":{"post":{"tags":["Workflows"],"summary":"Commit Workflow Revision","operationId":"commit_workflow_revision","parameters":[{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionCommitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/log":{"post":{"tags":["Workflows"],"summary":"Log Workflow Revisions","operationId":"log_workflow_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/resolve":{"post":{"tags":["Workflows"],"summary":"Resolve Workflow Revision Endpoint","description":"Resolve embedded references in a workflow revision configuration.\n\nThis endpoint:\n1. Fetches the workflow revision\n2. Resolves all @ag.references tokens in the configuration\n3. Returns the revision with resolved configuration + metadata","operationId":"resolve_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/":{"post":{"tags":["Workflows"],"summary":"Create Simple Workflow","operationId":"create_simple_workflow","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/{workflow_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Simple Workflow","operationId":"fetch_simple_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Simple Workflow","operationId":"edit_simple_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/{workflow_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Simple Workflow","operationId":"archive_simple_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/{workflow_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Simple Workflow","operationId":"unarchive_simple_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/query":{"post":{"tags":["Workflows"],"summary":"Query Simple Workflows","operationId":"query_simple_workflows","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/catalog/types/":{"get":{"tags":["Evaluators"],"summary":"List Evaluator Catalog Types","description":"List the JSON schema types the evaluator catalog understands.\n\nTypes are static metadata shipped with the product. Use this when\nrendering a catalog UI or validating that a template's schema is\nsupported. See the Evaluators guide for how the catalog relates\nto user-owned evaluator artifacts.","operationId":"list_evaluator_catalog_types","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogTypesResponse"}}}}}}},"/evaluators/catalog/templates/":{"get":{"tags":["Evaluators"],"summary":"List Evaluator Catalog Templates","description":"List evaluator templates from the catalog.\n\nTemplates are blueprints that describe an evaluator's handler\nURI, JSON schemas, and default configuration. Pass\n`include_archived=true` to include deprecated templates. Use the\nreturned `key` with `/catalog/templates/{template_key}/presets/`\nto list its presets.","operationId":"list_evaluator_catalog_templates","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogTemplatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/catalog/templates/{template_key}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Catalog Template","description":"Fetch one evaluator template by key.\n\nReturns an empty envelope (`count: 0`) when no template matches\nthe key. Template keys come from\n`GET /catalog/templates/`.","operationId":"fetch_evaluator_catalog_template","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/catalog/templates/{template_key}/presets/":{"get":{"tags":["Evaluators"],"summary":"List Evaluator Catalog Presets","description":"List presets defined against one evaluator template.\n\nA preset is a named set of parameter values pre-filled against\nthe template. Use the returned `key` to fetch a specific preset\nvia `GET /catalog/templates/{template_key}/presets/{preset_key}`.","operationId":"list_evaluator_catalog_presets","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogPresetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/catalog/templates/{template_key}/presets/{preset_key}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Catalog Preset","description":"Fetch one evaluator preset by template and preset key.\n\nPresets are not separate entities; they are metadata. Use the\nreturned preset payload as the starting point when creating a\nnew evaluator from a template. See the Evaluators guide.","operationId":"fetch_evaluator_catalog_preset","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"preset_key","in":"path","required":true,"schema":{"type":"string","title":"Preset Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogPresetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/":{"post":{"tags":["Evaluators"],"summary":"Create Evaluator","description":"Create an evaluator artifact, its first variant, and its initial revision.\n\nUse this endpoint when you already know you want to manage the\nartifact / variant / revision layers independently. For a\none-shot \"create and forget\" call that returns a flat record,\nsee `POST /simple/evaluators/`. See the Versioning guide for\ncommit semantics.","operationId":"create_evaluator","parameters":[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/{evaluator_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator","description":"Fetch an evaluator artifact by id.\n\nReturns the artifact-level record (slug, name, flags, lifecycle)\nwithout variant or revision data. Use the variant and revision\nendpoints to retrieve those layers.","operationId":"fetch_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Evaluator","description":"Edit an evaluator artifact's metadata.\n\nEdits are limited to metadata fields (description, tags, meta).\nRenaming is temporarily disabled and returns 400. To change\nevaluator behavior, commit a new revision on the variant — see\n`/evaluators/revisions/commit`.","operationId":"edit_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/{evaluator_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Evaluator","description":"Soft-delete an evaluator artifact.\n\nSets `deleted_at` on the evaluator and hides it from subsequent\n`/query` responses unless `include_archived=true`. Revision IDs\nremain resolvable so historical traces stay intact.","operationId":"archive_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/{evaluator_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Evaluator","description":"Restore a soft-deleted evaluator artifact.\n\nClears `deleted_at` on the evaluator so it re-appears in `/query`\nresponses.","operationId":"unarchive_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/query":{"post":{"tags":["Evaluators"],"summary":"Query Evaluators","description":"Query evaluator artifacts with filters and pagination.\n\nReturns artifact-level records only. The request body follows\nthe shared query pattern (filter + refs + windowing). Send `{}`\nto list all evaluators in the project. See the Query Pattern\nguide.","operationId":"query_evaluators","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/":{"post":{"tags":["Evaluators"],"summary":"Create Evaluator Variant","description":"Create a new variant on an existing evaluator.\n\nA variant is a named branch of the evaluator's history. New\nrevisions committed to this variant do not touch other variants.\nSee the Versioning guide.","operationId":"create_evaluator_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/{evaluator_variant_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Variant","description":"Fetch an evaluator variant by id.\n\nReturns the variant record (slug, flags, lifecycle) without the\ncommitted revisions. Use `/evaluators/revisions/retrieve` to\nread the variant's current revision payload.","operationId":"fetch_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Evaluator Variant","description":"Edit a variant's metadata.\n\nEdits only touch variant-level metadata. To change evaluator\nbehavior commit a new revision via\n`/evaluators/revisions/commit`.","operationId":"edit_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/{evaluator_variant_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Evaluator Variant","description":"Soft-delete an evaluator variant.\n\nSets `deleted_at` on the variant. Its revisions stay resolvable\nby id; they are hidden from `/query` unless the caller sets\n`include_archived=true`.","operationId":"archive_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/{evaluator_variant_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Evaluator Variant","description":"Restore a soft-deleted evaluator variant.","operationId":"unarchive_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/query":{"post":{"tags":["Evaluators"],"summary":"Query Evaluator Variants","description":"Query evaluator variants with filters, reference scoping, and pagination.\n\nAccepts parameters from both the query string and a JSON body;\nthe two are merged. Use `evaluator_refs` to scope to one or more\nevaluators, or `evaluator_variant_refs` for specific variants.","operationId":"query_evaluator_variants","parameters":[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}},{"name":"evaluator_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Evaluator Ids"}},{"name":"evaluator_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Slug"}},{"name":"evaluator_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Evaluator Slugs"}},{"name":"evaluator_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"}},{"name":"evaluator_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Evaluator Variant Ids"}},{"name":"evaluator_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Variant Slug"}},{"name":"evaluator_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Evaluator Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/fork":{"post":{"tags":["Evaluators"],"summary":"Fork Evaluator Variant","description":"Fork an evaluator variant into a new variant.\n\nCreates a new branch whose initial revision is copied from the\nsource. Use this to experiment without touching the original.\nThe returned variant has a fresh id and slug but inherits\nlineage metadata from its source.","operationId":"fork_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorForkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/retrieve":{"post":{"tags":["Evaluators"],"summary":"Retrieve Evaluator Revision","description":"Retrieve one evaluator revision, either directly or via an environment key.\n\nProvide one of:\nan evaluator / variant / revision reference (returns that\nrevision, or the latest revision on the variant or evaluator),\nor an environment reference plus `key` (returns the revision\ncurrently pinned to that key). Supplying both forms returns 400.\nPass `resolve=true` to expand embedded references on the\nreturned payload.","operationId":"retrieve_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/deploy":{"post":{"tags":["Evaluators"],"summary":"Deploy Evaluator Revision","description":"Pin an evaluator revision into an environment revision under a key.\n\nRequires an evaluator ref (`evaluator_ref`,\n`evaluator_variant_ref`, or `evaluator_revision_ref`) and an\nenvironment ref. When `key` is omitted it defaults to\n`.revision`. The deployment is recorded as a\nnew commit on the environment revision. See the Evaluators\nguide for the deployment model.","operationId":"deploy_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionDeployRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/":{"post":{"tags":["Evaluators"],"summary":"Create Evaluator Revision","description":"Create a new revision on an evaluator variant.\n\nPrefer `/evaluators/revisions/commit` for the standard commit\nflow. This endpoint exists for internal create paths that need\nto insert a revision without the commit semantics.","operationId":"create_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/{evaluator_revision_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Revision","description":"Fetch a specific evaluator revision by id.\n\nReturns the full revision including `data` (handler uri,\nschemas, and parameters). To pick the latest revision on a\nvariant without knowing its id, use\n`/evaluators/revisions/retrieve`.","operationId":"fetch_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Evaluator Revision","description":"Edit a revision's metadata.\n\nRevision `data` is immutable once committed. This endpoint is\nfor metadata fields only (description, tags, meta). To change\nevaluator behavior, commit a new revision instead.","operationId":"edit_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/{evaluator_revision_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Evaluator Revision","description":"Soft-delete an evaluator revision.\n\nArchived revisions remain resolvable by id but are excluded from\nrevision logs and queries unless `include_archived=true`.","operationId":"archive_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/{evaluator_revision_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Evaluator Revision","description":"Restore a soft-deleted evaluator revision.","operationId":"unarchive_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/query":{"post":{"tags":["Evaluators"],"summary":"Query Evaluator Revisions","description":"Query evaluator revisions with filters, reference scoping, and pagination.\n\nReturns revision payloads. Use `evaluator_refs`,\n`evaluator_variant_refs`, or `evaluator_revision_refs` to scope\nthe query. Pass `resolve=true` to expand embedded references on\neach revision's `data`.","operationId":"query_evaluator_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/commit":{"post":{"tags":["Evaluators"],"summary":"Commit Evaluator Revision","description":"Commit a new revision on an evaluator variant.\n\nThe commit body carries the target `evaluator_variant_id`, an\noptional `message`, and the revision `data` (handler uri,\nschemas, parameters). A committed revision is immutable.","operationId":"commit_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/log":{"post":{"tags":["Evaluators"],"summary":"Log Evaluator Revisions","description":"List the revision log of an evaluator variant.\n\nReturns revisions in commit order. Scope the log by supplying\nan evaluator, variant, or revision reference. Use the retrieve\nendpoint to fetch a specific revision's full payload.","operationId":"log_evaluator_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/resolve":{"post":{"tags":["Evaluators"],"summary":"Resolve Evaluator Revision","description":"Resolve embedded references on an evaluator revision's `data`.\n\nWalks embedded references (for example, references to other\nrevisions or to secrets) up to `max_depth` and `max_embeds`.\nThe response includes a `resolution_info` block with counts,\ndepth reached, and errors according to `error_policy`.","operationId":"resolve_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/":{"post":{"tags":["Evaluators"],"summary":"Create Simple Evaluator","description":"Create an evaluator via the simple surface.\n\nCreates the artifact, its first variant, and its initial\nrevision in one call. Returns the flat evaluator record\n(latest revision merged into `data`). Use this when you do not\nneed to manage variants or revisions directly.","operationId":"create_simple_evaluator","parameters":[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/templates":{"get":{"tags":["Evaluators"],"summary":"List Evaluator Templates","description":"List the legacy built-in evaluator templates.\n\nReturns static evaluator-type definitions shipped with the\nproduct. Prefer the `/evaluators/catalog/*` endpoints for new\nintegrations; this endpoint is kept for older clients. Pass\n`include_archived=true` to include deprecated templates.","operationId":"list_evaluator_templates","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorTemplatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/{evaluator_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Simple Evaluator","description":"Fetch one evaluator via the simple surface.\n\nReturns the flat evaluator record including its current variant\nand revision ids and the merged `data` payload.","operationId":"fetch_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Simple Evaluator","description":"Edit an evaluator via the simple surface.\n\nTouches metadata and (when `data` is supplied) commits a new\nrevision on the evaluator's variant. Renaming is temporarily\ndisabled and returns 400.","operationId":"edit_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/{evaluator_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Simple Evaluator","description":"Soft-delete an evaluator via the simple surface.\n\nArchives the underlying artifact. Historical traces that\nreference specific revision ids remain resolvable.","operationId":"archive_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/{evaluator_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Simple Evaluator","description":"Restore a soft-deleted evaluator via the simple surface.","operationId":"unarchive_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/query":{"post":{"tags":["Evaluators"],"summary":"Query Simple Evaluators","description":"Query evaluators via the simple surface with filters and pagination.\n\nReturns flat evaluator records (one per artifact with its\nlatest variant and revision merged into `data`). Send `{}` to\nlist all evaluators in the project. See the Query Pattern\nguide.","operationId":"query_simple_evaluators","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/":{"post":{"tags":["Environments"],"summary":"Create Environment","operationId":"create_environment","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/{environment_id}":{"get":{"tags":["Environments"],"summary":"Fetch Environment","operationId":"fetch_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Environments"],"summary":"Edit Environment","operationId":"edit_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/{environment_id}/archive":{"post":{"tags":["Environments"],"summary":"Archive Environment","operationId":"archive_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/{environment_id}/unarchive":{"post":{"tags":["Environments"],"summary":"Unarchive Environment","operationId":"unarchive_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/query":{"post":{"tags":["Environments"],"summary":"Query Environments","operationId":"query_environments","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}},{"name":"environment_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Ids"}},{"name":"environment_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Slug"}},{"name":"environment_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/":{"post":{"tags":["Environments"],"summary":"Create Environment Variant","operationId":"create_environment_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/{environment_variant_id}":{"get":{"tags":["Environments"],"summary":"Fetch Environment Variant","operationId":"fetch_environment_variant","parameters":[{"name":"environment_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Environments"],"summary":"Edit Environment Variant","operationId":"edit_environment_variant","parameters":[{"name":"environment_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/{environment_variant_id}/archive":{"post":{"tags":["Environments"],"summary":"Archive Environment Variant","operationId":"archive_environment_variant","parameters":[{"name":"environment_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/{environment_variant_id}/unarchive":{"post":{"tags":["Environments"],"summary":"Unarchive Environment Variant","operationId":"unarchive_environment_variant","parameters":[{"name":"environment_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/query":{"post":{"tags":["Environments"],"summary":"Query Environment Variants","operationId":"query_environment_variants","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}},{"name":"environment_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Ids"}},{"name":"environment_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Slug"}},{"name":"environment_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Slugs"}},{"name":"environment_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"}},{"name":"environment_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Variant Ids"}},{"name":"environment_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Variant Slug"}},{"name":"environment_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/retrieve":{"post":{"tags":["Environments"],"summary":"Retrieve Environment Revision","operationId":"retrieve_environment_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/":{"post":{"tags":["Environments"],"summary":"Create Environment Revision","operationId":"create_environment_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/{environment_revision_id}":{"get":{"tags":["Environments"],"summary":"Fetch Environment Revision","operationId":"fetch_environment_revision","parameters":[{"name":"environment_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Environments"],"summary":"Edit Environment Revision","operationId":"edit_environment_revision","parameters":[{"name":"environment_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/{environment_revision_id}/archive":{"post":{"tags":["Environments"],"summary":"Archive Environment Revision","operationId":"archive_environment_revision","parameters":[{"name":"environment_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/{environment_revision_id}/unarchive":{"post":{"tags":["Environments"],"summary":"Unarchive Environment Revision","operationId":"unarchive_environment_revision","parameters":[{"name":"environment_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/query":{"post":{"tags":["Environments"],"summary":"Query Environment Revisions","operationId":"query_environment_revisions","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}},{"name":"environment_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Ids"}},{"name":"environment_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Slug"}},{"name":"environment_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Slugs"}},{"name":"environment_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"}},{"name":"environment_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Variant Ids"}},{"name":"environment_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Variant Slug"}},{"name":"environment_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Variant Slugs"}},{"name":"environment_revision_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Revision Id"}},{"name":"environment_revision_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Revision Ids"}},{"name":"environment_revision_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Revision Slug"}},{"name":"environment_revision_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Revision Slugs"}},{"name":"environment_revision_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Revision Version"}},{"name":"environment_revision_versions","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Revision Versions"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/commit":{"post":{"tags":["Environments"],"summary":"Commit Environment Revision","operationId":"commit_environment_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/log":{"post":{"tags":["Environments"],"summary":"Log Environment Revisions","operationId":"log_environment_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/resolve":{"post":{"tags":["Environments"],"summary":"Resolve Environment Revision Endpoint","description":"Resolve embedded references in an environment revision configuration.\n\nThis endpoint:\n1. Fetches the environment revision\n2. Resolves all @ag.references tokens in the configuration\n3. Returns the revision with resolved configuration + metadata","operationId":"resolve_environment_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/":{"post":{"tags":["Environments"],"summary":"Create Simple Environment","operationId":"create_simple_environment","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}":{"get":{"tags":["Environments"],"summary":"Fetch Simple Environment","operationId":"fetch_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Environments"],"summary":"Edit Simple Environment","operationId":"edit_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}/archive":{"post":{"tags":["Environments"],"summary":"Archive Simple Environment","operationId":"archive_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}/unarchive":{"post":{"tags":["Environments"],"summary":"Unarchive Simple Environment","operationId":"unarchive_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/query":{"post":{"tags":["Environments"],"summary":"Query Simple Environments","operationId":"query_simple_environments","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}/guard":{"post":{"tags":["Environments"],"summary":"Guard Simple Environment","operationId":"guard_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}/unguard":{"post":{"tags":["Environments"],"summary":"Unguard Simple Environment","operationId":"unguard_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/configs/fetch":{"post":{"tags":["Deprecated"],"summary":"Configs Fetch","operationId":"configs_fetch_variants_configs_fetch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_configs_fetch_variants_configs_fetch_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tools/catalog/providers/":{"get":{"tags":["Tools"],"summary":"List Providers","operationId":"list_tool_providers","parameters":[{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogProvidersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}":{"get":{"tags":["Tools"],"summary":"Get Provider","operationId":"fetch_tool_provider","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}/integrations/":{"get":{"tags":["Tools"],"summary":"List Integrations","operationId":"list_tool_integrations","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogIntegrationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}/integrations/{integration_key}":{"get":{"tags":["Tools"],"summary":"Get Integration","operationId":"fetch_tool_integration","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"integration_key","in":"path","required":true,"schema":{"type":"string","title":"Integration Key"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogIntegrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}/integrations/{integration_key}/actions/":{"get":{"tags":["Tools"],"summary":"List Actions","operationId":"list_tool_actions","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"integration_key","in":"path","required":true,"schema":{"type":"string","title":"Integration Key"}},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"}},{"name":"categories","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Categories"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogActionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}/integrations/{integration_key}/actions/{action_key}":{"get":{"tags":["Tools"],"summary":"Get Action","operationId":"fetch_tool_action","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"integration_key","in":"path","required":true,"schema":{"type":"string","title":"Integration Key"}},{"name":"action_key","in":"path","required":true,"schema":{"type":"string","title":"Action Key"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/query":{"post":{"tags":["Tools"],"summary":"Query Connections","description":"Query connections with optional filtering.","operationId":"query_tool_connections","parameters":[{"name":"provider_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Key"}},{"name":"integration_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/":{"post":{"tags":["Tools"],"summary":"Create Connection","description":"Create a new tool connection.","operationId":"create_tool_connection","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/callback":{"get":{"tags":["Tools"],"summary":"Callback Connection","description":"Handle OAuth callback from Composio.","operationId":"callback_tool_connection","parameters":[{"name":"connected_account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected Account Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"error_message","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/{connection_id}":{"get":{"tags":["Tools"],"summary":"Get Connection","description":"Get a connection by ID.","operationId":"fetch_tool_connection","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Tools"],"summary":"Delete Connection","description":"Delete a connection by ID.","operationId":"delete_tool_connection","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/{connection_id}/refresh":{"post":{"tags":["Tools"],"summary":"Refresh Connection","description":"Refresh a connection's credentials.","operationId":"refresh_tool_connection","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/{connection_id}/revoke":{"post":{"tags":["Tools"],"summary":"Revoke Connection","description":"Mark a connection invalid locally (does not revoke at the provider).","operationId":"revoke_tool_connection","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/call":{"post":{"tags":["Tools"],"summary":"Call Tool","description":"Call a tool action with a connection.","operationId":"call_tool","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCall"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/":{"post":{"tags":["Evaluations"],"summary":"Create Runs","operationId":"create_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Runs","operationId":"delete_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Runs","operationId":"edit_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/query":{"post":{"tags":["Evaluations"],"summary":"Query Runs","operationId":"query_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/close":{"post":{"tags":["Evaluations"],"summary":"Close Runs","operationId":"close_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/open":{"post":{"tags":["Evaluations"],"summary":"Open Runs","operationId":"open_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/{run_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Run","operationId":"fetch_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Run","operationId":"edit_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Run","operationId":"delete_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/{run_id}/close":{"post":{"tags":["Evaluations"],"summary":"Close Run","operationId":"close_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/{run_id}/close/{status}":{"post":{"tags":["Evaluations"],"summary":"Close Run","operationId":"close_run_with_status","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"status","in":"path","required":true,"schema":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/{run_id}/open":{"post":{"tags":["Evaluations"],"summary":"Open Run","operationId":"open_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/scenarios/":{"post":{"tags":["Evaluations"],"summary":"Create Scenarios","operationId":"create_scenarios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Scenarios","operationId":"delete_scenarios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Scenarios","operationId":"edit_scenarios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/scenarios/query":{"post":{"tags":["Evaluations"],"summary":"Query Scenarios","operationId":"query_scenarios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/scenarios/{scenario_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Scenario","operationId":"fetch_scenario","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Scenario","operationId":"edit_scenario","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Scenario","operationId":"delete_scenario","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/results/":{"post":{"tags":["Evaluations"],"summary":"Create Results","operationId":"create_results","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Results","operationId":"delete_results","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Results","operationId":"edit_results","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/results/query":{"post":{"tags":["Evaluations"],"summary":"Query Results","operationId":"query_results","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/results/{result_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Result","operationId":"fetch_result","parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Result","operationId":"edit_result","parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Result","operationId":"delete_result","parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/metrics/refresh":{"post":{"tags":["Evaluations"],"summary":"Refresh Metrics","operationId":"refresh_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsRefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/metrics/":{"post":{"tags":["Evaluations"],"summary":"Create Metrics","operationId":"create_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Metrics","operationId":"delete_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Metrics","operationId":"edit_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/metrics/query":{"post":{"tags":["Evaluations"],"summary":"Query Metrics","operationId":"query_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/queues/":{"post":{"tags":["Evaluations"],"summary":"Create Queues","operationId":"create_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Queues","operationId":"delete_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Queues","operationId":"edit_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/queues/query":{"post":{"tags":["Evaluations"],"summary":"Query Queues","operationId":"query_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/queues/{queue_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Queue","operationId":"fetch_queue","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Queue","operationId":"edit_queue","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Queue","operationId":"delete_queue","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/queues/{queue_id}/scenarios/query":{"post":{"tags":["Evaluations"],"summary":"Query Queue Scenarios","operationId":"query_evaluation_queue_scenarios","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueScenariosQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/":{"post":{"tags":["Evaluations"],"summary":"Create Evaluation","operationId":"create_simple_evaluation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Evaluation","operationId":"fetch_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Evaluation","operationId":"edit_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Evaluation","operationId":"delete_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/query":{"post":{"tags":["Evaluations"],"summary":"Query Evaluations","operationId":"query_simple_evaluations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}/start":{"post":{"tags":["Evaluations"],"summary":"Start Evaluation","operationId":"start_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}/stop":{"post":{"tags":["Evaluations"],"summary":"Stop Evaluation","operationId":"stop_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}/close":{"post":{"tags":["Evaluations"],"summary":"Close Evaluation","operationId":"close_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}/open":{"post":{"tags":["Evaluations"],"summary":"Open Evaluation","operationId":"open_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/":{"post":{"tags":["Evaluations"],"summary":"Create Queue","operationId":"create_simple_queue","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/query":{"post":{"tags":["Evaluations"],"summary":"Query Queues","operationId":"query_simple_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/{queue_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Queue","operationId":"fetch_simple_queue","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/{queue_id}/scenarios/query":{"post":{"tags":["Evaluations"],"summary":"Query Queue Scenarios","operationId":"query_simple_queue_scenarios","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueScenariosQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/{queue_id}/traces/":{"post":{"tags":["Evaluations"],"summary":"Add Queue Traces","operationId":"add_simple_queue_traces","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueTracesCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/{queue_id}/testcases/":{"post":{"tags":["Evaluations"],"summary":"Add Queue Testcases","operationId":"add_simple_queue_testcases","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueTestcasesCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounts/":{"post":{"tags":["Admin"],"summary":"Create accounts","operationId":"create_accounts_admin_accounts__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete accounts","operationId":"delete_accounts_admin_accounts__delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsDelete"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/":{"post":{"tags":["Admin"],"summary":"Create simple accounts","operationId":"create_simple_accounts_admin_simple_accounts__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete simple accounts","operationId":"delete_simple_accounts_admin_simple_accounts__delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsDelete"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/users/":{"post":{"tags":["Admin"],"summary":"Create users","operationId":"create_user_admin_simple_accounts_users__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsUsersCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/users/{user_id}":{"delete":{"tags":["Admin"],"summary":"Delete user","operationId":"delete_user_admin_simple_accounts_users__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/users/identities/":{"post":{"tags":["Admin"],"summary":"Create user identities","operationId":"create_user_identity_admin_simple_accounts_users_identities__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsUsersIdentitiesCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/users/{user_id}/identities/{identity_id}":{"delete":{"tags":["Admin"],"summary":"Delete user identity","operationId":"delete_user_identity_admin_simple_accounts_users__user_id__identities__identity_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","title":"Identity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/organizations/":{"post":{"tags":["Admin"],"summary":"Create organizations","operationId":"create_organization_admin_simple_accounts_organizations__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsOrganizationsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/organizations/{organization_id}":{"delete":{"tags":["Admin"],"summary":"Delete organization","operationId":"delete_organization_admin_simple_accounts_organizations__organization_id__delete","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/organizations/memberships/":{"post":{"tags":["Admin"],"summary":"Create organization memberships","operationId":"create_organization_membership_admin_simple_accounts_organizations_memberships__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsOrganizationsMembershipsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/organizations/{organization_id}/memberships/{membership_id}":{"delete":{"tags":["Admin"],"summary":"Delete organization membership","operationId":"delete_organization_membership_admin_simple_accounts_organizations__organization_id__memberships__membership_id__delete","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","title":"Membership Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/workspaces/":{"post":{"tags":["Admin"],"summary":"Create workspaces","operationId":"create_workspace_admin_simple_accounts_workspaces__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsWorkspacesCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/workspaces/{workspace_id}":{"delete":{"tags":["Admin"],"summary":"Delete workspace","operationId":"delete_workspace_admin_simple_accounts_workspaces__workspace_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/workspaces/memberships/":{"post":{"tags":["Admin"],"summary":"Create workspace memberships","operationId":"create_workspace_membership_admin_simple_accounts_workspaces_memberships__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsWorkspacesMembershipsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/workspaces/{workspace_id}/memberships/{membership_id}":{"delete":{"tags":["Admin"],"summary":"Delete workspace membership","operationId":"delete_workspace_membership_admin_simple_accounts_workspaces__workspace_id__memberships__membership_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","title":"Membership Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/projects/":{"post":{"tags":["Admin"],"summary":"Create projects","operationId":"create_project_admin_simple_accounts_projects__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsProjectsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/projects/{project_id}":{"delete":{"tags":["Admin"],"summary":"Delete project","operationId":"delete_project_admin_simple_accounts_projects__project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/projects/memberships/":{"post":{"tags":["Admin"],"summary":"Create project memberships","operationId":"create_project_membership_admin_simple_accounts_projects_memberships__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsProjectsMembershipsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/projects/{project_id}/memberships/{membership_id}":{"delete":{"tags":["Admin"],"summary":"Delete project membership","operationId":"delete_project_membership_admin_simple_accounts_projects__project_id__memberships__membership_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","title":"Membership Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/api-keys/":{"post":{"tags":["Admin"],"summary":"Create API keys","operationId":"create_api_key_admin_simple_accounts_api_keys__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsApiKeysCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/api-keys/{api_key_id}":{"delete":{"tags":["Admin"],"summary":"Delete API key","operationId":"delete_api_key_admin_simple_accounts_api_keys__api_key_id__delete","parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","title":"Api Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/reset-password":{"post":{"tags":["Admin"],"summary":"Reset user password","operationId":"reset_password_admin_simple_accounts_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsUsersResetPassword"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/transfer-ownership":{"post":{"tags":["Admin"],"summary":"Transfer organization ownership","operationId":"transfer_ownership_admin_simple_accounts_transfer_ownership_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsOrganizationsTransferOwnership"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"200":{"description":"Partial transfer — some orgs could not be transferred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsOrganizationsTransferOwnershipResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["Status"],"summary":"Health Check","operationId":"health_check","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/permissions/verify":{"get":{"tags":["Access"],"summary":"Verify Permissions","operationId":"verify_permissions","parameters":[{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"scope_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Type"}},{"name":"scope_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scope Id"}},{"name":"resource_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type"}},{"name":"resource_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects":{"get":{"tags":["Projects"],"summary":"Get Projects","operationId":"get_projects","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProjectsResponse"},"type":"array","title":"Response Get Projects"}}}}}},"post":{"tags":["Projects"],"summary":"Create Project","operationId":"create_project","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}":{"get":{"tags":["Projects"],"summary":"Get Project","operationId":"get_project","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Projects"],"summary":"Delete Project","operationId":"delete_project","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Projects"],"summary":"Update Project","operationId":"update_project","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile":{"get":{"tags":["Users"],"summary":"User Profile","operationId":"fetch_user_profile","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/profile/username":{"put":{"tags":["Users"],"summary":"Update User Username","operationId":"update_user_username","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/reset-password":{"post":{"tags":["Users"],"summary":"Reset User Password","operationId":"reset_user_password","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/keys":{"get":{"tags":["Keys"],"summary":"List Api Keys","description":"List all API keys associated with the authenticated user.\n\nArgs:\n request (Request): The incoming request object.\n\nReturns:\n List[ListAPIKeysResponse]: A list of API Keys associated with the user.","operationId":"list_api_keys","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ListAPIKeysResponse"},"type":"array","title":"Response List Api Keys"}}}}}},"post":{"tags":["Keys"],"summary":"Create Api Key","description":"Creates an API key for a user.\n\nArgs:\n request (Request): The request object containing the user ID in the request state.\n\nReturns:\n str: The created API key.","operationId":"create_api_key","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Create Api Key"}}}}}}},"/keys/{key_prefix}":{"delete":{"tags":["Keys"],"summary":"Delete Api Key","description":"Delete an API key with the given key prefix for the authenticated user.\n\nArgs:\n key_prefix (str): The prefix of the API key to be deleted.\n request (Request): The incoming request object.\n\nReturns:\n dict: A dictionary containing a success message upon successful deletion.\n\nRaises:\n HTTPException: If the API key is not found or does not belong to the user.","operationId":"delete_api_key","parameters":[{"name":"key_prefix","in":"path","required":true,"schema":{"type":"string","title":"Key Prefix"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Api Key"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}/invite":{"post":{"tags":["Organizations"],"summary":"Invite User To Organization","description":"Assigns a role to a user in an organization.\n\nArgs:\n organization_id (str): The ID of the organization.\n payload (InviteRequest): The payload containing the organization id, user email, and role to assign.\n workspace_id (str): The ID of the workspace.\n\nReturns:\n bool: True if the role was successfully assigned, False otherwise.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.\n HTTPException: If there is an error assigning the role to the user.","operationId":"invite_user_to_workspace","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InviteRequest"},"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}/invite/resend":{"post":{"tags":["Organizations"],"summary":"Resend User Invitation To Organization","description":"Resend an invitation to a user to an Organization.\n\nRaises:\n HTTPException: _description_; status_code: 500\n HTTPException: Invitation not found or has expired; status_code: 400\n HTTPException: You already belong to this organization; status_code: 400\n\nReturns:\n JSONResponse: Resent invitation to user; status_code: 200","operationId":"resend_invitation","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendInviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}/invite/accept":{"post":{"tags":["Organizations"],"summary":"Accept Organization Invitation","description":"Accept an invitation to an organization.\n\nRaises:\n HTTPException: _description_; status_code: 500\n HTTPException: Invitation not found or has expired; status_code: 400\n HTTPException: You already belong to this organization; status_code: 400\n\nReturns:\n JSONResponse: Accepted invitation to workspace; status_code: 200","operationId":"accept_invitation","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"project_id","in":"query","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteToken"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces":{"get":{"tags":["Workspaces"],"summary":"Get Workspace","description":"Get workspace details.\n\nReturns details about the workspace associated with the user's session.\n\nReturns:\n Workspace: The details of the workspace.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.","operationId":"get_workspace","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Workspace"},"type":"array","title":"Response Get Workspace"}}}}}}},"/workspaces/roles":{"get":{"tags":["Workspaces"],"summary":"Get All Workspace Roles","description":"Get all workspace roles.\n\nReturns a list of all available workspace roles.\n\nReturns:\n List[WorkspaceRoleResponse]: A list of WorkspaceRole objects representing the available workspace roles.\n\nRaises:\n HTTPException: If an error occurs while retrieving the workspace roles.","operationId":"get_all_workspace_roles","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Response Get All Workspace Roles"}}}}}}},"/workspaces/{workspace_id}/users":{"delete":{"tags":["Workspaces"],"summary":"Remove User From Workspace","description":"Remove a user from a workspace.\n\nArgs:\n email (str): The email address of the user to be removed\n workspace_id (str): The ID of the workspace.","operationId":"remove_user_from_workspace","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AdminAccountCreateOptions":{"properties":{"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","default":false},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"},"create_identities":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Create Identities"},"create_api_keys":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Create Api Keys"},"return_api_keys":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Return Api Keys"},"seed_defaults":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Seed Defaults","default":true},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"AdminAccountCreateOptions"},"AdminAccountRead":{"properties":{"users":{"additionalProperties":{"$ref":"#/components/schemas/AdminUserRead"},"type":"object","title":"Users","default":{}},"user_identities":{"additionalProperties":{"$ref":"#/components/schemas/AdminUserIdentityRead"},"type":"object","title":"User Identities","default":{}},"organizations":{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationRead"},"type":"object","title":"Organizations","default":{}},"workspaces":{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceRead"},"type":"object","title":"Workspaces","default":{}},"projects":{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectRead"},"type":"object","title":"Projects","default":{}},"organization_memberships":{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationMembershipRead"},"type":"object","title":"Organization Memberships","default":{}},"workspace_memberships":{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceMembershipRead"},"type":"object","title":"Workspace Memberships","default":{}},"project_memberships":{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectMembershipRead"},"type":"object","title":"Project Memberships","default":{}},"subscriptions":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminSubscriptionRead"},"type":"object"},{"type":"null"}],"title":"Subscriptions"},"api_keys":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminApiKeyResponse"},"type":"object"},{"type":"null"}],"title":"Api Keys"}},"type":"object","title":"AdminAccountRead","description":"Per-account projection in the full graph response (plural entity maps)."},"AdminAccountsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"users":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminUserCreate"},"type":"object"},{"type":"null"}],"title":"Users"},"user_identities":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminUserIdentityCreate"},"type":"object"},{"type":"null"}],"title":"User Identities"},"organizations":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationCreate"},"type":"object"},{"type":"null"}],"title":"Organizations"},"workspaces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceCreate"},"type":"object"},{"type":"null"}],"title":"Workspaces"},"projects":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectCreate"},"type":"object"},{"type":"null"}],"title":"Projects"},"organization_memberships":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationMembershipCreate"},"type":"object"},{"type":"null"}],"title":"Organization Memberships"},"workspace_memberships":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceMembershipCreate"},"type":"object"},{"type":"null"}],"title":"Workspace Memberships"},"project_memberships":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectMembershipCreate"},"type":"object"},{"type":"null"}],"title":"Project Memberships"},"api_keys":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminApiKeyCreate"},"type":"object"},{"type":"null"}],"title":"Api Keys"},"subscriptions":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminSubscriptionCreate"},"type":"object"},{"type":"null"}],"title":"Subscriptions"}},"type":"object","title":"AdminAccountsCreate"},"AdminAccountsDelete":{"properties":{"target":{"$ref":"#/components/schemas/AdminAccountsDeleteTarget"},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","default":true},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"confirm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirm"}},"type":"object","required":["target"],"title":"AdminAccountsDelete"},"AdminAccountsDeleteTarget":{"properties":{"user_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"User Ids"},"user_emails":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"User Emails"},"organization_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Organization Ids"},"workspace_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Workspace Ids"},"project_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Project Ids"}},"type":"object","title":"AdminAccountsDeleteTarget"},"AdminAccountsResponse":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/AdminAccountRead"},"type":"array","title":"Accounts","default":[]},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminStructuredError"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","title":"AdminAccountsResponse"},"AdminApiKeyCreate":{"properties":{"project_ref":{"$ref":"#/components/schemas/EntityRef"},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["project_ref","user_ref"],"title":"AdminApiKeyCreate"},"AdminApiKeyResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"prefix":{"type":"string","title":"Prefix"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"project_id":{"type":"string","title":"Project Id"},"user_id":{"type":"string","title":"User Id"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"revoked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoked At"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"returned_once":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Returned Once"}},"type":"object","required":["prefix","project_id","user_id"],"title":"AdminApiKeyResponse"},"AdminDeleteResponse":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","default":false},"deleted":{"$ref":"#/components/schemas/AdminDeletedEntities","default":{}},"skipped":{"anyOf":[{"$ref":"#/components/schemas/AdminDeletedEntities"},{"type":"null"}]},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminStructuredError"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","title":"AdminDeleteResponse"},"AdminDeletedEntities":{"properties":{"users":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Users"},"user_identities":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"User Identities"},"organizations":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Organizations"},"workspaces":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Workspaces"},"projects":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Projects"},"organization_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Organization Memberships"},"workspace_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Workspace Memberships"},"project_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Project Memberships"},"api_keys":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Api Keys"}},"type":"object","title":"AdminDeletedEntities"},"AdminDeletedEntity":{"properties":{"id":{"type":"string","title":"Id"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"}},"type":"object","required":["id"],"title":"AdminDeletedEntity"},"AdminOrganizationCreate":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"owner_user_ref":{"anyOf":[{"$ref":"#/components/schemas/EntityRef"},{"type":"null"}]},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["name"],"title":"AdminOrganizationCreate"},"AdminOrganizationMembershipCreate":{"properties":{"organization_ref":{"$ref":"#/components/schemas/EntityRef"},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"role":{"type":"string","title":"Role"}},"type":"object","required":["organization_ref","user_ref","role"],"title":"AdminOrganizationMembershipCreate"},"AdminOrganizationMembershipRead":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"user_id":{"type":"string","title":"User Id"},"role":{"type":"string","title":"Role"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","organization_id","user_id","role"],"title":"AdminOrganizationMembershipRead"},"AdminOrganizationRead":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"owner_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner User Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","name"],"title":"AdminOrganizationRead"},"AdminProjectCreate":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"organization_ref":{"$ref":"#/components/schemas/EntityRef"},"workspace_ref":{"$ref":"#/components/schemas/EntityRef"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["name","organization_ref","workspace_ref"],"title":"AdminProjectCreate"},"AdminProjectMembershipCreate":{"properties":{"project_ref":{"$ref":"#/components/schemas/EntityRef"},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"role":{"type":"string","title":"Role"}},"type":"object","required":["project_ref","user_ref","role"],"title":"AdminProjectMembershipCreate"},"AdminProjectMembershipRead":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"user_id":{"type":"string","title":"User Id"},"role":{"type":"string","title":"Role"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","project_id","user_id","role"],"title":"AdminProjectMembershipRead"},"AdminProjectRead":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"organization_id":{"type":"string","title":"Organization Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","name","organization_id","workspace_id"],"title":"AdminProjectRead"},"AdminSimpleAccountCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"user":{"$ref":"#/components/schemas/AdminUserCreate"},"user_identities":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminUserIdentityCreate"},"type":"array"},{"type":"null"}],"title":"User Identities"},"organization":{"anyOf":[{"$ref":"#/components/schemas/AdminOrganizationCreate"},{"type":"null"}]},"workspace":{"anyOf":[{"$ref":"#/components/schemas/AdminWorkspaceCreate"},{"type":"null"}]},"project":{"anyOf":[{"$ref":"#/components/schemas/AdminProjectCreate"},{"type":"null"}]},"organization_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminOrganizationMembershipCreate"},"type":"array"},{"type":"null"}],"title":"Organization Memberships"},"workspace_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminWorkspaceMembershipCreate"},"type":"array"},{"type":"null"}],"title":"Workspace Memberships"},"project_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminProjectMembershipCreate"},"type":"array"},{"type":"null"}],"title":"Project Memberships"},"api_keys":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminApiKeyCreate"},"type":"array"},{"type":"null"}],"title":"Api Keys"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/AdminSubscriptionCreate"},{"type":"null"}]}},"type":"object","required":["user"],"title":"AdminSimpleAccountCreate","description":"One account entry in a batch simple-accounts create request."},"AdminSimpleAccountDeleteEntry":{"properties":{"user":{"$ref":"#/components/schemas/EntityRef"}},"type":"object","required":["user"],"title":"AdminSimpleAccountDeleteEntry","description":"One account entry in a batch simple-accounts delete request.\n\nIdentifies the account by its user (typically by id)."},"AdminSimpleAccountRead":{"properties":{"user":{"anyOf":[{"$ref":"#/components/schemas/AdminUserRead"},{"type":"null"}]},"user_identities":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminUserIdentityRead"},"type":"array"},{"type":"null"}],"title":"User Identities"},"organizations":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationRead"},"type":"object"},{"type":"null"}],"title":"Organizations"},"workspaces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceRead"},"type":"object"},{"type":"null"}],"title":"Workspaces"},"projects":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectRead"},"type":"object"},{"type":"null"}],"title":"Projects"},"organization_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminOrganizationMembershipRead"},"type":"array"},{"type":"null"}],"title":"Organization Memberships"},"workspace_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminWorkspaceMembershipRead"},"type":"array"},{"type":"null"}],"title":"Workspace Memberships"},"project_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminProjectMembershipRead"},"type":"array"},{"type":"null"}],"title":"Project Memberships"},"subscriptions":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminSubscriptionRead"},"type":"object"},{"type":"null"}],"title":"Subscriptions"},"api_keys":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Api Keys"}},"type":"object","title":"AdminSimpleAccountRead","description":"Per-account entry in the simple-accounts response.\n\n``user`` is a flat object (there is always exactly one per account).\n``organizations``, ``workspaces``, ``projects`` are named dicts (keys match\nthe ref keys used internally, e.g. \"org\", \"wrk\", \"prj\").\n``api_keys`` maps ref names to raw key values (plain strings, not DTOs)."},"AdminSimpleAccountsApiKeysCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"api_key":{"$ref":"#/components/schemas/AdminApiKeyCreate"}},"type":"object","required":["api_key"],"title":"AdminSimpleAccountsApiKeysCreate"},"AdminSimpleAccountsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"accounts":{"additionalProperties":{"$ref":"#/components/schemas/AdminSimpleAccountCreate"},"type":"object","title":"Accounts"}},"type":"object","required":["accounts"],"title":"AdminSimpleAccountsCreate"},"AdminSimpleAccountsDelete":{"properties":{"accounts":{"additionalProperties":{"$ref":"#/components/schemas/AdminSimpleAccountDeleteEntry"},"type":"object","title":"Accounts"},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","default":false},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"confirm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirm"}},"type":"object","required":["accounts"],"title":"AdminSimpleAccountsDelete"},"AdminSimpleAccountsOrganizationsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"organization":{"$ref":"#/components/schemas/AdminOrganizationCreate"},"owner":{"anyOf":[{"$ref":"#/components/schemas/AdminUserCreate"},{"type":"null"}]}},"type":"object","required":["organization"],"title":"AdminSimpleAccountsOrganizationsCreate"},"AdminSimpleAccountsOrganizationsMembershipsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"membership":{"$ref":"#/components/schemas/AdminOrganizationMembershipCreate"}},"type":"object","required":["membership"],"title":"AdminSimpleAccountsOrganizationsMembershipsCreate"},"AdminSimpleAccountsOrganizationsTransferOwnership":{"properties":{"organizations":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/EntityRef"},"type":"object"},{"type":"null"}],"title":"Organizations"},"users":{"additionalProperties":{"$ref":"#/components/schemas/EntityRef"},"type":"object","title":"Users"},"include_workspaces":{"anyOf":[{"type":"string","const":"all"},{"items":{"type":"string"},"type":"array"}],"title":"Include Workspaces","default":"all"},"include_projects":{"anyOf":[{"type":"string","const":"all"},{"items":{"type":"string"},"type":"array"}],"title":"Include Projects","default":"all"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"recovery":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recovery"}},"type":"object","required":["users"],"title":"AdminSimpleAccountsOrganizationsTransferOwnership"},"AdminSimpleAccountsOrganizationsTransferOwnershipResponse":{"properties":{"transferred":{"items":{"type":"string"},"type":"array","title":"Transferred","default":[]},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminStructuredError"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","title":"AdminSimpleAccountsOrganizationsTransferOwnershipResponse"},"AdminSimpleAccountsProjectsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"project":{"$ref":"#/components/schemas/AdminProjectCreate"}},"type":"object","required":["project"],"title":"AdminSimpleAccountsProjectsCreate"},"AdminSimpleAccountsProjectsMembershipsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"membership":{"$ref":"#/components/schemas/AdminProjectMembershipCreate"}},"type":"object","required":["membership"],"title":"AdminSimpleAccountsProjectsMembershipsCreate"},"AdminSimpleAccountsResponse":{"properties":{"accounts":{"additionalProperties":{"$ref":"#/components/schemas/AdminSimpleAccountRead"},"type":"object","title":"Accounts","default":{}},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminStructuredError"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","title":"AdminSimpleAccountsResponse"},"AdminSimpleAccountsUsersCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"user":{"$ref":"#/components/schemas/AdminUserCreate"}},"type":"object","required":["user"],"title":"AdminSimpleAccountsUsersCreate"},"AdminSimpleAccountsUsersIdentitiesCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"user_identity":{"$ref":"#/components/schemas/AdminUserIdentityCreate"}},"type":"object","required":["user_ref","user_identity"],"title":"AdminSimpleAccountsUsersIdentitiesCreate"},"AdminSimpleAccountsUsersResetPassword":{"properties":{"user_identities":{"items":{"$ref":"#/components/schemas/AdminUserIdentityCreate"},"type":"array","title":"User Identities"}},"type":"object","required":["user_identities"],"title":"AdminSimpleAccountsUsersResetPassword"},"AdminSimpleAccountsWorkspacesCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"workspace":{"$ref":"#/components/schemas/AdminWorkspaceCreate"}},"type":"object","required":["workspace"],"title":"AdminSimpleAccountsWorkspacesCreate"},"AdminSimpleAccountsWorkspacesMembershipsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"membership":{"$ref":"#/components/schemas/AdminWorkspaceMembershipCreate"}},"type":"object","required":["membership"],"title":"AdminSimpleAccountsWorkspacesMembershipsCreate"},"AdminStructuredError":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"type":"object","required":["code","message"],"title":"AdminStructuredError"},"AdminSubscriptionCreate":{"properties":{"plan":{"type":"string","title":"Plan"}},"type":"object","required":["plan"],"title":"AdminSubscriptionCreate"},"AdminSubscriptionRead":{"properties":{"plan":{"type":"string","title":"Plan"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","required":["plan"],"title":"AdminSubscriptionRead"},"AdminUserCreate":{"properties":{"email":{"type":"string","title":"Email"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin"},"is_root":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Root"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["email"],"title":"AdminUserCreate"},"AdminUserIdentityCreate":{"properties":{"user_ref":{"anyOf":[{"$ref":"#/components/schemas/EntityRef"},{"type":"null"}]},"method":{"type":"string","title":"Method"},"subject":{"type":"string","title":"Subject"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"},"provider_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider User Id"},"claims":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Claims"}},"type":"object","required":["method","subject"],"title":"AdminUserIdentityCreate"},"AdminUserIdentityRead":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"user_id":{"type":"string","title":"User Id"},"method":{"type":"string","title":"Method"},"subject":{"type":"string","title":"Subject"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"status":{"type":"string","enum":["created","linked","pending_confirmation","skipped","failed"],"title":"Status","default":"created"},"verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["user_id","method","subject"],"title":"AdminUserIdentityRead"},"AdminUserRead":{"properties":{"id":{"type":"string","title":"Id"},"uid":{"type":"string","title":"Uid"},"email":{"type":"string","title":"Email"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin"},"is_root":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Root"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","uid","email"],"title":"AdminUserRead"},"AdminWorkspaceCreate":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"organization_ref":{"$ref":"#/components/schemas/EntityRef"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["name","organization_ref"],"title":"AdminWorkspaceCreate"},"AdminWorkspaceMembershipCreate":{"properties":{"workspace_ref":{"$ref":"#/components/schemas/EntityRef"},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"role":{"type":"string","title":"Role"}},"type":"object","required":["workspace_ref","user_ref","role"],"title":"AdminWorkspaceMembershipCreate"},"AdminWorkspaceMembershipRead":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"user_id":{"type":"string","title":"User Id"},"role":{"type":"string","title":"Role"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","workspace_id","user_id","role"],"title":"AdminWorkspaceMembershipRead"},"AdminWorkspaceRead":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"organization_id":{"type":"string","title":"Organization Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","name","organization_id"],"title":"AdminWorkspaceRead"},"Analytics":{"properties":{"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","default":0},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration","default":0.0},"costs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Costs","default":0.0},"tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tokens","default":0.0}},"type":"object","title":"Analytics"},"AnalyticsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of time buckets returned.","default":0},"buckets":{"items":{"$ref":"#/components/schemas/MetricsBucket"},"type":"array","title":"Buckets","description":"Time-bucketed aggregates. Each bucket's `metrics` dict is keyed by the dotted `path` of the corresponding `MetricSpec`.","default":[]},"query":{"$ref":"#/components/schemas/TracingQuery","description":"The resolved query used to compute the buckets."},"specs":{"items":{"$ref":"#/components/schemas/MetricSpec"},"type":"array","title":"Specs","description":"The resolved metric specs applied in each bucket.","default":[]}},"type":"object","title":"AnalyticsResponse","description":"Analytics response with user-specified metric specs."},"Annotation":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Annotation"},"AnnotationCreate":{"properties":{"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"AnnotationCreate"},"AnnotationCreateRequest":{"properties":{"annotation":{"$ref":"#/components/schemas/AnnotationCreate"}},"type":"object","required":["annotation"],"title":"AnnotationCreateRequest"},"AnnotationEdit":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data"],"title":"AnnotationEdit"},"AnnotationEditRequest":{"properties":{"annotation":{"$ref":"#/components/schemas/AnnotationEdit"}},"type":"object","required":["annotation"],"title":"AnnotationEditRequest"},"AnnotationLinkResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"annotation_link":{"anyOf":[{"$ref":"#/components/schemas/OTelLink-Output"},{"type":"null"}]}},"type":"object","title":"AnnotationLinkResponse"},"AnnotationQuery":{"properties":{"origin":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceOrigin"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceKind"},{"type":"null"}]},"channel":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceChannel"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"AnnotationQuery"},"AnnotationQueryRequest":{"properties":{"annotation":{"anyOf":[{"$ref":"#/components/schemas/AnnotationQuery"},{"type":"null"}]},"annotation_links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Annotation Links"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"AnnotationQueryRequest"},"AnnotationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"annotation":{"anyOf":[{"$ref":"#/components/schemas/Annotation"},{"type":"null"}]}},"type":"object","title":"AnnotationResponse"},"AnnotationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"annotations":{"items":{"$ref":"#/components/schemas/Annotation"},"type":"array","title":"Annotations","default":[]}},"type":"object","title":"AnnotationsResponse"},"Application":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationArtifactFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Application"},"ApplicationArtifactFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"ApplicationArtifactFlags","description":"Application flags - is_application=True; other booleans use their normal defaults unless explicitly set."},"ApplicationArtifactQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"}},"type":"object","title":"ApplicationArtifactQueryFlags","description":"Application query flags - filter for is_application=True."},"ApplicationCatalogPreset":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"ApplicationCatalogPreset"},"ApplicationCatalogPresetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when found, `0` otherwise.","default":0},"preset":{"anyOf":[{"$ref":"#/components/schemas/ApplicationCatalogPreset"},{"type":"null"}],"description":"Catalog preset definition."}},"type":"object","title":"ApplicationCatalogPresetResponse","description":"Single preset response envelope."},"ApplicationCatalogPresetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of presets returned.","default":0},"presets":{"items":{"$ref":"#/components/schemas/ApplicationCatalogPreset"},"type":"array","title":"Presets","description":"Named parameter sets for the template. Use a preset's `data` as the first revision when creating an application from a template."}},"type":"object","title":"ApplicationCatalogPresetsResponse","description":"List of catalog presets scoped to one template."},"ApplicationCatalogTemplate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"ApplicationCatalogTemplate"},"ApplicationCatalogTemplateResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when found, `0` otherwise.","default":0},"template":{"anyOf":[{"$ref":"#/components/schemas/ApplicationCatalogTemplate"},{"type":"null"}],"description":"Catalog template definition."}},"type":"object","title":"ApplicationCatalogTemplateResponse","description":"Single template response envelope."},"ApplicationCatalogTemplatesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of templates returned.","default":0},"templates":{"items":{"$ref":"#/components/schemas/ApplicationCatalogTemplate"},"type":"array","title":"Templates","description":"Built-in and custom templates an application can be created from. Each template carries a `key`, a `uri`, and the JSON Schemas that applications of that type expose."}},"type":"object","title":"ApplicationCatalogTemplatesResponse","description":"List of catalog templates."},"ApplicationCatalogType":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"json_schema":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Json Schema"}},"type":"object","required":["key","json_schema"],"title":"ApplicationCatalogType"},"ApplicationCatalogTypesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of types returned.","default":0},"types":{"items":{"$ref":"#/components/schemas/ApplicationCatalogType"},"type":"array","title":"Types","description":"Shared JSON Schema building blocks referenced by templates (for example `message`, `prompt-template`)."}},"type":"object","title":"ApplicationCatalogTypesResponse","description":"List of catalog types."},"ApplicationCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"ApplicationCreate"},"ApplicationCreateRequest":{"properties":{"application":{"$ref":"#/components/schemas/ApplicationCreate","description":"Artifact-level fields for the new application: `slug`, `name`, `description`, `flags`, `tags`, `meta`. The `slug` must be unique within the project."}},"type":"object","required":["application"],"title":"ApplicationCreateRequest","description":"Request body for creating an application artifact.\n\nApplications are versioned resources; creating one produces an empty artifact.\nUse `POST /simple/applications/` if you want to create the artifact, a default\nvariant, and a first committed revision in a single call.\nSee the [Applications guide](/reference/api-guide/applications)."},"ApplicationEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ApplicationEdit"},"ApplicationEditRequest":{"properties":{"application":{"$ref":"#/components/schemas/ApplicationEdit","description":"Artifact fields to update. The `id` must match the `application_id` in the URL path."}},"type":"object","required":["application"],"title":"ApplicationEditRequest","description":"Request body for editing an application artifact.\n\nOnly artifact-level fields (flags, tags, meta) can be edited here. Editing\nthe `name` is currently disabled. To change the prompt or model parameters,\ncommit a new revision on a variant with `/applications/revisions/commit`."},"ApplicationFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"ApplicationFlags","description":"Legacy full application flag set."},"ApplicationFork":{"properties":{"application_revision":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionFork"},{"type":"null"}]},"revision":{"anyOf":[{"$ref":"#/components/schemas/RevisionFork"},{"type":"null"}]},"application_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"application_variant":{"anyOf":[{"$ref":"#/components/schemas/ApplicationVariantFork"},{"type":"null"}]},"variant":{"anyOf":[{"$ref":"#/components/schemas/VariantFork"},{"type":"null"}]},"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFork"},{"type":"null"}]},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFork"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"ApplicationFork"},"ApplicationForkRequest":{"properties":{"application":{"$ref":"#/components/schemas/ApplicationFork","description":"Fork payload. Must include the source `application_variant_id` (or `application_revision_id`) plus a `variant` object describing the new branch and a `revision` object for the new tip commit."}},"type":"object","required":["application"],"title":"ApplicationForkRequest","description":"Request body for forking a variant into a new variant on the same application.\n\nThe fork copies the revision history up to `application_variant_id` /\n`application_revision_id`, then commits the `revision` payload on top.\nBoth `variant` and `revision` objects must be provided."},"ApplicationQuery":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationArtifactQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"ApplicationQuery"},"ApplicationQueryRequest":{"properties":{"application":{"anyOf":[{"$ref":"#/components/schemas/ApplicationQuery"},{"type":"null"}],"description":"Attribute filter. Accepts `slug`, `slugs`, `flags`, `tags`, `meta`. All fields are AND-ed."},"application_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Refs","description":"Restrict the query to specific applications by `id` or `slug`. Combined with the `application` filter with AND semantics."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When `true`, include soft-deleted applications. Defaults to `false`."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time-range controls."}},"type":"object","title":"ApplicationQueryRequest","description":"Request body for `POST /applications/query`.\n\nReturns artifact rows only. For rows that include the currently resolved\nvariant, revision, and `data` payload merged in, use\n`POST /simple/applications/query`.\nSee [Query Pattern](/reference/api-guide/query-pattern)."},"ApplicationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when the application was found, `0` otherwise.","default":0},"application":{"anyOf":[{"$ref":"#/components/schemas/Application"},{"type":"null"}],"description":"The application artifact, or `null` if not found."}},"type":"object","title":"ApplicationResponse","description":"Single-application response envelope."},"ApplicationRevision":{"properties":{"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"ApplicationRevision"},"ApplicationRevisionCommit":{"properties":{"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"ApplicationRevisionCommit"},"ApplicationRevisionCommitRequest":{"properties":{"application_revision_commit":{"$ref":"#/components/schemas/ApplicationRevisionCommit","description":"Commit payload. Must include `application_variant_id` and `data`. `message` is a human-readable commit message. `slug` is optional; if omitted, the server generates one."}},"type":"object","required":["application_revision_commit"],"title":"ApplicationRevisionCommitRequest","description":"Request body for committing a new revision on a variant.\n\nThe commit becomes the variant's new tip. Revisions are immutable once\ncommitted; to change behavior, commit another revision.\nSee [Versioning](/reference/api-guide/versioning#committing-a-revision)."},"ApplicationRevisionCreate":{"properties":{"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"ApplicationRevisionCreate"},"ApplicationRevisionCreateRequest":{"properties":{"application_revision":{"$ref":"#/components/schemas/ApplicationRevisionCreate","description":"Revision fields. Must reference the parent variant."}},"type":"object","required":["application_revision"],"title":"ApplicationRevisionCreateRequest","description":"Request body for creating a revision row without committing it.\n\nPrefer `POST /applications/revisions/commit` for normal use — commit creates\na revision and advances the variant's tip. The plain create endpoint exists\nfor advanced workflows that populate revision rows out of band."},"ApplicationRevisionData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"ApplicationRevisionData"},"ApplicationRevisionData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"ApplicationRevisionData"},"ApplicationRevisionDeployRequest":{"properties":{"application_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Application reference. If provided, the latest revision of the default variant is deployed."},"application_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant reference. Its latest revision is deployed."},"application_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Revision reference. The exact revision is deployed."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment (for example `{\"slug\": \"production\"}`)."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment variant."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment revision; advanced use only."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Deployment key inside the environment revision. Defaults to `{application_slug}.revision`."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Optional commit message attached to the environment revision."}},"type":"object","title":"ApplicationRevisionDeployRequest","description":"Request body for `POST /applications/revisions/deploy`.\n\nAttaches an application revision to an environment under a key. Subsequent\ncalls to `/applications/revisions/retrieve` with the matching\n`environment_ref` resolve to this revision.\nSee the [Applications guide](/reference/api-guide/applications#deployment)."},"ApplicationRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ApplicationRevisionEdit"},"ApplicationRevisionEditRequest":{"properties":{"application_revision":{"$ref":"#/components/schemas/ApplicationRevisionEdit","description":"Full revision body. Edit replaces the editable fields in a single PUT, so include every editable field even if its value is unchanged. `id` must match the `application_revision_id` in the URL path. `data`, `author`, `date`, and `message` are immutable."}},"type":"object","required":["application_revision"],"title":"ApplicationRevisionEditRequest","description":"Request body for editing a revision's header fields.\n\nRevisions are immutable snapshots of the application's configuration;\n`data`, `author`, `date`, and `message` cannot be edited. Use this only to\ncorrect metadata such as `description` or `tags`."},"ApplicationRevisionFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"ApplicationRevisionFlags"},"ApplicationRevisionFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"ApplicationRevisionFork"},"ApplicationRevisionQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"ApplicationRevisionQuery"},"ApplicationRevisionQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"ApplicationRevisionQueryFlags"},"ApplicationRevisionQueryRequest":{"properties":{"application_revision":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionQuery"},{"type":"null"}],"description":"Attribute filter. Includes standard fields (`slug`, `slugs`, `flags`) plus revision-specific ones (`author`, `authors`, `date`, `dates`, `message`)."},"application_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Refs","description":"Scope to revisions belonging to these applications."},"application_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Variant Refs","description":"Scope to revisions belonging to these variants."},"application_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Revision Refs","description":"Restrict to specific revisions by `id` or by `slug` + `version`."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When `true`, include archived revisions. Defaults to `false`."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time-range controls."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When `true`, resolve embedded references in each returned revision's `data` (for example, snippet references). Defaults to `false`."}},"type":"object","title":"ApplicationRevisionQueryRequest","description":"Request body for `POST /applications/revisions/query`.\n\nReturns committed revisions across one or more variants. For the ordered\nlog of a single variant, use `POST /applications/revisions/log`."},"ApplicationRevisionResolveRequest":{"properties":{"application_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Application reference."},"application_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant reference; resolves the latest revision on it."},"application_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Revision reference; resolves that exact revision."},"max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Depth","description":"Maximum nesting depth for embedded references. Protects against runaway recursion. Defaults to `10`.","default":10},"max_embeds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Embeds","description":"Maximum total number of embedded references to follow. Defaults to `100`.","default":100},"error_policy":{"anyOf":[{"$ref":"#/components/schemas/ErrorPolicy"},{"type":"null"}],"description":"How to handle resolution errors. `exception` (default) aborts; `placeholder` substitutes a marker; `keep` leaves the original reference untouched.","default":"exception"}},"type":"object","title":"ApplicationRevisionResolveRequest","description":"Request body for `POST /applications/revisions/resolve`.\n\nFetches a revision and resolves any embedded references (snippets, linked\nrevisions) inside its `data`. Use when clients need the fully-inlined\nconfiguration instead of the raw stored form."},"ApplicationRevisionResolveResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a revision was resolved, `0` otherwise.","default":0},"application_revision":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevision"},{"type":"null"}],"description":"The revision with embedded references inlined into `data`."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Diagnostic info about which references were resolved."}},"type":"object","title":"ApplicationRevisionResolveResponse","description":"Response for `POST /applications/revisions/resolve`."},"ApplicationRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a revision was found, `0` otherwise.","default":0},"application_revision":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevision"},{"type":"null"}],"description":"The application revision, including its `data` payload (prompt, model parameters, schemas, URL)."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Present only when the request set `resolve: true`. Describes which embedded references were resolved and any errors that occurred."}},"type":"object","title":"ApplicationRevisionResponse","description":"Single-revision response envelope."},"ApplicationRevisionRetrieveRequest":{"properties":{"application_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Application reference. When only an application is supplied, the latest revision of its default variant is returned."},"application_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant reference. Returns the latest revision on that variant."},"application_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Revision reference. Returns that exact revision."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment reference. Returns the revision currently deployed to that environment under the given `key`."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment variant reference; used together with `environment_ref`."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment revision reference; used to pin to a specific environment commit instead of the current tip."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Deployment key inside the environment revision. When omitted and `application_ref` is supplied, the server derives it as `{application_slug}.revision`."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When `true`, resolve embedded references in the returned revision's `data` (for example, snippet references)."}},"type":"object","title":"ApplicationRevisionRetrieveRequest","description":"Request body for `POST /applications/revisions/retrieve`.\n\nResolves to a single revision by one of several reference types. Exactly one\nreference path is needed; the most specific wins when several are provided.\nSee the [Applications guide](/reference/api-guide/applications#invocation)."},"ApplicationRevisionsLog":{"properties":{"application_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"ApplicationRevisionsLog"},"ApplicationRevisionsLogRequest":{"properties":{"application":{"$ref":"#/components/schemas/ApplicationRevisionsLog","description":"Filter for the log. Typically set `application_variant_id` to list the revision history of a single variant; optionally set `application_revision_id` + `depth` to walk back a bounded number of commits from a specific revision."}},"type":"object","required":["application"],"title":"ApplicationRevisionsLogRequest","description":"Request body for `POST /applications/revisions/log`.\n\nReturns the ordered list of revisions committed to a variant, newest first.\nEach entry carries commit metadata and the full revision record."},"ApplicationRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of revisions in this page.","default":0},"application_revisions":{"items":{"$ref":"#/components/schemas/ApplicationRevision"},"type":"array","title":"Application Revisions","description":"Application revisions matching the query or log."}},"type":"object","title":"ApplicationRevisionsResponse","description":"Paginated list of application revisions."},"ApplicationVariant":{"properties":{"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ApplicationVariant"},"ApplicationVariantCreate":{"properties":{"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"ApplicationVariantCreate"},"ApplicationVariantCreateRequest":{"properties":{"application_variant":{"$ref":"#/components/schemas/ApplicationVariantCreate","description":"Variant fields. Must include `application_id` (the artifact the variant belongs to) and a `slug` unique within the project."}},"type":"object","required":["application_variant"],"title":"ApplicationVariantCreateRequest","description":"Request body for creating a variant on an existing application."},"ApplicationVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ApplicationVariantEdit"},"ApplicationVariantEditRequest":{"properties":{"application_variant":{"$ref":"#/components/schemas/ApplicationVariantEdit","description":"Full variant body. Edit replaces the artifact-level fields in a single PUT, so include every editable field even if its value is unchanged. `id` must match the `application_variant_id` in the URL path; `slug` is immutable. Configuration changes (prompt, model parameters) go through `/applications/revisions/commit`, not this endpoint."}},"type":"object","required":["application_variant"],"title":"ApplicationVariantEditRequest","description":"Request body for editing a variant's artifact-level fields."},"ApplicationVariantFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"ApplicationVariantFlags"},"ApplicationVariantFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"ApplicationVariantFork"},"ApplicationVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a variant was found, `0` otherwise.","default":0},"application_variant":{"anyOf":[{"$ref":"#/components/schemas/ApplicationVariant"},{"type":"null"}],"description":"The application variant, or `null`."}},"type":"object","title":"ApplicationVariantResponse","description":"Single-variant response envelope."},"ApplicationVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of variants in this page.","default":0},"application_variants":{"items":{"$ref":"#/components/schemas/ApplicationVariant"},"type":"array","title":"Application Variants","description":"Application variants matching the query."}},"type":"object","title":"ApplicationVariantsResponse","description":"Paginated list of application variants."},"ApplicationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of applications in this page.","default":0},"applications":{"items":{"$ref":"#/components/schemas/Application"},"type":"array","title":"Applications","description":"Application artifacts matching the query."}},"type":"object","title":"ApplicationsResponse","description":"Paginated list of application artifacts."},"Body_configs_fetch_variants_configs_fetch_post":{"properties":{"variant_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Input"},{"type":"null"}]},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Input"},{"type":"null"}]},"application_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Input"},{"type":"null"}]}},"type":"object","title":"Body_configs_fetch_variants_configs_fetch_post"},"Body_create_simple_testset_from_file":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"file_type":{"type":"string","enum":["csv","json"],"title":"File Type","default":"csv"},"testset_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Slug"},"testset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Name"},"testset_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Description"},"testset_tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Tags"},"testset_meta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Meta"}},"type":"object","required":["file"],"title":"Body_create_simple_testset_from_file"},"Body_create_testset_revision_from_file":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"file_type":{"type":"string","enum":["csv","json"],"title":"File Type","default":"csv"},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases"}},"type":"object","required":["file"],"title":"Body_create_testset_revision_from_file"},"Body_edit_simple_testset_from_file":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"file_type":{"type":"string","enum":["csv","json"],"title":"File Type","default":"csv"},"testset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Name"},"testset_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Description"},"testset_tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Tags"},"testset_meta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Meta"}},"type":"object","required":["file"],"title":"Body_edit_simple_testset_from_file"},"Bucket":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"interval":{"type":"integer","title":"Interval"},"total":{"$ref":"#/components/schemas/Analytics"},"errors":{"$ref":"#/components/schemas/Analytics"}},"type":"object","required":["timestamp","interval","total","errors"],"title":"Bucket"},"CollectStatusResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"status":{"type":"string","title":"Status","description":"Readiness string. `ready` means the router is mounted and accepts OTLP ingest."}},"type":"object","required":["status"],"title":"CollectStatusResponse","description":"OTLP endpoint readiness response."},"ComparisonOperator":{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},"Condition":{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"$ref":"#/components/schemas/ComparisonOperator"},{"$ref":"#/components/schemas/NumericOperator"},{"$ref":"#/components/schemas/StringOperator"},{"$ref":"#/components/schemas/ListOperator"},{"$ref":"#/components/schemas/DictOperator"},{"$ref":"#/components/schemas/ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"$ref":"#/components/schemas/TextOptions"},{"$ref":"#/components/schemas/ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"ConfigResponseModel":{"properties":{"params":{"additionalProperties":true,"type":"object","title":"Params"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"application_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Output"},{"type":"null"}]},"service_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Output"},{"type":"null"}]},"variant_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Output"},{"type":"null"}]},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Output"},{"type":"null"}]},"application_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"service_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"variant_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"environment_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","title":"ConfigResponseModel"},"CreateOrganizationPayload":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"CreateOrganizationPayload"},"CreateProjectRequest":{"properties":{"name":{"type":"string","title":"Name"},"make_default":{"type":"boolean","title":"Make Default","default":false}},"type":"object","required":["name"],"title":"CreateProjectRequest"},"CreateSecretDTO":{"properties":{"header":{"$ref":"#/components/schemas/Header"},"secret":{"$ref":"#/components/schemas/SecretDTO"}},"type":"object","required":["header","secret"],"title":"CreateSecretDTO"},"CreateWorkspace":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","title":"CreateWorkspace"},"CustomModelSettingsDTO":{"properties":{"slug":{"type":"string","title":"Slug"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","required":["slug"],"title":"CustomModelSettingsDTO"},"CustomProviderDTO":{"properties":{"kind":{"$ref":"#/components/schemas/CustomProviderKind"},"provider":{"$ref":"#/components/schemas/CustomProviderSettingsDTO"},"models":{"items":{"$ref":"#/components/schemas/CustomModelSettingsDTO"},"type":"array","title":"Models"},"provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Slug"},"model_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Model Keys"}},"type":"object","required":["kind","provider","models"],"title":"CustomProviderDTO"},"CustomProviderKind":{"type":"string","enum":["custom","azure","bedrock","sagemaker","vertex_ai","openai","cohere","anyscale","deepinfra","alephalpha","groq","minimax","mistral","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"CustomProviderKind"},"CustomProviderSettingsDTO":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","title":"CustomProviderSettingsDTO"},"DictOperator":{"type":"string","enum":["has","has_not"],"title":"DictOperator"},"DiscoverRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"DiscoverRequest"},"DiscoverResponse":{"properties":{"exists":{"type":"boolean","title":"Exists"},"methods":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#/components/schemas/SSOProviders"}]},"type":"object","title":"Methods"}},"type":"object","required":["exists","methods"],"title":"DiscoverResponse"},"EntityRef":{"properties":{"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"EntityRef","description":"Polymorphic reference that can point to a request-local key, an\nexisting persisted ID, a stable slug, or an email address.\nExactly one field must be set."},"Environment":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Environment"},"EnvironmentCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EnvironmentCreate"},"EnvironmentCreateRequest":{"properties":{"environment":{"$ref":"#/components/schemas/EnvironmentCreate"}},"type":"object","required":["environment"],"title":"EnvironmentCreateRequest"},"EnvironmentEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EnvironmentEdit"},"EnvironmentEditRequest":{"properties":{"environment":{"$ref":"#/components/schemas/EnvironmentEdit"}},"type":"object","required":["environment"],"title":"EnvironmentEditRequest"},"EnvironmentFlags":{"properties":{"is_guarded":{"type":"boolean","title":"Is Guarded","default":false}},"type":"object","title":"EnvironmentFlags"},"EnvironmentQueryFlags":{"properties":{"is_guarded":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Guarded"}},"type":"object","title":"EnvironmentQueryFlags"},"EnvironmentResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment":{"anyOf":[{"$ref":"#/components/schemas/Environment"},{"type":"null"}]}},"type":"object","title":"EnvironmentResponse"},"EnvironmentRevision":{"properties":{"environment_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]}},"type":"object","title":"EnvironmentRevision"},"EnvironmentRevisionCommit":{"properties":{"environment_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"environment_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"delta":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionDelta"},{"type":"null"}]}},"type":"object","title":"EnvironmentRevisionCommit"},"EnvironmentRevisionCommitRequest":{"properties":{"environment_revision_commit":{"$ref":"#/components/schemas/EnvironmentRevisionCommit"}},"type":"object","required":["environment_revision_commit"],"title":"EnvironmentRevisionCommitRequest"},"EnvironmentRevisionCreate":{"properties":{"environment_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EnvironmentRevisionCreate"},"EnvironmentRevisionCreateRequest":{"properties":{"environment_revision":{"$ref":"#/components/schemas/EnvironmentRevisionCreate"}},"type":"object","required":["environment_revision"],"title":"EnvironmentRevisionCreateRequest"},"EnvironmentRevisionData":{"properties":{"references":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object"},"type":"object"},{"type":"null"}],"title":"References"}},"type":"object","title":"EnvironmentRevisionData","description":"Per-app references for environment revision data.\n\nKeys are app-scoped identifiers (e.g., ``\"pre.revision\"``).\nValues are dicts of entity-type → Reference, providing full traceability::\n\n {\n \"pre.revision\": {\n \"application\": Reference(id=..., slug=..., version=...),\n \"application_variant\": Reference(id=..., slug=..., version=...),\n \"application_revision\": Reference(id=..., slug=..., version=...),\n },\n ...\n }"},"EnvironmentRevisionDelta":{"properties":{"set":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Set"},"remove":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Remove"}},"type":"object","title":"EnvironmentRevisionDelta","description":"Delta operations on environment revision references.\n\n- ``set``: references to add or update (key → dict of entity → Reference).\n- ``remove``: reference keys to remove."},"EnvironmentRevisionEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EnvironmentRevisionEdit"},"EnvironmentRevisionEditRequest":{"properties":{"environment_revision":{"$ref":"#/components/schemas/EnvironmentRevisionEdit"}},"type":"object","required":["environment_revision"],"title":"EnvironmentRevisionEditRequest"},"EnvironmentRevisionResolveRequest":{"properties":{"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Depth","default":10},"max_embeds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Embeds","default":100},"error_policy":{"anyOf":[{"$ref":"#/components/schemas/ErrorPolicy"},{"type":"null"}],"default":"exception"}},"type":"object","title":"EnvironmentRevisionResolveRequest"},"EnvironmentRevisionResolveResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_revision":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevision"},{"type":"null"}]},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}]}},"type":"object","title":"EnvironmentRevisionResolveResponse"},"EnvironmentRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_revision":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevision"},{"type":"null"}]},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}]}},"type":"object","title":"EnvironmentRevisionResponse"},"EnvironmentRevisionRetrieveRequest":{"properties":{"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve"}},"type":"object","title":"EnvironmentRevisionRetrieveRequest"},"EnvironmentRevisionsLog":{"properties":{"environment_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"environment_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"EnvironmentRevisionsLog"},"EnvironmentRevisionsLogRequest":{"properties":{"environment":{"$ref":"#/components/schemas/EnvironmentRevisionsLog"}},"type":"object","required":["environment"],"title":"EnvironmentRevisionsLogRequest"},"EnvironmentRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_revisions":{"items":{"$ref":"#/components/schemas/EnvironmentRevision"},"type":"array","title":"Environment Revisions","default":[]}},"type":"object","title":"EnvironmentRevisionsResponse"},"EnvironmentVariant":{"properties":{"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EnvironmentVariant"},"EnvironmentVariantCreate":{"properties":{"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EnvironmentVariantCreate"},"EnvironmentVariantCreateRequest":{"properties":{"environment_variant":{"$ref":"#/components/schemas/EnvironmentVariantCreate"}},"type":"object","required":["environment_variant"],"title":"EnvironmentVariantCreateRequest"},"EnvironmentVariantEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EnvironmentVariantEdit"},"EnvironmentVariantEditRequest":{"properties":{"environment_variant":{"$ref":"#/components/schemas/EnvironmentVariantEdit"}},"type":"object","required":["environment_variant"],"title":"EnvironmentVariantEditRequest"},"EnvironmentVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_variant":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentVariant"},{"type":"null"}]}},"type":"object","title":"EnvironmentVariantResponse"},"EnvironmentVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_variants":{"items":{"$ref":"#/components/schemas/EnvironmentVariant"},"type":"array","title":"Environment Variants","default":[]}},"type":"object","title":"EnvironmentVariantsResponse"},"EnvironmentsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environments":{"items":{"$ref":"#/components/schemas/Environment"},"type":"array","title":"Environments","default":[]}},"type":"object","title":"EnvironmentsResponse"},"ErrorPolicy":{"type":"string","enum":["exception","placeholder","keep"],"title":"ErrorPolicy"},"EvaluationMetrics":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationMetrics"},"EvaluationMetricsCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationMetricsCreate"},"EvaluationMetricsCreateRequest":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/EvaluationMetricsCreate"},"type":"array","title":"Metrics"}},"type":"object","required":["metrics"],"title":"EvaluationMetricsCreateRequest"},"EvaluationMetricsEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"EvaluationMetricsEdit"},"EvaluationMetricsEditRequest":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/EvaluationMetricsEdit"},"type":"array","title":"Metrics"}},"type":"object","required":["metrics"],"title":"EvaluationMetricsEditRequest"},"EvaluationMetricsIdsRequest":{"properties":{"metrics_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Metrics Ids"}},"type":"object","required":["metrics_ids"],"title":"EvaluationMetricsIdsRequest"},"EvaluationMetricsIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"metrics_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Metrics Ids","default":[]}},"type":"object","title":"EvaluationMetricsIdsResponse"},"EvaluationMetricsQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"boolean"},{"type":"null"}],"title":"Timestamps"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"boolean"},{"type":"null"}],"title":"Scenario Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationMetricsQuery"},"EvaluationMetricsQueryRequest":{"properties":{"metrics":{"anyOf":[{"$ref":"#/components/schemas/EvaluationMetricsQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationMetricsQueryRequest"},"EvaluationMetricsRefresh":{"properties":{"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"}},"type":"object","title":"EvaluationMetricsRefresh"},"EvaluationMetricsRefreshRequest":{"properties":{"metrics":{"$ref":"#/components/schemas/EvaluationMetricsRefresh"}},"type":"object","required":["metrics"],"title":"EvaluationMetricsRefreshRequest"},"EvaluationMetricsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"metrics":{"items":{"$ref":"#/components/schemas/EvaluationMetrics"},"type":"array","title":"Metrics","default":[]}},"type":"object","title":"EvaluationMetricsResponse"},"EvaluationQueue":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationQueue"},"EvaluationQueueCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationQueueCreate"},"EvaluationQueueData":{"properties":{"user_ids":{"anyOf":[{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array"},{"type":"null"}],"title":"User Ids"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"},"batch_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Size"},"batch_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Offset"}},"type":"object","title":"EvaluationQueueData"},"EvaluationQueueEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueData"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueEdit"},"EvaluationQueueEditRequest":{"properties":{"queue":{"$ref":"#/components/schemas/EvaluationQueueEdit"}},"type":"object","required":["queue"],"title":"EvaluationQueueEditRequest"},"EvaluationQueueFlags":{"properties":{"is_sequential":{"type":"boolean","title":"Is Sequential","default":false}},"type":"object","title":"EvaluationQueueFlags"},"EvaluationQueueIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Queue Id"}},"type":"object","title":"EvaluationQueueIdResponse"},"EvaluationQueueIdsRequest":{"properties":{"queue_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Queue Ids"}},"type":"object","required":["queue_ids"],"title":"EvaluationQueueIdsRequest"},"EvaluationQueueIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Queue Ids","default":[]}},"type":"object","title":"EvaluationQueueIdsResponse"},"EvaluationQueueQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationQueueQuery"},"EvaluationQueueQueryFlags":{"properties":{"is_sequential":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Sequential"}},"type":"object","title":"EvaluationQueueQueryFlags"},"EvaluationQueueQueryRequest":{"properties":{"queue":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueQueryRequest"},"EvaluationQueueResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueue"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueResponse"},"EvaluationQueueScenariosQuery":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"}},"type":"object","title":"EvaluationQueueScenariosQuery"},"EvaluationQueueScenariosQueryRequest":{"properties":{"queue":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueScenariosQuery"},{"type":"null"}]},"scenario":{"anyOf":[{"$ref":"#/components/schemas/EvaluationScenarioQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueScenariosQueryRequest"},"EvaluationQueuesCreateRequest":{"properties":{"queues":{"items":{"$ref":"#/components/schemas/EvaluationQueueCreate"},"type":"array","title":"Queues"}},"type":"object","required":["queues"],"title":"EvaluationQueuesCreateRequest"},"EvaluationQueuesEditRequest":{"properties":{"queues":{"items":{"$ref":"#/components/schemas/EvaluationQueueEdit"},"type":"array","title":"Queues"}},"type":"object","required":["queues"],"title":"EvaluationQueuesEditRequest"},"EvaluationQueuesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queues":{"items":{"$ref":"#/components/schemas/EvaluationQueue"},"type":"array","title":"Queues","default":[]}},"type":"object","title":"EvaluationQueuesResponse"},"EvaluationResult":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx","default":0},"step_key":{"type":"string","title":"Step Key"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["step_key","scenario_id","run_id"],"title":"EvaluationResult"},"EvaluationResultCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx","default":0},"step_key":{"type":"string","title":"Step Key"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["step_key","scenario_id","run_id"],"title":"EvaluationResultCreate"},"EvaluationResultEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]}},"type":"object","title":"EvaluationResultEdit"},"EvaluationResultEditRequest":{"properties":{"result":{"$ref":"#/components/schemas/EvaluationResultEdit"}},"type":"object","required":["result"],"title":"EvaluationResultEditRequest"},"EvaluationResultIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"result_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Result Id"}},"type":"object","title":"EvaluationResultIdResponse"},"EvaluationResultIdsRequest":{"properties":{"result_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Result Ids"}},"type":"object","required":["result_ids"],"title":"EvaluationResultIdsRequest"},"EvaluationResultIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"result_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Result Ids","default":[]}},"type":"object","title":"EvaluationResultIdsResponse"},"EvaluationResultQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx"},"repeat_idxs":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Repeat Idxs"},"step_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Key"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationResultQuery"},"EvaluationResultQueryRequest":{"properties":{"result":{"anyOf":[{"$ref":"#/components/schemas/EvaluationResultQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationResultQueryRequest"},"EvaluationResultResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"result":{"anyOf":[{"$ref":"#/components/schemas/EvaluationResult"},{"type":"null"}]}},"type":"object","title":"EvaluationResultResponse"},"EvaluationResultsCreateRequest":{"properties":{"results":{"items":{"$ref":"#/components/schemas/EvaluationResultCreate"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"EvaluationResultsCreateRequest"},"EvaluationResultsEditRequest":{"properties":{"results":{"items":{"$ref":"#/components/schemas/EvaluationResultEdit"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"EvaluationResultsEditRequest"},"EvaluationResultsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"results":{"items":{"$ref":"#/components/schemas/EvaluationResult"},"type":"array","title":"Results","default":[]}},"type":"object","title":"EvaluationResultsResponse"},"EvaluationRun":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRun"},"EvaluationRunCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRunCreate"},"EvaluationRunData":{"properties":{"steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},"EvaluationRunDataMapping":{"properties":{"column":{"$ref":"#/components/schemas/EvaluationRunDataMappingColumn"},"step":{"$ref":"#/components/schemas/EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"EvaluationRunDataMappingColumn":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"EvaluationRunDataMappingStep":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"},"EvaluationRunDataStep":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"EvaluationRunDataStepInput":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"EvaluationRunEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRunEdit"},"EvaluationRunEditRequest":{"properties":{"run":{"$ref":"#/components/schemas/EvaluationRunEdit"}},"type":"object","required":["run"],"title":"EvaluationRunEditRequest"},"EvaluationRunFlags":{"properties":{"is_live":{"type":"boolean","title":"Is Live","default":false},"is_active":{"type":"boolean","title":"Is Active","default":false},"is_closed":{"type":"boolean","title":"Is Closed","default":false},"is_queue":{"type":"boolean","title":"Is Queue","default":false},"is_cached":{"type":"boolean","title":"Is Cached","default":false},"is_split":{"type":"boolean","title":"Is Split","default":false},"has_queries":{"type":"boolean","title":"Has Queries","default":false},"has_testsets":{"type":"boolean","title":"Has Testsets","default":false},"has_evaluators":{"type":"boolean","title":"Has Evaluators","default":false},"has_custom":{"type":"boolean","title":"Has Custom","default":false},"has_human":{"type":"boolean","title":"Has Human","default":false},"has_auto":{"type":"boolean","title":"Has Auto","default":false}},"type":"object","title":"EvaluationRunFlags"},"EvaluationRunIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"}},"type":"object","title":"EvaluationRunIdResponse"},"EvaluationRunIdsRequest":{"properties":{"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Run Ids"}},"type":"object","required":["run_ids"],"title":"EvaluationRunIdsRequest"},"EvaluationRunIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Run Ids","default":[]}},"type":"object","title":"EvaluationRunIdsResponse"},"EvaluationRunQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"references":{"anyOf":[{"items":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object"},"type":"array"},{"type":"null"}],"title":"References"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationRunQuery"},"EvaluationRunQueryFlags":{"properties":{"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_queue":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Queue"},"is_cached":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Cached"},"is_split":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Split"},"has_queries":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Queries"},"has_testsets":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testsets"},"has_evaluators":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Evaluators"},"has_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Custom"},"has_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Human"},"has_auto":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Auto"}},"type":"object","title":"EvaluationRunQueryFlags"},"EvaluationRunQueryRequest":{"properties":{"run":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationRunQueryRequest"},"EvaluationRunResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"run":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRun"},{"type":"null"}]}},"type":"object","title":"EvaluationRunResponse"},"EvaluationRunsCreateRequest":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/EvaluationRunCreate"},"type":"array","title":"Runs"}},"type":"object","required":["runs"],"title":"EvaluationRunsCreateRequest"},"EvaluationRunsEditRequest":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/EvaluationRunEdit"},"type":"array","title":"Runs"}},"type":"object","required":["runs"],"title":"EvaluationRunsEditRequest"},"EvaluationRunsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"runs":{"items":{"$ref":"#/components/schemas/EvaluationRun"},"type":"array","title":"Runs","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationRunsResponse"},"EvaluationScenario":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationScenario"},"EvaluationScenarioCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationScenarioCreate"},"EvaluationScenarioEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioEdit"},"EvaluationScenarioEditRequest":{"properties":{"scenario":{"$ref":"#/components/schemas/EvaluationScenarioEdit"}},"type":"object","required":["scenario"],"title":"EvaluationScenarioEditRequest"},"EvaluationScenarioIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"}},"type":"object","title":"EvaluationScenarioIdResponse"},"EvaluationScenarioIdsRequest":{"properties":{"scenario_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Scenario Ids"}},"type":"object","required":["scenario_ids"],"title":"EvaluationScenarioIdsRequest"},"EvaluationScenarioIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenario_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Scenario Ids","default":[]}},"type":"object","title":"EvaluationScenarioIdsResponse"},"EvaluationScenarioQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationScenarioQuery"},"EvaluationScenarioQueryRequest":{"properties":{"scenario":{"anyOf":[{"$ref":"#/components/schemas/EvaluationScenarioQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioQueryRequest"},"EvaluationScenarioResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenario":{"anyOf":[{"$ref":"#/components/schemas/EvaluationScenario"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioResponse"},"EvaluationScenariosCreateRequest":{"properties":{"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenarioCreate"},"type":"array","title":"Scenarios"}},"type":"object","required":["scenarios"],"title":"EvaluationScenariosCreateRequest"},"EvaluationScenariosEditRequest":{"properties":{"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenarioEdit"},"type":"array","title":"Scenarios"}},"type":"object","required":["scenarios"],"title":"EvaluationScenariosEditRequest"},"EvaluationScenariosResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenario"},"type":"array","title":"Scenarios","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationScenariosResponse"},"EvaluationStatus":{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},"Evaluator":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorArtifactFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Evaluator"},"EvaluatorArtifactFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"EvaluatorArtifactFlags"},"EvaluatorArtifactQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"}},"type":"object","title":"EvaluatorArtifactQueryFlags"},"EvaluatorCatalogPreset":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"EvaluatorCatalogPreset"},"EvaluatorCatalogPresetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a preset is returned, 0 otherwise.","default":0},"preset":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorCatalogPreset"},{"type":"null"}],"description":"The catalog preset, or null when none matched."}},"type":"object","title":"EvaluatorCatalogPresetResponse","description":"Envelope for a single catalog preset."},"EvaluatorCatalogPresetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of presets in `presets`.","default":0},"presets":{"items":{"$ref":"#/components/schemas/EvaluatorCatalogPreset"},"type":"array","title":"Presets","description":"Named parameter presets defined against a template."}},"type":"object","title":"EvaluatorCatalogPresetsResponse","description":"Envelope for a list of catalog presets."},"EvaluatorCatalogTemplate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"EvaluatorCatalogTemplate"},"EvaluatorCatalogTemplateResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a template is returned, 0 otherwise.","default":0},"template":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorCatalogTemplate"},{"type":"null"}],"description":"The catalog template, or null when none matched."}},"type":"object","title":"EvaluatorCatalogTemplateResponse","description":"Envelope for a single catalog template."},"EvaluatorCatalogTemplatesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of templates in `templates`.","default":0},"templates":{"items":{"$ref":"#/components/schemas/EvaluatorCatalogTemplate"},"type":"array","title":"Templates","description":"Evaluator catalog templates (blueprints for creating evaluators)."}},"type":"object","title":"EvaluatorCatalogTemplatesResponse","description":"Envelope for a list of catalog templates."},"EvaluatorCatalogType":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"json_schema":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Json Schema"}},"type":"object","required":["key","json_schema"],"title":"EvaluatorCatalogType"},"EvaluatorCatalogTypesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of types in `types`.","default":0},"types":{"items":{"$ref":"#/components/schemas/EvaluatorCatalogType"},"type":"array","title":"Types","description":"JSON schema types the evaluator catalog understands."}},"type":"object","title":"EvaluatorCatalogTypesResponse","description":"Envelope for a list of catalog types."},"EvaluatorCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorCreate"},"EvaluatorCreateRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorCreate","description":"Evaluator payload (slug, name, flags, data). Slug is required and scoped to the project."}},"type":"object","required":["evaluator"],"title":"EvaluatorCreateRequest","description":"Body for creating an evaluator artifact.\n\nCreating an evaluator also provisions its first variant and its initial\nrevision. The evaluator shares the artifact / variant / revision model\nused across versioned resources — see the Versioning guide."},"EvaluatorEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorEdit"},"EvaluatorEditRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorEdit","description":"Evaluator edit payload. Requires the evaluator `id`. Renaming is temporarily disabled."}},"type":"object","required":["evaluator"],"title":"EvaluatorEditRequest","description":"Body for editing the metadata of an existing evaluator artifact."},"EvaluatorFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"EvaluatorFlags","description":"Legacy full evaluator flag set."},"EvaluatorFork":{"properties":{"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionFork"},{"type":"null"}]},"revision":{"anyOf":[{"$ref":"#/components/schemas/RevisionFork"},{"type":"null"}]},"evaluator_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"evaluator_variant":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariantFork"},{"type":"null"}]},"variant":{"anyOf":[{"$ref":"#/components/schemas/VariantFork"},{"type":"null"}]},"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFork"},{"type":"null"}]},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFork"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"EvaluatorFork"},"EvaluatorForkRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorFork","description":"Fork payload. References the source variant or revision and the target evaluator."}},"type":"object","required":["evaluator"],"title":"EvaluatorForkRequest","description":"Body for forking an evaluator variant into a new variant.\n\nForking copies the variant's history into a new branch so experiments\ncan proceed without touching the original."},"EvaluatorQuery":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorArtifactQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"EvaluatorQuery"},"EvaluatorQueryRequest":{"properties":{"evaluator":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorQuery"},{"type":"null"}],"description":"Filter on evaluator attributes (flags, tags, meta)."},"evaluator_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs","description":"Restrict the query to these evaluators. Accepts `id` or `slug` per reference."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When true, include soft-deleted evaluators in the response."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination controls (limit, order, next, newest, oldest)."}},"type":"object","title":"EvaluatorQueryRequest","description":"Body for filtering evaluators. See the Query Pattern guide for field semantics."},"EvaluatorResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when an evaluator is returned, 0 otherwise.","default":0},"evaluator":{"anyOf":[{"$ref":"#/components/schemas/Evaluator"},{"type":"null"}],"description":"The evaluator artifact, or null when none matched."}},"type":"object","title":"EvaluatorResponse","description":"Envelope for a single evaluator response."},"EvaluatorRevision":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevision"},"EvaluatorRevisionCommit":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"EvaluatorRevisionCommit"},"EvaluatorRevisionCommitRequest":{"properties":{"evaluator_revision_commit":{"$ref":"#/components/schemas/EvaluatorRevisionCommit","description":"Commit payload carrying the `evaluator_variant_id`, optional commit `message`, and the revision `data`."}},"type":"object","required":["evaluator_revision_commit"],"title":"EvaluatorRevisionCommitRequest","description":"Body for committing a new revision on a variant."},"EvaluatorRevisionCreate":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorRevisionCreate"},"EvaluatorRevisionCreateRequest":{"properties":{"evaluator_revision":{"$ref":"#/components/schemas/EvaluatorRevisionCreate","description":"Revision payload. Requires the parent `evaluator_variant_id` and a `data` object."}},"type":"object","required":["evaluator_revision"],"title":"EvaluatorRevisionCreateRequest","description":"Body for creating a new revision (commit) on an evaluator variant."},"EvaluatorRevisionData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"EvaluatorRevisionData"},"EvaluatorRevisionData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"EvaluatorRevisionData"},"EvaluatorRevisionDeployRequest":{"properties":{"evaluator_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Evaluator to deploy (latest revision)."},"evaluator_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant to deploy (latest revision on this variant)."},"evaluator_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific revision to deploy."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment variant."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment revision."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Named key under which the revision is pinned. Defaults to `.revision`."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Commit message stored on the environment revision that records the deployment."}},"type":"object","title":"EvaluatorRevisionDeployRequest","description":"Body for pinning an evaluator revision into an environment revision under a key."},"EvaluatorRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorRevisionEdit"},"EvaluatorRevisionEditRequest":{"properties":{"evaluator_revision":{"$ref":"#/components/schemas/EvaluatorRevisionEdit","description":"Revision edit payload. Requires the revision `id`."}},"type":"object","required":["evaluator_revision"],"title":"EvaluatorRevisionEditRequest","description":"Body for editing a revision's mutable fields (currently limited; payload data is immutable)."},"EvaluatorRevisionFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"EvaluatorRevisionFlags"},"EvaluatorRevisionFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"EvaluatorRevisionFork"},"EvaluatorRevisionQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"EvaluatorRevisionQuery"},"EvaluatorRevisionQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"EvaluatorRevisionQueryFlags"},"EvaluatorRevisionQueryRequest":{"properties":{"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionQuery"},{"type":"null"}],"description":"Filter on revision attributes."},"evaluator_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs","description":"Restrict to revisions under these evaluators."},"evaluator_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Variant Refs","description":"Restrict to revisions under these variants."},"evaluator_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Revision Refs","description":"Restrict to these specific revisions."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When true, include soft-deleted revisions."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination controls."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When true, resolve embedded references on each returned revision's `data`."}},"type":"object","title":"EvaluatorRevisionQueryRequest","description":"Body for filtering evaluator revisions. Supports scoping to evaluators, variants, or specific revisions."},"EvaluatorRevisionResolveRequest":{"properties":{"evaluator_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve the latest revision of this evaluator."},"evaluator_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve the latest revision on this variant."},"evaluator_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve this specific revision."},"max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Depth","description":"Maximum recursion depth when following embedded references. Defaults to 10.","default":10},"max_embeds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Embeds","description":"Maximum number of embeds to resolve. Defaults to 100.","default":100},"error_policy":{"anyOf":[{"$ref":"#/components/schemas/ErrorPolicy"},{"type":"null"}],"description":"How to handle embed-resolution errors (`exception` or `fallback`).","default":"exception"}},"type":"object","title":"EvaluatorRevisionResolveRequest","description":"Body for resolving embedded references on an evaluator revision's `data`."},"EvaluatorRevisionResolveResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a revision was resolved, 0 otherwise.","default":0},"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevision"},{"type":"null"}],"description":"The resolved revision."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Diagnostic information about the resolution pass (depth, embed count, errors)."}},"type":"object","title":"EvaluatorRevisionResolveResponse","description":"Envelope for a resolved evaluator revision."},"EvaluatorRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a revision is returned, 0 otherwise.","default":0},"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevision"},{"type":"null"}],"description":"The evaluator revision, or null when none matched."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Embed-resolution metadata. Populated when `resolve=true` was requested."}},"type":"object","title":"EvaluatorRevisionResponse","description":"Envelope for a single evaluator revision."},"EvaluatorRevisionRetrieveRequest":{"properties":{"evaluator_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Retrieve the latest revision of this evaluator."},"evaluator_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Retrieve the latest revision on this variant."},"evaluator_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Retrieve this specific revision."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment to resolve through. Requires `key`."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment variant to resolve through. Requires `key`."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific environment revision to resolve through. Requires `key`."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Named deployment key inside the environment revision. Required with environment refs."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When true, resolve embedded references on the returned revision's `data`."}},"type":"object","title":"EvaluatorRevisionRetrieveRequest","description":"Body for retrieving one revision, either by direct reference or through an environment key.\n\nProvide one of: an evaluator / variant / revision reference, or an environment reference plus `key`."},"EvaluatorRevisionsLog":{"properties":{"evaluator_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"EvaluatorRevisionsLog"},"EvaluatorRevisionsLogRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorRevisionsLog","description":"Log request scoped to an evaluator / variant / revision by id, slug, or version."}},"type":"object","required":["evaluator"],"title":"EvaluatorRevisionsLogRequest","description":"Body for listing the revision log of an evaluator variant."},"EvaluatorRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of revisions in `evaluator_revisions`.","default":0},"evaluator_revisions":{"items":{"$ref":"#/components/schemas/EvaluatorRevision"},"type":"array","title":"Evaluator Revisions","description":"Matching evaluator revisions."}},"type":"object","title":"EvaluatorRevisionsResponse","description":"Envelope for a list of evaluator revisions."},"EvaluatorTemplate":{"properties":{"name":{"type":"string","title":"Name","description":"Human-readable template name."},"key":{"type":"string","title":"Key","description":"Stable template identifier, used to create evaluators from the template."},"direct_use":{"type":"boolean","title":"Direct Use","description":"Whether the template can be used without further configuration."},"settings_presets":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Settings Presets","description":"Preset parameter configurations shipped with the template."},"settings_template":{"additionalProperties":true,"type":"object","title":"Settings Template","description":"JSON Schema describing the template's configurable parameters."},"outputs_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Outputs Schema","description":"JSON Schema describing the template's evaluator output shape."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Template description."},"oss":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Oss","description":"True when the template is available in OSS builds.","default":false},"requires_llm_api_keys":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requires Llm Api Keys","description":"True when the template calls an LLM provider and requires an API key.","default":false},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Tags for grouping templates."},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived","description":"True when the template is deprecated. Hidden unless `include_archived=true`.","default":false}},"type":"object","required":["name","key","direct_use","settings_template"],"title":"EvaluatorTemplate","description":"Static evaluator template definition (built-in evaluator types).\n\nTemplates are shipped with the product and describe the available\nevaluator types. They are read-only and separate from user-owned\nevaluator artifacts."},"EvaluatorTemplatesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of templates in `templates`.","default":0},"templates":{"items":{"$ref":"#/components/schemas/EvaluatorTemplate"},"type":"array","title":"Templates","description":"Built-in evaluator templates."}},"type":"object","title":"EvaluatorTemplatesResponse","description":"Envelope for a list of evaluator templates."},"EvaluatorVariant":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariant"},"EvaluatorVariantCreate":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorVariantCreate"},"EvaluatorVariantCreateRequest":{"properties":{"evaluator_variant":{"$ref":"#/components/schemas/EvaluatorVariantCreate","description":"Variant payload. Requires the parent `evaluator_id`."}},"type":"object","required":["evaluator_variant"],"title":"EvaluatorVariantCreateRequest","description":"Body for creating a new variant on an existing evaluator."},"EvaluatorVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariantEdit"},"EvaluatorVariantEditRequest":{"properties":{"evaluator_variant":{"$ref":"#/components/schemas/EvaluatorVariantEdit","description":"Variant edit payload. Requires the variant `id`."}},"type":"object","required":["evaluator_variant"],"title":"EvaluatorVariantEditRequest","description":"Body for editing a variant's metadata."},"EvaluatorVariantFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"EvaluatorVariantFlags"},"EvaluatorVariantFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorVariantFork"},"EvaluatorVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a variant is returned, 0 otherwise.","default":0},"evaluator_variant":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariant"},{"type":"null"}],"description":"The evaluator variant, or null when none matched."}},"type":"object","title":"EvaluatorVariantResponse","description":"Envelope for a single evaluator variant."},"EvaluatorVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of variants in `evaluator_variants`.","default":0},"evaluator_variants":{"items":{"$ref":"#/components/schemas/EvaluatorVariant"},"type":"array","title":"Evaluator Variants","description":"Matching evaluator variants."}},"type":"object","title":"EvaluatorVariantsResponse","description":"Envelope for a list of evaluator variants."},"EvaluatorsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of evaluators in `evaluators`.","default":0},"evaluators":{"items":{"$ref":"#/components/schemas/Evaluator"},"type":"array","title":"Evaluators","description":"Matching evaluator artifacts."}},"type":"object","title":"EvaluatorsResponse","description":"Envelope for a list of evaluators."},"ExistenceOperator":{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},"Filtering-Input":{"properties":{"operator":{"$ref":"#/components/schemas/LogicalOperator","default":"and"},"conditions":{"items":{"anyOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/Filtering-Input"}]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},"Filtering-Output":{"properties":{"operator":{"$ref":"#/components/schemas/LogicalOperator","default":"and"},"conditions":{"items":{"anyOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/Filtering-Output"}]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},"Focus":{"type":"string","enum":["trace","span"],"title":"Focus"},"Folder":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"kind":{"anyOf":[{"$ref":"#/components/schemas/FolderKind"},{"type":"null"}],"description":"Resource family this folder organizes. Only `applications` is defined today, and it also covers workflows, evaluators, and testsets (they share the artifact table)."},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path","description":"Dot-separated materialized path built from the folder's slug and its ancestors' slugs. Read-only; derived by the server."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"Id of the parent folder, or `null` for a root folder."}},"type":"object","title":"Folder"},"FolderCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"kind":{"anyOf":[{"$ref":"#/components/schemas/FolderKind"},{"type":"null"}],"description":"Resource family the folder organizes. Defaults to `applications` when omitted."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"Id of the parent folder. Omit or set to `null` to create a root folder."}},"type":"object","title":"FolderCreate"},"FolderCreateRequest":{"properties":{"folder":{"$ref":"#/components/schemas/FolderCreate","description":"Folder to create. `slug` is required; `parent_id` nests the new folder under an existing one."}},"type":"object","required":["folder"],"title":"FolderCreateRequest"},"FolderEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"kind":{"anyOf":[{"$ref":"#/components/schemas/FolderKind"},{"type":"null"}],"description":"Resource family. Must match the current folder's kind; defaults to `applications`."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"New parent folder id. Include the key with a `null` value to move the folder to the root; omit the key to keep the existing parent."}},"type":"object","title":"FolderEdit"},"FolderEditRequest":{"properties":{"folder":{"$ref":"#/components/schemas/FolderEdit","description":"Folder edit payload. `id` must match the path parameter. Only fields present in the payload are changed."}},"type":"object","required":["folder"],"title":"FolderEditRequest"},"FolderIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a folder was deleted, `0` if no folder matched.","default":0},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id","description":"Id of the deleted folder. Omitted when nothing was deleted."}},"type":"object","title":"FolderIdResponse"},"FolderKind":{"type":"string","enum":["applications"],"title":"FolderKind"},"FolderQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id","description":"Match a single folder id."},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids","description":"Match any of the given folder ids."},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"Match a folder by slug, regardless of its position in the tree."},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs","description":"Match folders whose slug is in the given list."},"kind":{"anyOf":[{"$ref":"#/components/schemas/FolderKind"},{"type":"null"}],"description":"Match folders of a single resource family."},"kinds":{"anyOf":[{"type":"boolean"},{"items":{"$ref":"#/components/schemas/FolderKind"},"type":"array"},{"type":"null"}],"title":"Kinds","description":"Filter by presence of a kind. `false` returns folders with no kind, `true` returns folders where `kind` is set, and an array restricts to the given kinds."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"Match folders whose parent is this id. Send `null` to return only root folders."},"parent_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Parent Ids","description":"Match folders whose parent is any of the given ids."},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path","description":"Exact match on the materialized `path` (e.g. `support.prod`)."},"paths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Paths","description":"Exact match on any of the given paths."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Subtree lookup: returns the folder at this path and every descendant."},"prefixes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Prefixes","description":"Subtree lookup across multiple prefixes, OR-ed together."}},"type":"object","title":"FolderQuery"},"FolderQueryRequest":{"properties":{"folder":{"$ref":"#/components/schemas/FolderQuery","description":"Filter object. Any combination of `id`/`ids`, `slug`/`slugs`, `kind`/`kinds`, `parent_id`/`parent_ids`, `path`/`paths`, and `prefix`/`prefixes` narrows the result."}},"type":"object","required":["folder"],"title":"FolderQueryRequest"},"FolderResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of folders returned (`0` or `1`).","default":0},"folder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"The folder, when found. Omitted when `count` is `0`."}},"type":"object","title":"FolderResponse"},"FoldersResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of folders in `folders`.","default":0},"folders":{"items":{"$ref":"#/components/schemas/Folder"},"type":"array","title":"Folders","description":"Matching folders for the query. Ordering is not guaranteed."}},"type":"object","title":"FoldersResponse"},"Format":{"type":"string","enum":["agenta","opentelemetry"],"title":"Format"},"Formatting":{"properties":{"focus":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}]},"format":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}]}},"type":"object","title":"Formatting"},"FullJson-Input":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/FullJson-Input"},"type":"array"},{"type":"null"}]},"FullJson-Output":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"items":{"$ref":"#/components/schemas/FullJson-Output"},"type":"array"},{"type":"null"}]},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Header":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"Header"},"InviteRequest":{"properties":{"email":{"type":"string","title":"Email"},"roles":{"anyOf":[{"items":{"type":"string","enum":["owner","admin","developer","editor","annotator","viewer"]},"type":"array"},{"type":"null"}],"title":"Roles"}},"type":"object","required":["email"],"title":"InviteRequest"},"InviteToken":{"properties":{"token":{"type":"string","title":"Token"},"email":{"type":"string","title":"Email"}},"type":"object","required":["token","email"],"title":"InviteToken"},"Invocation":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Invocation"},"InvocationCreate":{"properties":{"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"InvocationCreate"},"InvocationCreateRequest":{"properties":{"invocation":{"$ref":"#/components/schemas/InvocationCreate"}},"type":"object","required":["invocation"],"title":"InvocationCreateRequest"},"InvocationEdit":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data"],"title":"InvocationEdit"},"InvocationEditRequest":{"properties":{"invocation":{"$ref":"#/components/schemas/InvocationEdit"}},"type":"object","required":["invocation"],"title":"InvocationEditRequest"},"InvocationLinkResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"invocation_link":{"anyOf":[{"$ref":"#/components/schemas/OTelLink-Output"},{"type":"null"}]}},"type":"object","title":"InvocationLinkResponse"},"InvocationQuery":{"properties":{"origin":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceOrigin"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceKind"},{"type":"null"}]},"channel":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceChannel"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"InvocationQuery"},"InvocationQueryRequest":{"properties":{"invocation":{"anyOf":[{"$ref":"#/components/schemas/InvocationQuery"},{"type":"null"}]},"invocation_links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Invocation Links"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"InvocationQueryRequest"},"InvocationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"invocation":{"anyOf":[{"$ref":"#/components/schemas/Invocation"},{"type":"null"}]}},"type":"object","title":"InvocationResponse"},"InvocationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"invocations":{"items":{"$ref":"#/components/schemas/Invocation"},"type":"array","title":"Invocations","default":[]}},"type":"object","title":"InvocationsResponse"},"JsonSchemas-Input":{"properties":{"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"inputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Inputs"},"outputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Outputs"}},"type":"object","title":"JsonSchemas"},"JsonSchemas-Output":{"properties":{"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"inputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Inputs"},"outputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Outputs"}},"type":"object","title":"JsonSchemas"},"LabelJson-Input":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"}]},"LabelJson-Output":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"}]},"LegacyLifecycleDTO":{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},"ListAPIKeysResponse":{"properties":{"prefix":{"type":"string","title":"Prefix"},"created_at":{"type":"string","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"expiration_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiration Date"}},"type":"object","required":["prefix","created_at"],"title":"ListAPIKeysResponse"},"ListOperator":{"type":"string","enum":["in","not_in"],"title":"ListOperator"},"ListOptions":{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},"LogicalOperator":{"type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"MetricSpec":{"properties":{"type":{"$ref":"#/components/schemas/MetricType","default":"none"},"path":{"type":"string","title":"Path","default":"*"},"bins":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bins"},"vmin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vmin"},"vmax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vmax"},"edge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Edge"}},"type":"object","title":"MetricSpec"},"MetricType":{"type":"string","enum":["numeric/continuous","numeric/discrete","binary","categorical/single","categorical/multiple","string","json","none","*"],"title":"MetricType"},"MetricsBucket":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"interval":{"type":"integer","title":"Interval"},"metrics":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Metrics"}},"type":"object","required":["timestamp","interval"],"title":"MetricsBucket"},"NumericOperator":{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},"OTelEvent-Input":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"OTelEvent-Output":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"OTelHash-Input":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"OTelHash-Output":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"OTelLink-Input":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelLink"},"OTelLink-Output":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelLink"},"OTelLinksResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of spans that were accepted and published to the ingest stream. Compare against the number of spans you sent to detect partial failures.","default":0},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links","description":"List of `(trace_id, span_id)` pairs for the accepted spans, in submission order."}},"type":"object","title":"OTelLinksResponse","description":"Response from span ingestion.\n\n`count` reflects how many spans were successfully parsed and published\nto the ingest stream. If you submitted N spans and see `count < N`,\nsome spans failed server-side validation and were not persisted (check\nserver logs for details). See [Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202) for\nthe full semantics of the `202 Accepted` response."},"OTelReference-Input":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"OTelReference-Output":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"OTelSpanKind":{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},"OTelStatusCode":{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},"OTelTracingRequest":{"properties":{"spans":{"anyOf":[{"items":{"$ref":"#/components/schemas/Span-Input"},"type":"array"},{"type":"null"}],"title":"Spans","description":"Flat list of spans. Use this when you already have a flat list and parent/child relationships are expressed via each span's `parent_id`."},"traces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SpansTree-Input"},"type":"object"},{"type":"null"}],"title":"Traces","description":"Nested tree of spans keyed by `trace_id` → span name, with children under each node's `spans` field. This matches the shape returned by `POST /tracing/spans/query` with `focus=\"trace\"`."}},"type":"object","title":"OTelTracingRequest","description":"Ingest or query payload for OpenTelemetry-style spans.\n\nExactly one of `spans` or `traces` should be provided. Use `spans`\nfor a flat list (parent/child linked via `parent_id`); use `traces`\nfor a nested tree (keyed by `trace_id` then by span name, children\nhanging off each node's `spans` field). The two shapes are\ninterchangeable and the query endpoint returns the `traces` shape by\ndefault.\n\nSee [Tracing](/reference/api-guide/tracing) for the full attribute\nnamespace and the async ingest contract."},"OTelTracingResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Total number of matching traces or spans in the window.","default":0},"spans":{"anyOf":[{"items":{"$ref":"#/components/schemas/Span-Output"},"type":"array"},{"type":"null"}],"title":"Spans","description":"Flat list of spans, populated when the query was run with `focus=\"span\"`."},"traces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SpansTree-Output"},"type":"object"},{"type":"null"}],"title":"Traces","description":"Nested tree of spans keyed by `trace_id` → span name, populated when the query was run with `focus=\"trace\"` (default)."}},"type":"object","title":"OTelTracingResponse","description":"Response from span/trace queries.\n\nExactly one of `spans` or `traces` is populated, controlled by the\n`focus` field in the request (`\"span\"` for flat lists, `\"trace\"` for\nnested trees). The shapes here match what the ingest endpoint accepts,\nso you can round-trip data between environments."},"OldAnalyticsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of time buckets returned.","default":0},"buckets":{"items":{"$ref":"#/components/schemas/Bucket"},"type":"array","title":"Buckets","description":"Time-bucketed aggregates with fixed fields (`total`, `errors`) holding `count`, `duration`, `costs`, and `tokens`.","default":[]}},"type":"object","title":"OldAnalyticsResponse","description":"Legacy analytics response with a fixed metric schema."},"OrganizationDetails":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"members":{"items":{"type":"string"},"type":"array","title":"Members"},"invitations":{"items":{},"type":"array","title":"Invitations"},"workspaces":{"items":{"type":"string"},"type":"array","title":"Workspaces"},"default_workspace":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Workspace"}},"type":"object","required":["id","owner_id"],"title":"OrganizationDetails"},"OrganizationDomainCreate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"domain":{"type":"string","title":"Domain"}},"type":"object","required":["domain"],"title":"OrganizationDomainCreate","description":"Request model for creating a domain."},"OrganizationDomainResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"additionalProperties":true,"type":"object","title":"Flags"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"}},"type":"object","required":["id","slug","name","description","flags","token","created_at","updated_at","organization_id"],"title":"OrganizationDomainResponse","description":"Response model for a domain."},"OrganizationDomainVerify":{"properties":{"domain_id":{"type":"string","title":"Domain Id"}},"type":"object","required":["domain_id"],"title":"OrganizationDomainVerify","description":"Request model for verifying a domain."},"OrganizationProviderCreate":{"properties":{"slug":{"type":"string","pattern":"^[a-z-]+$","title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"settings":{"additionalProperties":true,"type":"object","title":"Settings"}},"type":"object","required":["slug","settings"],"title":"OrganizationProviderCreate","description":"Request model for creating an SSO provider."},"OrganizationProviderResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"additionalProperties":true,"type":"object","title":"Flags"},"settings":{"additionalProperties":true,"type":"object","title":"Settings"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"}},"type":"object","required":["id","slug","name","description","flags","settings","created_at","updated_at","organization_id"],"title":"OrganizationProviderResponse","description":"Response model for an SSO provider."},"OrganizationProviderUpdate":{"properties":{"slug":{"anyOf":[{"type":"string","pattern":"^[a-z-]+$"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"}},"type":"object","title":"OrganizationProviderUpdate","description":"Request model for updating an SSO provider."},"OrganizationUpdate":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","title":"OrganizationUpdate"},"Permission":{"type":"string","enum":["read_system","view_applications","edit_application","create_app_variant","delete_app_variant","modify_variant_configurations","delete_application_variant","run_service","view_webhooks","edit_webhooks","view_secret","edit_secret","view_spans","edit_spans","view_folders","edit_folders","view_api_keys","edit_api_keys","view_app_environment_deployment","edit_app_environment_deployment","create_app_environment_deployment","view_testset","edit_testset","create_testset","delete_testset","view_evaluation","run_evaluations","edit_evaluation","create_evaluation","delete_evaluation","deploy_application","view_workspace","edit_workspace","create_workspace","delete_workspace","modify_user_roles","add_new_user_to_workspace","edit_organization","delete_organization","add_new_user_to_organization","reset_password","view_billing","edit_billing","view_workflows","edit_workflows","run_workflows","view_evaluators","edit_evaluators","view_environments","edit_environments","deploy_environments","view_queries","edit_queries","view_testsets","edit_testsets","view_annotations","edit_annotations","view_invocations","edit_invocations","view_evaluation_runs","edit_evaluation_runs","view_evaluation_scenarios","edit_evaluation_scenarios","view_evaluation_results","edit_evaluation_results","view_evaluation_metrics","edit_evaluation_metrics","view_evaluation_queues","edit_evaluation_queues","view_tools","edit_tools","run_tools"],"title":"Permission"},"Plan":{"type":"string","enum":["cloud_v0_hobby","cloud_v0_pro","cloud_v0_business","cloud_v0_humanity_labs","cloud_v0_x_labs","cloud_v0_agenta_ai","self_hosted_enterprise"],"title":"Plan"},"ProjectsResponse":{"properties":{"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"workspace_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Name"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"},"is_default_project":{"type":"boolean","title":"Is Default Project","default":false},"user_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Role"},"is_demo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Demo"}},"type":"object","required":["project_id","project_name"],"title":"ProjectsResponse"},"QueriesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queries":{"items":{"$ref":"#/components/schemas/Query"},"type":"array","title":"Queries","default":[]}},"type":"object","title":"QueriesResponse"},"Query":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Query"},"QueryCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"QueryCreate"},"QueryCreateRequest":{"properties":{"query":{"$ref":"#/components/schemas/QueryCreate"}},"type":"object","required":["query"],"title":"QueryCreateRequest"},"QueryEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryEdit"},"QueryEditRequest":{"properties":{"query":{"$ref":"#/components/schemas/QueryEdit"}},"type":"object","required":["query"],"title":"QueryEditRequest"},"QueryFlags":{"properties":{},"type":"object","title":"QueryFlags"},"QueryQueryFlags":{"properties":{},"type":"object","title":"QueryQueryFlags"},"QueryResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"$ref":"#/components/schemas/Query"},{"type":"null"}]}},"type":"object","title":"QueryResponse"},"QueryRevision":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"QueryRevision"},"QueryRevisionCommit":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"QueryRevisionCommit"},"QueryRevisionCommitRequest":{"properties":{"query_revision_commit":{"$ref":"#/components/schemas/QueryRevisionCommit"}},"type":"object","required":["query_revision_commit"],"title":"QueryRevisionCommitRequest"},"QueryRevisionCreate":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"QueryRevisionCreate"},"QueryRevisionCreateRequest":{"properties":{"query_revision":{"$ref":"#/components/schemas/QueryRevisionCreate"}},"type":"object","required":["query_revision"],"title":"QueryRevisionCreateRequest"},"QueryRevisionData-Input":{"properties":{"formatting":{"anyOf":[{"$ref":"#/components/schemas/Formatting"},{"type":"null"}]},"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Input"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]},"trace_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trace Ids"},"traces":{"anyOf":[{"items":{"$ref":"#/components/schemas/Trace-Input"},"type":"array"},{"type":"null"}],"title":"Traces"}},"type":"object","title":"QueryRevisionData"},"QueryRevisionData-Output":{"properties":{"formatting":{"anyOf":[{"$ref":"#/components/schemas/Formatting"},{"type":"null"}]},"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Output"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]},"trace_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trace Ids"},"traces":{"anyOf":[{"items":{"$ref":"#/components/schemas/Trace-Output"},"type":"array"},{"type":"null"}],"title":"Traces"}},"type":"object","title":"QueryRevisionData"},"QueryRevisionEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryRevisionEdit"},"QueryRevisionEditRequest":{"properties":{"query_revision":{"$ref":"#/components/schemas/QueryRevisionEdit"}},"type":"object","required":["query_revision"],"title":"QueryRevisionEditRequest"},"QueryRevisionQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"QueryRevisionQuery"},"QueryRevisionQueryRequest":{"properties":{"query_revision":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionQuery"},{"type":"null"}]},"query_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Refs"},"query_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Variant Refs"},"query_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Revision Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"QueryRevisionQueryRequest"},"QueryRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query_revision":{"anyOf":[{"$ref":"#/components/schemas/QueryRevision"},{"type":"null"}]}},"type":"object","title":"QueryRevisionResponse"},"QueryRevisionRetrieveRequest":{"properties":{"query_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"query_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"query_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"include_trace_ids":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Trace Ids"},"include_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Traces"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"QueryRevisionRetrieveRequest"},"QueryRevisionsLog":{"properties":{"query_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"QueryRevisionsLog"},"QueryRevisionsLogRequest":{"properties":{"query_revisions":{"$ref":"#/components/schemas/QueryRevisionsLog"}},"type":"object","required":["query_revisions"],"title":"QueryRevisionsLogRequest"},"QueryRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query_revisions":{"items":{"$ref":"#/components/schemas/QueryRevision"},"type":"array","title":"Query Revisions","default":[]}},"type":"object","title":"QueryRevisionsResponse"},"QueryVariant":{"properties":{"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryVariant"},"QueryVariantCreate":{"properties":{"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"QueryVariantCreate"},"QueryVariantCreateRequest":{"properties":{"query_variant":{"$ref":"#/components/schemas/QueryVariantCreate"}},"type":"object","required":["query_variant"],"title":"QueryVariantCreateRequest"},"QueryVariantEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryVariantEdit"},"QueryVariantEditRequest":{"properties":{"query_variant":{"$ref":"#/components/schemas/QueryVariantEdit"}},"type":"object","required":["query_variant"],"title":"QueryVariantEditRequest"},"QueryVariantQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"QueryVariantQuery"},"QueryVariantQueryRequest":{"properties":{"query_variant":{"anyOf":[{"$ref":"#/components/schemas/QueryVariantQuery"},{"type":"null"}]},"query_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Refs"},"query_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Variant Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"QueryVariantQueryRequest"},"QueryVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query_variant":{"anyOf":[{"$ref":"#/components/schemas/QueryVariant"},{"type":"null"}]}},"type":"object","title":"QueryVariantResponse"},"QueryVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query_variants":{"items":{"$ref":"#/components/schemas/QueryVariant"},"type":"array","title":"Query Variants","default":[]}},"type":"object","title":"QueryVariantsResponse"},"Reference":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"ReferenceRequestModel-Input":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},"ReferenceRequestModel-Output":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},"ResendInviteRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"ResendInviteRequest"},"ResolutionInfo":{"properties":{"references_used":{"items":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object"},"type":"array","title":"References Used"},"depth_reached":{"type":"integer","title":"Depth Reached"},"embeds_resolved":{"type":"integer","title":"Embeds Resolved"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]}},"type":"object","required":["references_used","depth_reached","embeds_resolved"],"title":"ResolutionInfo"},"RevisionFork":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"RevisionFork"},"SSOProviderDTO":{"properties":{"provider":{"$ref":"#/components/schemas/SSOProviderSettingsDTO"}},"type":"object","required":["provider"],"title":"SSOProviderDTO"},"SSOProviderInfo":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"third_party_id":{"type":"string","title":"Third Party Id"}},"type":"object","required":["id","slug","third_party_id"],"title":"SSOProviderInfo"},"SSOProviderSettingsDTO":{"properties":{"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"issuer_url":{"type":"string","title":"Issuer Url"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"extra":{"additionalProperties":true,"type":"object","title":"Extra"}},"type":"object","required":["client_id","client_secret","issuer_url","scopes"],"title":"SSOProviderSettingsDTO"},"SSOProviders":{"properties":{"providers":{"items":{"$ref":"#/components/schemas/SSOProviderInfo"},"type":"array","title":"Providers"}},"type":"object","required":["providers"],"title":"SSOProviders"},"SecretDTO":{"properties":{"kind":{"$ref":"#/components/schemas/SecretKind"},"data":{"anyOf":[{"$ref":"#/components/schemas/StandardProviderDTO"},{"$ref":"#/components/schemas/CustomProviderDTO"},{"$ref":"#/components/schemas/SSOProviderDTO"},{"$ref":"#/components/schemas/WebhookProviderDTO"}],"title":"Data"}},"type":"object","required":["kind","data"],"title":"SecretDTO"},"SecretKind":{"type":"string","enum":["provider_key","custom_provider","sso_provider","webhook_provider"],"title":"SecretKind"},"SecretResponseDTO":{"properties":{"kind":{"$ref":"#/components/schemas/SecretKind"},"data":{"anyOf":[{"$ref":"#/components/schemas/StandardProviderDTO"},{"$ref":"#/components/schemas/CustomProviderDTO"},{"$ref":"#/components/schemas/SSOProviderDTO"},{"$ref":"#/components/schemas/WebhookProviderDTO"}],"title":"Data"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"header":{"$ref":"#/components/schemas/Header"},"lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["kind","data","header"],"title":"SecretResponseDTO"},"SessionIdentitiesUpdate":{"properties":{"session_identities":{"items":{"type":"string"},"type":"array","title":"Session Identities"}},"type":"object","required":["session_identities"],"title":"SessionIdentitiesUpdate"},"SessionIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of session IDs in this page.","default":0},"session_ids":{"items":{"type":"string"},"type":"array","title":"Session Ids","description":"Distinct values of `ag.session.id` in this page.","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor for the next page. Pass verbatim as `windowing.next`."}},"type":"object","title":"SessionIdsResponse"},"SessionsQueryRequest":{"properties":{"realtime":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Realtime","description":"When `true`, paginate by `last_active` (reflects ongoing activity but can shift between pages). When `false` or unset, paginate by the stable `first_active` cursor."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range. Pass the returned `windowing.next` on subsequent calls to continue iteration."}},"type":"object","title":"SessionsQueryRequest","description":"Request body for `POST /tracing/sessions/query`."},"SimpleApplication":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationData-Output"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleApplication"},"SimpleApplicationCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleApplicationCreate"},"SimpleApplicationCreateRequest":{"properties":{"application":{"$ref":"#/components/schemas/SimpleApplicationCreate","description":"Application fields plus `data` for the first revision. `data.uri` selects the template (for example `agenta:builtin:completion:v0`); `data.parameters` carries the prompt and model config."}},"type":"object","required":["application"],"title":"SimpleApplicationCreateRequest","description":"Request body for `POST /simple/applications/`.\n\nCreates the application artifact, a default variant, and a first committed\nrevision whose `data` comes from the request. Use this for the common case\nof \"spin up a new application from a template\".\nSee [Simple Endpoints](/reference/api-guide/simple-endpoints)."},"SimpleApplicationData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleApplicationData"},"SimpleApplicationData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleApplicationData"},"SimpleApplicationEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleApplicationEdit"},"SimpleApplicationEditRequest":{"properties":{"application":{"$ref":"#/components/schemas/SimpleApplicationEdit","description":"Fields to change. `id` must match the path. Supplying `data` commits a new revision with that configuration; supplying `flags`/`tags`/`meta` commits a revision with the updated header but the existing `data`."}},"type":"object","required":["application"],"title":"SimpleApplicationEditRequest","description":"Request body for `PUT /simple/applications/{application_id}`.\n\nCommits a new revision on the application's variant whenever fields other\nthan `id` are present. If only `id` is sent, the current state is returned\nwithout committing."},"SimpleApplicationFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"SimpleApplicationFlags"},"SimpleApplicationQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"SimpleApplicationQuery"},"SimpleApplicationQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"SimpleApplicationQueryFlags"},"SimpleApplicationQueryRequest":{"properties":{"application":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationQuery"},{"type":"null"}],"description":"Attribute filter. Supports `slug`, `slugs`, `flags`, and `meta`. `flags` filter both artifact flags (`is_application`, etc.) and revision flags (`is_chat`, `has_url`, etc.)."},"application_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Refs","description":"Restrict to specific applications by `id` or `slug`."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When `true`, include archived applications. Defaults to `false`.","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time-range controls."}},"type":"object","title":"SimpleApplicationQueryRequest","description":"Request body for `POST /simple/applications/query`.\n\nReturns one row per application with the currently resolved variant,\nrevision, and `data` merged in — the shape most clients want when listing\napplications for a dashboard or invocation picker."},"SimpleApplicationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when the application was found, `0` otherwise.","default":0},"application":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplication"},{"type":"null"}],"description":"The application with `variant_id`, `revision_id`, and the revision's `data` merged. `data.url` is the invocation URL."}},"type":"object","title":"SimpleApplicationResponse","description":"Simple-application single-row response envelope."},"SimpleApplicationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of applications in this page.","default":0},"applications":{"items":{"$ref":"#/components/schemas/SimpleApplication"},"type":"array","title":"Applications","description":"Applications with their current variant, revision, and `data` merged in."}},"type":"object","title":"SimpleApplicationsResponse","description":"Paginated list of simple-application rows."},"SimpleEnvironment":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleEnvironment"},"SimpleEnvironmentCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleEnvironmentCreate"},"SimpleEnvironmentCreateRequest":{"properties":{"environment":{"$ref":"#/components/schemas/SimpleEnvironmentCreate"}},"type":"object","required":["environment"],"title":"SimpleEnvironmentCreateRequest"},"SimpleEnvironmentEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleEnvironmentEdit"},"SimpleEnvironmentEditRequest":{"properties":{"environment":{"$ref":"#/components/schemas/SimpleEnvironmentEdit"}},"type":"object","required":["environment"],"title":"SimpleEnvironmentEditRequest"},"SimpleEnvironmentQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"SimpleEnvironmentQuery"},"SimpleEnvironmentQueryRequest":{"properties":{"environment":{"anyOf":[{"$ref":"#/components/schemas/SimpleEnvironmentQuery"},{"type":"null"}]},"environment_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Environment Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleEnvironmentQueryRequest"},"SimpleEnvironmentResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment":{"anyOf":[{"$ref":"#/components/schemas/SimpleEnvironment"},{"type":"null"}]}},"type":"object","title":"SimpleEnvironmentResponse"},"SimpleEnvironmentsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environments":{"items":{"$ref":"#/components/schemas/SimpleEnvironment"},"type":"array","title":"Environments","default":[]}},"type":"object","title":"SimpleEnvironmentsResponse"},"SimpleEvaluation":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluation"},"SimpleEvaluationCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationCreate"},"SimpleEvaluationCreateRequest":{"properties":{"evaluation":{"$ref":"#/components/schemas/SimpleEvaluationCreate"}},"type":"object","required":["evaluation"],"title":"SimpleEvaluationCreateRequest"},"SimpleEvaluationData":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"query_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Query Steps"},"testset_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Testset Steps"},"application_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Application Steps"},"evaluator_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluator Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"}},"type":"object","title":"SimpleEvaluationData"},"SimpleEvaluationEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationEdit"},"SimpleEvaluationEditRequest":{"properties":{"evaluation":{"$ref":"#/components/schemas/SimpleEvaluationEdit"}},"type":"object","required":["evaluation"],"title":"SimpleEvaluationEditRequest"},"SimpleEvaluationIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"evaluation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluation Id"}},"type":"object","title":"SimpleEvaluationIdResponse"},"SimpleEvaluationQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"SimpleEvaluationQuery"},"SimpleEvaluationQueryRequest":{"properties":{"evaluation":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationQueryRequest"},"SimpleEvaluationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"evaluation":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluation"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationResponse"},"SimpleEvaluationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"evaluations":{"items":{"$ref":"#/components/schemas/SimpleEvaluation"},"type":"array","title":"Evaluations","default":[]}},"type":"object","title":"SimpleEvaluationsResponse"},"SimpleEvaluator":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorData-Output"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleEvaluator"},"SimpleEvaluatorCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorCreate"},"SimpleEvaluatorCreateRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/SimpleEvaluatorCreate","description":"Simple evaluator payload (slug, name, flags, and `data` with `uri` + `parameters`)."}},"type":"object","required":["evaluator"],"title":"SimpleEvaluatorCreateRequest","description":"Body for creating an evaluator via the simple surface.\n\nCollapses artifact, variant, and first revision into one call. The\nresponse returns the same flat shape that `/simple/evaluators/query`\nexposes."},"SimpleEvaluatorData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleEvaluatorData"},"SimpleEvaluatorData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleEvaluatorData"},"SimpleEvaluatorEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorEdit"},"SimpleEvaluatorEditRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/SimpleEvaluatorEdit","description":"Simple evaluator edit payload. Requires the evaluator `id`. Renaming is temporarily disabled."}},"type":"object","required":["evaluator"],"title":"SimpleEvaluatorEditRequest","description":"Body for editing an evaluator via the simple surface."},"SimpleEvaluatorFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"SimpleEvaluatorFlags"},"SimpleEvaluatorQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"SimpleEvaluatorQuery"},"SimpleEvaluatorQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"SimpleEvaluatorQueryFlags"},"SimpleEvaluatorQueryRequest":{"properties":{"evaluator":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorQuery"},{"type":"null"}],"description":"Filter on evaluator attributes (slug, slugs, flags, meta)."},"evaluator_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs","description":"Restrict to these evaluators."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When true, include soft-deleted evaluators.","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination controls."}},"type":"object","title":"SimpleEvaluatorQueryRequest","description":"Body for filtering evaluators via the simple surface."},"SimpleEvaluatorResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when an evaluator is returned, 0 otherwise.","default":0},"evaluator":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluator"},{"type":"null"}],"description":"The flat evaluator record with latest variant and revision merged into `data`."}},"type":"object","title":"SimpleEvaluatorResponse","description":"Envelope for a single simple evaluator."},"SimpleEvaluatorsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of evaluators in `evaluators`.","default":0},"evaluators":{"items":{"$ref":"#/components/schemas/SimpleEvaluator"},"type":"array","title":"Evaluators","description":"Matching flat evaluator records."}},"type":"object","title":"SimpleEvaluatorsResponse","description":"Envelope for a list of simple evaluators."},"SimpleQueriesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queries":{"items":{"$ref":"#/components/schemas/SimpleQuery"},"type":"array","title":"Queries","default":[]}},"type":"object","title":"SimpleQueriesResponse"},"SimpleQuery":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Output"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleQuery"},"SimpleQueryCreate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleQueryCreate"},"SimpleQueryCreateRequest":{"properties":{"query":{"$ref":"#/components/schemas/SimpleQueryCreate"}},"type":"object","required":["query"],"title":"SimpleQueryCreateRequest"},"SimpleQueryEdit":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleQueryEdit"},"SimpleQueryEditRequest":{"properties":{"query":{"$ref":"#/components/schemas/SimpleQueryEdit"}},"type":"object","required":["query"],"title":"SimpleQueryEditRequest"},"SimpleQueryQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","title":"SimpleQueryQuery"},"SimpleQueryQueryRequest":{"properties":{"query":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueryQuery"},{"type":"null"}]},"query_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueryQueryRequest"},"SimpleQueryResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"$ref":"#/components/schemas/SimpleQuery"},{"type":"null"}]}},"type":"object","title":"SimpleQueryResponse"},"SimpleQueue":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"SimpleQueue"},"SimpleQueueCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueData"},{"type":"null"}]}},"type":"object","title":"SimpleQueueCreate"},"SimpleQueueCreateRequest":{"properties":{"queue":{"$ref":"#/components/schemas/SimpleQueueCreate"}},"type":"object","required":["queue"],"title":"SimpleQueueCreateRequest"},"SimpleQueueData":{"properties":{"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueKind"},{"type":"null"}]},"queries":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Queries"},"testsets":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testsets"},"evaluators":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluators"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"},"assignments":{"anyOf":[{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Assignments"},"settings":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueSettings"},{"type":"null"}]}},"type":"object","title":"SimpleQueueData"},"SimpleQueueIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Queue Id"}},"type":"object","title":"SimpleQueueIdResponse"},"SimpleQueueKind":{"type":"string","enum":["traces","testcases"],"title":"SimpleQueueKind"},"SimpleQueueQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueKind"},{"type":"null"}]},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"queue_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Queue Ids"}},"type":"object","title":"SimpleQueueQuery"},"SimpleQueueQueryRequest":{"properties":{"queue":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueueQueryRequest"},"SimpleQueueResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueue"},{"type":"null"}]}},"type":"object","title":"SimpleQueueResponse"},"SimpleQueueScenariosQuery":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"}},"type":"object","title":"SimpleQueueScenariosQuery"},"SimpleQueueScenariosQueryRequest":{"properties":{"queue":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueScenariosQuery"},{"type":"null"}]},"scenario":{"anyOf":[{"$ref":"#/components/schemas/EvaluationScenarioQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueueScenariosQueryRequest"},"SimpleQueueScenariosResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenario"},"type":"array","title":"Scenarios","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueueScenariosResponse"},"SimpleQueueSettings":{"properties":{"batch_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Size"},"batch_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Offset"}},"type":"object","title":"SimpleQueueSettings"},"SimpleQueueTestcasesCreateRequest":{"properties":{"testcase_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Testcase Ids"}},"type":"object","required":["testcase_ids"],"title":"SimpleQueueTestcasesCreateRequest"},"SimpleQueueTracesCreateRequest":{"properties":{"trace_ids":{"items":{"type":"string"},"type":"array","title":"Trace Ids"}},"type":"object","required":["trace_ids"],"title":"SimpleQueueTracesCreateRequest"},"SimpleQueuesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queues":{"items":{"$ref":"#/components/schemas/SimpleQueue"},"type":"array","title":"Queues","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueuesResponse"},"SimpleTestset":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Output"},{"type":"null"}]},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"}},"type":"object","title":"SimpleTestset"},"SimpleTestsetCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetCreate"},"SimpleTestsetCreateRequest":{"properties":{"testset":{"$ref":"#/components/schemas/SimpleTestsetCreate","description":"Simple testset to create. `data.testcases` is committed as the first revision on a single variant in one call."}},"type":"object","required":["testset"],"title":"SimpleTestsetCreateRequest"},"SimpleTestsetEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetEdit"},"SimpleTestsetEditRequest":{"properties":{"testset":{"$ref":"#/components/schemas/SimpleTestsetEdit","description":"Simple testset fields to update. If `data.testcases` is provided, a new revision is committed with those testcases."}},"type":"object","required":["testset"],"title":"SimpleTestsetEditRequest"},"SimpleTestsetQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"SimpleTestsetQuery"},"SimpleTestsetQueryRequest":{"properties":{"testset":{"anyOf":[{"$ref":"#/components/schemas/SimpleTestsetQuery"},{"type":"null"}],"description":"Attribute filter on the testset (flags, tags, meta)."},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs","description":"Restrict the query to specific testsets."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"Include soft-deleted testsets."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. See the Query Pattern guide."}},"type":"object","title":"SimpleTestsetQueryRequest"},"SimpleTestsetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a testset was returned, 0 otherwise.","default":0},"testset":{"anyOf":[{"$ref":"#/components/schemas/SimpleTestset"},{"type":"null"}],"description":"The testset with its latest revision testcases merged into `data.testcases`, and the revision ID on `revision_id`."}},"type":"object","title":"SimpleTestsetResponse"},"SimpleTestsetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of simple testsets returned.","default":0},"testsets":{"items":{"$ref":"#/components/schemas/SimpleTestset"},"type":"array","title":"Testsets","description":"Simple testsets, each with its latest revision testcases merged in."}},"type":"object","title":"SimpleTestsetsResponse"},"SimpleTrace":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"SimpleTrace"},"SimpleTraceChannel":{"type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel"},"SimpleTraceCreate":{"properties":{"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"SimpleTraceCreate"},"SimpleTraceCreateRequest":{"properties":{"trace":{"$ref":"#/components/schemas/SimpleTraceCreate","description":"The trace to create. Must include `data` (the payload being recorded) and typically `origin`, `kind`, and `channel` to describe where it came from. Optional `references` link the trace to Agenta entities (app, variant, revision, evaluator, testset, etc.)."}},"type":"object","required":["trace"],"title":"SimpleTraceCreateRequest","description":"Request body for creating a single-span \"simple\" trace."},"SimpleTraceEdit":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data"],"title":"SimpleTraceEdit"},"SimpleTraceEditRequest":{"properties":{"trace":{"$ref":"#/components/schemas/SimpleTraceEdit","description":"The fields to update. `data` is required. `tags`, `meta`, `references`, and `links` overwrite their current values when present."}},"type":"object","required":["trace"],"title":"SimpleTraceEditRequest","description":"Request body for editing an existing \"simple\" trace."},"SimpleTraceKind":{"type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind"},"SimpleTraceLinkResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a trace was removed, `0` otherwise.","default":0},"link":{"anyOf":[{"$ref":"#/components/schemas/OTelLink-Output"},{"type":"null"}],"description":"The `(trace_id, span_id)` pair that was removed."}},"type":"object","title":"SimpleTraceLinkResponse","description":"Response from `DELETE /simple/traces/{trace_id}`."},"SimpleTraceOrigin":{"type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin"},"SimpleTraceQuery":{"properties":{"origin":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceOrigin"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceKind"},{"type":"null"}]},"channel":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceChannel"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"SimpleTraceQuery"},"SimpleTraceQueryRequest":{"properties":{"trace":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceQuery"},{"type":"null"}],"description":"Filter fields on the trace itself — `origin`, `kind`, `channel`, `tags`, `meta`, `references`, and inbound `links`. Filtering by `trace.links.invocation` is the common pattern for finding annotations on a given span."},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links","description":"Batch GET by the trace's own `(trace_id, span_id)`. Each entry matches the trace whose own identity equals the pair. Distinct from `trace.links`, which filters on inbound links."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range."}},"type":"object","title":"SimpleTraceQueryRequest","description":"Request body for `POST /simple/traces/query`."},"SimpleTraceReferences":{"properties":{"query":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"testset":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"application":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"SimpleTraceResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if the trace was returned, `0` otherwise.","default":0},"trace":{"anyOf":[{"$ref":"#/components/schemas/SimpleTrace"},{"type":"null"}],"description":"The created or fetched trace, including server-assigned `trace_id` and `span_id`."}},"type":"object","title":"SimpleTraceResponse","description":"Response from a single-trace create/fetch/edit."},"SimpleTracesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of matching traces in this page.","default":0},"traces":{"items":{"$ref":"#/components/schemas/SimpleTrace"},"type":"array","title":"Traces","description":"The matching traces in the high-level `SimpleTrace` shape.","default":[]}},"type":"object","title":"SimpleTracesResponse","description":"Response from `POST /simple/traces/query`."},"SimpleWorkflow":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowData-Output"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleWorkflow"},"SimpleWorkflowCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleWorkflowCreate"},"SimpleWorkflowCreateRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/SimpleWorkflowCreate","description":"Simple-workflow create payload. Creates the artifact, a default variant, and an initial revision in one call."}},"type":"object","required":["workflow"],"title":"SimpleWorkflowCreateRequest"},"SimpleWorkflowData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleWorkflowData"},"SimpleWorkflowData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleWorkflowData"},"SimpleWorkflowEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleWorkflowEdit"},"SimpleWorkflowEditRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/SimpleWorkflowEdit","description":"Simple-workflow edit payload. Updates artifact-level fields and commits a new revision when `data` changes."}},"type":"object","required":["workflow"],"title":"SimpleWorkflowEditRequest"},"SimpleWorkflowFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"SimpleWorkflowFlags"},"SimpleWorkflowQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"SimpleWorkflowQuery"},"SimpleWorkflowQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"SimpleWorkflowQueryFlags"},"SimpleWorkflowQueryRequest":{"properties":{"workflow":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowQuery"},{"type":"null"}],"description":"Attribute filter on simple workflows (slug, slugs, flags, tags, meta)."},"workflow_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Workflow Refs","description":"Restrict results to workflows matching these references."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When true, include archived workflows."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination controls."}},"type":"object","title":"SimpleWorkflowQueryRequest"},"SimpleWorkflowResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a simple workflow is returned, `0` when none matched.","default":0},"workflow":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflow"},{"type":"null"}],"description":"Workflow artifact with its resolved variant and revision merged."}},"type":"object","title":"SimpleWorkflowResponse"},"SimpleWorkflowsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of workflows in the response.","default":0},"workflows":{"items":{"$ref":"#/components/schemas/SimpleWorkflow"},"type":"array","title":"Workflows","description":"Workflow artifacts each merged with their resolved variant and revision."}},"type":"object","title":"SimpleWorkflowsResponse"},"Span-Input":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Input"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Input"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Input"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"Span"},"Span-Output":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Output"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Output"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Output"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"Span"},"SpanResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a span was returned, `0` otherwise.","default":0},"span":{"anyOf":[{"$ref":"#/components/schemas/Span-Output"},{"type":"null"}],"description":"The matching span, or `null` if not found."}},"type":"object","title":"SpanResponse"},"SpanType":{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},"SpansNode-Input":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Input"},{"items":{"$ref":"#/components/schemas/SpansNode-Input"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Input"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Input"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Input"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"SpansNode"},"SpansNode-Output":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Output"},{"items":{"$ref":"#/components/schemas/SpansNode-Output"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Output"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Output"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Output"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"SpansNode"},"SpansQueryRequest":{"properties":{"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Input"},{"type":"null"}],"description":"Span-level conditions."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range."},"query_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve filtering/windowing from a saved query."},"query_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve from the latest revision of a specific query variant."},"query_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve from a specific query revision. Returns `409` when the revision's stored `formatting.focus` is `trace`."}},"type":"object","title":"SpansQueryRequest","description":"Request body for `POST /spans/query`."},"SpansResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Total number of matching spans in the window.","default":0},"spans":{"anyOf":[{"items":{"$ref":"#/components/schemas/Span-Output"},"type":"array"},{"type":"null"}],"title":"Spans","description":"Flat list of matching spans."}},"type":"object","title":"SpansResponse"},"SpansTree-Input":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Input"},{"items":{"$ref":"#/components/schemas/SpansNode-Input"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"SpansTree"},"SpansTree-Output":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Output"},{"items":{"$ref":"#/components/schemas/SpansNode-Output"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"SpansTree"},"StandardProviderDTO":{"properties":{"kind":{"$ref":"#/components/schemas/StandardProviderKind"},"provider":{"$ref":"#/components/schemas/StandardProviderSettingsDTO"}},"type":"object","required":["kind","provider"],"title":"StandardProviderDTO"},"StandardProviderKind":{"type":"string","enum":["openai","cohere","anyscale","deepinfra","alephalpha","groq","minimax","mistral","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"StandardProviderKind"},"StandardProviderSettingsDTO":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"StandardProviderSettingsDTO"},"Status":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","title":"Status"},"StringOperator":{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},"Testcase-Input":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"Testcase-Output":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"TestcaseResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a testcase was returned, 0 otherwise.","default":0},"testcase":{"anyOf":[{"$ref":"#/components/schemas/Testcase-Output"},{"type":"null"}],"description":"The testcase blob. `data` carries the user-defined columns; `testcase_dedup_id` (inside `data`) is the caller-supplied dedup key when present."}},"type":"object","title":"TestcaseResponse"},"TestcasesQueryRequest":{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids","description":"Explicit list of testcase IDs to fetch. Combine with `testset_id` or testset references to scope the lookup."},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id","description":"Return all testcases stored in this testset. The testset owns its testcases as a content-addressed bag; a revision references a subset of these."},"testset_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Testset reference used to resolve the latest revision on the default variant. The revision's ordered testcase IDs are used for the lookup and pagination."},"testset_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Testset variant reference used to resolve the latest revision on that variant."},"testset_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific testset revision reference. The revision's ordered testcase IDs drive the lookup and cursor pagination."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. When a revision reference is used, the cursor walks the revision's deterministic testcase ID list."}},"type":"object","title":"TestcasesQueryRequest"},"TestcasesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of testcases returned on this page.","default":0},"testcases":{"items":{"$ref":"#/components/schemas/Testcase-Output"},"type":"array","title":"Testcases","description":"Testcase blobs matching the query, in revision-order when scoped by a revision reference."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor for the next page, if more results exist."}},"type":"object","title":"TestcasesResponse"},"Testset":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Testset"},"TestsetCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetCreate"},"TestsetCreateRequest":{"properties":{"testset":{"$ref":"#/components/schemas/TestsetCreate","description":"Testset artifact to create. The call only creates the artifact row; testcases are added by committing a revision (see /testsets/revisions/commit) or by using the /simple/testsets/ surface."}},"type":"object","required":["testset"],"title":"TestsetCreateRequest"},"TestsetEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetEdit"},"TestsetEditRequest":{"properties":{"testset":{"$ref":"#/components/schemas/TestsetEdit","description":"Testset artifact fields to update. The `id` in the body must match the `testset_id` in the path."}},"type":"object","required":["testset"],"title":"TestsetEditRequest"},"TestsetFlags":{"properties":{},"type":"object","title":"TestsetFlags","description":"Placeholder for testset-level flags.\n\nThis model is intentionally empty but kept as a dedicated type so that:\n- existing references to `flags: Optional[TestsetFlags]` remain valid, and\n- structured flags can be added here in the future without breaking the\n surrounding DTOs."},"TestsetQuery":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"TestsetQuery"},"TestsetQueryRequest":{"properties":{"testset":{"anyOf":[{"$ref":"#/components/schemas/TestsetQuery"},{"type":"null"}],"description":"Attribute filter (name, description, slug, flags, tags, meta, folder)."},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs","description":"Restrict the query to specific testsets by reference (id or slug)."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"Include soft-deleted testsets."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. See the Query Pattern guide."}},"type":"object","title":"TestsetQueryRequest"},"TestsetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a testset was returned, 0 otherwise.","default":0},"testset":{"anyOf":[{"$ref":"#/components/schemas/Testset"},{"type":"null"}],"description":"The testset artifact. Does not include testcases."}},"type":"object","title":"TestsetResponse"},"TestsetRevision":{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"TestsetRevision"},"TestsetRevisionCommit":{"properties":{"testset_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"delta":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionDelta"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionCommit"},"TestsetRevisionCommitRequest":{"properties":{"testset_revision_commit":{"$ref":"#/components/schemas/TestsetRevisionCommit","description":"New revision to commit. Pass either `data` (full replacement of the testcase list) or `delta` (add/remove/replace operations against the base revision) — not both."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects in the response."}},"type":"object","required":["testset_revision_commit"],"title":"TestsetRevisionCommitRequest"},"TestsetRevisionCreate":{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetRevisionCreate"},"TestsetRevisionCreateRequest":{"properties":{"testset_revision":{"$ref":"#/components/schemas/TestsetRevisionCreate","description":"Revision to create on an existing variant. Typically used to seed an empty revision; use /testsets/revisions/commit to set testcases."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects in the response. Defaults to true when the response would carry revision data."}},"type":"object","required":["testset_revision"],"title":"TestsetRevisionCreateRequest"},"TestsetRevisionData-Input":{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Input"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},"TestsetRevisionData-Output":{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Output"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},"TestsetRevisionDelta":{"properties":{"rows":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionDeltaRows"},{"type":"null"}]},"columns":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionDeltaColumns"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionDelta","description":"Operations to apply to a testset revision."},"TestsetRevisionDeltaColumns":{"properties":{"add":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Add"},"remove":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Remove"},"replace":{"anyOf":[{"items":{"prefixItems":[{"type":"string"},{"type":"string"}],"type":"array","maxItems":2,"minItems":2},"type":"array"},{"type":"null"}],"title":"Replace"}},"type":"object","title":"TestsetRevisionDeltaColumns","description":"Column-level operations applied to ALL testcases in the revision."},"TestsetRevisionDeltaRows":{"properties":{"add":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Input"},"type":"array"},{"type":"null"}],"title":"Add"},"remove":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Remove"},"replace":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Input"},"type":"array"},{"type":"null"}],"title":"Replace"}},"type":"object","title":"TestsetRevisionDeltaRows","description":"Row-level operations applied to testcases in the revision."},"TestsetRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetRevisionEdit"},"TestsetRevisionEditRequest":{"properties":{"testset_revision":{"$ref":"#/components/schemas/TestsetRevisionEdit","description":"Revision fields to update. The `id` in the body must match the `testset_revision_id` in the path. Only metadata fields are editable; content is committed as a new revision."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects in the response."}},"type":"object","required":["testset_revision"],"title":"TestsetRevisionEditRequest"},"TestsetRevisionQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"TestsetRevisionQuery"},"TestsetRevisionQueryRequest":{"properties":{"testset_revision":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionQuery"},{"type":"null"}],"description":"Attribute filter on the revision (name, description, slug, author, date, message)."},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs","description":"Scope revisions to these testsets."},"testset_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Variant Refs","description":"Scope revisions to these variants."},"testset_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Revision Refs","description":"Restrict to specific revisions by reference (id, slug, or version)."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"Include soft-deleted revisions."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects for each returned revision. Defaults to true."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. See the Query Pattern guide."}},"type":"object","title":"TestsetRevisionQueryRequest"},"TestsetRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a revision was returned, 0 otherwise.","default":0},"testset_revision":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevision"},{"type":"null"}],"description":"The testset revision. `data.testcase_ids` is the ordered list of testcase IDs; `data.testcases` is populated when `include_testcases` is true."}},"type":"object","title":"TestsetRevisionResponse"},"TestsetRevisionRetrieveRequest":{"properties":{"testset_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Testset reference. If only the testset is provided, the latest revision on its default variant is returned."},"testset_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant reference. Returns the latest revision on that variant."},"testset_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Revision reference. Returns that specific revision."},"include_testcase_ids":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcase Ids","description":"Include the ordered list of testcase IDs. Defaults to true (opt-out)."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects. Defaults to true (opt-out). Note: this opt-out default is the opposite of `/queries/revisions/retrieve`, where trace materialization is opt-in."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Windowing applied to the testcases list when materialized."}},"type":"object","title":"TestsetRevisionRetrieveRequest"},"TestsetRevisionsLog":{"properties":{"testset_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"TestsetRevisionsLog"},"TestsetRevisionsLogRequest":{"properties":{"testset_revision":{"$ref":"#/components/schemas/TestsetRevisionsLog","description":"Scope for the log: one of `testset_id`, `testset_variant_id`, or `testset_revision_id`. Optional `depth` limits how far back to walk."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects for each returned revision."}},"type":"object","required":["testset_revision"],"title":"TestsetRevisionsLogRequest"},"TestsetRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of revisions returned.","default":0},"testset_revisions":{"items":{"$ref":"#/components/schemas/TestsetRevision"},"type":"array","title":"Testset Revisions","description":"Testset revisions matching the query, in the requested order."}},"type":"object","title":"TestsetRevisionsResponse"},"TestsetVariant":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetVariant"},"TestsetVariantCreate":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetVariantCreate"},"TestsetVariantCreateRequest":{"properties":{"testset_variant":{"$ref":"#/components/schemas/TestsetVariantCreate","description":"Variant to create on an existing testset. Pass `testset_id` to identify the parent artifact."}},"type":"object","required":["testset_variant"],"title":"TestsetVariantCreateRequest"},"TestsetVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetVariantEdit"},"TestsetVariantEditRequest":{"properties":{"testset_variant":{"$ref":"#/components/schemas/TestsetVariantEdit","description":"Variant fields to update. The `id` in the body must match the `testset_variant_id` in the path."}},"type":"object","required":["testset_variant"],"title":"TestsetVariantEditRequest"},"TestsetVariantQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"TestsetVariantQuery"},"TestsetVariantQueryRequest":{"properties":{"testset_variant":{"anyOf":[{"$ref":"#/components/schemas/TestsetVariantQuery"},{"type":"null"}],"description":"Attribute filter on the variant (name, description, slug, flags, tags, meta)."},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs","description":"Scope to variants whose parent testset matches one of these references."},"testset_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Variant Refs","description":"Restrict the query to specific variants by reference (id or slug)."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"Include soft-deleted variants."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. See the Query Pattern guide."}},"type":"object","title":"TestsetVariantQueryRequest"},"TestsetVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a variant was returned, 0 otherwise.","default":0},"testset_variant":{"anyOf":[{"$ref":"#/components/schemas/TestsetVariant"},{"type":"null"}],"description":"The testset variant (branch)."}},"type":"object","title":"TestsetVariantResponse"},"TestsetVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of variants returned.","default":0},"testset_variants":{"items":{"$ref":"#/components/schemas/TestsetVariant"},"type":"array","title":"Testset Variants","description":"Testset variants matching the query."}},"type":"object","title":"TestsetVariantsResponse"},"TestsetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of testsets returned on this page.","default":0},"testsets":{"items":{"$ref":"#/components/schemas/Testset"},"type":"array","title":"Testsets","description":"Testset artifacts matching the query, without testcases."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor for the next page, if more results exist."}},"type":"object","title":"TestsetsResponse"},"TextOptions":{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},"ToolAuthScheme":{"type":"string","enum":["oauth","api_key"],"title":"ToolAuthScheme"},"ToolCall":{"properties":{"data":{"$ref":"#/components/schemas/ToolCallData"}},"type":"object","required":["data"],"title":"ToolCall","description":"Request envelope — wraps the raw OpenAI tool call."},"ToolCallData":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type","default":"function"},"function":{"$ref":"#/components/schemas/ToolCallFunction"}},"type":"object","required":["id","function"],"title":"ToolCallData","description":"OpenAI tool_calls array item — passed verbatim from the LLM."},"ToolCallFunction":{"properties":{"name":{"type":"string","title":"Name"},"arguments":{"title":"Arguments"}},"type":"object","required":["name","arguments"],"title":"ToolCallFunction","description":"Mirrors OpenAI function call: {name, arguments}."},"ToolCallResponse":{"properties":{"call":{"$ref":"#/components/schemas/ToolResult"}},"type":"object","required":["call"],"title":"ToolCallResponse"},"ToolCatalogAction":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"}},"type":"object","required":["key","name"],"title":"ToolCatalogAction"},"ToolCatalogActionDetails":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"}},"type":"object","required":["key","name"],"title":"ToolCatalogActionDetails"},"ToolCatalogActionResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"action":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogAction"},{"$ref":"#/components/schemas/ToolCatalogActionDetails"},{"type":"null"}],"title":"Action"}},"type":"object","title":"ToolCatalogActionResponse"},"ToolCatalogActionsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"total":{"type":"integer","title":"Total","default":0},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"},"actions":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogAction"},{"$ref":"#/components/schemas/ToolCatalogActionDetails"}]},"type":"array","title":"Actions","default":[]}},"type":"object","title":"ToolCatalogActionsResponse"},"ToolCatalogIntegration":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"actions_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Actions Count"},"auth_schemes":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolAuthScheme"},"type":"array"},{"type":"null"}],"title":"Auth Schemes"}},"type":"object","required":["key","name"],"title":"ToolCatalogIntegration"},"ToolCatalogIntegrationDetails":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"actions_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Actions Count"},"auth_schemes":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolAuthScheme"},"type":"array"},{"type":"null"}],"title":"Auth Schemes"},"actions":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolCatalogAction"},"type":"array"},{"type":"null"}],"title":"Actions"}},"type":"object","required":["key","name"],"title":"ToolCatalogIntegrationDetails"},"ToolCatalogIntegrationResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"integration":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogIntegration"},{"$ref":"#/components/schemas/ToolCatalogIntegrationDetails"},{"type":"null"}],"title":"Integration"}},"type":"object","title":"ToolCatalogIntegrationResponse"},"ToolCatalogIntegrationsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"total":{"type":"integer","title":"Total","default":0},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"},"integrations":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogIntegration"},{"$ref":"#/components/schemas/ToolCatalogIntegrationDetails"}]},"type":"array","title":"Integrations","default":[]}},"type":"object","title":"ToolCatalogIntegrationsResponse"},"ToolCatalogProvider":{"properties":{"key":{"$ref":"#/components/schemas/ToolProviderKind"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"integrations_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Integrations Count"}},"type":"object","required":["key","name"],"title":"ToolCatalogProvider"},"ToolCatalogProviderDetails":{"properties":{"key":{"$ref":"#/components/schemas/ToolProviderKind"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"integrations_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Integrations Count"},"integrations":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolCatalogIntegration"},"type":"array"},{"type":"null"}],"title":"Integrations"}},"type":"object","required":["key","name"],"title":"ToolCatalogProviderDetails"},"ToolCatalogProviderResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"provider":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogProvider"},{"$ref":"#/components/schemas/ToolCatalogProviderDetails"},{"type":"null"}],"title":"Provider"}},"type":"object","title":"ToolCatalogProviderResponse"},"ToolCatalogProvidersResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"providers":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogProvider"},{"$ref":"#/components/schemas/ToolCatalogProviderDetails"}]},"type":"array","title":"Providers","default":[]}},"type":"object","title":"ToolCatalogProvidersResponse"},"ToolConnection":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"provider_key":{"$ref":"#/components/schemas/ToolProviderKind"},"integration_key":{"type":"string","title":"Integration Key"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"},"status":{"anyOf":[{"$ref":"#/components/schemas/ToolConnectionStatus"},{"type":"null"}]}},"type":"object","required":["provider_key","integration_key"],"title":"ToolConnection"},"ToolConnectionCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"provider_key":{"$ref":"#/components/schemas/ToolProviderKind"},"integration_key":{"type":"string","title":"Integration Key"},"data":{"anyOf":[{"$ref":"#/components/schemas/ToolConnectionCreateData"},{"type":"null"}]}},"type":"object","required":["provider_key","integration_key"],"title":"ToolConnectionCreate"},"ToolConnectionCreateData":{"properties":{"callback_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callback Url"},"auth_scheme":{"anyOf":[{"$ref":"#/components/schemas/ToolAuthScheme"},{"type":"null"}]}},"type":"object","title":"ToolConnectionCreateData"},"ToolConnectionCreateRequest":{"properties":{"connection":{"$ref":"#/components/schemas/ToolConnectionCreate"}},"type":"object","required":["connection"],"title":"ToolConnectionCreateRequest"},"ToolConnectionResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"connection":{"anyOf":[{"$ref":"#/components/schemas/ToolConnection"},{"type":"null"}]}},"type":"object","title":"ToolConnectionResponse"},"ToolConnectionStatus":{"properties":{"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Url"}},"type":"object","title":"ToolConnectionStatus"},"ToolConnectionsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"connections":{"items":{"$ref":"#/components/schemas/ToolConnection"},"type":"array","title":"Connections","default":[]}},"type":"object","title":"ToolConnectionsResponse"},"ToolProviderKind":{"type":"string","enum":["composio","agenta"],"title":"ToolProviderKind"},"ToolResult":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"anyOf":[{"$ref":"#/components/schemas/Status"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/ToolResultData"},{"type":"null"}]}},"type":"object","title":"ToolResult","description":"Response envelope with Agenta identity, status, and the OpenAI tool message."},"ToolResultData":{"properties":{"role":{"type":"string","title":"Role","default":"tool"},"tool_call_id":{"type":"string","title":"Tool Call Id"},"content":{"type":"string","title":"Content"}},"type":"object","required":["tool_call_id","content"],"title":"ToolResultData","description":"OpenAI tool message — passed verbatim back to the LLM."},"Trace-Input":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Input"},{"items":{"$ref":"#/components/schemas/SpansNode-Input"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Trace"},"Trace-Output":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Output"},{"items":{"$ref":"#/components/schemas/SpansNode-Output"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Trace"},"TraceIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a `trace_id` was returned, `0` otherwise.","default":0},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id","description":"32-char hex UUID identifying the trace that was created or edited."}},"type":"object","title":"TraceIdResponse"},"TraceIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of distinct trace IDs in this response.","default":0},"trace_ids":{"items":{"type":"string"},"type":"array","title":"Trace Ids","description":"32-char hex UUIDs of the traces that were ingested. Compare against the number you submitted to detect partial failures.","default":[]}},"type":"object","title":"TraceIdsResponse"},"TraceRequest":{"properties":{"trace":{"anyOf":[{"$ref":"#/components/schemas/Trace-Input"},{"type":"null"}],"description":"A single trace record (trace_id plus nested spans). The `trace_id` must match the path parameter on edit endpoints."}},"type":"object","title":"TraceRequest","description":"Ingest or edit payload for a single canonical `Trace`."},"TraceResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a trace was returned, `0` otherwise.","default":0},"trace":{"anyOf":[{"$ref":"#/components/schemas/Trace-Output"},{"type":"null"}],"description":"The trace in the canonical `Trace` shape (`trace_id` + nested `spans` tree)."}},"type":"object","title":"TraceResponse"},"TraceType":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},"TracesQueryRequest":{"properties":{"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Input"},{"type":"null"}],"description":"Span-level conditions. A trace matches when any of its spans matches."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range (see [Query Pattern](/reference/api-guide/query-pattern#windowing))."},"query_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve filtering/windowing from a saved query by `id`/`slug`. Only one of the three `query_*_ref` fields is needed."},"query_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve from the latest revision of a specific query variant."},"query_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve from a specific query revision. Returns `409` when the revision's stored `formatting.focus` is `span`."}},"type":"object","title":"TracesQueryRequest","description":"Request body for `POST /traces/query`."},"TracesRequest":{"properties":{"traces":{"anyOf":[{"items":{"$ref":"#/components/schemas/Trace-Input"},"type":"array"},{"type":"null"}],"title":"Traces","description":"List of trace records. Each record is a `trace_id` plus the nested `spans` tree. Equivalent to the map-shaped payload accepted by `POST /tracing/spans/ingest`."}},"type":"object","title":"TracesRequest","description":"Ingest payload in the canonical `Traces` list shape.\n\nUsed by `POST /traces/ingest`. Each entry is one trace with its\n`trace_id` and a nested `spans` tree."},"TracesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Total number of matching traces in the window.","default":0},"traces":{"anyOf":[{"items":{"$ref":"#/components/schemas/Trace-Output"},"type":"array"},{"type":"null"}],"title":"Traces","description":"List of traces in the canonical `Traces` shape. For the map-shaped payload keyed by `trace_id`, call `POST /tracing/spans/query` with `focus=\"trace\"`."}},"type":"object","title":"TracesResponse"},"TracingQuery":{"properties":{"formatting":{"anyOf":[{"$ref":"#/components/schemas/Formatting"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Output"},{"type":"null"}]}},"type":"object","title":"TracingQuery"},"UpdateProjectRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"make_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Make Default"}},"type":"object","title":"UpdateProjectRequest"},"UpdateSecretDTO":{"properties":{"header":{"anyOf":[{"$ref":"#/components/schemas/Header"},{"type":"null"}]},"secret":{"anyOf":[{"$ref":"#/components/schemas/SecretDTO"},{"type":"null"}]}},"type":"object","title":"UpdateSecretDTO"},"UpdateWorkspace":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","title":"UpdateWorkspace"},"UserIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of user IDs in this page.","default":0},"user_ids":{"items":{"type":"string"},"type":"array","title":"User Ids","description":"Distinct values of `ag.user.id` in this page.","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor for the next page. Pass verbatim as `windowing.next`."}},"type":"object","title":"UserIdsResponse"},"UserRole":{"properties":{"email":{"type":"string","title":"Email"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"organization_id":{"type":"string","title":"Organization Id"}},"type":"object","required":["email","organization_id"],"title":"UserRole"},"UserUpdate":{"properties":{"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","title":"UserUpdate"},"UsersQueryRequest":{"properties":{"realtime":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Realtime","description":"When `true`, paginate by `last_active`. When `false` or unset, paginate by the stable `first_active` cursor."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range."}},"type":"object","title":"UsersQueryRequest","description":"Request body for `POST /tracing/users/query`."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VariantFork":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"VariantFork"},"WebhookDeliveriesResponse":{"properties":{"count":{"type":"integer","title":"Count"},"deliveries":{"items":{"$ref":"#/components/schemas/WebhookDelivery"},"type":"array","title":"Deliveries","default":[]}},"type":"object","required":["count"],"title":"WebhookDeliveriesResponse"},"WebhookDelivery":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"$ref":"#/components/schemas/Status"},"data":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDelivery"},"WebhookDeliveryCreate":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"$ref":"#/components/schemas/Status"},"data":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDeliveryCreate"},"WebhookDeliveryCreateRequest":{"properties":{"delivery":{"$ref":"#/components/schemas/WebhookDeliveryCreate"}},"type":"object","required":["delivery"],"title":"WebhookDeliveryCreateRequest"},"WebhookDeliveryData":{"properties":{"event_type":{"anyOf":[{"$ref":"#/components/schemas/WebhookEventType"},{"type":"null"}]},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"response":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryResponseInfo"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["url"],"title":"WebhookDeliveryData"},"WebhookDeliveryQuery":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/Status"},{"type":"null"}]},"subscription_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Id"},"event_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Event Id"}},"type":"object","title":"WebhookDeliveryQuery"},"WebhookDeliveryQueryRequest":{"properties":{"delivery":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryQuery"},{"type":"null"}]},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"WebhookDeliveryQueryRequest"},"WebhookDeliveryResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"delivery":{"anyOf":[{"$ref":"#/components/schemas/WebhookDelivery"},{"type":"null"}]}},"type":"object","title":"WebhookDeliveryResponse"},"WebhookDeliveryResponseInfo":{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","title":"WebhookDeliveryResponseInfo"},"WebhookEventType":{"type":"string","enum":["environments.revisions.committed","webhooks.subscriptions.tested"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"WebhookProviderDTO":{"properties":{"provider":{"$ref":"#/components/schemas/WebhookProviderSettingsDTO"}},"type":"object","required":["provider"],"title":"WebhookProviderDTO"},"WebhookProviderSettingsDTO":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"WebhookProviderSettingsDTO"},"WebhookSubscription":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"$ref":"#/components/schemas/WebhookSubscriptionData"},"secret_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Secret Id"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscription"},"WebhookSubscriptionCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"data":{"$ref":"#/components/schemas/WebhookSubscriptionData"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscriptionCreate"},"WebhookSubscriptionCreateRequest":{"properties":{"subscription":{"$ref":"#/components/schemas/WebhookSubscriptionCreate"}},"type":"object","required":["subscription"],"title":"WebhookSubscriptionCreateRequest"},"WebhookSubscriptionData":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/WebhookEventType"},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"WebhookSubscriptionEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"$ref":"#/components/schemas/WebhookSubscriptionData"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscriptionEdit"},"WebhookSubscriptionEditRequest":{"properties":{"subscription":{"$ref":"#/components/schemas/WebhookSubscriptionEdit"}},"type":"object","required":["subscription"],"title":"WebhookSubscriptionEditRequest"},"WebhookSubscriptionQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"WebhookSubscriptionQuery"},"WebhookSubscriptionQueryRequest":{"properties":{"subscription":{"anyOf":[{"$ref":"#/components/schemas/WebhookSubscriptionQuery"},{"type":"null"}]},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"WebhookSubscriptionQueryRequest"},"WebhookSubscriptionResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"subscription":{"anyOf":[{"$ref":"#/components/schemas/WebhookSubscription"},{"type":"null"}]}},"type":"object","title":"WebhookSubscriptionResponse"},"WebhookSubscriptionTestRequest":{"properties":{"subscription_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Id"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/WebhookSubscriptionEdit"},{"$ref":"#/components/schemas/WebhookSubscriptionCreate"},{"type":"null"}],"title":"Subscription"}},"type":"object","title":"WebhookSubscriptionTestRequest"},"WebhookSubscriptionsResponse":{"properties":{"count":{"type":"integer","title":"Count"},"subscriptions":{"items":{"$ref":"#/components/schemas/WebhookSubscription"},"type":"array","title":"Subscriptions","default":[]}},"type":"object","required":["count"],"title":"WebhookSubscriptionsResponse"},"Windowing":{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},"Workflow":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowArtifactFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Workflow"},"WorkflowArtifactFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"WorkflowArtifactFlags"},"WorkflowCatalogFlags":{"properties":{"is_archived":{"type":"boolean","title":"Is Archived","default":false},"is_recommended":{"type":"boolean","title":"Is Recommended","default":false},"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"WorkflowCatalogFlags"},"WorkflowCatalogPreset":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"WorkflowCatalogPreset"},"WorkflowCatalogPresetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when the preset is returned, `0` when not found.","default":0},"preset":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogPreset"},{"type":"null"}],"description":"Named parameter set defined against a template."}},"type":"object","title":"WorkflowCatalogPresetResponse"},"WorkflowCatalogPresetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of presets returned.","default":0},"presets":{"items":{"$ref":"#/components/schemas/WorkflowCatalogPreset"},"type":"array","title":"Presets","description":"Named parameter sets defined against a template."}},"type":"object","title":"WorkflowCatalogPresetsResponse"},"WorkflowCatalogTemplate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"WorkflowCatalogTemplate"},"WorkflowCatalogTemplateResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when the template is returned, `0` when not found.","default":0},"template":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogTemplate"},{"type":"null"}],"description":"Workflow blueprint (key, name, description, flags, default data)."}},"type":"object","title":"WorkflowCatalogTemplateResponse"},"WorkflowCatalogTemplatesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of templates returned.","default":0},"templates":{"items":{"$ref":"#/components/schemas/WorkflowCatalogTemplate"},"type":"array","title":"Templates","description":"Workflow blueprints shipped with the product."}},"type":"object","title":"WorkflowCatalogTemplatesResponse"},"WorkflowCatalogType":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"json_schema":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Json Schema"}},"type":"object","required":["key","json_schema"],"title":"WorkflowCatalogType"},"WorkflowCatalogTypeResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a type definition is returned, `0` when not found.","default":0},"type":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogType"},{"type":"null"}],"description":"JSON Schema fragment referenced by workflow input/output schemas via `x-ag-type-ref`."}},"type":"object","title":"WorkflowCatalogTypeResponse"},"WorkflowCatalogTypesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of type definitions available.","default":0},"types":{"items":{"$ref":"#/components/schemas/WorkflowCatalogType"},"type":"array","title":"Types","description":"Shared JSON Schema fragments shipped with the product."}},"type":"object","title":"WorkflowCatalogTypesResponse"},"WorkflowCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowCreate"},"WorkflowCreateRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowCreate","description":"Workflow artifact to create. Must include a project-unique `slug`; `name`, `description`, `flags`, `tags`, and `meta` are optional."}},"type":"object","required":["workflow"],"title":"WorkflowCreateRequest"},"WorkflowEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowEdit"},"WorkflowEditRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowEdit","description":"Workflow fields to update. `id` is required and must match the path parameter; only supplied fields are modified."}},"type":"object","required":["workflow"],"title":"WorkflowEditRequest"},"WorkflowFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"WorkflowFlags","description":"Legacy full workflow flag set."},"WorkflowFork":{"properties":{"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFork"},{"type":"null"}]},"revision":{"anyOf":[{"$ref":"#/components/schemas/RevisionFork"},{"type":"null"}]},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFork"},{"type":"null"}]},"variant":{"anyOf":[{"$ref":"#/components/schemas/VariantFork"},{"type":"null"}]},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"WorkflowFork"},"WorkflowForkRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowFork","description":"Fork payload. Identify the source by `workflow_id` and `workflow_variant_id` (or equivalent slugs), supply a new `workflow_variant.slug` for the forked branch."}},"type":"object","required":["workflow"],"title":"WorkflowForkRequest"},"WorkflowResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a workflow is returned, `0` when none matched.","default":0},"workflow":{"anyOf":[{"$ref":"#/components/schemas/Workflow"},{"type":"null"}],"description":"The workflow artifact."}},"type":"object","title":"WorkflowResponse"},"WorkflowRevision-Input":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},"WorkflowRevision-Output":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},"WorkflowRevisionCommit":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"WorkflowRevisionCommit"},"WorkflowRevisionCommitRequest":{"properties":{"workflow_revision":{"$ref":"#/components/schemas/WorkflowRevisionCommit","description":"Revision to append to a variant's history. Requires `workflow_variant_id` and optional `message`; `data` carries the new configuration."}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionCommitRequest"},"WorkflowRevisionCreate":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowRevisionCreate"},"WorkflowRevisionCreateRequest":{"properties":{"workflow_revision":{"$ref":"#/components/schemas/WorkflowRevisionCreate","description":"Revision to create on an existing variant. The revision is immutable once persisted; to change the payload, commit a new revision."}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionCreateRequest"},"WorkflowRevisionData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"WorkflowRevisionData"},"WorkflowRevisionData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"WorkflowRevisionData"},"WorkflowRevisionDeployRequest":{"properties":{"workflow_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Workflow artifact to deploy. One of the workflow refs is required."},"workflow_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Workflow variant to deploy. Resolves to the latest revision of this variant."},"workflow_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific workflow revision to deploy."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment artifact. One of the environment refs is required."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment variant."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment revision."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Reference key to set on the environment revision. Defaults to `.revision` when omitted."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Commit message recorded on the resulting environment revision."}},"type":"object","title":"WorkflowRevisionDeployRequest"},"WorkflowRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowRevisionEdit"},"WorkflowRevisionEditRequest":{"properties":{"workflow_revision":{"$ref":"#/components/schemas/WorkflowRevisionEdit","description":"Revision fields to update (lifecycle metadata only). Data and configuration are immutable — commit a new revision to change them."}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionEditRequest"},"WorkflowRevisionFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"WorkflowRevisionFlags"},"WorkflowRevisionFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"WorkflowRevisionFork"},"WorkflowRevisionResolveRequest":{"properties":{"workflow_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Workflow artifact; resolves against its latest revision."},"workflow_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Workflow variant; resolves against its latest revision."},"workflow_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific workflow revision to resolve."},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevision-Input"},{"type":"null"}],"description":"Resolve the references embedded in this revision payload directly, without fetching it first."},"max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Depth","description":"Maximum recursive depth for nested `@ag.references`.","default":10},"max_embeds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Embeds","description":"Maximum number of embeds to resolve in one call.","default":100},"error_policy":{"anyOf":[{"$ref":"#/components/schemas/ErrorPolicy"},{"type":"null"}],"description":"How to handle unresolved references: `EXCEPTION` or `IGNORE`.","default":"exception"}},"type":"object","title":"WorkflowRevisionResolveRequest"},"WorkflowRevisionResolveResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a revision is returned, `0` when none matched.","default":0},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevision-Output"},{"type":"null"}],"description":"The workflow revision with `@ag.references` replaced by their resolved payloads."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Metadata describing which references were resolved, depth reached, and errors."}},"type":"object","title":"WorkflowRevisionResolveResponse"},"WorkflowRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a revision is returned, `0` when none matched.","default":0},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevision-Output"},{"type":"null"}],"description":"The workflow revision."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Reference-resolution metadata; populated when `resolve=true` on retrieve."}},"type":"object","title":"WorkflowRevisionResponse"},"WorkflowRevisionRetrieveRequest":{"properties":{"workflow_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Return the latest revision across all variants of this workflow."},"workflow_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Return the latest revision of this variant."},"workflow_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Return this exact revision (by `id`, or by `slug` + `version`)."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment artifact backing the deployment to resolve from."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment variant backing the deployment to resolve from."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific environment revision to resolve from."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Key into the environment revision's reference map. Required when retrieving via environment refs."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When true, resolve `@ag.references` tokens embedded in the revision configuration before returning it."}},"type":"object","title":"WorkflowRevisionRetrieveRequest"},"WorkflowRevisionsLog":{"properties":{"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"WorkflowRevisionsLog"},"WorkflowRevisionsLogRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowRevisionsLog","description":"Log query. Supply `workflow_id`, `workflow_variant_id`, or `workflow_revision_id` to scope the log, and an optional `depth`."}},"type":"object","required":["workflow"],"title":"WorkflowRevisionsLogRequest"},"WorkflowRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of revisions in this page.","default":0},"workflow_revisions":{"items":{"$ref":"#/components/schemas/WorkflowRevision-Output"},"type":"array","title":"Workflow Revisions","description":"Workflow revisions matching the query, ordered by commit time."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Pagination cursor."}},"type":"object","title":"WorkflowRevisionsResponse"},"WorkflowVariant":{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariant"},"WorkflowVariantCreate":{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowVariantCreate"},"WorkflowVariantCreateRequest":{"properties":{"workflow_variant":{"$ref":"#/components/schemas/WorkflowVariantCreate","description":"Variant to create under an existing workflow. Requires `workflow_id` (the artifact) and a project-unique `slug`."}},"type":"object","required":["workflow_variant"],"title":"WorkflowVariantCreateRequest"},"WorkflowVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariantEdit"},"WorkflowVariantEditRequest":{"properties":{"workflow_variant":{"$ref":"#/components/schemas/WorkflowVariantEdit","description":"Variant fields to update. `id` is required and must match the path parameter."}},"type":"object","required":["workflow_variant"],"title":"WorkflowVariantEditRequest"},"WorkflowVariantFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"WorkflowVariantFlags"},"WorkflowVariantFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowVariantFork"},"WorkflowVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a variant is returned, `0` when none matched.","default":0},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariant"},{"type":"null"}],"description":"The workflow variant."}},"type":"object","title":"WorkflowVariantResponse"},"WorkflowVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of variants in this page.","default":0},"workflow_variants":{"items":{"$ref":"#/components/schemas/WorkflowVariant"},"type":"array","title":"Workflow Variants","description":"Workflow variants matching the query."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Pagination cursor."}},"type":"object","title":"WorkflowVariantsResponse"},"WorkflowsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of workflows in this page.","default":0},"workflows":{"items":{"$ref":"#/components/schemas/Workflow"},"type":"array","title":"Workflows","description":"Workflow artifacts matching the query."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Pagination cursor; pass `windowing.next` back to fetch the following page."}},"type":"object","title":"WorkflowsResponse"},"Workspace":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","required":["name","type"],"title":"Workspace"},"WorkspaceMemberResponse":{"properties":{"user":{"additionalProperties":true,"type":"object","title":"User"},"roles":{"items":{"$ref":"#/components/schemas/WorkspacePermission"},"type":"array","title":"Roles"}},"type":"object","required":["user","roles"],"title":"WorkspaceMemberResponse"},"WorkspacePermission":{"properties":{"role_name":{"$ref":"#/components/schemas/WorkspaceRole"},"role_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Description"},"permissions":{"anyOf":[{"items":{"$ref":"#/components/schemas/Permission"},"type":"array"},{"type":"null"}],"title":"Permissions"}},"type":"object","required":["role_name"],"title":"WorkspacePermission"},"WorkspaceResponse":{"properties":{"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"organization":{"type":"string","title":"Organization"},"members":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkspaceMemberResponse"},"type":"array"},{"type":"null"}],"title":"Members"}},"type":"object","required":["id","type","organization"],"title":"WorkspaceResponse"},"WorkspaceRole":{"type":"string","enum":["owner","admin","developer","editor","annotator","viewer"],"title":"WorkspaceRole"},"ee__src__models__api__organization_models__Organization":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"members":{"items":{"type":"string"},"type":"array","title":"Members"},"invitations":{"items":{},"type":"array","title":"Invitations"},"workspaces":{"items":{"type":"string"},"type":"array","title":"Workspaces"}},"type":"object","required":["id","owner_id"],"title":"Organization"},"oss__src__models__api__organization_models__Organization":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"members":{"items":{"type":"string"},"type":"array","title":"Members"},"invitations":{"items":{},"type":"array","title":"Invitations"},"workspaces":{"items":{"type":"string"},"type":"array","title":"Workspaces"}},"type":"object","required":["id","owner_id"],"title":"Organization"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","name":"Authorization","in":"header"}}},"tags":[{"name":"Status","description":"API server liveness and readiness status."},{"name":"Organizations","description":"Manage organizations, workspaces, SSO domains, and identity providers."},{"name":"Workspaces","description":"Manage workspaces within an organization and their members."},{"name":"Projects","description":"Manage projects within a workspace."},{"name":"Users","description":"User profile and account management — view profile, update username, reset password."},{"name":"Keys","description":"Create and revoke API keys used to authenticate programmatic requests."},{"name":"Workflows","description":"Workflow definitions — the runnable pipelines that back an application."},{"name":"Applications","description":"LLM applications — create, update, list, and delete apps."},{"name":"Evaluators","description":"Evaluator definitions — the metrics and judges used in evaluation runs."},{"name":"Testsets","description":"Test datasets — collections of input/output pairs used in evaluations."},{"name":"Testcases","description":"Individual test cases within a testset."},{"name":"Queries","description":"Saved query definitions used to filter and retrieve trace data."},{"name":"Traces","description":"Ingest and query traces, spans, and metrics from running applications."},{"name":"Invocations","description":"Run an application against a payload and capture the resulting trace."},{"name":"Annotations","description":"Attach evaluator-style feedback to existing traces and spans."},{"name":"Evaluations","description":"Evaluation runs — execute evaluators against variants and testsets."},{"name":"Environments","description":"Deployment environments (e.g. production, staging) and their active variants."},{"name":"Secrets","description":"Manage provider credentials and secret values stored in the vault."},{"name":"Tools","description":"External tool connections and OAuth integrations available to applications."},{"name":"Folders","description":"Organize applications and other resources into folder hierarchies."},{"name":"Webhooks","description":"Register and manage webhooks that fire on platform events."},{"name":"OpenTelemetry","description":"OTLP-compatible endpoints for ingesting traces directly from OpenTelemetry-instrumented services."},{"name":"Access","description":"Authentication discovery, organization access checks, and SSO callback endpoints."},{"name":"Billing","description":"Subscription, plan, and usage endpoints for workspace billing."},{"name":"Admin","description":"Internal administration endpoints — restricted to platform operators."},{"name":"Legacy","description":"Stable legacy endpoints retained for existing integrations — not deprecated, but new integrations should prefer the canonical surface."},{"name":"Deprecated","description":"Deprecated endpoints kept for backwards compatibility — avoid in new integrations."}],"security":[{"APIKeyHeader":[]}],"servers":[{"url":"/api"},{"url":"http://localhost/api"}]} \ No newline at end of file +{"openapi":"3.1.0","info":{"title":"Agenta API","description":"Agenta API","contact":{"name":"Agenta","url":"https://agenta.ai/","email":"team@agenta.ai"},"version":"0.1.0"},"paths":{"/billing/stripe/events/":{"post":{"tags":["Billing"],"summary":"Handle Events","operationId":"handle_events","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/stripe/portals/":{"post":{"tags":["Billing"],"summary":"Create Portal User Route","operationId":"create_portal","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/stripe/checkouts/":{"post":{"tags":["Billing"],"summary":"Create Checkout User Route","operationId":"create_checkout","parameters":[{"name":"plan","in":"query","required":true,"schema":{"type":"string","title":"Plan"}},{"name":"success_url","in":"query","required":true,"schema":{"type":"string","title":"Success Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/plans":{"get":{"tags":["Billing"],"summary":"Fetch Plan User Route","operationId":"fetch_plans","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/plans/switch":{"post":{"tags":["Billing"],"summary":"Switch Plans User Route","operationId":"switch_plans","parameters":[{"name":"plan","in":"query","required":true,"schema":{"type":"string","title":"Plan"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/subscription":{"get":{"tags":["Billing"],"summary":"Fetch Subscription User Route","operationId":"fetch_subscription","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/subscription/cancel":{"post":{"tags":["Billing"],"summary":"Cancel Subscription User Route","operationId":"cancel_plan","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/usage":{"get":{"tags":["Billing"],"summary":"Fetch Usage User Route","operationId":"fetch_usage","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/organizations/domains/":{"get":{"tags":["Organizations"],"summary":"List Domains","description":"List all domains for the organization.","operationId":"list_organization_domains","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrganizationDomainResponse"},"type":"array","title":"Response List Organization Domains"}}}}}},"post":{"tags":["Organizations"],"summary":"Create Domain","description":"Create a new domain for verification.\n\nThis endpoint initiates the domain verification process by:\n1. Creating a domain record\n2. Generating a unique verification token\n3. Returning DNS configuration instructions\n\nThe user must add a DNS TXT record to verify ownership.","operationId":"create_organization_domain","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/domains/verify":{"post":{"tags":["Organizations"],"summary":"Verify Domain","description":"Verify domain ownership via DNS TXT record.\n\nThis endpoint checks for the presence of the verification TXT record\nand marks the domain as verified if found.","operationId":"verify_organization_domain","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainVerify"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/domains/{domain_id}/refresh":{"post":{"tags":["Organizations"],"summary":"Refresh Domain Token","description":"Refresh the verification token for an unverified domain.\n\nGenerates a new token and resets the 48-hour expiry window.\nThis is useful when the original token has expired.","operationId":"refresh_organization_domain_token","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/domains/{domain_id}/reset":{"post":{"tags":["Organizations"],"summary":"Reset Domain","description":"Reset a verified domain to unverified state for re-verification.\n\nGenerates a new token and marks the domain as unverified.\nThis allows re-verification of already verified domains.","operationId":"reset_organization_domain","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/domains/{domain_id}":{"delete":{"tags":["Organizations"],"summary":"Delete Domain","description":"Delete a domain.","operationId":"delete_organization_domain","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/providers/":{"get":{"tags":["Organizations"],"summary":"List Providers","description":"List all SSO providers for the organization.","operationId":"list_organization_providers","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrganizationProviderResponse"},"type":"array","title":"Response List Organization Providers"}}}}}},"post":{"tags":["Organizations"],"summary":"Create Provider","description":"Create a new SSO provider configuration.\n\nSupported provider types:\n- oidc: OpenID Connect\n- saml: SAML 2.0 (coming soon)","operationId":"create_organization_provider","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/providers/{provider_id}":{"patch":{"tags":["Organizations"],"summary":"Update Provider","description":"Update an SSO provider configuration.","operationId":"update_organization_provider","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","title":"Provider Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organizations"],"summary":"Delete Provider","description":"Delete an SSO provider configuration.","operationId":"delete_organization_provider","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","title":"Provider Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/providers/{provider_id}/test":{"post":{"tags":["Organizations"],"summary":"Test Provider","description":"Test SSO provider connection.\n\nThis endpoint tests the OIDC provider configuration by fetching the\ndiscovery document and validating required endpoints exist.\nIf successful, marks the provider as valid (is_valid=true).\nIf failed, marks as invalid and deactivates (is_valid=false, is_active=false).","operationId":"test_organization_provider","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}":{"get":{"tags":["Organizations"],"summary":"Fetch Organization Details","description":"Return the details of the organization.","operationId":"fetch_organization_details","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDetails"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Organizations"],"summary":"Update Organization","operationId":"patch_organization","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ee__src__models__api__organization_models__Organization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Organizations"],"summary":"Update Organization","operationId":"update_organization","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ee__src__models__api__organization_models__Organization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organizations"],"summary":"Delete Organization","description":"Delete an organization (owner only).","operationId":"delete_organization","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces":{"post":{"tags":["Organizations"],"summary":"Create Workspace","operationId":"create_workspace","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspace"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}":{"put":{"tags":["Organizations"],"summary":"Update Workspace","operationId":"update_workspace","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspace"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/transfer/{new_owner_id}":{"post":{"tags":["Organizations"],"summary":"Transfer Organization Ownership","description":"Transfer organization ownership to another member.","operationId":"transfer_organization_ownership","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"new_owner_id","in":"path","required":true,"schema":{"type":"string","title":"New Owner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations":{"get":{"tags":["Organizations"],"summary":"List Organizations","description":"Returns a list of organizations associated with the user's session.\n\nReturns:\n list[Organization]: A list of organizations associated with the user's session.\n\nRaises:\n HTTPException: If there is an error retrieving the organizations from the database.","operationId":"list_organizations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/oss__src__models__api__organization_models__Organization"},"type":"array","title":"Response List Organizations"}}}}}},"post":{"tags":["Organizations"],"summary":"Create Organization","description":"Create a new organization.","operationId":"create_organization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/permissions":{"get":{"tags":["Workspaces"],"summary":"Get All Workspace Permissions","description":"Get all workspace permissions.\n\nReturns a list of all available workspace permissions.\n\nReturns:\n List[Permission]: A list of Permission objects representing the available workspace permissions.\n\nRaises:\n HTTPException: If there is an error retrieving the workspace permissions.","operationId":"get_all_workspace_permissions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Permission"},"type":"array","title":"Response Get All Workspace Permissions"}}}}}}},"/workspaces/{workspace_id}/roles":{"post":{"tags":["Workspaces"],"summary":"Assign Role To User","description":"Assigns a role to a user in a workspace.\n\nArgs:\n payload (UserRole): The payload containing the organization id, user email, and role to assign.\n workspace_id (str): The ID of the workspace.\n request (Request): The FastAPI request object.\n\nReturns:\n bool: True if the role was successfully assigned, False otherwise.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.\n HTTPException: If there is an error assigning the role to the user.","operationId":"assign_role_to_user","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRole"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Workspaces"],"summary":"Unassign Role From User","description":"Delete a role assignment from a user in a workspace.\n\nArgs:\n workspace_id (str): The ID of the workspace.\n email (str): The email of the user to remove the role from.\n organization_id (str): The ID of the organization.\n role (str): The role to remove from the user.\n request (Request): The FastAPI request object.\n\nReturns:\n bool: True if the role assignment was successfully deleted.\n\nRaises:\n HTTPException: If there is an error in the request or the user does not have permission to perform the action.\n HTTPException: If there is an error in updating the user's roles.","operationId":"unassign_role_from_user","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}},{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"role","in":"query","required":true,"schema":{"type":"string","title":"Role"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/secrets/":{"get":{"tags":["Secrets"],"summary":"List Secrets","operationId":"list_secrets","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SecretResponseDTO"},"type":"array","title":"Response List Secrets"}}}}}},"post":{"tags":["Secrets"],"summary":"Create Secret","operationId":"create_secret","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSecretDTO"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/secrets/{secret_id}":{"get":{"tags":["Secrets"],"summary":"Read Secret","operationId":"read_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Secrets"],"summary":"Update Secret","operationId":"update_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSecretDTO"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Secrets"],"summary":"Delete Secret","operationId":"delete_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/":{"post":{"tags":["Webhooks"],"summary":"Create Subscription","operationId":"create_webhook_subscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/test":{"post":{"tags":["Webhooks"],"summary":"Test Subscription","operationId":"test_webhook_subscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionTestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/{subscription_id}":{"get":{"tags":["Webhooks"],"summary":"Fetch Subscription","operationId":"fetch_webhook_subscription","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subscription Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Webhooks"],"summary":"Edit Subscription","operationId":"edit_webhook_subscription","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subscription Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete Subscription","operationId":"delete_webhook_subscription","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subscription Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/query":{"post":{"tags":["Webhooks"],"summary":"Query Subscriptions","operationId":"query_webhook_subscriptions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/deliveries":{"post":{"tags":["Webhooks"],"summary":"Create Delivery","operationId":"create_webhook_delivery","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/deliveries/{delivery_id}":{"get":{"tags":["Webhooks"],"summary":"Fetch Delivery","operationId":"fetch_webhook_delivery","parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/deliveries/query":{"post":{"tags":["Webhooks"],"summary":"Query Deliveries","operationId":"query_webhook_deliveries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/otlp/v1/traces":{"get":{"tags":["OpenTelemetry"],"summary":"Status check for OTLP","description":"Return the OTLP endpoint liveness status.\n\nLightweight readiness probe. Returns `{\"status\": \"ready\"}` when\nthe router is mounted. Intended for health checks from OTel\ncollectors before they start exporting traces.","operationId":"otlp_status","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectStatusResponse"}}}}}},"post":{"tags":["OpenTelemetry"],"summary":"Ingest traces via OTLP","description":"Ingest traces via the OTLP/HTTP protobuf protocol.\n\nThis endpoint accepts a serialized\n`ExportTraceServiceRequest` protobuf. Point any OTLP/HTTP\ncollector or SDK at `POST /otlp/v1/traces` and spans will flow\ninto the same ingest stream as the Agenta-native endpoints.\n\nUse this when you already have OTel instrumentation emitting\nOTLP. For new integrations that don't need raw OTLP, prefer\n`POST /tracing/spans/ingest` — it takes JSON, accepts Agenta's\nnested shape directly, and surfaces parse failures immediately.\n\n## Content-Type and size limit\n\nBinary protobuf only (`Content-Type: application/x-protobuf`).\nJSON OTLP is not accepted. Requests larger than the configured\nbatch limit (default 4 MB, see `OTLP_MAX_BATCH_BYTES`) return\n`413 Request Entity Too Large`.\n\n## Response\n\nSuccessful ingest returns `200 OK` with a serialized\n`ExportTraceServiceResponse` protobuf. Parse failures on the\nrequest body return `400`; malformed spans return `500`; quota\nexhaustion returns `403`. Like the native ingest paths, spans\nare queued on a Redis stream and persisted asynchronously — see\n[Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202).","operationId":"otlp_ingest","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectStatusResponse"}}}}}}},"/auth/discover":{"post":{"tags":["Access"],"summary":"Discover","description":"Discover authentication methods available for a given email.\n\nThis endpoint does NOT reveal:\n- Organization names\n- User existence (optionally - currently does for UX)\n- Detailed policy information\n\nReturns minimal information needed for authentication flow.","operationId":"discover_access","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/access":{"get":{"tags":["Access"],"summary":"Check Organization Access","description":"Check if the current session satisfies the organization's auth policy.\n\nReturns 200 when access is allowed, 403 with AUTH_UPGRADE_REQUIRED when not.","operationId":"check_organization_access","parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/session/identities":{"patch":{"tags":["Access"],"summary":"Update Session Identities","operationId":"update_session_identities","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionIdentitiesUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/sso/callback/{organization_slug}/{provider_slug}":{"get":{"tags":["Access"],"summary":"Sso Callback Redirect","description":"Custom SSO callback endpoint that redirects to SuperTokens.\n\nThis endpoint:\n1. Accepts clean URL path: /auth/sso/callback/{organization_slug}/{provider_slug}\n2. Validates the organization and provider exist\n3. Builds SuperTokens thirdPartyId: sso:{organization_slug}:{provider_slug}\n4. Redirects to SuperTokens callback: /auth/callback/{thirdPartyId}\n\nSuperTokens then handles:\n1. Exchange code for tokens (using our dynamic provider config)\n2. Get user info\n3. Call our sign_in_up override (creates user_identity, adds user_identities to session)\n4. Redirect to frontend with session cookie","operationId":"sso_callback_redirect","parameters":[{"name":"organization_slug","in":"path","required":true,"schema":{"type":"string","title":"Organization Slug"}},{"name":"provider_slug","in":"path","required":true,"schema":{"type":"string","title":"Provider Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tracing/spans/ingest":{"post":{"tags":["Deprecated"],"summary":"Ingest Spans","description":"Ingest spans into the tracing backend.\n\nUse this endpoint to write full OpenTelemetry-style spans — including\nmulti-span hierarchies (parent → child → grandchild), attributes,\nreferences, events and links. For simple single-span annotations or\nevaluator outputs, prefer `POST /preview/tracing/traces/`\n(`create_simple_trace`) — it's a higher-level helper on top of this\nendpoint.\n\n## Request body\n\nProvide exactly one of:\n\n- `spans`: a flat list of spans. Parent/child relationships are\n expressed via `parent_id` on each span.\n- `traces`: a nested tree keyed by `trace_id` then by span name,\n where each node may contain a `spans` dict of its children. The\n query endpoint (`POST /tracing/spans/query`) returns this shape.\n\nEach span requires `trace_id`, `span_id`, `start_time`, `end_time`.\n`trace_id` must be a 32-char hex UUID, `span_id` a 16-char hex.\nAttributes follow the Agenta convention under the `ag` namespace\n(`ag.type`, `ag.data`, `ag.metrics`, `ag.references`) and may be\nsubmitted either as a flat dotted map (OTel wire format) or as a\nnested object — both are accepted.\n\n## Response\n\nReturns `202 Accepted` with the links (`trace_id` + `span_id`) for\nthe spans that were parsed into the ingest stream. See\n[Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202)\nfor what `count < N submitted` means.\n\n## Example\n\n```json\n{\n \"spans\": [\n {\n \"trace_id\": \"f5a2efb40895881e938e2ebc070beca8\",\n \"span_id\": \"15f3df0731995245\",\n \"span_name\": \"completion_v0\",\n \"span_type\": \"workflow\",\n \"span_kind\": \"SPAN_KIND_SERVER\",\n \"start_time\": \"2026-04-16T18:18:18.491929Z\",\n \"end_time\": \"2026-04-16T18:18:20.415372Z\",\n \"attributes\": {\n \"ag.type.trace\": \"invocation\",\n \"ag.type.span\": \"workflow\",\n \"ag.data.inputs.country\": \"France\",\n \"ag.data.outputs\": \"Paris\"\n }\n }\n ]\n}\n```","operationId":"ingest_spans","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tracing/spans/query":{"post":{"tags":["Deprecated"],"summary":"Query Spans","description":"Query spans and traces in the tracing backend.\n\nUse `focus` in the request body to control the response shape:\n\n- `\"trace\"` (default): returns a nested `traces` tree keyed by\n `trace_id` then by span name. Children hang off their parent's\n `spans` field. Best for rendering a trace waterfall.\n- `\"span\"`: returns a flat `spans` list. Best for paginating or\n filtering across all spans regardless of hierarchy.\n\nUse `oldest` / `newest` (unix seconds) to window the query and\n`limit` to cap the number of traces/spans returned.\n\nThe response preserves the Agenta `ag.*` attribute namespace and\nincludes computed metrics (`ag.metrics.duration`, `ag.metrics.tokens`,\n`ag.metrics.costs`) on each span. The `traces` tree returned here is\nthe same shape that `POST /tracing/spans/ingest` accepts as its\n`traces` field.","operationId":"query_spans_rpc","deprecated":true,"parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tracing/analytics/query":{"post":{"tags":["Deprecated"],"summary":"Fetch Analytics","description":"Aggregate span metrics into time buckets.\n\nRuns filtering and windowing identical to `POST /tracing/spans/query`,\nthen bucketizes the matched spans by time and computes one or more\nmetric summaries per bucket. Use this to build charts of latency,\ncost, token usage, or custom numeric and categorical attributes.\n\n## Request body\n\n- `filtering` — same shape as the query endpoint, scoped to the spans\n that contribute to the analytics.\n- `windowing` — `oldest`/`newest` for the time range and `interval`\n for bucket width (in seconds).\n- `specs` — a list of `MetricSpec` entries describing which\n attributes to summarize and how. Each spec declares a `type`\n (`numeric/continuous`, `numeric/discrete`, `binary`,\n `categorical/single`, `categorical/multiple`, `string`, `json`,\n or `*` for auto) and a dotted `path` into the span (for example\n `attributes.ag.metrics.costs.cumulative.total`).\n\n## Response\n\nBuckets are returned in chronological order. Each bucket carries a\n`metrics` dict keyed by spec path. See [Tracing — the ag.*\nnamespace](/reference/api-guide/tracing#the-ag-attribute-namespace)\nfor the cumulative/incremental metric layout on each span.","operationId":"query_analytics","deprecated":true,"parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}},{"name":"specs","in":"query","required":false,"schema":{"title":"Specs"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tracing/traces/":{"post":{"tags":["Deprecated"],"summary":"Create Trace","description":"Create a trace from one or more spans.\n\nThis is the single-trace counterpart to `POST /tracing/spans/ingest`.\nAccepts the same `OTelTracingRequest` body (either `spans` flat list\nor `traces` nested tree) but requires all spans to share a single\n`trace_id`.\n\nReturns `202 Accepted` with the links for the spans that entered\nthe ingest stream. See [Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202).\n\nMost callers should prefer `POST /tracing/spans/ingest` (no\nsingle-trace restriction) or `POST /simple/traces/` (helper for a\none-span payload).","operationId":"create_trace_tracing","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tracing/traces/{trace_id}":{"get":{"tags":["Deprecated"],"summary":"Fetch Trace","description":"Fetch a single trace by `trace_id`.\n\nReturns the trace as a `traces` map keyed by `trace_id` → span\nname. The response is empty when the trace is not in the current\nproject. `trace_id` must be a 32-char hex UUID; any other format\nreturns `400`.\n\nFor flat-list retrieval across many traces, use\n`POST /tracing/spans/query` with `focus=\"span\"`.","operationId":"fetch_trace_tracing","deprecated":true,"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Deprecated"],"summary":"Edit Trace","description":"Replace the spans of an existing trace.\n\nThe path `trace_id` must match the `trace_id` in the payload.\nMismatches return `400`. The payload must contain exactly one\ntrace; submitting spans from more than one trace returns `400`.\n\nEdit is implemented as a re-ingest: the new spans are written\nthrough the same stream as `POST /tracing/spans/ingest`, and the\n`202 Accepted` response reports how many spans entered the stream.\nThe worker reconciles the trace asynchronously.","operationId":"edit_trace_tracing","deprecated":true,"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Deprecated"],"summary":"Delete Trace","description":"Delete a trace and all its spans.\n\nRemoves every span that shares this `trace_id` within the project.\nReturns `202 Accepted` with the links for the spans that were\nmarked for deletion. `trace_id` must be a 32-char hex UUID.\n\nDeletion is not reversible. For soft-removal semantics on a\nsingle-trace simple annotation, prefer\n`DELETE /simple/traces/{trace_id}`.","operationId":"delete_trace_tracing","deprecated":true,"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tracing/sessions/query":{"post":{"tags":["Deprecated"],"summary":"List Sessions","description":"List distinct session IDs from span attributes.\n\nReturns the distinct values of `ag.session.id` across spans in the\ncurrent project, in a windowed, cursor-paginated form. Use this to\ndrive a session-picker UI before drilling into the spans of each\nsession.\n\nThe `realtime` flag controls the cursor field:\n\n- `false` or unset — paginate by a stable `first_active` cursor\n (safe to iterate under heavy write load).\n- `true` — paginate by `last_active`, reflecting ongoing activity\n but less stable between pages.\n\nThe response includes a `windowing` cursor; pass it as `windowing.next`\non the next call to continue.","operationId":"query_sessions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionsQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tracing/users/query":{"post":{"tags":["Deprecated"],"summary":"List Users","description":"List distinct user IDs from span attributes.\n\nReturns the distinct values of `ag.user.id` across spans in the\ncurrent project. Same pagination and `realtime` semantics as\n`POST /tracing/sessions/query`; pass the returned `windowing.next`\ncursor on subsequent calls.","operationId":"query_users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsersQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tracing/spans/analytics":{"post":{"tags":["Legacy"],"summary":"Fetch Legacy Analytics","description":"Aggregate span metrics using the fixed legacy schema.\n\nReturns time-bucketed aggregates with a fixed set of fields\n(`count`, `duration`, `costs`, `tokens`) split into `total` and\n`errors`. The shape predates `specs`-driven analytics and is kept\nfor the existing observability dashboards that consume it.\n\nNew integrations should prefer `POST /tracing/analytics/query`,\nwhich accepts `specs` and can summarize arbitrary span attributes,\nnot just the four fixed metrics.","operationId":"fetch_legacy_analytics","parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OldAnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces/":{"get":{"tags":["Traces"],"summary":"Fetch Traces","description":"Fetch multiple traces by known IDs.\n\nPoint lookup endpoint. Accepts either repeated query params\n(`?trace_id=a&trace_id=b`) or a comma-separated single param\n(`?trace_ids=a,b`). Results are deduplicated. Returns `400` when\nno IDs are supplied. Use `POST /traces/query` for filter-based\nretrieval.","operationId":"fetch_traces","parameters":[{"name":"trace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Trace Id"}},{"name":"trace_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Traces"],"summary":"Create Trace","description":"Create a single trace from the canonical `Trace` shape.\n\nAccepts one trace (`trace_id` plus a nested `spans` tree) and\nreturns the resulting `trace_id`. The payload is internally\nnormalized into the same ingest pipeline as\n`POST /tracing/spans/ingest`.\n\nReturns `202 Accepted`. The async write contract applies — see\n[Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202).\n\nUse this when you want to operate on whole traces in the\nlist-shaped `Trace` payload. For flat-list ingestion or multiple\ntraces in one call, use `POST /traces/ingest` (plural).","operationId":"create_trace","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces/query":{"post":{"tags":["Traces"],"summary":"Query Traces","description":"Query traces as a list of canonical `Trace` records.\n\nThin wrapper over the shared span-query backend that forces\n`focus = \"trace\"` and returns the list-shaped `Traces` payload\n(one entry per trace, each with its nested `spans` tree). Use this\nto build a table of runs, where each row is a trace.\n\n## Request body\n\n- `filtering` — span-level conditions, same dialect as\n `POST /spans/query`. A trace matches when any of its spans\n matches.\n- `windowing` — cursor pagination and time range.\n- `query_ref`, `query_variant_ref`, `query_revision_ref` — resolve\n filters and windowing from a saved query revision. If the\n revision's stored `formatting.focus` is `span`, this endpoint\n returns `409` — call `POST /spans/query` instead.\n\n## Response\n\nReturns `{count, traces: [...]}`. For the per-trace map shape\nkeyed by `trace_id`, call `POST /tracing/spans/query` with\n`focus=\"trace\"`.","operationId":"query_traces","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracesQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces/{trace_id}":{"get":{"tags":["Traces"],"summary":"Fetch Trace","description":"Fetch a single trace by `trace_id` in the canonical `Trace` shape.\n\nReturns `{count: 1, trace}` when found and `{count: 0}` otherwise.\n`trace_id` must be a 32-char hex UUID; any other format returns\n`400`. The reserved path segments `query` and `ingest` return\n`405` to disambiguate from the sibling query/ingest endpoints.","operationId":"fetch_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Traces"],"summary":"Edit Trace","description":"Replace a trace's spans using the canonical `Trace` shape.\n\nPath `trace_id` must match the `trace_id` inside the payload's\n`trace.trace_id`. Mismatches return `400`. The payload must\ndescribe exactly one trace.\n\nEdit re-ingests the spans through the same stream as\n`POST /tracing/spans/ingest`. Returns `202 Accepted` once the\nspans are queued. The worker reconciles the trace asynchronously.","operationId":"edit_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Traces"],"summary":"Delete Trace","operationId":"delete_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces/ingest":{"post":{"tags":["Deprecated"],"summary":"Ingest Traces","description":"Ingest a batch of traces in the canonical `Traces` list shape.\n\nAccepts a list of trace records (each `trace_id` plus nested\n`spans`). Internally normalized into the same pipeline as\n`POST /tracing/spans/ingest`. Use this when you already hold\ndata in the `Traces` list shape — for example, replaying traces\nfrom another environment.\n\nReturns `202 Accepted` with the list of accepted `trace_ids`. See\n[Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202)\nfor what `count` means here.","operationId":"ingest_traces","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracesRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/spans/":{"get":{"tags":["Traces"],"summary":"Fetch Spans","description":"Fetch spans by known IDs.\n\nPoint lookup endpoint. At least one of `trace_id` or `span_id`\nmust be present. Both accept either repeated query params\n(`?trace_id=a&trace_id=b`) or a comma-separated single param\n(`?trace_ids=a,b`); results are deduplicated.\n\nReturns `400` when neither IDs nor trace IDs are supplied.\nFor filter-based retrieval, use `POST /spans/query`.","operationId":"fetch_spans","parameters":[{"name":"trace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Trace Id"}},{"name":"trace_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Ids"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Span Id"}},{"name":"span_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpansResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/query":{"post":{"tags":["Traces"],"summary":"Query Spans","description":"Query spans as a flat list.\n\nThin wrapper over the shared span-query backend that forces\n`focus = \"span\"`. Use this when you want a paged list of spans\nregardless of trace hierarchy — for example, to surface all LLM\ncalls across traces or to stream spans into an external system.\n\n## Request body\n\n- `filtering` — span-level conditions (fields on `Span` and\n `attributes` paths).\n- `windowing` — cursor pagination and time range (see\n [Query Pattern](/reference/api-guide/query-pattern#windowing)).\n- `query_ref`, `query_variant_ref`, `query_revision_ref` — resolve\n filtering and windowing from a saved query revision. If the\n revision's stored `formatting.focus` is `trace`, this endpoint\n returns `409` — call `POST /traces/query` for that revision.\n\n## Response\n\nReturns `{count, spans}`. For the nested per-trace shape, call\n`POST /traces/query` or `POST /tracing/spans/query` with\n`focus=\"trace\"` instead.","operationId":"query_spans","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpansQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpansResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/analytics/query":{"post":{"tags":["Traces"],"summary":"Query Analytics","operationId":"query_spans_analytics","parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}},{"name":"specs","in":"query","required":false,"schema":{"title":"Specs"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/sessions/query":{"post":{"tags":["Traces"],"summary":"Query Sessions","operationId":"query_spans_sessions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionsQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/users/query":{"post":{"tags":["Traces"],"summary":"Query Users","operationId":"query_spans_users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsersQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/{trace_id}/{span_id}":{"get":{"tags":["Traces"],"summary":"Fetch Span","description":"Fetch a single span by `trace_id` + `span_id`.\n\nReturns `{count: 1, span}` when found and `{count: 0}` otherwise.\nBoth IDs are required path parameters. Use this to drill in on one\nspan from a trace waterfall without pulling the full tree.","operationId":"fetch_span","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"path","required":true,"schema":{"type":"string","title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/traces/":{"post":{"tags":["Traces"],"summary":"Create Trace","description":"Create a single-span \"simple\" trace.\n\nThis endpoint is a higher-level helper for the common case of\nrecording one self-contained event — an evaluator output, a human\nannotation, a feedback entry, a manually-logged inference. It\ncreates one span under a fresh `trace_id` and returns the resulting\nhandle.\n\n## When to use this vs. `/tracing/spans/ingest`\n\n- **Use this endpoint** when you have a single payload to record\n with no internal hierarchy: evaluation results, human feedback,\n manual annotations, or a standalone completion. It takes care of\n `trace_id`/`span_id` generation, attribute namespacing, and link\n wiring for you.\n- **Use `POST /tracing/spans/ingest`** when you need multi-span\n traces (e.g. an agent run with nested tool calls and LLM spans),\n precise control over IDs, timings, or parent/child relationships,\n or when forwarding traces from another OTel-compatible source.\n\n## Request body\n\nSend a `trace` object with:\n\n- `origin` — who produced the trace (`human`, `auto`, `custom`).\n- `kind` — intent (`adhoc`, `eval`, `play`).\n- `channel` — transport that produced it (`sdk`, `api`, `web`, `otlp`).\n- `data` — required dict carrying the actual payload (inputs,\n outputs, or evaluator results).\n- `tags`, `meta` — optional free-form dicts for filtering and\n metadata.\n- `references` — optional links to Agenta entities (application,\n variant, revision, evaluator, testset, etc.).\n- `links` — optional OTel-style links to other traces/spans.\n\nUse `PATCH /preview/tracing/traces/{trace_id}` to update fields\nlater, `GET` to fetch, and `DELETE` to remove. See\n[Tracing — References and links](/reference/api-guide/tracing#references-and-entity-linking)\nfor when to use `references` vs. `links`.","operationId":"create_simple_trace","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceCreateRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/traces/{trace_id}":{"get":{"tags":["Traces"],"summary":"Fetch Trace","description":"Fetch a single \"simple\" trace by `trace_id`.\n\nReturns the high-level `SimpleTrace` view (origin, kind, channel,\ndata, references, links) rather than the raw OTel span shape. Use\nthis for evaluation results, feedback entries, and annotations\ncreated via `POST /simple/traces/`. For the span-level view of the\nsame trace, call `GET /tracing/traces/{trace_id}`.","operationId":"fetch_simple_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Traces"],"summary":"Edit Trace","description":"Update an existing \"simple\" trace.\n\nSupplied fields overwrite the existing trace. Fields not present\nin the request body are left unchanged. `data` is required (the\npayload being recorded); `tags`, `meta`, `references`, and\n`links` are optional.\n\nThis endpoint is intended for annotations and feedback entries,\nwhere the `data.outputs` is the part that typically gets revised.\nFor span-level edits, use `PUT /tracing/traces/{trace_id}`.","operationId":"edit_simple_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Traces"],"summary":"Delete Trace","description":"Delete a \"simple\" trace.\n\nRemoves the single-span trace created via\n`POST /simple/traces/`. Returns the `(trace_id, span_id)` pair\nthat was removed, for logging or downstream cleanup. Use\n`DELETE /tracing/traces/{trace_id}` when operating on a\nmulti-span trace.","operationId":"delete_simple_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/traces/query":{"post":{"tags":["Traces"],"summary":"Query Traces","description":"Query \"simple\" traces.\n\nFilter annotations and feedback by `origin`, `kind`, `channel`,\n`tags`, `meta`, `references`, and `links`. The shape of the\nrequest body is described in the\n[Simple Endpoints](/reference/api-guide/simple-endpoints#query-traces)\nguide, including the distinction between filtering via\n`trace.links` (inbound links on the trace) and the top-level\n`links` (batch GET by the trace's own IDs).\n\nUse this endpoint when building feedback or annotation UIs.\nFor span-level queries across all trace types, use\n`POST /tracing/spans/query`.","operationId":"query_simple_traces","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTracesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invocations/":{"post":{"tags":["Invocations"],"summary":"Create Invocation","operationId":"create_invocation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invocations/{trace_id}":{"get":{"tags":["Invocations"],"summary":"Fetch Invocation","operationId":"fetch_invocation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Invocations"],"summary":"Edit Invocation","operationId":"edit_invocation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Invocations"],"summary":"Delete Invocation","operationId":"delete_invocation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invocations/query":{"post":{"tags":["Invocations"],"summary":"Query Invocations","operationId":"query_invocations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/annotations/":{"post":{"tags":["Annotations"],"summary":"Create Annotation","operationId":"create_annotation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/annotations/{trace_id}":{"get":{"tags":["Annotations"],"summary":"Fetch Annotation","operationId":"fetch_annotation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Annotations"],"summary":"Edit Annotation","operationId":"edit_annotation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Annotations"],"summary":"Delete Annotation","operationId":"delete_annotation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/annotations/query":{"post":{"tags":["Annotations"],"summary":"Query Annotations","operationId":"query_annotations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testcases/":{"get":{"tags":["Testcases"],"summary":"Fetch Testcases","operationId":"fetch_testcases","parameters":[{"name":"testcase_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Testcase Id"}},{"name":"testcase_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testcase Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcasesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testcases/{testcase_id}":{"get":{"tags":["Testcases"],"summary":"Fetch Testcase","operationId":"fetch_testcase","parameters":[{"name":"testcase_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testcase Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testcases/query":{"post":{"tags":["Testcases"],"summary":"Query Testcases","operationId":"query_testcases","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcasesQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcasesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/":{"post":{"tags":["Testsets"],"summary":"Create Testset","description":"Create an empty testset artifact.\n\nOnly creates the artifact row (name, slug, metadata). No variant or\nrevision is created; add testcases by committing a revision with\n`/testsets/revisions/commit`, or use `/simple/testsets/` to create\na testset with seed rows in a single call.","operationId":"create_testset","parameters":[{"name":"testset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/{testset_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Testset","description":"Fetch a testset artifact by ID.\n\nReturns the artifact row only; testcases are stored on revisions and\nmust be fetched via `/testsets/revisions/retrieve` or\n`/testcases/query`.","operationId":"fetch_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Testset","description":"Update metadata on a testset artifact.\n\nOnly artifact-level fields (name, description, slug, flags, tags,\nmeta, folder) are editable here. Testcase changes are committed as\nnew revisions via `/testsets/revisions/commit`.","operationId":"edit_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/{testset_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Testset","description":"Soft-delete a testset artifact.\n\nSets `deleted_at` on the testset. Archived testsets are excluded\nfrom `/testsets/query` unless `include_archived` is true. Use\n`/testsets/{testset_id}/unarchive` to restore.","operationId":"archive_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/{testset_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Testset","description":"Restore a previously archived testset artifact.\n\nClears `deleted_at` on the testset so it shows up in queries again.","operationId":"unarchive_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/query":{"post":{"tags":["Testsets"],"summary":"Query Testsets","description":"List and filter testset artifacts.\n\nFollows the shared query pattern: attribute filters on the testset\nbody, optional `testset_refs` to restrict by id/slug, cursor-based\npagination via `windowing`. Only artifact rows are returned — no\ntestcases. See the Query Pattern guide for the full body shape.","operationId":"query_testsets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/":{"post":{"tags":["Testsets"],"summary":"Create Testset Variant","description":"Create a variant (history branch) on a testset.\n\nMost testsets only need one variant. Create additional variants to\nmaintain parallel revision histories (for example, a staging branch\nseparate from the main one).","operationId":"create_testset_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/{testset_variant_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Testset Variant","description":"Fetch a variant by ID.\n\nReturns the variant row (branch metadata). Use\n`/testsets/revisions/retrieve` to get the latest revision on this\nvariant.","operationId":"fetch_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Testset Variant","description":"Update metadata on a testset variant.\n\nVariants hold only branch-level metadata (name, description, slug,\nflags, tags, meta). Testcase content belongs to revisions.","operationId":"edit_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/{testset_variant_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Testset Variant","description":"Soft-delete a testset variant.\n\nArchiving a variant excludes it from `/testsets/variants/query`\nunless `include_archived` is true. Its revisions stay in place and\ncan still be retrieved by ID.","operationId":"archive_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/{testset_variant_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Testset Variant","description":"Restore a previously archived testset variant.","operationId":"unarchive_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/query":{"post":{"tags":["Testsets"],"summary":"Query Testset Variants","description":"List and filter testset variants.\n\nUse `testset_refs` to scope to one or more parent testsets. Use\n`testset_variant_refs` to restrict by specific variant id/slug.","operationId":"query_testset_variants","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/":{"post":{"tags":["Testsets"],"summary":"Create Testset Revision","description":"Create a new revision on an existing variant.\n\nCreates a revision row without committing content. Most callers\ninstead use `/testsets/revisions/commit`, which writes the\ntestcases and the revision together.","operationId":"create_testset_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Testset Revision","operationId":"fetch_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}},{"name":"include_testcases","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Include full testcase objects. Default (null/true): include testcases. False: return only testcase IDs.","title":"Include Testcases"},"description":"Include full testcase objects. Default (null/true): include testcases. False: return only testcase IDs."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Testset Revision","operationId":"edit_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Testset Revision","operationId":"archive_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Testset Revision","operationId":"unarchive_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}/download":{"post":{"tags":["Testsets"],"summary":"Fetch Testset Revision To File","operationId":"fetch_testset_revision_to_file","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}},{"name":"file_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["csv","json"],"type":"string"},{"type":"null"}],"description":"File type to download. Supported: 'csv' or 'json'. Default: 'csv'.","default":"csv","title":"File Type"},"description":"File type to download. Supported: 'csv' or 'json'. Default: 'csv'."},{"name":"file_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional custom filename for the download.","title":"File Name"},"description":"Optional custom filename for the download."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}/upload":{"post":{"tags":["Testsets"],"summary":"Create Testset Revision From File","operationId":"create_testset_revision_from_file","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_testset_revision_from_file"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/query":{"post":{"tags":["Testsets"],"summary":"Query Testset Revisions","operationId":"query_testset_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/commit":{"post":{"tags":["Testsets"],"summary":"Commit Testset Revision","operationId":"commit_testset_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/retrieve":{"post":{"tags":["Testsets"],"summary":"Retrieve Testset Revision","operationId":"retrieve_testset_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/log":{"post":{"tags":["Testsets"],"summary":"Log Testset Revisions","operationId":"log_testset_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/":{"post":{"tags":["Testsets"],"summary":"Create Simple Testset","operationId":"create_simple_testset","parameters":[{"name":"testset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Simple Testset","operationId":"fetch_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Simple Testset","operationId":"edit_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Simple Testset","operationId":"archive_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Simple Testset","operationId":"unarchive_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}/upload":{"post":{"tags":["Testsets"],"summary":"Edit Simple Testset From File","operationId":"edit_simple_testset_from_file","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_edit_simple_testset_from_file"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}/download":{"post":{"tags":["Testsets"],"summary":"Fetch Simple Testset To File","operationId":"fetch_simple_testset_to_file","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}},{"name":"file_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["csv","json"],"type":"string"},{"type":"null"}],"title":"File Type"}},{"name":"file_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/query":{"post":{"tags":["Testsets"],"summary":"Query Simple Testsets","operationId":"query_simple_testsets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/upload":{"post":{"tags":["Testsets"],"summary":"Create Simple Testset From File","operationId":"create_simple_testset_from_file","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_simple_testset_from_file"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/":{"post":{"tags":["Queries"],"summary":"Create Query","operationId":"create_query","parameters":[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/{query_id}":{"get":{"tags":["Queries"],"summary":"Fetch Query","operationId":"fetch_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Query","operationId":"edit_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/{query_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Query","operationId":"archive_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/{query_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Query","operationId":"unarchive_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/query":{"post":{"tags":["Queries"],"summary":"Query Queries","operationId":"query_queries","parameters":[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}},{"name":"query_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Query Ids"}},{"name":"query_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query Slug"}},{"name":"query_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Query Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/":{"post":{"tags":["Queries"],"summary":"Create Query Variant","operationId":"create_query_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/{query_variant_id}":{"get":{"tags":["Queries"],"summary":"Fetch Query Variant","operationId":"fetch_query_variant","parameters":[{"name":"query_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Query Variant","operationId":"edit_query_variant","parameters":[{"name":"query_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/{query_variant_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Query Variant","operationId":"archive_query_variant","parameters":[{"name":"query_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/{query_variant_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Query Variant","operationId":"unarchive_query_variant","parameters":[{"name":"query_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/query":{"post":{"tags":["Queries"],"summary":"Query Query Variants","operationId":"query_query_variants","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/retrieve":{"post":{"tags":["Queries"],"summary":"Retrieve Query Revision","operationId":"retrieve_query_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/":{"post":{"tags":["Queries"],"summary":"Create Query Revision","operationId":"create_query_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/{query_revision_id}":{"get":{"tags":["Queries"],"summary":"Fetch Query Revision","operationId":"fetch_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Query Revision","operationId":"edit_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/{query_revision_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Query Revision","operationId":"archive_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/{query_revision_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Query Revision","operationId":"unarchive_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/query":{"post":{"tags":["Queries"],"summary":"Query Query Revisions","operationId":"query_query_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/commit":{"post":{"tags":["Queries"],"summary":"Commit Query Revision","operationId":"commit_query_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/log":{"post":{"tags":["Queries"],"summary":"Log Query Revisions","operationId":"log_query_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/":{"post":{"tags":["Queries"],"summary":"Create Simple Query","operationId":"create_simple_query","parameters":[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/{query_id}":{"get":{"tags":["Queries"],"summary":"Fetch Simple Query","operationId":"fetch_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Simple Query","operationId":"edit_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/{query_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Simple Query","operationId":"archive_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/{query_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Simple Query","operationId":"unarchive_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/query":{"post":{"tags":["Queries"],"summary":"Query Simple Queries","operationId":"query_simple_queries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/folders/":{"post":{"tags":["Folders"],"summary":"Create Folder","description":"Create a folder.\n\nThe folder name must match `[\\w -]+` (letters, digits, underscore,\nspace, hyphen); other characters return `400`. The resulting path\n(the slug joined to the parent's path with a dot) must be unique\nwithin the project, otherwise the call returns `409`. Passing a\n`parent_id` that does not exist returns `404`. Paths are capped at\n10 levels of nesting and slugs at 64 characters.","operationId":"create_folder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/folders/{folder_id}":{"get":{"tags":["Folders"],"summary":"Fetch Folder","description":"Fetch one folder by id.\n\nReturns a single `folder` envelope. If the folder does not exist in\nthe caller's project, `count` is `0` and `folder` is omitted.","operationId":"fetch_folder","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Folders"],"summary":"Edit Folder","description":"Rename or move a folder.\n\nUse this endpoint to change a folder's `slug`, `name`, or\n`parent_id`. The `id` in the request body must match the path\nparameter or the call returns `400`. Name and path-uniqueness rules\nfrom create apply: invalid names return `400`, a path collision\nreturns `409`, and a missing `parent_id` returns `404`.","operationId":"edit_folder","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Folders"],"summary":"Delete Folder","description":"Delete a folder and every descendant.\n\nRemoves the folder identified by `folder_id` together with every\nfolder beneath it, in a single transaction. Deletion is\nunconditional; there is no archive or unarchive step. Resources\nthat were assigned to any of the removed folders continue to\nexist and are no longer reachable through the deleted folder.","operationId":"delete_folder","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/folders/query":{"post":{"tags":["Folders"],"summary":"Query Folders","description":"Filter folders inside the caller's project.\n\nFollows the general response envelope described in the\n[Query Pattern](/reference/api-guide/query-pattern) guide, but\ndoes not accept `windowing` or `include_archived` — folders are\nhard-deleted and the response always returns the full filtered\nset. Filters include `id`/`ids`, `slug`/`slugs`, `kind`/`kinds`,\n`parent_id`/`parent_ids` (use `parent_id: null` for root folders),\n`path`/`paths`, and `prefix`/`prefixes` for subtree lookup.","operationId":"query_folders","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoldersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/catalog/types/":{"get":{"tags":["Applications"],"summary":"List Application Catalog Types","description":"List shared catalog types.\n\nCatalog types are reusable JSON-Schema building blocks referenced from\ntemplate schemas (for example `message`, `prompt-template`). Types are\nread-only and version with the product.\nSee the [Applications guide](/reference/api-guide/applications#catalog).","operationId":"list_application_catalog_types","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogTypesResponse"}}}}}}},"/applications/catalog/templates/":{"get":{"tags":["Applications"],"summary":"List Application Catalog Templates","description":"List application templates available in the catalog.\n\nTemplates describe the handler (`uri`) and JSON schemas used to create\na new application. Pass `include_archived=true` to include retired\ntemplates (useful when editing applications created from an old\ntemplate). Templates are global and read-only.","operationId":"list_application_catalog_templates","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogTemplatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/catalog/templates/{template_key}":{"get":{"tags":["Applications"],"summary":"Fetch Application Catalog Template","description":"Fetch one application template by key.\n\nUse this to inspect the exact `uri`, `data`, and JSON Schemas for a\ntemplate before creating an application from it. `template_key` comes\nfrom the `key` field of a template returned by the list endpoint\n(for example `completion`, `chat`, `hook`).","operationId":"fetch_application_catalog_template","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/catalog/templates/{template_key}/presets/":{"get":{"tags":["Applications"],"summary":"List Application Catalog Presets","description":"List presets scoped to a template.\n\nPresets are named parameter sets (for example a curated prompt +\nmodel combination) that scaffold the first revision when creating an\napplication from a template. Pass `include_archived=true` to include\nretired presets.","operationId":"list_application_catalog_presets","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogPresetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/catalog/templates/{template_key}/presets/{preset_key}":{"get":{"tags":["Applications"],"summary":"Fetch Application Catalog Preset","description":"Fetch one preset by key within a template.\n\nReturns the preset's `data` so clients can use it as the payload for a\nfirst revision when creating an application from a template.","operationId":"fetch_application_catalog_preset","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"preset_key","in":"path","required":true,"schema":{"type":"string","title":"Preset Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogPresetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/":{"post":{"tags":["Applications"],"summary":"Create Application","description":"Create an application artifact only.\n\nReturns an empty application without any variants or revisions.\nMost callers should use `POST /simple/applications/` instead — it\ncreates the artifact, a default variant, and a first committed\nrevision in one request.\nSee the [Applications guide](/reference/api-guide/applications).","operationId":"create_application","parameters":[{"name":"application_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/{application_id}":{"get":{"tags":["Applications"],"summary":"Fetch Application","description":"Fetch one application artifact by ID.\n\nReturns artifact-level fields only. To get the current variant,\nrevision, and `data` in a single call, use\n`GET /simple/applications/{application_id}`.","operationId":"fetch_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Applications"],"summary":"Edit Application","description":"Edit artifact-level fields on an application.\n\nEditable fields: `description`, `flags`, `tags`, `meta`. Editing `name`\nis currently disabled and returns `400`. Prompt or model-parameter\nchanges go through `POST /applications/revisions/commit`, not this\nendpoint.","operationId":"edit_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/{application_id}/archive":{"post":{"tags":["Applications"],"summary":"Archive Application","description":"Soft-delete an application.\n\nArchiving sets `deleted_at` on the application and hides it from\nqueries that don't set `include_archived: true`. Its variants and\nrevisions become unreachable from listing but their IDs remain\nresolvable so historical traces stay intact.\nSee [Versioning](/reference/api-guide/versioning#archive-and-unarchive).","operationId":"archive_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/{application_id}/unarchive":{"post":{"tags":["Applications"],"summary":"Unarchive Application","description":"Restore a previously archived application.\n\nClears `deleted_at` and makes the application visible to standard\nqueries again. Safe to call on an already-active application; it is a\nno-op in that case.","operationId":"unarchive_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/query":{"post":{"tags":["Applications"],"summary":"Query Applications","description":"Query application artifacts.\n\nReturns only artifact-level fields; the variant, revision, and `data`\npayload are not included. For one row per application with those\nmerged in, use `POST /simple/applications/query`.\nSee [Query Pattern](/reference/api-guide/query-pattern).","operationId":"query_applications","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/":{"post":{"tags":["Applications"],"summary":"Create Application Variant","description":"Create a new variant on an existing application.\n\nA variant is an independent branch of the application's history. The\nnew variant starts empty — call `POST /applications/revisions/commit`\nto add its first revision. Use `POST /applications/variants/fork` when\nyou want the new variant to inherit an existing revision history.","operationId":"create_application_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/{application_variant_id}":{"get":{"tags":["Applications"],"summary":"Fetch Application Variant","description":"Fetch one variant by ID.\n\nReturns variant-level fields. To get the variant's tip revision and\nits `data`, call `POST /applications/revisions/retrieve` with\n`application_variant_ref`.","operationId":"fetch_application_variant","parameters":[{"name":"application_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Applications"],"summary":"Edit Application Variant","description":"Edit a variant's header fields (`name`, `description`, `tags`, `meta`).\n\nConfiguration changes go through a new commit via\n`POST /applications/revisions/commit`. This endpoint only touches\nvariant-level metadata.","operationId":"edit_application_variant","parameters":[{"name":"application_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/{application_variant_id}/archive":{"post":{"tags":["Applications"],"summary":"Archive Application Variant","description":"Soft-delete a variant.\n\nThe variant and its revisions are hidden from queries unless\n`include_archived: true` is sent. Revision IDs remain resolvable so\nhistorical traces are preserved.","operationId":"archive_application_variant","parameters":[{"name":"application_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/{application_variant_id}/unarchive":{"post":{"tags":["Applications"],"summary":"Unarchive Application Variant","description":"Restore a previously archived variant.","operationId":"unarchive_application_variant","parameters":[{"name":"application_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/query":{"post":{"tags":["Applications"],"summary":"Query Application Variants","description":"Query variants across one or more applications.\n\nFilters are parsed from both query-string parameters and the request\nbody; body values take precedence. Use `application_refs` to scope to\nspecific applications, `application_variant_refs` to narrow to\nspecific variants.\nSee [Query Pattern](/reference/api-guide/query-pattern).","operationId":"query_application_variants","parameters":[{"name":"application_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"}},{"name":"application_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Application Ids"}},{"name":"application_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Slug"}},{"name":"application_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Application Slugs"}},{"name":"application_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"}},{"name":"application_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Application Variant Ids"}},{"name":"application_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Variant Slug"}},{"name":"application_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Application Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/fork":{"post":{"tags":["Applications"],"summary":"Fork Application Variant","description":"Fork an existing variant into a new variant on the same application.\n\nUse this to experiment without touching the source variant's history.\nThe fork copies the source variant's revisions up to the specified\nrevision (or tip) into the new variant, then commits the supplied\n`revision` object on top. Both `variant` and `revision` sub-objects\nin the request must be present; the server returns `count: 0` when\neither is missing. Returns `400 Bad Request` if the fork target is\ninvalid (for example, the source variant or revision cannot be\nlocated in this application's lineage).","operationId":"fork_application_variant","parameters":[{"name":"application_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationForkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/retrieve":{"post":{"tags":["Applications"],"summary":"Retrieve Application Revision","description":"Retrieve one application revision by reference.\n\nAccepts application / variant / revision references for direct lookup,\nor an environment reference (with optional `key`) to resolve the\ncurrently-deployed revision in that environment. Returns the revision\nincluding its `data` payload (URL, parameters, schemas), which clients\nuse to invoke the application.\nSet `resolve: true` to inline embedded references inside `data`.","operationId":"retrieve_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/deploy":{"post":{"tags":["Applications"],"summary":"Deploy Application Revision","description":"Deploy an application revision to an environment.\n\nWrites a reference from the environment revision to the application\nrevision under `key` (default: `{application_slug}.revision`). Clients\nthat subsequently call `/applications/revisions/retrieve` with the\nsame `environment_ref` and `key` resolve to this revision.\nSee the [Applications guide](/reference/api-guide/applications#deployment).","operationId":"deploy_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionDeployRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/":{"post":{"tags":["Applications"],"summary":"Create Application Revision","description":"Create a revision row directly, without the commit workflow.\n\nAdvanced use only. For normal development loops prefer\n`POST /applications/revisions/commit`, which commits the new revision\nas the variant's tip and assigns a version number.","operationId":"create_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/{application_revision_id}":{"get":{"tags":["Applications"],"summary":"Fetch Application Revision","description":"Fetch one revision by its ID.\n\nReturns the revision including its `data` payload. For lookup by\nvariant slug or environment, use `POST /applications/revisions/retrieve`.","operationId":"fetch_application_revision","parameters":[{"name":"application_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Applications"],"summary":"Edit Application Revision","description":"Edit a revision's header fields only.\n\nRevisions are immutable snapshots; `data`, `author`, `date`, and\n`message` cannot be changed. This endpoint updates header fields such\nas `description` and `tags`. To change configuration, commit a new\nrevision with `POST /applications/revisions/commit`.","operationId":"edit_application_revision","parameters":[{"name":"application_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/{application_revision_id}/archive":{"post":{"tags":["Applications"],"summary":"Archive Application Revision","description":"Soft-delete a revision.\n\nArchived revisions are hidden from `/query` and `/log` responses\nunless `include_archived: true` is set. The ID remains resolvable for\ntraces and deployed environment references.","operationId":"archive_application_revision","parameters":[{"name":"application_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/{application_revision_id}/unarchive":{"post":{"tags":["Applications"],"summary":"Unarchive Application Revision","description":"Restore a previously archived revision.","operationId":"unarchive_application_revision","parameters":[{"name":"application_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/query":{"post":{"tags":["Applications"],"summary":"Query Application Revisions","description":"Query revisions across one or more applications or variants.\n\nUse `application_refs` / `application_variant_refs` to scope the\nquery, or filter on commit metadata (`author`, `date`, `message`) via\nthe `application_revision` object. For the ordered history of a\nsingle variant, `POST /applications/revisions/log` is more direct.\nSet `resolve: true` to inline embedded references in each revision's\n`data`.","operationId":"query_application_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/commit":{"post":{"tags":["Applications"],"summary":"Commit Application Revision","description":"Commit a new revision on a variant.\n\nThe new revision becomes the variant's tip and is assigned the next\n`version` number. Revisions are immutable once committed; to change\nconfiguration, commit a new revision.\nSee [Versioning](/reference/api-guide/versioning#committing-a-revision).","operationId":"commit_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/log":{"post":{"tags":["Applications"],"summary":"Log Application Revisions","description":"Return the ordered revision log for a variant.\n\nPass `application_variant_id` to list the full history of that\nvariant; optionally pass `application_revision_id` + `depth` to walk\nback a bounded number of commits from a specific revision. Entries\nare returned newest-first and include the full revision record.","operationId":"log_application_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/resolve":{"post":{"tags":["Applications"],"summary":"Resolve Application Revision","description":"Fetch a revision with embedded references inlined.\n\nWhen a revision's `data` carries references to other entities\n(snippets, linked revisions), this endpoint resolves them in place and\nreturns the fully-inlined configuration along with `resolution_info`\ndescribing what was substituted. Use it when clients need a\nself-contained configuration for invocation or export.","operationId":"resolve_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/":{"post":{"tags":["Applications"],"summary":"Create Simple Application","description":"Create an application end-to-end.\n\nCreates the application artifact, a default variant, and a first\ncommitted revision whose `data` comes from the request. This is the\nrecommended entry point for \"spin up a new application from a\ntemplate\". For more control over variant and revision creation, use\nthe structured endpoints under `/applications/`.\nSee [Simple Endpoints](/reference/api-guide/simple-endpoints).","operationId":"create_simple_application","parameters":[{"name":"application_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/query":{"post":{"tags":["Applications"],"summary":"Query Simple Applications","description":"Query applications with variant, revision, and `data` merged per row.\n\nThis is the shape most clients want for dashboards or invocation\npickers: each row carries `variant_id`, `revision_id`, and `data`\n(URL, parameters, schemas) alongside the artifact fields. For the\nstructured query that returns artifacts only, use\n`POST /applications/query`.","operationId":"query_simple_applications","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/{application_id}":{"get":{"tags":["Applications"],"summary":"Fetch Simple Application","description":"Fetch one application with its current variant, revision, and `data` merged.\n\nThe returned `data` includes the invocation `url`, the `parameters`\nthe revision was committed with, and the JSON `schemas` for inputs,\noutputs, and parameters.","operationId":"fetch_simple_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Applications"],"summary":"Edit Simple Application","description":"Edit an application and commit a new revision if configuration changed.\n\nFields other than `id` in the request body are treated as changes and\nproduce a new committed revision. Supplying `data` changes the\nconfiguration; supplying only header fields (`flags`, `tags`, `meta`)\nstill produces a new revision with the updated header but the\nexisting `data`. Editing the application `name` is currently\ndisabled and returns `400`.","operationId":"edit_simple_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/{application_id}/archive":{"post":{"tags":["Applications"],"summary":"Archive Simple Application","description":"Archive an application through the simple endpoint layer.\n\nEquivalent to `POST /applications/{application_id}/archive`; returns\nthe archived application in the simple shape (with its last known\nvariant, revision, and `data`).","operationId":"archive_simple_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/{application_id}/unarchive":{"post":{"tags":["Applications"],"summary":"Unarchive Simple Application","description":"Unarchive an application through the simple endpoint layer.\n\nEquivalent to `POST /applications/{application_id}/unarchive`, with\nthe response shape of `/simple/applications/`.","operationId":"unarchive_simple_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/types/":{"get":{"tags":["Workflows"],"summary":"List Workflow Catalog Types","description":"List the shared JSON Schema fragments available to workflow schemas.\n\nWorkflow input/output schemas reference these via `x-ag-type-ref` (for\nexample, `message` or `prompt`). Use this endpoint to discover what\ntype keys exist before building a schema.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"list_workflow_catalog_types","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogTypesResponse"}}}}}}},"/workflows/catalog/types/{ag_type}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Catalog Type","description":"Return the JSON Schema for a single shared type key.\n\nReturns 404 when the `ag_type` is not part of the shipped catalog.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow_catalog_type","parameters":[{"name":"ag_type","in":"path","required":true,"schema":{"type":"string","title":"Ag Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/templates/":{"get":{"tags":["Workflows"],"summary":"List Workflow Catalog Templates","description":"List workflow blueprints shipped with the product.\n\nFilter by domain with `is_application`, `is_evaluator`, or\n`is_snippet`. Archived templates are hidden unless `include_archived`\nis true. Templates are global and read-only.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"list_workflow_catalog_templates","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"is_application","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"}},{"name":"is_evaluator","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"}},{"name":"is_snippet","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogTemplatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/templates/{template_key}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Catalog Template","description":"Return a single workflow template by its key.\n\nReturns `count=0` when the template is not found. Templates are global\nmetadata and are not scoped to a project.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow_catalog_template","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/templates/{template_key}/presets/":{"get":{"tags":["Workflows"],"summary":"List Workflow Catalog Presets","description":"List presets defined against a template.\n\nPresets are named parameter sets that can be committed as the first\nrevision of a new variant. Returns an empty list when a template has\nno canned presets.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"list_workflow_catalog_presets","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogPresetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/templates/{template_key}/presets/{preset_key}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Catalog Preset","description":"Return a single preset for a template by key.\n\nReturns `count=0` when the preset is not defined.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow_catalog_preset","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"preset_key","in":"path","required":true,"schema":{"type":"string","title":"Preset Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogPresetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/":{"post":{"tags":["Workflows"],"summary":"Create Workflow","description":"Create a workflow artifact.\n\nCreates the top-level container only; commit a revision on a variant\nbefore the workflow can be retrieved or invoked. Use when you need the\nlower-level primitive — pick `/applications/` for serving logic or\n`/evaluators/` for scoring logic.\n\nSee: [Workflows](/reference/api-guide/workflows),\n[Versioning](/reference/api-guide/versioning).","operationId":"create_workflow","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow","description":"Fetch a workflow artifact by ID.\n\nReturns the artifact only — variants and revisions are not included.\nUse `/workflows/variants/query` and `/workflows/revisions/query` for\nthe child entities.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Workflow","description":"Update artifact-level fields on a workflow.\n\nThe `id` in the body must match the path parameter. Only supplied\nfields are modified. Configuration (parameters, URL, schemas) lives on\nrevisions — commit a new revision to change those.\n\nSee: [Workflows](/reference/api-guide/workflows),\n[Versioning](/reference/api-guide/versioning).","operationId":"edit_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Workflow","description":"Archive a workflow artifact (soft delete).\n\nSets `deleted_at` on the workflow and its variants. Archived\nworkflows are hidden from queries unless `include_archived=true`.\nRevision IDs remain resolvable so historical traces stay intact.\n\nSee: [Versioning](/reference/api-guide/versioning).","operationId":"archive_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Workflow","description":"Restore a previously archived workflow.\n\nClears `deleted_at` on the workflow. Archived variants and revisions\nare restored with the workflow.\n\nSee: [Versioning](/reference/api-guide/versioning).","operationId":"unarchive_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/query":{"post":{"tags":["Workflows"],"summary":"Query Workflows","description":"Query workflow artifacts with filters and pagination.\n\nAccepts the same filters as query parameters or in the request body;\nbody fields win when both are supplied. Results are ordered by\ncreation time; pass `windowing.next` back for the following page.\n\nSee: [Query Pattern](/reference/api-guide/query-pattern).","operationId":"query_workflows","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/":{"post":{"tags":["Workflows"],"summary":"Create Workflow Variant","description":"Create a new variant under an existing workflow.\n\nVariants are branches of an artifact's history; each maintains its own\nrevision log. Variant slugs are unique within the project — reuse of a\nslug already in use returns a 409 conflict.\n\nSee: [Versioning](/reference/api-guide/versioning).","operationId":"create_workflow_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/{workflow_variant_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Variant","description":"Fetch a workflow variant by ID.\n\nReturns the variant metadata only — use\n`/workflows/revisions/retrieve` or `/workflows/revisions/log` for the\nvariant's revisions.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Workflow Variant","description":"Update metadata on a workflow variant.\n\nThe `id` in the body must match the path parameter. Revisions on the\nvariant are not affected — commit a new revision to change data.\n\nSee: [Versioning](/reference/api-guide/versioning).","operationId":"edit_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/{workflow_variant_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Workflow Variant","description":"Archive a workflow variant.\n\nSoft-deletes the variant and its revisions. Archived variants are\nhidden from queries unless `include_archived=true`. See\n[Versioning](/reference/api-guide/versioning).","operationId":"archive_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/{workflow_variant_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Workflow Variant","description":"Restore a previously archived workflow variant.\n\nClears `deleted_at` on the variant and its revisions. See\n[Versioning](/reference/api-guide/versioning).","operationId":"unarchive_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/query":{"post":{"tags":["Workflows"],"summary":"Query Workflow Variants","description":"Query workflow variants with filters and pagination.\n\nScope the query by `workflow_refs` (parent artifact) or\n`workflow_variant_refs` (specific variants). Accepts the same fields\nas query parameters or in the request body.\n\nSee: [Query Pattern](/reference/api-guide/query-pattern).","operationId":"query_workflow_variants","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}},{"name":"workflow_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Variant Ids"}},{"name":"workflow_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Variant Slug"}},{"name":"workflow_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/fork":{"post":{"tags":["Workflows"],"summary":"Fork Workflow Variant","operationId":"fork_workflow_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowForkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/retrieve":{"post":{"tags":["Workflows"],"summary":"Retrieve Workflow Revision","operationId":"retrieve_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/deploy":{"post":{"tags":["Workflows"],"summary":"Deploy Workflow Revision","operationId":"deploy_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionDeployRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/":{"post":{"tags":["Workflows"],"summary":"Create Workflow Revision","operationId":"create_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/{workflow_revision_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Revision","operationId":"fetch_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Workflow Revision","operationId":"edit_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/{workflow_revision_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Workflow Revision","operationId":"archive_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/{workflow_revision_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Workflow Revision","operationId":"unarchive_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/query":{"post":{"tags":["Workflows"],"summary":"Query Workflow Revisions","operationId":"query_workflow_revisions","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}},{"name":"workflow_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Variant Ids"}},{"name":"workflow_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Variant Slug"}},{"name":"workflow_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Variant Slugs"}},{"name":"workflow_revision_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"}},{"name":"workflow_revision_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Revision Ids"}},{"name":"workflow_revision_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Revision Slug"}},{"name":"workflow_revision_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Revision Slugs"}},{"name":"workflow_revision_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Revision Version"}},{"name":"workflow_revision_versions","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Revision Versions"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/commit":{"post":{"tags":["Workflows"],"summary":"Commit Workflow Revision","operationId":"commit_workflow_revision","parameters":[{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionCommitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/log":{"post":{"tags":["Workflows"],"summary":"Log Workflow Revisions","operationId":"log_workflow_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/resolve":{"post":{"tags":["Workflows"],"summary":"Resolve Workflow Revision Endpoint","description":"Resolve embedded references in a workflow revision configuration.\n\nThis endpoint:\n1. Fetches the workflow revision\n2. Resolves all @ag.references tokens in the configuration\n3. Returns the revision with resolved configuration + metadata","operationId":"resolve_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/":{"post":{"tags":["Workflows"],"summary":"Create Simple Workflow","operationId":"create_simple_workflow","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/{workflow_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Simple Workflow","operationId":"fetch_simple_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Simple Workflow","operationId":"edit_simple_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/{workflow_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Simple Workflow","operationId":"archive_simple_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/{workflow_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Simple Workflow","operationId":"unarchive_simple_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/query":{"post":{"tags":["Workflows"],"summary":"Query Simple Workflows","operationId":"query_simple_workflows","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/catalog/types/":{"get":{"tags":["Evaluators"],"summary":"List Evaluator Catalog Types","description":"List the JSON schema types the evaluator catalog understands.\n\nTypes are static metadata shipped with the product. Use this when\nrendering a catalog UI or validating that a template's schema is\nsupported. See the Evaluators guide for how the catalog relates\nto user-owned evaluator artifacts.","operationId":"list_evaluator_catalog_types","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogTypesResponse"}}}}}}},"/evaluators/catalog/templates/":{"get":{"tags":["Evaluators"],"summary":"List Evaluator Catalog Templates","description":"List evaluator templates from the catalog.\n\nTemplates are blueprints that describe an evaluator's handler\nURI, JSON schemas, and default configuration. Pass\n`include_archived=true` to include deprecated templates. Use the\nreturned `key` with `/catalog/templates/{template_key}/presets/`\nto list its presets.","operationId":"list_evaluator_catalog_templates","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogTemplatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/catalog/templates/{template_key}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Catalog Template","description":"Fetch one evaluator template by key.\n\nReturns an empty envelope (`count: 0`) when no template matches\nthe key. Template keys come from\n`GET /catalog/templates/`.","operationId":"fetch_evaluator_catalog_template","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/catalog/templates/{template_key}/presets/":{"get":{"tags":["Evaluators"],"summary":"List Evaluator Catalog Presets","description":"List presets defined against one evaluator template.\n\nA preset is a named set of parameter values pre-filled against\nthe template. Use the returned `key` to fetch a specific preset\nvia `GET /catalog/templates/{template_key}/presets/{preset_key}`.","operationId":"list_evaluator_catalog_presets","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogPresetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/catalog/templates/{template_key}/presets/{preset_key}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Catalog Preset","description":"Fetch one evaluator preset by template and preset key.\n\nPresets are not separate entities; they are metadata. Use the\nreturned preset payload as the starting point when creating a\nnew evaluator from a template. See the Evaluators guide.","operationId":"fetch_evaluator_catalog_preset","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"preset_key","in":"path","required":true,"schema":{"type":"string","title":"Preset Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogPresetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/":{"post":{"tags":["Evaluators"],"summary":"Create Evaluator","description":"Create an evaluator artifact, its first variant, and its initial revision.\n\nUse this endpoint when you already know you want to manage the\nartifact / variant / revision layers independently. For a\none-shot \"create and forget\" call that returns a flat record,\nsee `POST /simple/evaluators/`. See the Versioning guide for\ncommit semantics.","operationId":"create_evaluator","parameters":[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/{evaluator_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator","description":"Fetch an evaluator artifact by id.\n\nReturns the artifact-level record (slug, name, flags, lifecycle)\nwithout variant or revision data. Use the variant and revision\nendpoints to retrieve those layers.","operationId":"fetch_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Evaluator","description":"Edit an evaluator artifact's metadata.\n\nEdits are limited to metadata fields (description, tags, meta).\nRenaming is temporarily disabled and returns 400. To change\nevaluator behavior, commit a new revision on the variant — see\n`/evaluators/revisions/commit`.","operationId":"edit_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/{evaluator_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Evaluator","description":"Soft-delete an evaluator artifact.\n\nSets `deleted_at` on the evaluator and hides it from subsequent\n`/query` responses unless `include_archived=true`. Revision IDs\nremain resolvable so historical traces stay intact.","operationId":"archive_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/{evaluator_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Evaluator","description":"Restore a soft-deleted evaluator artifact.\n\nClears `deleted_at` on the evaluator so it re-appears in `/query`\nresponses.","operationId":"unarchive_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/query":{"post":{"tags":["Evaluators"],"summary":"Query Evaluators","description":"Query evaluator artifacts with filters and pagination.\n\nReturns artifact-level records only. The request body follows\nthe shared query pattern (filter + refs + windowing). Send `{}`\nto list all evaluators in the project. See the Query Pattern\nguide.","operationId":"query_evaluators","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/":{"post":{"tags":["Evaluators"],"summary":"Create Evaluator Variant","description":"Create a new variant on an existing evaluator.\n\nA variant is a named branch of the evaluator's history. New\nrevisions committed to this variant do not touch other variants.\nSee the Versioning guide.","operationId":"create_evaluator_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/{evaluator_variant_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Variant","description":"Fetch an evaluator variant by id.\n\nReturns the variant record (slug, flags, lifecycle) without the\ncommitted revisions. Use `/evaluators/revisions/retrieve` to\nread the variant's current revision payload.","operationId":"fetch_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Evaluator Variant","description":"Edit a variant's metadata.\n\nEdits only touch variant-level metadata. To change evaluator\nbehavior commit a new revision via\n`/evaluators/revisions/commit`.","operationId":"edit_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/{evaluator_variant_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Evaluator Variant","description":"Soft-delete an evaluator variant.\n\nSets `deleted_at` on the variant. Its revisions stay resolvable\nby id; they are hidden from `/query` unless the caller sets\n`include_archived=true`.","operationId":"archive_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/{evaluator_variant_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Evaluator Variant","description":"Restore a soft-deleted evaluator variant.","operationId":"unarchive_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/query":{"post":{"tags":["Evaluators"],"summary":"Query Evaluator Variants","description":"Query evaluator variants with filters, reference scoping, and pagination.\n\nAccepts parameters from both the query string and a JSON body;\nthe two are merged. Use `evaluator_refs` to scope to one or more\nevaluators, or `evaluator_variant_refs` for specific variants.","operationId":"query_evaluator_variants","parameters":[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}},{"name":"evaluator_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Evaluator Ids"}},{"name":"evaluator_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Slug"}},{"name":"evaluator_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Evaluator Slugs"}},{"name":"evaluator_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"}},{"name":"evaluator_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Evaluator Variant Ids"}},{"name":"evaluator_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Variant Slug"}},{"name":"evaluator_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Evaluator Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/fork":{"post":{"tags":["Evaluators"],"summary":"Fork Evaluator Variant","description":"Fork an evaluator variant into a new variant.\n\nCreates a new branch whose initial revision is copied from the\nsource. Use this to experiment without touching the original.\nThe returned variant has a fresh id and slug but inherits\nlineage metadata from its source.","operationId":"fork_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorForkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/retrieve":{"post":{"tags":["Evaluators"],"summary":"Retrieve Evaluator Revision","description":"Retrieve one evaluator revision, either directly or via an environment key.\n\nProvide one of:\nan evaluator / variant / revision reference (returns that\nrevision, or the latest revision on the variant or evaluator),\nor an environment reference plus `key` (returns the revision\ncurrently pinned to that key). Supplying both forms returns 400.\nPass `resolve=true` to expand embedded references on the\nreturned payload.","operationId":"retrieve_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/deploy":{"post":{"tags":["Evaluators"],"summary":"Deploy Evaluator Revision","description":"Pin an evaluator revision into an environment revision under a key.\n\nRequires an evaluator ref (`evaluator_ref`,\n`evaluator_variant_ref`, or `evaluator_revision_ref`) and an\nenvironment ref. When `key` is omitted it defaults to\n`.revision`. The deployment is recorded as a\nnew commit on the environment revision. See the Evaluators\nguide for the deployment model.","operationId":"deploy_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionDeployRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/":{"post":{"tags":["Evaluators"],"summary":"Create Evaluator Revision","description":"Create a new revision on an evaluator variant.\n\nPrefer `/evaluators/revisions/commit` for the standard commit\nflow. This endpoint exists for internal create paths that need\nto insert a revision without the commit semantics.","operationId":"create_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/{evaluator_revision_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Revision","description":"Fetch a specific evaluator revision by id.\n\nReturns the full revision including `data` (handler uri,\nschemas, and parameters). To pick the latest revision on a\nvariant without knowing its id, use\n`/evaluators/revisions/retrieve`.","operationId":"fetch_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Evaluator Revision","description":"Edit a revision's metadata.\n\nRevision `data` is immutable once committed. This endpoint is\nfor metadata fields only (description, tags, meta). To change\nevaluator behavior, commit a new revision instead.","operationId":"edit_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/{evaluator_revision_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Evaluator Revision","description":"Soft-delete an evaluator revision.\n\nArchived revisions remain resolvable by id but are excluded from\nrevision logs and queries unless `include_archived=true`.","operationId":"archive_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/{evaluator_revision_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Evaluator Revision","description":"Restore a soft-deleted evaluator revision.","operationId":"unarchive_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/query":{"post":{"tags":["Evaluators"],"summary":"Query Evaluator Revisions","description":"Query evaluator revisions with filters, reference scoping, and pagination.\n\nReturns revision payloads. Use `evaluator_refs`,\n`evaluator_variant_refs`, or `evaluator_revision_refs` to scope\nthe query. Pass `resolve=true` to expand embedded references on\neach revision's `data`.","operationId":"query_evaluator_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/commit":{"post":{"tags":["Evaluators"],"summary":"Commit Evaluator Revision","description":"Commit a new revision on an evaluator variant.\n\nThe commit body carries the target `evaluator_variant_id`, an\noptional `message`, and the revision `data` (handler uri,\nschemas, parameters). A committed revision is immutable.","operationId":"commit_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/log":{"post":{"tags":["Evaluators"],"summary":"Log Evaluator Revisions","description":"List the revision log of an evaluator variant.\n\nReturns revisions in commit order. Scope the log by supplying\nan evaluator, variant, or revision reference. Use the retrieve\nendpoint to fetch a specific revision's full payload.","operationId":"log_evaluator_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/resolve":{"post":{"tags":["Evaluators"],"summary":"Resolve Evaluator Revision","description":"Resolve embedded references on an evaluator revision's `data`.\n\nWalks embedded references (for example, references to other\nrevisions or to secrets) up to `max_depth` and `max_embeds`.\nThe response includes a `resolution_info` block with counts,\ndepth reached, and errors according to `error_policy`.","operationId":"resolve_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/":{"post":{"tags":["Evaluators"],"summary":"Create Simple Evaluator","description":"Create an evaluator via the simple surface.\n\nCreates the artifact, its first variant, and its initial\nrevision in one call. Returns the flat evaluator record\n(latest revision merged into `data`). Use this when you do not\nneed to manage variants or revisions directly.","operationId":"create_simple_evaluator","parameters":[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/templates":{"get":{"tags":["Evaluators"],"summary":"List Evaluator Templates","description":"List the legacy built-in evaluator templates.\n\nReturns static evaluator-type definitions shipped with the\nproduct. Prefer the `/evaluators/catalog/*` endpoints for new\nintegrations; this endpoint is kept for older clients. Pass\n`include_archived=true` to include deprecated templates.","operationId":"list_evaluator_templates","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorTemplatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/{evaluator_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Simple Evaluator","description":"Fetch one evaluator via the simple surface.\n\nReturns the flat evaluator record including its current variant\nand revision ids and the merged `data` payload.","operationId":"fetch_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Simple Evaluator","description":"Edit an evaluator via the simple surface.\n\nTouches metadata and (when `data` is supplied) commits a new\nrevision on the evaluator's variant. Renaming is temporarily\ndisabled and returns 400.","operationId":"edit_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/{evaluator_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Simple Evaluator","description":"Soft-delete an evaluator via the simple surface.\n\nArchives the underlying artifact. Historical traces that\nreference specific revision ids remain resolvable.","operationId":"archive_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/{evaluator_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Simple Evaluator","description":"Restore a soft-deleted evaluator via the simple surface.","operationId":"unarchive_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/query":{"post":{"tags":["Evaluators"],"summary":"Query Simple Evaluators","description":"Query evaluators via the simple surface with filters and pagination.\n\nReturns flat evaluator records (one per artifact with its\nlatest variant and revision merged into `data`). Send `{}` to\nlist all evaluators in the project. See the Query Pattern\nguide.","operationId":"query_simple_evaluators","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/":{"post":{"tags":["Environments"],"summary":"Create Environment","operationId":"create_environment","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/{environment_id}":{"get":{"tags":["Environments"],"summary":"Fetch Environment","operationId":"fetch_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Environments"],"summary":"Edit Environment","operationId":"edit_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/{environment_id}/archive":{"post":{"tags":["Environments"],"summary":"Archive Environment","operationId":"archive_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/{environment_id}/unarchive":{"post":{"tags":["Environments"],"summary":"Unarchive Environment","operationId":"unarchive_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/query":{"post":{"tags":["Environments"],"summary":"Query Environments","operationId":"query_environments","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}},{"name":"environment_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Ids"}},{"name":"environment_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Slug"}},{"name":"environment_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/":{"post":{"tags":["Environments"],"summary":"Create Environment Variant","operationId":"create_environment_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/{environment_variant_id}":{"get":{"tags":["Environments"],"summary":"Fetch Environment Variant","operationId":"fetch_environment_variant","parameters":[{"name":"environment_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Environments"],"summary":"Edit Environment Variant","operationId":"edit_environment_variant","parameters":[{"name":"environment_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/{environment_variant_id}/archive":{"post":{"tags":["Environments"],"summary":"Archive Environment Variant","operationId":"archive_environment_variant","parameters":[{"name":"environment_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/{environment_variant_id}/unarchive":{"post":{"tags":["Environments"],"summary":"Unarchive Environment Variant","operationId":"unarchive_environment_variant","parameters":[{"name":"environment_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/query":{"post":{"tags":["Environments"],"summary":"Query Environment Variants","operationId":"query_environment_variants","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}},{"name":"environment_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Ids"}},{"name":"environment_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Slug"}},{"name":"environment_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Slugs"}},{"name":"environment_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"}},{"name":"environment_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Variant Ids"}},{"name":"environment_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Variant Slug"}},{"name":"environment_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/retrieve":{"post":{"tags":["Environments"],"summary":"Retrieve Environment Revision","operationId":"retrieve_environment_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/":{"post":{"tags":["Environments"],"summary":"Create Environment Revision","operationId":"create_environment_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/{environment_revision_id}":{"get":{"tags":["Environments"],"summary":"Fetch Environment Revision","operationId":"fetch_environment_revision","parameters":[{"name":"environment_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Environments"],"summary":"Edit Environment Revision","operationId":"edit_environment_revision","parameters":[{"name":"environment_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/{environment_revision_id}/archive":{"post":{"tags":["Environments"],"summary":"Archive Environment Revision","operationId":"archive_environment_revision","parameters":[{"name":"environment_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/{environment_revision_id}/unarchive":{"post":{"tags":["Environments"],"summary":"Unarchive Environment Revision","operationId":"unarchive_environment_revision","parameters":[{"name":"environment_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/query":{"post":{"tags":["Environments"],"summary":"Query Environment Revisions","operationId":"query_environment_revisions","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}},{"name":"environment_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Ids"}},{"name":"environment_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Slug"}},{"name":"environment_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Slugs"}},{"name":"environment_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"}},{"name":"environment_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Variant Ids"}},{"name":"environment_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Variant Slug"}},{"name":"environment_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Variant Slugs"}},{"name":"environment_revision_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Revision Id"}},{"name":"environment_revision_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Revision Ids"}},{"name":"environment_revision_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Revision Slug"}},{"name":"environment_revision_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Revision Slugs"}},{"name":"environment_revision_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Revision Version"}},{"name":"environment_revision_versions","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Revision Versions"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/commit":{"post":{"tags":["Environments"],"summary":"Commit Environment Revision","operationId":"commit_environment_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/log":{"post":{"tags":["Environments"],"summary":"Log Environment Revisions","operationId":"log_environment_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/resolve":{"post":{"tags":["Environments"],"summary":"Resolve Environment Revision Endpoint","description":"Resolve embedded references in an environment revision configuration.\n\nThis endpoint:\n1. Fetches the environment revision\n2. Resolves all @ag.references tokens in the configuration\n3. Returns the revision with resolved configuration + metadata","operationId":"resolve_environment_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/":{"post":{"tags":["Environments"],"summary":"Create Simple Environment","operationId":"create_simple_environment","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}":{"get":{"tags":["Environments"],"summary":"Fetch Simple Environment","operationId":"fetch_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Environments"],"summary":"Edit Simple Environment","operationId":"edit_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}/archive":{"post":{"tags":["Environments"],"summary":"Archive Simple Environment","operationId":"archive_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}/unarchive":{"post":{"tags":["Environments"],"summary":"Unarchive Simple Environment","operationId":"unarchive_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/query":{"post":{"tags":["Environments"],"summary":"Query Simple Environments","operationId":"query_simple_environments","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}/guard":{"post":{"tags":["Environments"],"summary":"Guard Simple Environment","operationId":"guard_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}/unguard":{"post":{"tags":["Environments"],"summary":"Unguard Simple Environment","operationId":"unguard_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/configs/fetch":{"post":{"tags":["Deprecated"],"summary":"Configs Fetch","operationId":"configs_fetch_variants_configs_fetch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_configs_fetch_variants_configs_fetch_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tools/catalog/providers/":{"get":{"tags":["Tools"],"summary":"List Providers","operationId":"list_tool_providers","parameters":[{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogProvidersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}":{"get":{"tags":["Tools"],"summary":"Get Provider","operationId":"fetch_tool_provider","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}/integrations/":{"get":{"tags":["Tools"],"summary":"List Integrations","operationId":"list_tool_integrations","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogIntegrationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}/integrations/{integration_key}":{"get":{"tags":["Tools"],"summary":"Get Integration","operationId":"fetch_tool_integration","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"integration_key","in":"path","required":true,"schema":{"type":"string","title":"Integration Key"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogIntegrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}/integrations/{integration_key}/actions/":{"get":{"tags":["Tools"],"summary":"List Actions","operationId":"list_tool_actions","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"integration_key","in":"path","required":true,"schema":{"type":"string","title":"Integration Key"}},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"}},{"name":"categories","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Categories"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogActionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}/integrations/{integration_key}/actions/{action_key}":{"get":{"tags":["Tools"],"summary":"Get Action","operationId":"fetch_tool_action","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"integration_key","in":"path","required":true,"schema":{"type":"string","title":"Integration Key"}},{"name":"action_key","in":"path","required":true,"schema":{"type":"string","title":"Action Key"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/query":{"post":{"tags":["Tools"],"summary":"Query Connections","description":"Query connections with optional filtering.","operationId":"query_tool_connections","parameters":[{"name":"provider_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Key"}},{"name":"integration_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/":{"post":{"tags":["Tools"],"summary":"Create Connection","description":"Create a new tool connection.","operationId":"create_tool_connection","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/callback":{"get":{"tags":["Tools"],"summary":"Callback Connection","description":"Handle OAuth callback from Composio.","operationId":"callback_tool_connection","parameters":[{"name":"connected_account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected Account Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"error_message","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/{connection_id}":{"get":{"tags":["Tools"],"summary":"Get Connection","description":"Get a connection by ID.","operationId":"fetch_tool_connection","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Tools"],"summary":"Delete Connection","description":"Delete a connection by ID.","operationId":"delete_tool_connection","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/{connection_id}/refresh":{"post":{"tags":["Tools"],"summary":"Refresh Connection","description":"Refresh a connection's credentials.","operationId":"refresh_tool_connection","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/{connection_id}/revoke":{"post":{"tags":["Tools"],"summary":"Revoke Connection","description":"Mark a connection invalid locally (does not revoke at the provider).","operationId":"revoke_tool_connection","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/call":{"post":{"tags":["Tools"],"summary":"Call Tool","description":"Call a tool action with a connection.","operationId":"call_tool","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCall"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/":{"post":{"tags":["Evaluations"],"summary":"Create Runs","operationId":"create_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Runs","operationId":"delete_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Runs","operationId":"edit_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/query":{"post":{"tags":["Evaluations"],"summary":"Query Runs","operationId":"query_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/close":{"post":{"tags":["Evaluations"],"summary":"Close Runs","operationId":"close_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/open":{"post":{"tags":["Evaluations"],"summary":"Open Runs","operationId":"open_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/{run_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Run","operationId":"fetch_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Run","operationId":"edit_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Run","operationId":"delete_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/{run_id}/close":{"post":{"tags":["Evaluations"],"summary":"Close Run","operationId":"close_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/{run_id}/close/{status}":{"post":{"tags":["Evaluations"],"summary":"Close Run","operationId":"close_run_with_status","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"status","in":"path","required":true,"schema":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/{run_id}/open":{"post":{"tags":["Evaluations"],"summary":"Open Run","operationId":"open_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/scenarios/":{"post":{"tags":["Evaluations"],"summary":"Create Scenarios","operationId":"create_scenarios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Scenarios","operationId":"delete_scenarios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Scenarios","operationId":"edit_scenarios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/scenarios/query":{"post":{"tags":["Evaluations"],"summary":"Query Scenarios","operationId":"query_scenarios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/scenarios/{scenario_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Scenario","operationId":"fetch_scenario","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Scenario","operationId":"edit_scenario","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Scenario","operationId":"delete_scenario","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/results/":{"post":{"tags":["Evaluations"],"summary":"Create Results","operationId":"create_results","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Results","operationId":"delete_results","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Results","operationId":"edit_results","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/results/query":{"post":{"tags":["Evaluations"],"summary":"Query Results","operationId":"query_results","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/results/{result_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Result","operationId":"fetch_result","parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Result","operationId":"edit_result","parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Result","operationId":"delete_result","parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/metrics/refresh":{"post":{"tags":["Evaluations"],"summary":"Refresh Metrics","operationId":"refresh_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsRefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/metrics/":{"post":{"tags":["Evaluations"],"summary":"Create Metrics","operationId":"create_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Metrics","operationId":"delete_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Metrics","operationId":"edit_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/metrics/query":{"post":{"tags":["Evaluations"],"summary":"Query Metrics","operationId":"query_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/queues/":{"post":{"tags":["Evaluations"],"summary":"Create Queues","operationId":"create_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Queues","operationId":"delete_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Queues","operationId":"edit_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/queues/query":{"post":{"tags":["Evaluations"],"summary":"Query Queues","operationId":"query_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/queues/{queue_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Queue","operationId":"fetch_queue","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Queue","operationId":"edit_queue","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Queue","operationId":"delete_queue","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/queues/{queue_id}/scenarios/query":{"post":{"tags":["Evaluations"],"summary":"Query Queue Scenarios","operationId":"query_evaluation_queue_scenarios","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueScenariosQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/":{"post":{"tags":["Evaluations"],"summary":"Create Evaluation","operationId":"create_simple_evaluation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Evaluation","operationId":"fetch_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Evaluation","operationId":"edit_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Evaluation","operationId":"delete_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/query":{"post":{"tags":["Evaluations"],"summary":"Query Evaluations","operationId":"query_simple_evaluations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}/start":{"post":{"tags":["Evaluations"],"summary":"Start Evaluation","operationId":"start_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}/stop":{"post":{"tags":["Evaluations"],"summary":"Stop Evaluation","operationId":"stop_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}/close":{"post":{"tags":["Evaluations"],"summary":"Close Evaluation","operationId":"close_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}/open":{"post":{"tags":["Evaluations"],"summary":"Open Evaluation","operationId":"open_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/":{"post":{"tags":["Evaluations"],"summary":"Create Queue","operationId":"create_simple_queue","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/query":{"post":{"tags":["Evaluations"],"summary":"Query Queues","operationId":"query_simple_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/{queue_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Queue","operationId":"fetch_simple_queue","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/{queue_id}/scenarios/query":{"post":{"tags":["Evaluations"],"summary":"Query Queue Scenarios","operationId":"query_simple_queue_scenarios","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueScenariosQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/{queue_id}/traces/":{"post":{"tags":["Evaluations"],"summary":"Add Queue Traces","operationId":"add_simple_queue_traces","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueTracesCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/{queue_id}/testcases/":{"post":{"tags":["Evaluations"],"summary":"Add Queue Testcases","operationId":"add_simple_queue_testcases","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueTestcasesCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounts/":{"post":{"tags":["Admin"],"summary":"Create accounts","operationId":"create_accounts_admin_accounts__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete accounts","operationId":"delete_accounts_admin_accounts__delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsDelete"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/":{"post":{"tags":["Admin"],"summary":"Create simple accounts","operationId":"create_simple_accounts_admin_simple_accounts__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete simple accounts","operationId":"delete_simple_accounts_admin_simple_accounts__delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsDelete"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/users/":{"post":{"tags":["Admin"],"summary":"Create users","operationId":"create_user_admin_simple_accounts_users__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsUsersCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/users/{user_id}":{"delete":{"tags":["Admin"],"summary":"Delete user","operationId":"delete_user_admin_simple_accounts_users__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/users/identities/":{"post":{"tags":["Admin"],"summary":"Create user identities","operationId":"create_user_identity_admin_simple_accounts_users_identities__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsUsersIdentitiesCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/users/{user_id}/identities/{identity_id}":{"delete":{"tags":["Admin"],"summary":"Delete user identity","operationId":"delete_user_identity_admin_simple_accounts_users__user_id__identities__identity_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","title":"Identity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/organizations/":{"post":{"tags":["Admin"],"summary":"Create organizations","operationId":"create_organization_admin_simple_accounts_organizations__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsOrganizationsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/organizations/{organization_id}":{"delete":{"tags":["Admin"],"summary":"Delete organization","operationId":"delete_organization_admin_simple_accounts_organizations__organization_id__delete","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/organizations/memberships/":{"post":{"tags":["Admin"],"summary":"Create organization memberships","operationId":"create_organization_membership_admin_simple_accounts_organizations_memberships__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsOrganizationsMembershipsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/organizations/{organization_id}/memberships/{membership_id}":{"delete":{"tags":["Admin"],"summary":"Delete organization membership","operationId":"delete_organization_membership_admin_simple_accounts_organizations__organization_id__memberships__membership_id__delete","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","title":"Membership Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/workspaces/":{"post":{"tags":["Admin"],"summary":"Create workspaces","operationId":"create_workspace_admin_simple_accounts_workspaces__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsWorkspacesCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/workspaces/{workspace_id}":{"delete":{"tags":["Admin"],"summary":"Delete workspace","operationId":"delete_workspace_admin_simple_accounts_workspaces__workspace_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/workspaces/memberships/":{"post":{"tags":["Admin"],"summary":"Create workspace memberships","operationId":"create_workspace_membership_admin_simple_accounts_workspaces_memberships__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsWorkspacesMembershipsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/workspaces/{workspace_id}/memberships/{membership_id}":{"delete":{"tags":["Admin"],"summary":"Delete workspace membership","operationId":"delete_workspace_membership_admin_simple_accounts_workspaces__workspace_id__memberships__membership_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","title":"Membership Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/projects/":{"post":{"tags":["Admin"],"summary":"Create projects","operationId":"create_project_admin_simple_accounts_projects__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsProjectsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/projects/{project_id}":{"delete":{"tags":["Admin"],"summary":"Delete project","operationId":"delete_project_admin_simple_accounts_projects__project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/projects/memberships/":{"post":{"tags":["Admin"],"summary":"Create project memberships","operationId":"create_project_membership_admin_simple_accounts_projects_memberships__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsProjectsMembershipsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/projects/{project_id}/memberships/{membership_id}":{"delete":{"tags":["Admin"],"summary":"Delete project membership","operationId":"delete_project_membership_admin_simple_accounts_projects__project_id__memberships__membership_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","title":"Membership Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/api-keys/":{"post":{"tags":["Admin"],"summary":"Create API keys","operationId":"create_api_key_admin_simple_accounts_api_keys__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsApiKeysCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/api-keys/{api_key_id}":{"delete":{"tags":["Admin"],"summary":"Delete API key","operationId":"delete_api_key_admin_simple_accounts_api_keys__api_key_id__delete","parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","title":"Api Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/reset-password":{"post":{"tags":["Admin"],"summary":"Reset user password","operationId":"reset_password_admin_simple_accounts_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsUsersResetPassword"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/transfer-ownership":{"post":{"tags":["Admin"],"summary":"Transfer organization ownership","operationId":"transfer_ownership_admin_simple_accounts_transfer_ownership_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsOrganizationsTransferOwnership"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"200":{"description":"Partial transfer — some orgs could not be transferred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsOrganizationsTransferOwnershipResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["Status"],"summary":"Health Check","operationId":"health_check","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/permissions/verify":{"get":{"tags":["Access"],"summary":"Verify Permissions","operationId":"verify_permissions","parameters":[{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"scope_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Type"}},{"name":"scope_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scope Id"}},{"name":"resource_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type"}},{"name":"resource_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects":{"get":{"tags":["Projects"],"summary":"Get Projects","operationId":"get_projects","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProjectsResponse"},"type":"array","title":"Response Get Projects"}}}}}},"post":{"tags":["Projects"],"summary":"Create Project","operationId":"create_project","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}":{"get":{"tags":["Projects"],"summary":"Get Project","operationId":"get_project","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Projects"],"summary":"Delete Project","operationId":"delete_project","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Projects"],"summary":"Update Project","operationId":"update_project","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile":{"get":{"tags":["Users"],"summary":"User Profile","operationId":"fetch_user_profile","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/profile/username":{"put":{"tags":["Users"],"summary":"Update User Username","operationId":"update_user_username","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/reset-password":{"post":{"tags":["Users"],"summary":"Reset User Password","operationId":"reset_user_password","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/keys":{"get":{"tags":["Keys"],"summary":"List Api Keys","description":"List all API keys associated with the authenticated user.\n\nArgs:\n request (Request): The incoming request object.\n\nReturns:\n List[ListAPIKeysResponse]: A list of API Keys associated with the user.","operationId":"list_api_keys","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ListAPIKeysResponse"},"type":"array","title":"Response List Api Keys"}}}}}},"post":{"tags":["Keys"],"summary":"Create Api Key","description":"Creates an API key for a user.\n\nArgs:\n request (Request): The request object containing the user ID in the request state.\n\nReturns:\n str: The created API key.","operationId":"create_api_key","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Create Api Key"}}}}}}},"/keys/{key_prefix}":{"delete":{"tags":["Keys"],"summary":"Delete Api Key","description":"Delete an API key with the given key prefix for the authenticated user.\n\nArgs:\n key_prefix (str): The prefix of the API key to be deleted.\n request (Request): The incoming request object.\n\nReturns:\n dict: A dictionary containing a success message upon successful deletion.\n\nRaises:\n HTTPException: If the API key is not found or does not belong to the user.","operationId":"delete_api_key","parameters":[{"name":"key_prefix","in":"path","required":true,"schema":{"type":"string","title":"Key Prefix"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Api Key"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}/invite":{"post":{"tags":["Organizations"],"summary":"Invite User To Organization","description":"Assigns a role to a user in an organization.\n\nArgs:\n organization_id (str): The ID of the organization.\n payload (InviteRequest): The payload containing the organization id, user email, and role to assign.\n workspace_id (str): The ID of the workspace.\n\nReturns:\n bool: True if the role was successfully assigned, False otherwise.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.\n HTTPException: If there is an error assigning the role to the user.","operationId":"invite_user_to_workspace","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InviteRequest"},"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}/invite/resend":{"post":{"tags":["Organizations"],"summary":"Resend User Invitation To Organization","description":"Resend an invitation to a user to an Organization.\n\nRaises:\n HTTPException: _description_; status_code: 500\n HTTPException: Invitation not found or has expired; status_code: 400\n HTTPException: You already belong to this organization; status_code: 400\n\nReturns:\n JSONResponse: Resent invitation to user; status_code: 200","operationId":"resend_invitation","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendInviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}/invite/accept":{"post":{"tags":["Organizations"],"summary":"Accept Organization Invitation","description":"Accept an invitation to an organization.\n\nRaises:\n HTTPException: _description_; status_code: 500\n HTTPException: Invitation not found or has expired; status_code: 400\n HTTPException: You already belong to this organization; status_code: 400\n\nReturns:\n JSONResponse: Accepted invitation to workspace; status_code: 200","operationId":"accept_invitation","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"project_id","in":"query","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteToken"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces":{"get":{"tags":["Workspaces"],"summary":"Get Workspace","description":"Get workspace details.\n\nReturns details about the workspace associated with the user's session.\n\nReturns:\n Workspace: The details of the workspace.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.","operationId":"get_workspace","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Workspace"},"type":"array","title":"Response Get Workspace"}}}}}}},"/workspaces/roles":{"get":{"tags":["Workspaces"],"summary":"Get All Workspace Roles","description":"Get all workspace roles.\n\nReturns a list of all available workspace roles.\n\nReturns:\n List[WorkspaceRoleResponse]: A list of WorkspaceRole objects representing the available workspace roles.\n\nRaises:\n HTTPException: If an error occurs while retrieving the workspace roles.","operationId":"get_all_workspace_roles","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Response Get All Workspace Roles"}}}}}}},"/workspaces/{workspace_id}/users":{"delete":{"tags":["Workspaces"],"summary":"Remove User From Workspace","description":"Remove a user from a workspace.\n\nArgs:\n email (str): The email address of the user to be removed\n workspace_id (str): The ID of the workspace.","operationId":"remove_user_from_workspace","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AdminAccountCreateOptions":{"properties":{"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","default":false},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"},"create_identities":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Create Identities"},"create_api_keys":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Create Api Keys"},"return_api_keys":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Return Api Keys"},"seed_defaults":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Seed Defaults","default":true},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"AdminAccountCreateOptions"},"AdminAccountRead":{"properties":{"users":{"additionalProperties":{"$ref":"#/components/schemas/AdminUserRead"},"type":"object","title":"Users","default":{}},"user_identities":{"additionalProperties":{"$ref":"#/components/schemas/AdminUserIdentityRead"},"type":"object","title":"User Identities","default":{}},"organizations":{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationRead"},"type":"object","title":"Organizations","default":{}},"workspaces":{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceRead"},"type":"object","title":"Workspaces","default":{}},"projects":{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectRead"},"type":"object","title":"Projects","default":{}},"organization_memberships":{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationMembershipRead"},"type":"object","title":"Organization Memberships","default":{}},"workspace_memberships":{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceMembershipRead"},"type":"object","title":"Workspace Memberships","default":{}},"project_memberships":{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectMembershipRead"},"type":"object","title":"Project Memberships","default":{}},"subscriptions":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminSubscriptionRead"},"type":"object"},{"type":"null"}],"title":"Subscriptions"},"api_keys":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminApiKeyResponse"},"type":"object"},{"type":"null"}],"title":"Api Keys"}},"type":"object","title":"AdminAccountRead","description":"Per-account projection in the full graph response (plural entity maps)."},"AdminAccountsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"users":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminUserCreate"},"type":"object"},{"type":"null"}],"title":"Users"},"user_identities":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminUserIdentityCreate"},"type":"object"},{"type":"null"}],"title":"User Identities"},"organizations":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationCreate"},"type":"object"},{"type":"null"}],"title":"Organizations"},"workspaces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceCreate"},"type":"object"},{"type":"null"}],"title":"Workspaces"},"projects":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectCreate"},"type":"object"},{"type":"null"}],"title":"Projects"},"organization_memberships":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationMembershipCreate"},"type":"object"},{"type":"null"}],"title":"Organization Memberships"},"workspace_memberships":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceMembershipCreate"},"type":"object"},{"type":"null"}],"title":"Workspace Memberships"},"project_memberships":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectMembershipCreate"},"type":"object"},{"type":"null"}],"title":"Project Memberships"},"api_keys":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminApiKeyCreate"},"type":"object"},{"type":"null"}],"title":"Api Keys"},"subscriptions":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminSubscriptionCreate"},"type":"object"},{"type":"null"}],"title":"Subscriptions"}},"type":"object","title":"AdminAccountsCreate"},"AdminAccountsDelete":{"properties":{"target":{"$ref":"#/components/schemas/AdminAccountsDeleteTarget"},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","default":true},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"confirm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirm"}},"type":"object","required":["target"],"title":"AdminAccountsDelete"},"AdminAccountsDeleteTarget":{"properties":{"user_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"User Ids"},"user_emails":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"User Emails"},"organization_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Organization Ids"},"workspace_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Workspace Ids"},"project_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Project Ids"}},"type":"object","title":"AdminAccountsDeleteTarget"},"AdminAccountsResponse":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/AdminAccountRead"},"type":"array","title":"Accounts","default":[]},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminStructuredError"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","title":"AdminAccountsResponse"},"AdminApiKeyCreate":{"properties":{"project_ref":{"$ref":"#/components/schemas/EntityRef"},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["project_ref","user_ref"],"title":"AdminApiKeyCreate"},"AdminApiKeyResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"prefix":{"type":"string","title":"Prefix"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"project_id":{"type":"string","title":"Project Id"},"user_id":{"type":"string","title":"User Id"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"revoked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoked At"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"returned_once":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Returned Once"}},"type":"object","required":["prefix","project_id","user_id"],"title":"AdminApiKeyResponse"},"AdminDeleteResponse":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","default":false},"deleted":{"$ref":"#/components/schemas/AdminDeletedEntities","default":{}},"skipped":{"anyOf":[{"$ref":"#/components/schemas/AdminDeletedEntities"},{"type":"null"}]},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminStructuredError"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","title":"AdminDeleteResponse"},"AdminDeletedEntities":{"properties":{"users":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Users"},"user_identities":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"User Identities"},"organizations":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Organizations"},"workspaces":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Workspaces"},"projects":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Projects"},"organization_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Organization Memberships"},"workspace_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Workspace Memberships"},"project_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Project Memberships"},"api_keys":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Api Keys"}},"type":"object","title":"AdminDeletedEntities"},"AdminDeletedEntity":{"properties":{"id":{"type":"string","title":"Id"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"}},"type":"object","required":["id"],"title":"AdminDeletedEntity"},"AdminOrganizationCreate":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"owner_user_ref":{"anyOf":[{"$ref":"#/components/schemas/EntityRef"},{"type":"null"}]},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["name"],"title":"AdminOrganizationCreate"},"AdminOrganizationMembershipCreate":{"properties":{"organization_ref":{"$ref":"#/components/schemas/EntityRef"},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"role":{"type":"string","title":"Role"}},"type":"object","required":["organization_ref","user_ref","role"],"title":"AdminOrganizationMembershipCreate"},"AdminOrganizationMembershipRead":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"user_id":{"type":"string","title":"User Id"},"role":{"type":"string","title":"Role"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","organization_id","user_id","role"],"title":"AdminOrganizationMembershipRead"},"AdminOrganizationRead":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"owner_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner User Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","name"],"title":"AdminOrganizationRead"},"AdminProjectCreate":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"organization_ref":{"$ref":"#/components/schemas/EntityRef"},"workspace_ref":{"$ref":"#/components/schemas/EntityRef"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["name","organization_ref","workspace_ref"],"title":"AdminProjectCreate"},"AdminProjectMembershipCreate":{"properties":{"project_ref":{"$ref":"#/components/schemas/EntityRef"},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"role":{"type":"string","title":"Role"}},"type":"object","required":["project_ref","user_ref","role"],"title":"AdminProjectMembershipCreate"},"AdminProjectMembershipRead":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"user_id":{"type":"string","title":"User Id"},"role":{"type":"string","title":"Role"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","project_id","user_id","role"],"title":"AdminProjectMembershipRead"},"AdminProjectRead":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"organization_id":{"type":"string","title":"Organization Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","name","organization_id","workspace_id"],"title":"AdminProjectRead"},"AdminSimpleAccountCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"user":{"$ref":"#/components/schemas/AdminUserCreate"},"user_identities":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminUserIdentityCreate"},"type":"array"},{"type":"null"}],"title":"User Identities"},"organization":{"anyOf":[{"$ref":"#/components/schemas/AdminOrganizationCreate"},{"type":"null"}]},"workspace":{"anyOf":[{"$ref":"#/components/schemas/AdminWorkspaceCreate"},{"type":"null"}]},"project":{"anyOf":[{"$ref":"#/components/schemas/AdminProjectCreate"},{"type":"null"}]},"organization_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminOrganizationMembershipCreate"},"type":"array"},{"type":"null"}],"title":"Organization Memberships"},"workspace_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminWorkspaceMembershipCreate"},"type":"array"},{"type":"null"}],"title":"Workspace Memberships"},"project_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminProjectMembershipCreate"},"type":"array"},{"type":"null"}],"title":"Project Memberships"},"api_keys":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminApiKeyCreate"},"type":"array"},{"type":"null"}],"title":"Api Keys"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/AdminSubscriptionCreate"},{"type":"null"}]}},"type":"object","required":["user"],"title":"AdminSimpleAccountCreate","description":"One account entry in a batch simple-accounts create request."},"AdminSimpleAccountDeleteEntry":{"properties":{"user":{"$ref":"#/components/schemas/EntityRef"}},"type":"object","required":["user"],"title":"AdminSimpleAccountDeleteEntry","description":"One account entry in a batch simple-accounts delete request.\n\nIdentifies the account by its user (typically by id)."},"AdminSimpleAccountRead":{"properties":{"user":{"anyOf":[{"$ref":"#/components/schemas/AdminUserRead"},{"type":"null"}]},"user_identities":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminUserIdentityRead"},"type":"array"},{"type":"null"}],"title":"User Identities"},"organizations":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationRead"},"type":"object"},{"type":"null"}],"title":"Organizations"},"workspaces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceRead"},"type":"object"},{"type":"null"}],"title":"Workspaces"},"projects":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectRead"},"type":"object"},{"type":"null"}],"title":"Projects"},"organization_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminOrganizationMembershipRead"},"type":"array"},{"type":"null"}],"title":"Organization Memberships"},"workspace_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminWorkspaceMembershipRead"},"type":"array"},{"type":"null"}],"title":"Workspace Memberships"},"project_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminProjectMembershipRead"},"type":"array"},{"type":"null"}],"title":"Project Memberships"},"subscriptions":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminSubscriptionRead"},"type":"object"},{"type":"null"}],"title":"Subscriptions"},"api_keys":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Api Keys"}},"type":"object","title":"AdminSimpleAccountRead","description":"Per-account entry in the simple-accounts response.\n\n``user`` is a flat object (there is always exactly one per account).\n``organizations``, ``workspaces``, ``projects`` are named dicts (keys match\nthe ref keys used internally, e.g. \"org\", \"wrk\", \"prj\").\n``api_keys`` maps ref names to raw key values (plain strings, not DTOs)."},"AdminSimpleAccountsApiKeysCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"api_key":{"$ref":"#/components/schemas/AdminApiKeyCreate"}},"type":"object","required":["api_key"],"title":"AdminSimpleAccountsApiKeysCreate"},"AdminSimpleAccountsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"accounts":{"additionalProperties":{"$ref":"#/components/schemas/AdminSimpleAccountCreate"},"type":"object","title":"Accounts"}},"type":"object","required":["accounts"],"title":"AdminSimpleAccountsCreate"},"AdminSimpleAccountsDelete":{"properties":{"accounts":{"additionalProperties":{"$ref":"#/components/schemas/AdminSimpleAccountDeleteEntry"},"type":"object","title":"Accounts"},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","default":false},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"confirm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirm"}},"type":"object","required":["accounts"],"title":"AdminSimpleAccountsDelete"},"AdminSimpleAccountsOrganizationsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"organization":{"$ref":"#/components/schemas/AdminOrganizationCreate"},"owner":{"anyOf":[{"$ref":"#/components/schemas/AdminUserCreate"},{"type":"null"}]}},"type":"object","required":["organization"],"title":"AdminSimpleAccountsOrganizationsCreate"},"AdminSimpleAccountsOrganizationsMembershipsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"membership":{"$ref":"#/components/schemas/AdminOrganizationMembershipCreate"}},"type":"object","required":["membership"],"title":"AdminSimpleAccountsOrganizationsMembershipsCreate"},"AdminSimpleAccountsOrganizationsTransferOwnership":{"properties":{"organizations":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/EntityRef"},"type":"object"},{"type":"null"}],"title":"Organizations"},"users":{"additionalProperties":{"$ref":"#/components/schemas/EntityRef"},"type":"object","title":"Users"},"include_workspaces":{"anyOf":[{"type":"string","const":"all"},{"items":{"type":"string"},"type":"array"}],"title":"Include Workspaces","default":"all"},"include_projects":{"anyOf":[{"type":"string","const":"all"},{"items":{"type":"string"},"type":"array"}],"title":"Include Projects","default":"all"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"recovery":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recovery"}},"type":"object","required":["users"],"title":"AdminSimpleAccountsOrganizationsTransferOwnership"},"AdminSimpleAccountsOrganizationsTransferOwnershipResponse":{"properties":{"transferred":{"items":{"type":"string"},"type":"array","title":"Transferred","default":[]},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminStructuredError"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","title":"AdminSimpleAccountsOrganizationsTransferOwnershipResponse"},"AdminSimpleAccountsProjectsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"project":{"$ref":"#/components/schemas/AdminProjectCreate"}},"type":"object","required":["project"],"title":"AdminSimpleAccountsProjectsCreate"},"AdminSimpleAccountsProjectsMembershipsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"membership":{"$ref":"#/components/schemas/AdminProjectMembershipCreate"}},"type":"object","required":["membership"],"title":"AdminSimpleAccountsProjectsMembershipsCreate"},"AdminSimpleAccountsResponse":{"properties":{"accounts":{"additionalProperties":{"$ref":"#/components/schemas/AdminSimpleAccountRead"},"type":"object","title":"Accounts","default":{}},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminStructuredError"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","title":"AdminSimpleAccountsResponse"},"AdminSimpleAccountsUsersCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"user":{"$ref":"#/components/schemas/AdminUserCreate"}},"type":"object","required":["user"],"title":"AdminSimpleAccountsUsersCreate"},"AdminSimpleAccountsUsersIdentitiesCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"user_identity":{"$ref":"#/components/schemas/AdminUserIdentityCreate"}},"type":"object","required":["user_ref","user_identity"],"title":"AdminSimpleAccountsUsersIdentitiesCreate"},"AdminSimpleAccountsUsersResetPassword":{"properties":{"user_identities":{"items":{"$ref":"#/components/schemas/AdminUserIdentityCreate"},"type":"array","title":"User Identities"}},"type":"object","required":["user_identities"],"title":"AdminSimpleAccountsUsersResetPassword"},"AdminSimpleAccountsWorkspacesCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"workspace":{"$ref":"#/components/schemas/AdminWorkspaceCreate"}},"type":"object","required":["workspace"],"title":"AdminSimpleAccountsWorkspacesCreate"},"AdminSimpleAccountsWorkspacesMembershipsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"membership":{"$ref":"#/components/schemas/AdminWorkspaceMembershipCreate"}},"type":"object","required":["membership"],"title":"AdminSimpleAccountsWorkspacesMembershipsCreate"},"AdminStructuredError":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"type":"object","required":["code","message"],"title":"AdminStructuredError"},"AdminSubscriptionCreate":{"properties":{"plan":{"type":"string","title":"Plan"}},"type":"object","required":["plan"],"title":"AdminSubscriptionCreate"},"AdminSubscriptionRead":{"properties":{"plan":{"type":"string","title":"Plan"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","required":["plan"],"title":"AdminSubscriptionRead"},"AdminUserCreate":{"properties":{"email":{"type":"string","title":"Email"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin"},"is_root":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Root"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["email"],"title":"AdminUserCreate"},"AdminUserIdentityCreate":{"properties":{"user_ref":{"anyOf":[{"$ref":"#/components/schemas/EntityRef"},{"type":"null"}]},"method":{"type":"string","title":"Method"},"subject":{"type":"string","title":"Subject"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"},"provider_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider User Id"},"claims":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Claims"}},"type":"object","required":["method","subject"],"title":"AdminUserIdentityCreate"},"AdminUserIdentityRead":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"user_id":{"type":"string","title":"User Id"},"method":{"type":"string","title":"Method"},"subject":{"type":"string","title":"Subject"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"status":{"type":"string","enum":["created","linked","pending_confirmation","skipped","failed"],"title":"Status","default":"created"},"verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["user_id","method","subject"],"title":"AdminUserIdentityRead"},"AdminUserRead":{"properties":{"id":{"type":"string","title":"Id"},"uid":{"type":"string","title":"Uid"},"email":{"type":"string","title":"Email"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin"},"is_root":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Root"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","uid","email"],"title":"AdminUserRead"},"AdminWorkspaceCreate":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"organization_ref":{"$ref":"#/components/schemas/EntityRef"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["name","organization_ref"],"title":"AdminWorkspaceCreate"},"AdminWorkspaceMembershipCreate":{"properties":{"workspace_ref":{"$ref":"#/components/schemas/EntityRef"},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"role":{"type":"string","title":"Role"}},"type":"object","required":["workspace_ref","user_ref","role"],"title":"AdminWorkspaceMembershipCreate"},"AdminWorkspaceMembershipRead":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"user_id":{"type":"string","title":"User Id"},"role":{"type":"string","title":"Role"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","workspace_id","user_id","role"],"title":"AdminWorkspaceMembershipRead"},"AdminWorkspaceRead":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"organization_id":{"type":"string","title":"Organization Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","name","organization_id"],"title":"AdminWorkspaceRead"},"Analytics":{"properties":{"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","default":0},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration","default":0.0},"costs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Costs","default":0.0},"tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tokens","default":0.0}},"type":"object","title":"Analytics"},"AnalyticsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of time buckets returned.","default":0},"buckets":{"items":{"$ref":"#/components/schemas/MetricsBucket"},"type":"array","title":"Buckets","description":"Time-bucketed aggregates. Each bucket's `metrics` dict is keyed by the dotted `path` of the corresponding `MetricSpec`.","default":[]},"query":{"$ref":"#/components/schemas/TracingQuery","description":"The resolved query used to compute the buckets."},"specs":{"items":{"$ref":"#/components/schemas/MetricSpec"},"type":"array","title":"Specs","description":"The resolved metric specs applied in each bucket.","default":[]}},"type":"object","title":"AnalyticsResponse","description":"Analytics response with user-specified metric specs."},"Annotation":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Annotation"},"AnnotationCreate":{"properties":{"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"AnnotationCreate"},"AnnotationCreateRequest":{"properties":{"annotation":{"$ref":"#/components/schemas/AnnotationCreate"}},"type":"object","required":["annotation"],"title":"AnnotationCreateRequest"},"AnnotationEdit":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data"],"title":"AnnotationEdit"},"AnnotationEditRequest":{"properties":{"annotation":{"$ref":"#/components/schemas/AnnotationEdit"}},"type":"object","required":["annotation"],"title":"AnnotationEditRequest"},"AnnotationLinkResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"annotation_link":{"anyOf":[{"$ref":"#/components/schemas/OTelLink-Output"},{"type":"null"}]}},"type":"object","title":"AnnotationLinkResponse"},"AnnotationQuery":{"properties":{"origin":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceOrigin"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceKind"},{"type":"null"}]},"channel":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceChannel"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"AnnotationQuery"},"AnnotationQueryRequest":{"properties":{"annotation":{"anyOf":[{"$ref":"#/components/schemas/AnnotationQuery"},{"type":"null"}]},"annotation_links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Annotation Links"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"AnnotationQueryRequest"},"AnnotationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"annotation":{"anyOf":[{"$ref":"#/components/schemas/Annotation"},{"type":"null"}]}},"type":"object","title":"AnnotationResponse"},"AnnotationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"annotations":{"items":{"$ref":"#/components/schemas/Annotation"},"type":"array","title":"Annotations","default":[]}},"type":"object","title":"AnnotationsResponse"},"Application":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationArtifactFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Application"},"ApplicationArtifactFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"ApplicationArtifactFlags","description":"Application flags - is_application=True; other booleans use their normal defaults unless explicitly set."},"ApplicationArtifactQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"}},"type":"object","title":"ApplicationArtifactQueryFlags","description":"Application query flags - filter for is_application=True."},"ApplicationCatalogPreset":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"ApplicationCatalogPreset"},"ApplicationCatalogPresetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when found, `0` otherwise.","default":0},"preset":{"anyOf":[{"$ref":"#/components/schemas/ApplicationCatalogPreset"},{"type":"null"}],"description":"Catalog preset definition."}},"type":"object","title":"ApplicationCatalogPresetResponse","description":"Single preset response envelope."},"ApplicationCatalogPresetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of presets returned.","default":0},"presets":{"items":{"$ref":"#/components/schemas/ApplicationCatalogPreset"},"type":"array","title":"Presets","description":"Named parameter sets for the template. Use a preset's `data` as the first revision when creating an application from a template."}},"type":"object","title":"ApplicationCatalogPresetsResponse","description":"List of catalog presets scoped to one template."},"ApplicationCatalogTemplate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"ApplicationCatalogTemplate"},"ApplicationCatalogTemplateResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when found, `0` otherwise.","default":0},"template":{"anyOf":[{"$ref":"#/components/schemas/ApplicationCatalogTemplate"},{"type":"null"}],"description":"Catalog template definition."}},"type":"object","title":"ApplicationCatalogTemplateResponse","description":"Single template response envelope."},"ApplicationCatalogTemplatesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of templates returned.","default":0},"templates":{"items":{"$ref":"#/components/schemas/ApplicationCatalogTemplate"},"type":"array","title":"Templates","description":"Built-in and custom templates an application can be created from. Each template carries a `key`, a `uri`, and the JSON Schemas that applications of that type expose."}},"type":"object","title":"ApplicationCatalogTemplatesResponse","description":"List of catalog templates."},"ApplicationCatalogType":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"json_schema":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Json Schema"}},"type":"object","required":["key","json_schema"],"title":"ApplicationCatalogType"},"ApplicationCatalogTypesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of types returned.","default":0},"types":{"items":{"$ref":"#/components/schemas/ApplicationCatalogType"},"type":"array","title":"Types","description":"Shared JSON Schema building blocks referenced by templates (for example `message`, `prompt-template`)."}},"type":"object","title":"ApplicationCatalogTypesResponse","description":"List of catalog types."},"ApplicationCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"ApplicationCreate"},"ApplicationCreateRequest":{"properties":{"application":{"$ref":"#/components/schemas/ApplicationCreate","description":"Artifact-level fields for the new application: `slug`, `name`, `description`, `flags`, `tags`, `meta`. The `slug` must be unique within the project."}},"type":"object","required":["application"],"title":"ApplicationCreateRequest","description":"Request body for creating an application artifact.\n\nApplications are versioned resources; creating one produces an empty artifact.\nUse `POST /simple/applications/` if you want to create the artifact, a default\nvariant, and a first committed revision in a single call.\nSee the [Applications guide](/reference/api-guide/applications)."},"ApplicationEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ApplicationEdit"},"ApplicationEditRequest":{"properties":{"application":{"$ref":"#/components/schemas/ApplicationEdit","description":"Artifact fields to update. The `id` must match the `application_id` in the URL path."}},"type":"object","required":["application"],"title":"ApplicationEditRequest","description":"Request body for editing an application artifact.\n\nOnly artifact-level fields (flags, tags, meta) can be edited here. Editing\nthe `name` is currently disabled. To change the prompt or model parameters,\ncommit a new revision on a variant with `/applications/revisions/commit`."},"ApplicationFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"ApplicationFlags","description":"Legacy full application flag set."},"ApplicationFork":{"properties":{"application_revision":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionFork"},{"type":"null"}]},"revision":{"anyOf":[{"$ref":"#/components/schemas/RevisionFork"},{"type":"null"}]},"application_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"application_variant":{"anyOf":[{"$ref":"#/components/schemas/ApplicationVariantFork"},{"type":"null"}]},"variant":{"anyOf":[{"$ref":"#/components/schemas/VariantFork"},{"type":"null"}]},"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFork"},{"type":"null"}]},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFork"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"ApplicationFork"},"ApplicationForkRequest":{"properties":{"application":{"$ref":"#/components/schemas/ApplicationFork","description":"Fork payload. Must include the source `application_variant_id` (or `application_revision_id`) plus a `variant` object describing the new branch and a `revision` object for the new tip commit."}},"type":"object","required":["application"],"title":"ApplicationForkRequest","description":"Request body for forking a variant into a new variant on the same application.\n\nThe fork copies the revision history up to `application_variant_id` /\n`application_revision_id`, then commits the `revision` payload on top.\nBoth `variant` and `revision` objects must be provided."},"ApplicationQuery":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationArtifactQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"ApplicationQuery"},"ApplicationQueryRequest":{"properties":{"application":{"anyOf":[{"$ref":"#/components/schemas/ApplicationQuery"},{"type":"null"}],"description":"Attribute filter. Accepts `slug`, `slugs`, `flags`, `tags`, `meta`. All fields are AND-ed."},"application_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Refs","description":"Restrict the query to specific applications by `id` or `slug`. Combined with the `application` filter with AND semantics."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When `true`, include soft-deleted applications. Defaults to `false`."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time-range controls."}},"type":"object","title":"ApplicationQueryRequest","description":"Request body for `POST /applications/query`.\n\nReturns artifact rows only. For rows that include the currently resolved\nvariant, revision, and `data` payload merged in, use\n`POST /simple/applications/query`.\nSee [Query Pattern](/reference/api-guide/query-pattern)."},"ApplicationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when the application was found, `0` otherwise.","default":0},"application":{"anyOf":[{"$ref":"#/components/schemas/Application"},{"type":"null"}],"description":"The application artifact, or `null` if not found."}},"type":"object","title":"ApplicationResponse","description":"Single-application response envelope."},"ApplicationRevision":{"properties":{"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"ApplicationRevision"},"ApplicationRevisionCommit":{"properties":{"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"ApplicationRevisionCommit"},"ApplicationRevisionCommitRequest":{"properties":{"application_revision_commit":{"$ref":"#/components/schemas/ApplicationRevisionCommit","description":"Commit payload. Must include `application_variant_id` and `data`. `message` is a human-readable commit message. `slug` is optional; if omitted, the server generates one."}},"type":"object","required":["application_revision_commit"],"title":"ApplicationRevisionCommitRequest","description":"Request body for committing a new revision on a variant.\n\nThe commit becomes the variant's new tip. Revisions are immutable once\ncommitted; to change behavior, commit another revision.\nSee [Versioning](/reference/api-guide/versioning#committing-a-revision)."},"ApplicationRevisionCreate":{"properties":{"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"ApplicationRevisionCreate"},"ApplicationRevisionCreateRequest":{"properties":{"application_revision":{"$ref":"#/components/schemas/ApplicationRevisionCreate","description":"Revision fields. Must reference the parent variant."}},"type":"object","required":["application_revision"],"title":"ApplicationRevisionCreateRequest","description":"Request body for creating a revision row without committing it.\n\nPrefer `POST /applications/revisions/commit` for normal use — commit creates\na revision and advances the variant's tip. The plain create endpoint exists\nfor advanced workflows that populate revision rows out of band."},"ApplicationRevisionData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"ApplicationRevisionData"},"ApplicationRevisionData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"ApplicationRevisionData"},"ApplicationRevisionDeployRequest":{"properties":{"application_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Application reference. If provided, the latest revision of the default variant is deployed."},"application_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant reference. Its latest revision is deployed."},"application_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Revision reference. The exact revision is deployed."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment (for example `{\"slug\": \"production\"}`)."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment variant."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment revision; advanced use only."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Deployment key inside the environment revision. Defaults to `{application_slug}.revision`."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Optional commit message attached to the environment revision."}},"type":"object","title":"ApplicationRevisionDeployRequest","description":"Request body for `POST /applications/revisions/deploy`.\n\nAttaches an application revision to an environment under a key. Subsequent\ncalls to `/applications/revisions/retrieve` with the matching\n`environment_ref` resolve to this revision.\nSee the [Applications guide](/reference/api-guide/applications#deployment)."},"ApplicationRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ApplicationRevisionEdit"},"ApplicationRevisionEditRequest":{"properties":{"application_revision":{"$ref":"#/components/schemas/ApplicationRevisionEdit","description":"Full revision body. Edit replaces the editable fields in a single PUT, so include every editable field even if its value is unchanged. `id` must match the `application_revision_id` in the URL path. `data`, `author`, `date`, and `message` are immutable."}},"type":"object","required":["application_revision"],"title":"ApplicationRevisionEditRequest","description":"Request body for editing a revision's header fields.\n\nRevisions are immutable snapshots of the application's configuration;\n`data`, `author`, `date`, and `message` cannot be edited. Use this only to\ncorrect metadata such as `description` or `tags`."},"ApplicationRevisionFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"ApplicationRevisionFlags"},"ApplicationRevisionFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"ApplicationRevisionFork"},"ApplicationRevisionQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"ApplicationRevisionQuery"},"ApplicationRevisionQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"ApplicationRevisionQueryFlags"},"ApplicationRevisionQueryRequest":{"properties":{"application_revision":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionQuery"},{"type":"null"}],"description":"Attribute filter. Includes standard fields (`slug`, `slugs`, `flags`) plus revision-specific ones (`author`, `authors`, `date`, `dates`, `message`)."},"application_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Refs","description":"Scope to revisions belonging to these applications."},"application_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Variant Refs","description":"Scope to revisions belonging to these variants."},"application_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Revision Refs","description":"Restrict to specific revisions by `id` or by `slug` + `version`."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When `true`, include archived revisions. Defaults to `false`."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time-range controls."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When `true`, resolve embedded references in each returned revision's `data` (for example, snippet references). Defaults to `false`."}},"type":"object","title":"ApplicationRevisionQueryRequest","description":"Request body for `POST /applications/revisions/query`.\n\nReturns committed revisions across one or more variants. For the ordered\nlog of a single variant, use `POST /applications/revisions/log`."},"ApplicationRevisionResolveRequest":{"properties":{"application_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Application reference."},"application_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant reference; resolves the latest revision on it."},"application_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Revision reference; resolves that exact revision."},"max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Depth","description":"Maximum nesting depth for embedded references. Protects against runaway recursion. Defaults to `10`.","default":10},"max_embeds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Embeds","description":"Maximum total number of embedded references to follow. Defaults to `100`.","default":100},"error_policy":{"anyOf":[{"$ref":"#/components/schemas/ErrorPolicy"},{"type":"null"}],"description":"How to handle resolution errors. `exception` (default) aborts; `placeholder` substitutes a marker; `keep` leaves the original reference untouched.","default":"exception"}},"type":"object","title":"ApplicationRevisionResolveRequest","description":"Request body for `POST /applications/revisions/resolve`.\n\nFetches a revision and resolves any embedded references (snippets, linked\nrevisions) inside its `data`. Use when clients need the fully-inlined\nconfiguration instead of the raw stored form."},"ApplicationRevisionResolveResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a revision was resolved, `0` otherwise.","default":0},"application_revision":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevision"},{"type":"null"}],"description":"The revision with embedded references inlined into `data`."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Diagnostic info about which references were resolved."}},"type":"object","title":"ApplicationRevisionResolveResponse","description":"Response for `POST /applications/revisions/resolve`."},"ApplicationRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a revision was found, `0` otherwise.","default":0},"application_revision":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevision"},{"type":"null"}],"description":"The application revision, including its `data` payload (prompt, model parameters, schemas, URL)."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Present only when the request set `resolve: true`. Describes which embedded references were resolved and any errors that occurred."}},"type":"object","title":"ApplicationRevisionResponse","description":"Single-revision response envelope."},"ApplicationRevisionRetrieveRequest":{"properties":{"application_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Application reference. When only an application is supplied, the latest revision of its default variant is returned."},"application_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant reference. Returns the latest revision on that variant."},"application_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Revision reference. Returns that exact revision."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment reference. Returns the revision currently deployed to that environment under the given `key`."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment variant reference; used together with `environment_ref`."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment revision reference; used to pin to a specific environment commit instead of the current tip."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Deployment key inside the environment revision. When omitted and `application_ref` is supplied, the server derives it as `{application_slug}.revision`."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When `true`, resolve embedded references in the returned revision's `data` (for example, snippet references)."}},"type":"object","title":"ApplicationRevisionRetrieveRequest","description":"Request body for `POST /applications/revisions/retrieve`.\n\nResolves to a single revision by one of several reference types. Exactly one\nreference path is needed; the most specific wins when several are provided.\nSee the [Applications guide](/reference/api-guide/applications#invocation)."},"ApplicationRevisionsLog":{"properties":{"application_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"ApplicationRevisionsLog"},"ApplicationRevisionsLogRequest":{"properties":{"application":{"$ref":"#/components/schemas/ApplicationRevisionsLog","description":"Filter for the log. Typically set `application_variant_id` to list the revision history of a single variant; optionally set `application_revision_id` + `depth` to walk back a bounded number of commits from a specific revision."}},"type":"object","required":["application"],"title":"ApplicationRevisionsLogRequest","description":"Request body for `POST /applications/revisions/log`.\n\nReturns the ordered list of revisions committed to a variant, newest first.\nEach entry carries commit metadata and the full revision record."},"ApplicationRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of revisions in this page.","default":0},"application_revisions":{"items":{"$ref":"#/components/schemas/ApplicationRevision"},"type":"array","title":"Application Revisions","description":"Application revisions matching the query or log."}},"type":"object","title":"ApplicationRevisionsResponse","description":"Paginated list of application revisions."},"ApplicationVariant":{"properties":{"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ApplicationVariant"},"ApplicationVariantCreate":{"properties":{"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"ApplicationVariantCreate"},"ApplicationVariantCreateRequest":{"properties":{"application_variant":{"$ref":"#/components/schemas/ApplicationVariantCreate","description":"Variant fields. Must include `application_id` (the artifact the variant belongs to) and a `slug` unique within the project."}},"type":"object","required":["application_variant"],"title":"ApplicationVariantCreateRequest","description":"Request body for creating a variant on an existing application."},"ApplicationVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ApplicationVariantEdit"},"ApplicationVariantEditRequest":{"properties":{"application_variant":{"$ref":"#/components/schemas/ApplicationVariantEdit","description":"Full variant body. Edit replaces the artifact-level fields in a single PUT, so include every editable field even if its value is unchanged. `id` must match the `application_variant_id` in the URL path; `slug` is immutable. Configuration changes (prompt, model parameters) go through `/applications/revisions/commit`, not this endpoint."}},"type":"object","required":["application_variant"],"title":"ApplicationVariantEditRequest","description":"Request body for editing a variant's artifact-level fields."},"ApplicationVariantFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"ApplicationVariantFlags"},"ApplicationVariantFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"ApplicationVariantFork"},"ApplicationVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a variant was found, `0` otherwise.","default":0},"application_variant":{"anyOf":[{"$ref":"#/components/schemas/ApplicationVariant"},{"type":"null"}],"description":"The application variant, or `null`."}},"type":"object","title":"ApplicationVariantResponse","description":"Single-variant response envelope."},"ApplicationVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of variants in this page.","default":0},"application_variants":{"items":{"$ref":"#/components/schemas/ApplicationVariant"},"type":"array","title":"Application Variants","description":"Application variants matching the query."}},"type":"object","title":"ApplicationVariantsResponse","description":"Paginated list of application variants."},"ApplicationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of applications in this page.","default":0},"applications":{"items":{"$ref":"#/components/schemas/Application"},"type":"array","title":"Applications","description":"Application artifacts matching the query."}},"type":"object","title":"ApplicationsResponse","description":"Paginated list of application artifacts."},"Body_configs_fetch_variants_configs_fetch_post":{"properties":{"variant_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Input"},{"type":"null"}]},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Input"},{"type":"null"}]},"application_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Input"},{"type":"null"}]}},"type":"object","title":"Body_configs_fetch_variants_configs_fetch_post"},"Body_create_simple_testset_from_file":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"file_type":{"type":"string","enum":["csv","json"],"title":"File Type","default":"csv"},"testset_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Slug"},"testset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Name"},"testset_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Description"},"testset_tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Tags"},"testset_meta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Meta"}},"type":"object","required":["file"],"title":"Body_create_simple_testset_from_file"},"Body_create_testset_revision_from_file":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"file_type":{"type":"string","enum":["csv","json"],"title":"File Type","default":"csv"},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases"}},"type":"object","required":["file"],"title":"Body_create_testset_revision_from_file"},"Body_edit_simple_testset_from_file":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"file_type":{"type":"string","enum":["csv","json"],"title":"File Type","default":"csv"},"testset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Name"},"testset_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Description"},"testset_tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Tags"},"testset_meta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Meta"}},"type":"object","required":["file"],"title":"Body_edit_simple_testset_from_file"},"Bucket":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"interval":{"type":"integer","title":"Interval"},"total":{"$ref":"#/components/schemas/Analytics"},"errors":{"$ref":"#/components/schemas/Analytics"}},"type":"object","required":["timestamp","interval","total","errors"],"title":"Bucket"},"CollectStatusResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"status":{"type":"string","title":"Status","description":"Readiness string. `ready` means the router is mounted and accepts OTLP ingest."}},"type":"object","required":["status"],"title":"CollectStatusResponse","description":"OTLP endpoint readiness response."},"ComparisonOperator":{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},"Condition":{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"$ref":"#/components/schemas/ComparisonOperator"},{"$ref":"#/components/schemas/NumericOperator"},{"$ref":"#/components/schemas/StringOperator"},{"$ref":"#/components/schemas/ListOperator"},{"$ref":"#/components/schemas/DictOperator"},{"$ref":"#/components/schemas/ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"$ref":"#/components/schemas/TextOptions"},{"$ref":"#/components/schemas/ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"ConfigResponseModel":{"properties":{"params":{"additionalProperties":true,"type":"object","title":"Params"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"application_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Output"},{"type":"null"}]},"service_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Output"},{"type":"null"}]},"variant_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Output"},{"type":"null"}]},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Output"},{"type":"null"}]},"application_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"service_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"variant_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"environment_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","title":"ConfigResponseModel"},"CreateOrganizationPayload":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"CreateOrganizationPayload"},"CreateProjectRequest":{"properties":{"name":{"type":"string","title":"Name"},"make_default":{"type":"boolean","title":"Make Default","default":false}},"type":"object","required":["name"],"title":"CreateProjectRequest"},"CreateSecretDTO":{"properties":{"header":{"$ref":"#/components/schemas/Header"},"secret":{"$ref":"#/components/schemas/SecretDTO"}},"type":"object","required":["header","secret"],"title":"CreateSecretDTO"},"CreateWorkspace":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","title":"CreateWorkspace"},"CustomModelSettingsDTO":{"properties":{"slug":{"type":"string","title":"Slug"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","required":["slug"],"title":"CustomModelSettingsDTO"},"CustomProviderDTO":{"properties":{"kind":{"$ref":"#/components/schemas/CustomProviderKind"},"provider":{"$ref":"#/components/schemas/CustomProviderSettingsDTO"},"models":{"items":{"$ref":"#/components/schemas/CustomModelSettingsDTO"},"type":"array","title":"Models"},"provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Slug"},"model_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Model Keys"}},"type":"object","required":["kind","provider","models"],"title":"CustomProviderDTO"},"CustomProviderKind":{"type":"string","enum":["custom","azure","bedrock","sagemaker","vertex_ai","openai","cohere","anyscale","deepinfra","alephalpha","groq","minimax","mistral","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"CustomProviderKind"},"CustomProviderSettingsDTO":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","title":"CustomProviderSettingsDTO"},"DictOperator":{"type":"string","enum":["has","has_not"],"title":"DictOperator"},"DiscoverRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"DiscoverRequest"},"DiscoverResponse":{"properties":{"exists":{"type":"boolean","title":"Exists"},"methods":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#/components/schemas/SSOProviders"}]},"type":"object","title":"Methods"}},"type":"object","required":["exists","methods"],"title":"DiscoverResponse"},"EntityRef":{"properties":{"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"EntityRef","description":"Polymorphic reference that can point to a request-local key, an\nexisting persisted ID, a stable slug, or an email address.\nExactly one field must be set."},"Environment":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Environment"},"EnvironmentCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EnvironmentCreate"},"EnvironmentCreateRequest":{"properties":{"environment":{"$ref":"#/components/schemas/EnvironmentCreate"}},"type":"object","required":["environment"],"title":"EnvironmentCreateRequest"},"EnvironmentEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EnvironmentEdit"},"EnvironmentEditRequest":{"properties":{"environment":{"$ref":"#/components/schemas/EnvironmentEdit"}},"type":"object","required":["environment"],"title":"EnvironmentEditRequest"},"EnvironmentFlags":{"properties":{"is_guarded":{"type":"boolean","title":"Is Guarded","default":false}},"type":"object","title":"EnvironmentFlags"},"EnvironmentQueryFlags":{"properties":{"is_guarded":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Guarded"}},"type":"object","title":"EnvironmentQueryFlags"},"EnvironmentResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment":{"anyOf":[{"$ref":"#/components/schemas/Environment"},{"type":"null"}]}},"type":"object","title":"EnvironmentResponse"},"EnvironmentRevision":{"properties":{"environment_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]}},"type":"object","title":"EnvironmentRevision"},"EnvironmentRevisionCommit":{"properties":{"environment_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"environment_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"delta":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionDelta"},{"type":"null"}]}},"type":"object","title":"EnvironmentRevisionCommit"},"EnvironmentRevisionCommitRequest":{"properties":{"environment_revision_commit":{"$ref":"#/components/schemas/EnvironmentRevisionCommit"}},"type":"object","required":["environment_revision_commit"],"title":"EnvironmentRevisionCommitRequest"},"EnvironmentRevisionCreate":{"properties":{"environment_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EnvironmentRevisionCreate"},"EnvironmentRevisionCreateRequest":{"properties":{"environment_revision":{"$ref":"#/components/schemas/EnvironmentRevisionCreate"}},"type":"object","required":["environment_revision"],"title":"EnvironmentRevisionCreateRequest"},"EnvironmentRevisionData":{"properties":{"references":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object"},"type":"object"},{"type":"null"}],"title":"References"}},"type":"object","title":"EnvironmentRevisionData","description":"Per-app references for environment revision data.\n\nKeys are app-scoped identifiers (e.g., ``\"pre.revision\"``).\nValues are dicts of entity-type → Reference, providing full traceability::\n\n {\n \"pre.revision\": {\n \"application\": Reference(id=..., slug=..., version=...),\n \"application_variant\": Reference(id=..., slug=..., version=...),\n \"application_revision\": Reference(id=..., slug=..., version=...),\n },\n ...\n }"},"EnvironmentRevisionDelta":{"properties":{"set":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Set"},"remove":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Remove"}},"type":"object","title":"EnvironmentRevisionDelta","description":"Delta operations on environment revision references.\n\n- ``set``: references to add or update (key → dict of entity → Reference).\n- ``remove``: reference keys to remove."},"EnvironmentRevisionEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EnvironmentRevisionEdit"},"EnvironmentRevisionEditRequest":{"properties":{"environment_revision":{"$ref":"#/components/schemas/EnvironmentRevisionEdit"}},"type":"object","required":["environment_revision"],"title":"EnvironmentRevisionEditRequest"},"EnvironmentRevisionResolveRequest":{"properties":{"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Depth","default":10},"max_embeds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Embeds","default":100},"error_policy":{"anyOf":[{"$ref":"#/components/schemas/ErrorPolicy"},{"type":"null"}],"default":"exception"}},"type":"object","title":"EnvironmentRevisionResolveRequest"},"EnvironmentRevisionResolveResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_revision":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevision"},{"type":"null"}]},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}]}},"type":"object","title":"EnvironmentRevisionResolveResponse"},"EnvironmentRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_revision":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevision"},{"type":"null"}]},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}]}},"type":"object","title":"EnvironmentRevisionResponse"},"EnvironmentRevisionRetrieveRequest":{"properties":{"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve"}},"type":"object","title":"EnvironmentRevisionRetrieveRequest"},"EnvironmentRevisionsLog":{"properties":{"environment_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"environment_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"EnvironmentRevisionsLog"},"EnvironmentRevisionsLogRequest":{"properties":{"environment":{"$ref":"#/components/schemas/EnvironmentRevisionsLog"}},"type":"object","required":["environment"],"title":"EnvironmentRevisionsLogRequest"},"EnvironmentRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_revisions":{"items":{"$ref":"#/components/schemas/EnvironmentRevision"},"type":"array","title":"Environment Revisions","default":[]}},"type":"object","title":"EnvironmentRevisionsResponse"},"EnvironmentVariant":{"properties":{"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EnvironmentVariant"},"EnvironmentVariantCreate":{"properties":{"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EnvironmentVariantCreate"},"EnvironmentVariantCreateRequest":{"properties":{"environment_variant":{"$ref":"#/components/schemas/EnvironmentVariantCreate"}},"type":"object","required":["environment_variant"],"title":"EnvironmentVariantCreateRequest"},"EnvironmentVariantEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EnvironmentVariantEdit"},"EnvironmentVariantEditRequest":{"properties":{"environment_variant":{"$ref":"#/components/schemas/EnvironmentVariantEdit"}},"type":"object","required":["environment_variant"],"title":"EnvironmentVariantEditRequest"},"EnvironmentVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_variant":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentVariant"},{"type":"null"}]}},"type":"object","title":"EnvironmentVariantResponse"},"EnvironmentVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_variants":{"items":{"$ref":"#/components/schemas/EnvironmentVariant"},"type":"array","title":"Environment Variants","default":[]}},"type":"object","title":"EnvironmentVariantsResponse"},"EnvironmentsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environments":{"items":{"$ref":"#/components/schemas/Environment"},"type":"array","title":"Environments","default":[]}},"type":"object","title":"EnvironmentsResponse"},"ErrorPolicy":{"type":"string","enum":["exception","placeholder","keep"],"title":"ErrorPolicy"},"EvaluationMetrics":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationMetrics"},"EvaluationMetricsCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationMetricsCreate"},"EvaluationMetricsCreateRequest":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/EvaluationMetricsCreate"},"type":"array","title":"Metrics"}},"type":"object","required":["metrics"],"title":"EvaluationMetricsCreateRequest"},"EvaluationMetricsEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"EvaluationMetricsEdit"},"EvaluationMetricsEditRequest":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/EvaluationMetricsEdit"},"type":"array","title":"Metrics"}},"type":"object","required":["metrics"],"title":"EvaluationMetricsEditRequest"},"EvaluationMetricsIdsRequest":{"properties":{"metrics_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Metrics Ids"}},"type":"object","required":["metrics_ids"],"title":"EvaluationMetricsIdsRequest"},"EvaluationMetricsIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"metrics_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Metrics Ids","default":[]}},"type":"object","title":"EvaluationMetricsIdsResponse"},"EvaluationMetricsQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"boolean"},{"type":"null"}],"title":"Timestamps"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"boolean"},{"type":"null"}],"title":"Scenario Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationMetricsQuery"},"EvaluationMetricsQueryRequest":{"properties":{"metrics":{"anyOf":[{"$ref":"#/components/schemas/EvaluationMetricsQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationMetricsQueryRequest"},"EvaluationMetricsRefresh":{"properties":{"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"}},"type":"object","title":"EvaluationMetricsRefresh"},"EvaluationMetricsRefreshRequest":{"properties":{"metrics":{"$ref":"#/components/schemas/EvaluationMetricsRefresh"}},"type":"object","required":["metrics"],"title":"EvaluationMetricsRefreshRequest"},"EvaluationMetricsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"metrics":{"items":{"$ref":"#/components/schemas/EvaluationMetrics"},"type":"array","title":"Metrics","default":[]}},"type":"object","title":"EvaluationMetricsResponse"},"EvaluationQueue":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationQueue"},"EvaluationQueueCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationQueueCreate"},"EvaluationQueueData":{"properties":{"user_ids":{"anyOf":[{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array"},{"type":"null"}],"title":"User Ids"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"},"batch_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Size"},"batch_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Offset"}},"type":"object","title":"EvaluationQueueData"},"EvaluationQueueEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueData"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueEdit"},"EvaluationQueueEditRequest":{"properties":{"queue":{"$ref":"#/components/schemas/EvaluationQueueEdit"}},"type":"object","required":["queue"],"title":"EvaluationQueueEditRequest"},"EvaluationQueueFlags":{"properties":{"is_sequential":{"type":"boolean","title":"Is Sequential","default":false}},"type":"object","title":"EvaluationQueueFlags"},"EvaluationQueueIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Queue Id"}},"type":"object","title":"EvaluationQueueIdResponse"},"EvaluationQueueIdsRequest":{"properties":{"queue_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Queue Ids"}},"type":"object","required":["queue_ids"],"title":"EvaluationQueueIdsRequest"},"EvaluationQueueIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Queue Ids","default":[]}},"type":"object","title":"EvaluationQueueIdsResponse"},"EvaluationQueueQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationQueueQuery"},"EvaluationQueueQueryFlags":{"properties":{"is_sequential":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Sequential"}},"type":"object","title":"EvaluationQueueQueryFlags"},"EvaluationQueueQueryRequest":{"properties":{"queue":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueQueryRequest"},"EvaluationQueueResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueue"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueResponse"},"EvaluationQueueScenariosQuery":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"}},"type":"object","title":"EvaluationQueueScenariosQuery"},"EvaluationQueueScenariosQueryRequest":{"properties":{"queue":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueScenariosQuery"},{"type":"null"}]},"scenario":{"anyOf":[{"$ref":"#/components/schemas/EvaluationScenarioQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueScenariosQueryRequest"},"EvaluationQueuesCreateRequest":{"properties":{"queues":{"items":{"$ref":"#/components/schemas/EvaluationQueueCreate"},"type":"array","title":"Queues"}},"type":"object","required":["queues"],"title":"EvaluationQueuesCreateRequest"},"EvaluationQueuesEditRequest":{"properties":{"queues":{"items":{"$ref":"#/components/schemas/EvaluationQueueEdit"},"type":"array","title":"Queues"}},"type":"object","required":["queues"],"title":"EvaluationQueuesEditRequest"},"EvaluationQueuesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queues":{"items":{"$ref":"#/components/schemas/EvaluationQueue"},"type":"array","title":"Queues","default":[]}},"type":"object","title":"EvaluationQueuesResponse"},"EvaluationResult":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx","default":0},"step_key":{"type":"string","title":"Step Key"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["step_key","scenario_id","run_id"],"title":"EvaluationResult"},"EvaluationResultCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx","default":0},"step_key":{"type":"string","title":"Step Key"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["step_key","scenario_id","run_id"],"title":"EvaluationResultCreate"},"EvaluationResultEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]}},"type":"object","title":"EvaluationResultEdit"},"EvaluationResultEditRequest":{"properties":{"result":{"$ref":"#/components/schemas/EvaluationResultEdit"}},"type":"object","required":["result"],"title":"EvaluationResultEditRequest"},"EvaluationResultIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"result_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Result Id"}},"type":"object","title":"EvaluationResultIdResponse"},"EvaluationResultIdsRequest":{"properties":{"result_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Result Ids"}},"type":"object","required":["result_ids"],"title":"EvaluationResultIdsRequest"},"EvaluationResultIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"result_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Result Ids","default":[]}},"type":"object","title":"EvaluationResultIdsResponse"},"EvaluationResultQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx"},"repeat_idxs":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Repeat Idxs"},"step_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Key"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationResultQuery"},"EvaluationResultQueryRequest":{"properties":{"result":{"anyOf":[{"$ref":"#/components/schemas/EvaluationResultQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationResultQueryRequest"},"EvaluationResultResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"result":{"anyOf":[{"$ref":"#/components/schemas/EvaluationResult"},{"type":"null"}]}},"type":"object","title":"EvaluationResultResponse"},"EvaluationResultsCreateRequest":{"properties":{"results":{"items":{"$ref":"#/components/schemas/EvaluationResultCreate"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"EvaluationResultsCreateRequest"},"EvaluationResultsEditRequest":{"properties":{"results":{"items":{"$ref":"#/components/schemas/EvaluationResultEdit"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"EvaluationResultsEditRequest"},"EvaluationResultsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"results":{"items":{"$ref":"#/components/schemas/EvaluationResult"},"type":"array","title":"Results","default":[]}},"type":"object","title":"EvaluationResultsResponse"},"EvaluationRun":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRun"},"EvaluationRunCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRunCreate"},"EvaluationRunData":{"properties":{"steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},"EvaluationRunDataMapping":{"properties":{"column":{"$ref":"#/components/schemas/EvaluationRunDataMappingColumn"},"step":{"$ref":"#/components/schemas/EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"EvaluationRunDataMappingColumn":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"EvaluationRunDataMappingStep":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"},"EvaluationRunDataStep":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"EvaluationRunDataStepInput":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"EvaluationRunEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRunEdit"},"EvaluationRunEditRequest":{"properties":{"run":{"$ref":"#/components/schemas/EvaluationRunEdit"}},"type":"object","required":["run"],"title":"EvaluationRunEditRequest"},"EvaluationRunFlags":{"properties":{"is_live":{"type":"boolean","title":"Is Live","default":false},"is_active":{"type":"boolean","title":"Is Active","default":false},"is_closed":{"type":"boolean","title":"Is Closed","default":false},"is_queue":{"type":"boolean","title":"Is Queue","default":false},"is_cached":{"type":"boolean","title":"Is Cached","default":false},"is_split":{"type":"boolean","title":"Is Split","default":false},"has_queries":{"type":"boolean","title":"Has Queries","default":false},"has_testsets":{"type":"boolean","title":"Has Testsets","default":false},"has_evaluators":{"type":"boolean","title":"Has Evaluators","default":false},"has_custom":{"type":"boolean","title":"Has Custom","default":false},"has_human":{"type":"boolean","title":"Has Human","default":false},"has_auto":{"type":"boolean","title":"Has Auto","default":false}},"type":"object","title":"EvaluationRunFlags"},"EvaluationRunIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"}},"type":"object","title":"EvaluationRunIdResponse"},"EvaluationRunIdsRequest":{"properties":{"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Run Ids"}},"type":"object","required":["run_ids"],"title":"EvaluationRunIdsRequest"},"EvaluationRunIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Run Ids","default":[]}},"type":"object","title":"EvaluationRunIdsResponse"},"EvaluationRunQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"references":{"anyOf":[{"items":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object"},"type":"array"},{"type":"null"}],"title":"References"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationRunQuery"},"EvaluationRunQueryFlags":{"properties":{"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_queue":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Queue"},"is_cached":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Cached"},"is_split":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Split"},"has_queries":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Queries"},"has_testsets":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testsets"},"has_evaluators":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Evaluators"},"has_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Custom"},"has_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Human"},"has_auto":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Auto"}},"type":"object","title":"EvaluationRunQueryFlags"},"EvaluationRunQueryRequest":{"properties":{"run":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationRunQueryRequest"},"EvaluationRunResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"run":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRun"},{"type":"null"}]}},"type":"object","title":"EvaluationRunResponse"},"EvaluationRunsCreateRequest":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/EvaluationRunCreate"},"type":"array","title":"Runs"}},"type":"object","required":["runs"],"title":"EvaluationRunsCreateRequest"},"EvaluationRunsEditRequest":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/EvaluationRunEdit"},"type":"array","title":"Runs"}},"type":"object","required":["runs"],"title":"EvaluationRunsEditRequest"},"EvaluationRunsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"runs":{"items":{"$ref":"#/components/schemas/EvaluationRun"},"type":"array","title":"Runs","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationRunsResponse"},"EvaluationScenario":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationScenario"},"EvaluationScenarioCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationScenarioCreate"},"EvaluationScenarioEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioEdit"},"EvaluationScenarioEditRequest":{"properties":{"scenario":{"$ref":"#/components/schemas/EvaluationScenarioEdit"}},"type":"object","required":["scenario"],"title":"EvaluationScenarioEditRequest"},"EvaluationScenarioIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"}},"type":"object","title":"EvaluationScenarioIdResponse"},"EvaluationScenarioIdsRequest":{"properties":{"scenario_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Scenario Ids"}},"type":"object","required":["scenario_ids"],"title":"EvaluationScenarioIdsRequest"},"EvaluationScenarioIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenario_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Scenario Ids","default":[]}},"type":"object","title":"EvaluationScenarioIdsResponse"},"EvaluationScenarioQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationScenarioQuery"},"EvaluationScenarioQueryRequest":{"properties":{"scenario":{"anyOf":[{"$ref":"#/components/schemas/EvaluationScenarioQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioQueryRequest"},"EvaluationScenarioResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenario":{"anyOf":[{"$ref":"#/components/schemas/EvaluationScenario"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioResponse"},"EvaluationScenariosCreateRequest":{"properties":{"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenarioCreate"},"type":"array","title":"Scenarios"}},"type":"object","required":["scenarios"],"title":"EvaluationScenariosCreateRequest"},"EvaluationScenariosEditRequest":{"properties":{"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenarioEdit"},"type":"array","title":"Scenarios"}},"type":"object","required":["scenarios"],"title":"EvaluationScenariosEditRequest"},"EvaluationScenariosResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenario"},"type":"array","title":"Scenarios","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationScenariosResponse"},"EvaluationStatus":{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},"Evaluator":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorArtifactFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Evaluator"},"EvaluatorArtifactFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"EvaluatorArtifactFlags"},"EvaluatorArtifactQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"}},"type":"object","title":"EvaluatorArtifactQueryFlags"},"EvaluatorCatalogPreset":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"EvaluatorCatalogPreset"},"EvaluatorCatalogPresetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a preset is returned, 0 otherwise.","default":0},"preset":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorCatalogPreset"},{"type":"null"}],"description":"The catalog preset, or null when none matched."}},"type":"object","title":"EvaluatorCatalogPresetResponse","description":"Envelope for a single catalog preset."},"EvaluatorCatalogPresetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of presets in `presets`.","default":0},"presets":{"items":{"$ref":"#/components/schemas/EvaluatorCatalogPreset"},"type":"array","title":"Presets","description":"Named parameter presets defined against a template."}},"type":"object","title":"EvaluatorCatalogPresetsResponse","description":"Envelope for a list of catalog presets."},"EvaluatorCatalogTemplate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"EvaluatorCatalogTemplate"},"EvaluatorCatalogTemplateResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a template is returned, 0 otherwise.","default":0},"template":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorCatalogTemplate"},{"type":"null"}],"description":"The catalog template, or null when none matched."}},"type":"object","title":"EvaluatorCatalogTemplateResponse","description":"Envelope for a single catalog template."},"EvaluatorCatalogTemplatesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of templates in `templates`.","default":0},"templates":{"items":{"$ref":"#/components/schemas/EvaluatorCatalogTemplate"},"type":"array","title":"Templates","description":"Evaluator catalog templates (blueprints for creating evaluators)."}},"type":"object","title":"EvaluatorCatalogTemplatesResponse","description":"Envelope for a list of catalog templates."},"EvaluatorCatalogType":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"json_schema":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Json Schema"}},"type":"object","required":["key","json_schema"],"title":"EvaluatorCatalogType"},"EvaluatorCatalogTypesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of types in `types`.","default":0},"types":{"items":{"$ref":"#/components/schemas/EvaluatorCatalogType"},"type":"array","title":"Types","description":"JSON schema types the evaluator catalog understands."}},"type":"object","title":"EvaluatorCatalogTypesResponse","description":"Envelope for a list of catalog types."},"EvaluatorCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorCreate"},"EvaluatorCreateRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorCreate","description":"Evaluator payload (slug, name, flags, data). Slug is required and scoped to the project."}},"type":"object","required":["evaluator"],"title":"EvaluatorCreateRequest","description":"Body for creating an evaluator artifact.\n\nCreating an evaluator also provisions its first variant and its initial\nrevision. The evaluator shares the artifact / variant / revision model\nused across versioned resources — see the Versioning guide."},"EvaluatorEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorEdit"},"EvaluatorEditRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorEdit","description":"Evaluator edit payload. Requires the evaluator `id`. Renaming is temporarily disabled."}},"type":"object","required":["evaluator"],"title":"EvaluatorEditRequest","description":"Body for editing the metadata of an existing evaluator artifact."},"EvaluatorFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"EvaluatorFlags","description":"Legacy full evaluator flag set."},"EvaluatorFork":{"properties":{"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionFork"},{"type":"null"}]},"revision":{"anyOf":[{"$ref":"#/components/schemas/RevisionFork"},{"type":"null"}]},"evaluator_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"evaluator_variant":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariantFork"},{"type":"null"}]},"variant":{"anyOf":[{"$ref":"#/components/schemas/VariantFork"},{"type":"null"}]},"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFork"},{"type":"null"}]},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFork"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"EvaluatorFork"},"EvaluatorForkRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorFork","description":"Fork payload. References the source variant or revision and the target evaluator."}},"type":"object","required":["evaluator"],"title":"EvaluatorForkRequest","description":"Body for forking an evaluator variant into a new variant.\n\nForking copies the variant's history into a new branch so experiments\ncan proceed without touching the original."},"EvaluatorQuery":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorArtifactQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"EvaluatorQuery"},"EvaluatorQueryRequest":{"properties":{"evaluator":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorQuery"},{"type":"null"}],"description":"Filter on evaluator attributes (flags, tags, meta)."},"evaluator_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs","description":"Restrict the query to these evaluators. Accepts `id` or `slug` per reference."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When true, include soft-deleted evaluators in the response."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination controls (limit, order, next, newest, oldest)."}},"type":"object","title":"EvaluatorQueryRequest","description":"Body for filtering evaluators. See the Query Pattern guide for field semantics."},"EvaluatorResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when an evaluator is returned, 0 otherwise.","default":0},"evaluator":{"anyOf":[{"$ref":"#/components/schemas/Evaluator"},{"type":"null"}],"description":"The evaluator artifact, or null when none matched."}},"type":"object","title":"EvaluatorResponse","description":"Envelope for a single evaluator response."},"EvaluatorRevision":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevision"},"EvaluatorRevisionCommit":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"EvaluatorRevisionCommit"},"EvaluatorRevisionCommitRequest":{"properties":{"evaluator_revision_commit":{"$ref":"#/components/schemas/EvaluatorRevisionCommit","description":"Commit payload carrying the `evaluator_variant_id`, optional commit `message`, and the revision `data`."}},"type":"object","required":["evaluator_revision_commit"],"title":"EvaluatorRevisionCommitRequest","description":"Body for committing a new revision on a variant."},"EvaluatorRevisionCreate":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorRevisionCreate"},"EvaluatorRevisionCreateRequest":{"properties":{"evaluator_revision":{"$ref":"#/components/schemas/EvaluatorRevisionCreate","description":"Revision payload. Requires the parent `evaluator_variant_id` and a `data` object."}},"type":"object","required":["evaluator_revision"],"title":"EvaluatorRevisionCreateRequest","description":"Body for creating a new revision (commit) on an evaluator variant."},"EvaluatorRevisionData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"EvaluatorRevisionData"},"EvaluatorRevisionData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"EvaluatorRevisionData"},"EvaluatorRevisionDeployRequest":{"properties":{"evaluator_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Evaluator to deploy (latest revision)."},"evaluator_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant to deploy (latest revision on this variant)."},"evaluator_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific revision to deploy."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment variant."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment revision."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Named key under which the revision is pinned. Defaults to `.revision`."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Commit message stored on the environment revision that records the deployment."}},"type":"object","title":"EvaluatorRevisionDeployRequest","description":"Body for pinning an evaluator revision into an environment revision under a key."},"EvaluatorRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorRevisionEdit"},"EvaluatorRevisionEditRequest":{"properties":{"evaluator_revision":{"$ref":"#/components/schemas/EvaluatorRevisionEdit","description":"Revision edit payload. Requires the revision `id`."}},"type":"object","required":["evaluator_revision"],"title":"EvaluatorRevisionEditRequest","description":"Body for editing a revision's mutable fields (currently limited; payload data is immutable)."},"EvaluatorRevisionFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"EvaluatorRevisionFlags"},"EvaluatorRevisionFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"EvaluatorRevisionFork"},"EvaluatorRevisionQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"EvaluatorRevisionQuery"},"EvaluatorRevisionQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"EvaluatorRevisionQueryFlags"},"EvaluatorRevisionQueryRequest":{"properties":{"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionQuery"},{"type":"null"}],"description":"Filter on revision attributes."},"evaluator_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs","description":"Restrict to revisions under these evaluators."},"evaluator_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Variant Refs","description":"Restrict to revisions under these variants."},"evaluator_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Revision Refs","description":"Restrict to these specific revisions."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When true, include soft-deleted revisions."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination controls."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When true, resolve embedded references on each returned revision's `data`."}},"type":"object","title":"EvaluatorRevisionQueryRequest","description":"Body for filtering evaluator revisions. Supports scoping to evaluators, variants, or specific revisions."},"EvaluatorRevisionResolveRequest":{"properties":{"evaluator_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve the latest revision of this evaluator."},"evaluator_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve the latest revision on this variant."},"evaluator_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve this specific revision."},"max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Depth","description":"Maximum recursion depth when following embedded references. Defaults to 10.","default":10},"max_embeds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Embeds","description":"Maximum number of embeds to resolve. Defaults to 100.","default":100},"error_policy":{"anyOf":[{"$ref":"#/components/schemas/ErrorPolicy"},{"type":"null"}],"description":"How to handle embed-resolution errors (`exception` or `fallback`).","default":"exception"}},"type":"object","title":"EvaluatorRevisionResolveRequest","description":"Body for resolving embedded references on an evaluator revision's `data`."},"EvaluatorRevisionResolveResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a revision was resolved, 0 otherwise.","default":0},"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevision"},{"type":"null"}],"description":"The resolved revision."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Diagnostic information about the resolution pass (depth, embed count, errors)."}},"type":"object","title":"EvaluatorRevisionResolveResponse","description":"Envelope for a resolved evaluator revision."},"EvaluatorRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a revision is returned, 0 otherwise.","default":0},"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevision"},{"type":"null"}],"description":"The evaluator revision, or null when none matched."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Embed-resolution metadata. Populated when `resolve=true` was requested."}},"type":"object","title":"EvaluatorRevisionResponse","description":"Envelope for a single evaluator revision."},"EvaluatorRevisionRetrieveRequest":{"properties":{"evaluator_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Retrieve the latest revision of this evaluator."},"evaluator_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Retrieve the latest revision on this variant."},"evaluator_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Retrieve this specific revision."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment to resolve through. Requires `key`."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment variant to resolve through. Requires `key`."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific environment revision to resolve through. Requires `key`."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Named deployment key inside the environment revision. Required with environment refs."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When true, resolve embedded references on the returned revision's `data`."}},"type":"object","title":"EvaluatorRevisionRetrieveRequest","description":"Body for retrieving one revision, either by direct reference or through an environment key.\n\nProvide one of: an evaluator / variant / revision reference, or an environment reference plus `key`."},"EvaluatorRevisionsLog":{"properties":{"evaluator_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"EvaluatorRevisionsLog"},"EvaluatorRevisionsLogRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorRevisionsLog","description":"Log request scoped to an evaluator / variant / revision by id, slug, or version."}},"type":"object","required":["evaluator"],"title":"EvaluatorRevisionsLogRequest","description":"Body for listing the revision log of an evaluator variant."},"EvaluatorRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of revisions in `evaluator_revisions`.","default":0},"evaluator_revisions":{"items":{"$ref":"#/components/schemas/EvaluatorRevision"},"type":"array","title":"Evaluator Revisions","description":"Matching evaluator revisions."}},"type":"object","title":"EvaluatorRevisionsResponse","description":"Envelope for a list of evaluator revisions."},"EvaluatorTemplate":{"properties":{"name":{"type":"string","title":"Name","description":"Human-readable template name."},"key":{"type":"string","title":"Key","description":"Stable template identifier, used to create evaluators from the template."},"direct_use":{"type":"boolean","title":"Direct Use","description":"Whether the template can be used without further configuration."},"settings_presets":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Settings Presets","description":"Preset parameter configurations shipped with the template."},"settings_template":{"additionalProperties":true,"type":"object","title":"Settings Template","description":"JSON Schema describing the template's configurable parameters."},"outputs_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Outputs Schema","description":"JSON Schema describing the template's evaluator output shape."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Template description."},"oss":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Oss","description":"True when the template is available in OSS builds.","default":false},"requires_llm_api_keys":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requires Llm Api Keys","description":"True when the template calls an LLM provider and requires an API key.","default":false},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Tags for grouping templates."},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived","description":"True when the template is deprecated. Hidden unless `include_archived=true`.","default":false}},"type":"object","required":["name","key","direct_use","settings_template"],"title":"EvaluatorTemplate","description":"Static evaluator template definition (built-in evaluator types).\n\nTemplates are shipped with the product and describe the available\nevaluator types. They are read-only and separate from user-owned\nevaluator artifacts."},"EvaluatorTemplatesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of templates in `templates`.","default":0},"templates":{"items":{"$ref":"#/components/schemas/EvaluatorTemplate"},"type":"array","title":"Templates","description":"Built-in evaluator templates."}},"type":"object","title":"EvaluatorTemplatesResponse","description":"Envelope for a list of evaluator templates."},"EvaluatorVariant":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariant"},"EvaluatorVariantCreate":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorVariantCreate"},"EvaluatorVariantCreateRequest":{"properties":{"evaluator_variant":{"$ref":"#/components/schemas/EvaluatorVariantCreate","description":"Variant payload. Requires the parent `evaluator_id`."}},"type":"object","required":["evaluator_variant"],"title":"EvaluatorVariantCreateRequest","description":"Body for creating a new variant on an existing evaluator."},"EvaluatorVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariantEdit"},"EvaluatorVariantEditRequest":{"properties":{"evaluator_variant":{"$ref":"#/components/schemas/EvaluatorVariantEdit","description":"Variant edit payload. Requires the variant `id`."}},"type":"object","required":["evaluator_variant"],"title":"EvaluatorVariantEditRequest","description":"Body for editing a variant's metadata."},"EvaluatorVariantFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"EvaluatorVariantFlags"},"EvaluatorVariantFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorVariantFork"},"EvaluatorVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a variant is returned, 0 otherwise.","default":0},"evaluator_variant":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariant"},{"type":"null"}],"description":"The evaluator variant, or null when none matched."}},"type":"object","title":"EvaluatorVariantResponse","description":"Envelope for a single evaluator variant."},"EvaluatorVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of variants in `evaluator_variants`.","default":0},"evaluator_variants":{"items":{"$ref":"#/components/schemas/EvaluatorVariant"},"type":"array","title":"Evaluator Variants","description":"Matching evaluator variants."}},"type":"object","title":"EvaluatorVariantsResponse","description":"Envelope for a list of evaluator variants."},"EvaluatorsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of evaluators in `evaluators`.","default":0},"evaluators":{"items":{"$ref":"#/components/schemas/Evaluator"},"type":"array","title":"Evaluators","description":"Matching evaluator artifacts."}},"type":"object","title":"EvaluatorsResponse","description":"Envelope for a list of evaluators."},"ExistenceOperator":{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},"Filtering-Input":{"properties":{"operator":{"$ref":"#/components/schemas/LogicalOperator","default":"and"},"conditions":{"items":{"anyOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/Filtering-Input"}]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},"Filtering-Output":{"properties":{"operator":{"$ref":"#/components/schemas/LogicalOperator","default":"and"},"conditions":{"items":{"anyOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/Filtering-Output"}]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},"Focus":{"type":"string","enum":["trace","span"],"title":"Focus"},"Folder":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"kind":{"anyOf":[{"$ref":"#/components/schemas/FolderKind"},{"type":"null"}],"description":"Resource family this folder organizes. Only `applications` is defined today, and it also covers workflows, evaluators, and testsets (they share the artifact table)."},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path","description":"Dot-separated materialized path built from the folder's slug and its ancestors' slugs. Read-only; derived by the server."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"Id of the parent folder, or `null` for a root folder."}},"type":"object","title":"Folder"},"FolderCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"kind":{"anyOf":[{"$ref":"#/components/schemas/FolderKind"},{"type":"null"}],"description":"Resource family the folder organizes. Defaults to `applications` when omitted."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"Id of the parent folder. Omit or set to `null` to create a root folder."}},"type":"object","title":"FolderCreate"},"FolderCreateRequest":{"properties":{"folder":{"$ref":"#/components/schemas/FolderCreate","description":"Folder to create. `slug` is required; `parent_id` nests the new folder under an existing one."}},"type":"object","required":["folder"],"title":"FolderCreateRequest"},"FolderEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"kind":{"anyOf":[{"$ref":"#/components/schemas/FolderKind"},{"type":"null"}],"description":"Resource family. Must match the current folder's kind; defaults to `applications`."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"New parent folder id. Include the key with a `null` value to move the folder to the root; omit the key to keep the existing parent."}},"type":"object","title":"FolderEdit"},"FolderEditRequest":{"properties":{"folder":{"$ref":"#/components/schemas/FolderEdit","description":"Folder edit payload. `id` must match the path parameter. Only fields present in the payload are changed."}},"type":"object","required":["folder"],"title":"FolderEditRequest"},"FolderIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a folder was deleted, `0` if no folder matched.","default":0},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id","description":"Id of the deleted folder. Omitted when nothing was deleted."}},"type":"object","title":"FolderIdResponse"},"FolderKind":{"type":"string","enum":["applications"],"title":"FolderKind"},"FolderQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id","description":"Match a single folder id."},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids","description":"Match any of the given folder ids."},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"Match a folder by slug, regardless of its position in the tree."},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs","description":"Match folders whose slug is in the given list."},"kind":{"anyOf":[{"$ref":"#/components/schemas/FolderKind"},{"type":"null"}],"description":"Match folders of a single resource family."},"kinds":{"anyOf":[{"type":"boolean"},{"items":{"$ref":"#/components/schemas/FolderKind"},"type":"array"},{"type":"null"}],"title":"Kinds","description":"Filter by presence of a kind. `false` returns folders with no kind, `true` returns folders where `kind` is set, and an array restricts to the given kinds."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"Match folders whose parent is this id. Send `null` to return only root folders."},"parent_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Parent Ids","description":"Match folders whose parent is any of the given ids."},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path","description":"Exact match on the materialized `path` (e.g. `support.prod`)."},"paths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Paths","description":"Exact match on any of the given paths."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Subtree lookup: returns the folder at this path and every descendant."},"prefixes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Prefixes","description":"Subtree lookup across multiple prefixes, OR-ed together."}},"type":"object","title":"FolderQuery"},"FolderQueryRequest":{"properties":{"folder":{"$ref":"#/components/schemas/FolderQuery","description":"Filter object. Any combination of `id`/`ids`, `slug`/`slugs`, `kind`/`kinds`, `parent_id`/`parent_ids`, `path`/`paths`, and `prefix`/`prefixes` narrows the result."}},"type":"object","required":["folder"],"title":"FolderQueryRequest"},"FolderResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of folders returned (`0` or `1`).","default":0},"folder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"The folder, when found. Omitted when `count` is `0`."}},"type":"object","title":"FolderResponse"},"FoldersResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of folders in `folders`.","default":0},"folders":{"items":{"$ref":"#/components/schemas/Folder"},"type":"array","title":"Folders","description":"Matching folders for the query. Ordering is not guaranteed."}},"type":"object","title":"FoldersResponse"},"Format":{"type":"string","enum":["agenta","opentelemetry"],"title":"Format"},"Formatting":{"properties":{"focus":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}]},"format":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}]}},"type":"object","title":"Formatting"},"FullJson-Input":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/FullJson-Input"},"type":"array"},{"type":"null"}]},"FullJson-Output":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"items":{"$ref":"#/components/schemas/FullJson-Output"},"type":"array"},{"type":"null"}]},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Header":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"Header"},"InviteRequest":{"properties":{"email":{"type":"string","title":"Email"},"roles":{"anyOf":[{"items":{"type":"string","enum":["owner","admin","developer","editor","annotator","viewer"]},"type":"array"},{"type":"null"}],"title":"Roles"}},"type":"object","required":["email"],"title":"InviteRequest"},"InviteToken":{"properties":{"token":{"type":"string","title":"Token"},"email":{"type":"string","title":"Email"}},"type":"object","required":["token","email"],"title":"InviteToken"},"Invocation":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Invocation"},"InvocationCreate":{"properties":{"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"InvocationCreate"},"InvocationCreateRequest":{"properties":{"invocation":{"$ref":"#/components/schemas/InvocationCreate"}},"type":"object","required":["invocation"],"title":"InvocationCreateRequest"},"InvocationEdit":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data"],"title":"InvocationEdit"},"InvocationEditRequest":{"properties":{"invocation":{"$ref":"#/components/schemas/InvocationEdit"}},"type":"object","required":["invocation"],"title":"InvocationEditRequest"},"InvocationLinkResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"invocation_link":{"anyOf":[{"$ref":"#/components/schemas/OTelLink-Output"},{"type":"null"}]}},"type":"object","title":"InvocationLinkResponse"},"InvocationQuery":{"properties":{"origin":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceOrigin"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceKind"},{"type":"null"}]},"channel":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceChannel"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"InvocationQuery"},"InvocationQueryRequest":{"properties":{"invocation":{"anyOf":[{"$ref":"#/components/schemas/InvocationQuery"},{"type":"null"}]},"invocation_links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Invocation Links"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"InvocationQueryRequest"},"InvocationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"invocation":{"anyOf":[{"$ref":"#/components/schemas/Invocation"},{"type":"null"}]}},"type":"object","title":"InvocationResponse"},"InvocationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"invocations":{"items":{"$ref":"#/components/schemas/Invocation"},"type":"array","title":"Invocations","default":[]}},"type":"object","title":"InvocationsResponse"},"JsonSchemas-Input":{"properties":{"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"inputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Inputs"},"outputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Outputs"}},"type":"object","title":"JsonSchemas"},"JsonSchemas-Output":{"properties":{"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"inputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Inputs"},"outputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Outputs"}},"type":"object","title":"JsonSchemas"},"LabelJson-Input":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"}]},"LabelJson-Output":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"}]},"LegacyLifecycleDTO":{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},"ListAPIKeysResponse":{"properties":{"prefix":{"type":"string","title":"Prefix"},"created_at":{"type":"string","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"expiration_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiration Date"}},"type":"object","required":["prefix","created_at"],"title":"ListAPIKeysResponse"},"ListOperator":{"type":"string","enum":["in","not_in"],"title":"ListOperator"},"ListOptions":{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},"LogicalOperator":{"type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"MetricSpec":{"properties":{"type":{"$ref":"#/components/schemas/MetricType","default":"none"},"path":{"type":"string","title":"Path","default":"*"},"bins":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bins"},"vmin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vmin"},"vmax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vmax"},"edge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Edge"}},"type":"object","title":"MetricSpec"},"MetricType":{"type":"string","enum":["numeric/continuous","numeric/discrete","binary","categorical/single","categorical/multiple","string","json","none","*"],"title":"MetricType"},"MetricsBucket":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"interval":{"type":"integer","title":"Interval"},"metrics":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Metrics"}},"type":"object","required":["timestamp","interval"],"title":"MetricsBucket"},"NumericOperator":{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},"OTelEvent-Input":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"OTelEvent-Output":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"OTelHash-Input":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"OTelHash-Output":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"OTelLink-Input":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelLink"},"OTelLink-Output":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelLink"},"OTelLinksResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of spans that were accepted and published to the ingest stream. Compare against the number of spans you sent to detect partial failures.","default":0},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links","description":"List of `(trace_id, span_id)` pairs for the accepted spans, in submission order."}},"type":"object","title":"OTelLinksResponse","description":"Response from span ingestion.\n\n`count` reflects how many spans were successfully parsed and published\nto the ingest stream. If you submitted N spans and see `count < N`,\nsome spans failed server-side validation and were not persisted (check\nserver logs for details). See [Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202) for\nthe full semantics of the `202 Accepted` response."},"OTelReference-Input":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"OTelReference-Output":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"OTelSpanKind":{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},"OTelStatusCode":{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},"OTelTracingRequest":{"properties":{"spans":{"anyOf":[{"items":{"$ref":"#/components/schemas/Span-Input"},"type":"array"},{"type":"null"}],"title":"Spans","description":"Flat list of spans. Use this when you already have a flat list and parent/child relationships are expressed via each span's `parent_id`."},"traces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SpansTree-Input"},"type":"object"},{"type":"null"}],"title":"Traces","description":"Nested tree of spans keyed by `trace_id` → span name, with children under each node's `spans` field. This matches the shape returned by `POST /tracing/spans/query` with `focus=\"trace\"`."}},"type":"object","title":"OTelTracingRequest","description":"Ingest or query payload for OpenTelemetry-style spans.\n\nExactly one of `spans` or `traces` should be provided. Use `spans`\nfor a flat list (parent/child linked via `parent_id`); use `traces`\nfor a nested tree (keyed by `trace_id` then by span name, children\nhanging off each node's `spans` field). The two shapes are\ninterchangeable and the query endpoint returns the `traces` shape by\ndefault.\n\nSee [Tracing](/reference/api-guide/tracing) for the full attribute\nnamespace and the async ingest contract."},"OTelTracingResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Total number of matching traces or spans in the window.","default":0},"spans":{"anyOf":[{"items":{"$ref":"#/components/schemas/Span-Output"},"type":"array"},{"type":"null"}],"title":"Spans","description":"Flat list of spans, populated when the query was run with `focus=\"span\"`."},"traces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SpansTree-Output"},"type":"object"},{"type":"null"}],"title":"Traces","description":"Nested tree of spans keyed by `trace_id` → span name, populated when the query was run with `focus=\"trace\"` (default)."}},"type":"object","title":"OTelTracingResponse","description":"Response from span/trace queries.\n\nExactly one of `spans` or `traces` is populated, controlled by the\n`focus` field in the request (`\"span\"` for flat lists, `\"trace\"` for\nnested trees). The shapes here match what the ingest endpoint accepts,\nso you can round-trip data between environments."},"OldAnalyticsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of time buckets returned.","default":0},"buckets":{"items":{"$ref":"#/components/schemas/Bucket"},"type":"array","title":"Buckets","description":"Time-bucketed aggregates with fixed fields (`total`, `errors`) holding `count`, `duration`, `costs`, and `tokens`.","default":[]}},"type":"object","title":"OldAnalyticsResponse","description":"Legacy analytics response with a fixed metric schema."},"OrganizationDetails":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"members":{"items":{"type":"string"},"type":"array","title":"Members"},"invitations":{"items":{},"type":"array","title":"Invitations"},"workspaces":{"items":{"type":"string"},"type":"array","title":"Workspaces"},"default_workspace":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Workspace"}},"type":"object","required":["id","owner_id"],"title":"OrganizationDetails"},"OrganizationDomainCreate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"domain":{"type":"string","title":"Domain"}},"type":"object","required":["domain"],"title":"OrganizationDomainCreate","description":"Request model for creating a domain."},"OrganizationDomainResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"additionalProperties":true,"type":"object","title":"Flags"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"}},"type":"object","required":["id","slug","name","description","flags","token","created_at","updated_at","organization_id"],"title":"OrganizationDomainResponse","description":"Response model for a domain."},"OrganizationDomainVerify":{"properties":{"domain_id":{"type":"string","title":"Domain Id"}},"type":"object","required":["domain_id"],"title":"OrganizationDomainVerify","description":"Request model for verifying a domain."},"OrganizationProviderCreate":{"properties":{"slug":{"type":"string","pattern":"^[a-z-]+$","title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"settings":{"additionalProperties":true,"type":"object","title":"Settings"}},"type":"object","required":["slug","settings"],"title":"OrganizationProviderCreate","description":"Request model for creating an SSO provider."},"OrganizationProviderResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"additionalProperties":true,"type":"object","title":"Flags"},"settings":{"additionalProperties":true,"type":"object","title":"Settings"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"}},"type":"object","required":["id","slug","name","description","flags","settings","created_at","updated_at","organization_id"],"title":"OrganizationProviderResponse","description":"Response model for an SSO provider."},"OrganizationProviderUpdate":{"properties":{"slug":{"anyOf":[{"type":"string","pattern":"^[a-z-]+$"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"}},"type":"object","title":"OrganizationProviderUpdate","description":"Request model for updating an SSO provider."},"OrganizationUpdate":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","title":"OrganizationUpdate"},"Permission":{"type":"string","enum":["read_system","view_applications","edit_application","create_app_variant","delete_app_variant","modify_variant_configurations","delete_application_variant","run_service","view_webhooks","edit_webhooks","view_secret","edit_secret","view_spans","edit_spans","view_folders","edit_folders","view_api_keys","edit_api_keys","view_app_environment_deployment","edit_app_environment_deployment","create_app_environment_deployment","view_testset","edit_testset","create_testset","delete_testset","view_evaluation","run_evaluations","edit_evaluation","create_evaluation","delete_evaluation","deploy_application","view_workspace","edit_workspace","create_workspace","delete_workspace","modify_user_roles","add_new_user_to_workspace","edit_organization","delete_organization","add_new_user_to_organization","reset_password","view_billing","edit_billing","view_workflows","edit_workflows","run_workflows","view_evaluators","edit_evaluators","view_environments","edit_environments","deploy_environments","view_queries","edit_queries","view_testsets","edit_testsets","view_annotations","edit_annotations","view_invocations","edit_invocations","view_evaluation_runs","edit_evaluation_runs","view_evaluation_scenarios","edit_evaluation_scenarios","view_evaluation_results","edit_evaluation_results","view_evaluation_metrics","edit_evaluation_metrics","view_evaluation_queues","edit_evaluation_queues","view_tools","edit_tools","run_tools"],"title":"Permission"},"ProjectsResponse":{"properties":{"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"workspace_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Name"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"},"is_default_project":{"type":"boolean","title":"Is Default Project","default":false},"user_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Role"},"is_demo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Demo"}},"type":"object","required":["project_id","project_name"],"title":"ProjectsResponse"},"QueriesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queries":{"items":{"$ref":"#/components/schemas/Query"},"type":"array","title":"Queries","default":[]}},"type":"object","title":"QueriesResponse"},"Query":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Query"},"QueryCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"QueryCreate"},"QueryCreateRequest":{"properties":{"query":{"$ref":"#/components/schemas/QueryCreate"}},"type":"object","required":["query"],"title":"QueryCreateRequest"},"QueryEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryEdit"},"QueryEditRequest":{"properties":{"query":{"$ref":"#/components/schemas/QueryEdit"}},"type":"object","required":["query"],"title":"QueryEditRequest"},"QueryFlags":{"properties":{},"type":"object","title":"QueryFlags"},"QueryQueryFlags":{"properties":{},"type":"object","title":"QueryQueryFlags"},"QueryResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"$ref":"#/components/schemas/Query"},{"type":"null"}]}},"type":"object","title":"QueryResponse"},"QueryRevision":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"QueryRevision"},"QueryRevisionCommit":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"QueryRevisionCommit"},"QueryRevisionCommitRequest":{"properties":{"query_revision_commit":{"$ref":"#/components/schemas/QueryRevisionCommit"}},"type":"object","required":["query_revision_commit"],"title":"QueryRevisionCommitRequest"},"QueryRevisionCreate":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"QueryRevisionCreate"},"QueryRevisionCreateRequest":{"properties":{"query_revision":{"$ref":"#/components/schemas/QueryRevisionCreate"}},"type":"object","required":["query_revision"],"title":"QueryRevisionCreateRequest"},"QueryRevisionData-Input":{"properties":{"formatting":{"anyOf":[{"$ref":"#/components/schemas/Formatting"},{"type":"null"}]},"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Input"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]},"trace_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trace Ids"},"traces":{"anyOf":[{"items":{"$ref":"#/components/schemas/Trace-Input"},"type":"array"},{"type":"null"}],"title":"Traces"}},"type":"object","title":"QueryRevisionData"},"QueryRevisionData-Output":{"properties":{"formatting":{"anyOf":[{"$ref":"#/components/schemas/Formatting"},{"type":"null"}]},"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Output"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]},"trace_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trace Ids"},"traces":{"anyOf":[{"items":{"$ref":"#/components/schemas/Trace-Output"},"type":"array"},{"type":"null"}],"title":"Traces"}},"type":"object","title":"QueryRevisionData"},"QueryRevisionEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryRevisionEdit"},"QueryRevisionEditRequest":{"properties":{"query_revision":{"$ref":"#/components/schemas/QueryRevisionEdit"}},"type":"object","required":["query_revision"],"title":"QueryRevisionEditRequest"},"QueryRevisionQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"QueryRevisionQuery"},"QueryRevisionQueryRequest":{"properties":{"query_revision":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionQuery"},{"type":"null"}]},"query_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Refs"},"query_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Variant Refs"},"query_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Revision Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"QueryRevisionQueryRequest"},"QueryRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query_revision":{"anyOf":[{"$ref":"#/components/schemas/QueryRevision"},{"type":"null"}]}},"type":"object","title":"QueryRevisionResponse"},"QueryRevisionRetrieveRequest":{"properties":{"query_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"query_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"query_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"include_trace_ids":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Trace Ids"},"include_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Traces"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"QueryRevisionRetrieveRequest"},"QueryRevisionsLog":{"properties":{"query_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"QueryRevisionsLog"},"QueryRevisionsLogRequest":{"properties":{"query_revisions":{"$ref":"#/components/schemas/QueryRevisionsLog"}},"type":"object","required":["query_revisions"],"title":"QueryRevisionsLogRequest"},"QueryRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query_revisions":{"items":{"$ref":"#/components/schemas/QueryRevision"},"type":"array","title":"Query Revisions","default":[]}},"type":"object","title":"QueryRevisionsResponse"},"QueryVariant":{"properties":{"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryVariant"},"QueryVariantCreate":{"properties":{"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"QueryVariantCreate"},"QueryVariantCreateRequest":{"properties":{"query_variant":{"$ref":"#/components/schemas/QueryVariantCreate"}},"type":"object","required":["query_variant"],"title":"QueryVariantCreateRequest"},"QueryVariantEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryVariantEdit"},"QueryVariantEditRequest":{"properties":{"query_variant":{"$ref":"#/components/schemas/QueryVariantEdit"}},"type":"object","required":["query_variant"],"title":"QueryVariantEditRequest"},"QueryVariantQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"QueryVariantQuery"},"QueryVariantQueryRequest":{"properties":{"query_variant":{"anyOf":[{"$ref":"#/components/schemas/QueryVariantQuery"},{"type":"null"}]},"query_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Refs"},"query_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Variant Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"QueryVariantQueryRequest"},"QueryVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query_variant":{"anyOf":[{"$ref":"#/components/schemas/QueryVariant"},{"type":"null"}]}},"type":"object","title":"QueryVariantResponse"},"QueryVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query_variants":{"items":{"$ref":"#/components/schemas/QueryVariant"},"type":"array","title":"Query Variants","default":[]}},"type":"object","title":"QueryVariantsResponse"},"Reference":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"ReferenceRequestModel-Input":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},"ReferenceRequestModel-Output":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},"ResendInviteRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"ResendInviteRequest"},"ResolutionInfo":{"properties":{"references_used":{"items":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object"},"type":"array","title":"References Used"},"depth_reached":{"type":"integer","title":"Depth Reached"},"embeds_resolved":{"type":"integer","title":"Embeds Resolved"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]}},"type":"object","required":["references_used","depth_reached","embeds_resolved"],"title":"ResolutionInfo"},"RevisionFork":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"RevisionFork"},"SSOProviderDTO":{"properties":{"provider":{"$ref":"#/components/schemas/SSOProviderSettingsDTO"}},"type":"object","required":["provider"],"title":"SSOProviderDTO"},"SSOProviderInfo":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"third_party_id":{"type":"string","title":"Third Party Id"}},"type":"object","required":["id","slug","third_party_id"],"title":"SSOProviderInfo"},"SSOProviderSettingsDTO":{"properties":{"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"issuer_url":{"type":"string","title":"Issuer Url"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"extra":{"additionalProperties":true,"type":"object","title":"Extra"}},"type":"object","required":["client_id","client_secret","issuer_url","scopes"],"title":"SSOProviderSettingsDTO"},"SSOProviders":{"properties":{"providers":{"items":{"$ref":"#/components/schemas/SSOProviderInfo"},"type":"array","title":"Providers"}},"type":"object","required":["providers"],"title":"SSOProviders"},"SecretDTO":{"properties":{"kind":{"$ref":"#/components/schemas/SecretKind"},"data":{"anyOf":[{"$ref":"#/components/schemas/StandardProviderDTO"},{"$ref":"#/components/schemas/CustomProviderDTO"},{"$ref":"#/components/schemas/SSOProviderDTO"},{"$ref":"#/components/schemas/WebhookProviderDTO"}],"title":"Data"}},"type":"object","required":["kind","data"],"title":"SecretDTO"},"SecretKind":{"type":"string","enum":["provider_key","custom_provider","sso_provider","webhook_provider"],"title":"SecretKind"},"SecretResponseDTO":{"properties":{"kind":{"$ref":"#/components/schemas/SecretKind"},"data":{"anyOf":[{"$ref":"#/components/schemas/StandardProviderDTO"},{"$ref":"#/components/schemas/CustomProviderDTO"},{"$ref":"#/components/schemas/SSOProviderDTO"},{"$ref":"#/components/schemas/WebhookProviderDTO"}],"title":"Data"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"header":{"$ref":"#/components/schemas/Header"},"lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["kind","data","header"],"title":"SecretResponseDTO"},"SessionIdentitiesUpdate":{"properties":{"session_identities":{"items":{"type":"string"},"type":"array","title":"Session Identities"}},"type":"object","required":["session_identities"],"title":"SessionIdentitiesUpdate"},"SessionIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of session IDs in this page.","default":0},"session_ids":{"items":{"type":"string"},"type":"array","title":"Session Ids","description":"Distinct values of `ag.session.id` in this page.","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor for the next page. Pass verbatim as `windowing.next`."}},"type":"object","title":"SessionIdsResponse"},"SessionsQueryRequest":{"properties":{"realtime":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Realtime","description":"When `true`, paginate by `last_active` (reflects ongoing activity but can shift between pages). When `false` or unset, paginate by the stable `first_active` cursor."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range. Pass the returned `windowing.next` on subsequent calls to continue iteration."}},"type":"object","title":"SessionsQueryRequest","description":"Request body for `POST /tracing/sessions/query`."},"SimpleApplication":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationData-Output"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleApplication"},"SimpleApplicationCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleApplicationCreate"},"SimpleApplicationCreateRequest":{"properties":{"application":{"$ref":"#/components/schemas/SimpleApplicationCreate","description":"Application fields plus `data` for the first revision. `data.uri` selects the template (for example `agenta:builtin:completion:v0`); `data.parameters` carries the prompt and model config."}},"type":"object","required":["application"],"title":"SimpleApplicationCreateRequest","description":"Request body for `POST /simple/applications/`.\n\nCreates the application artifact, a default variant, and a first committed\nrevision whose `data` comes from the request. Use this for the common case\nof \"spin up a new application from a template\".\nSee [Simple Endpoints](/reference/api-guide/simple-endpoints)."},"SimpleApplicationData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleApplicationData"},"SimpleApplicationData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleApplicationData"},"SimpleApplicationEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleApplicationEdit"},"SimpleApplicationEditRequest":{"properties":{"application":{"$ref":"#/components/schemas/SimpleApplicationEdit","description":"Fields to change. `id` must match the path. Supplying `data` commits a new revision with that configuration; supplying `flags`/`tags`/`meta` commits a revision with the updated header but the existing `data`."}},"type":"object","required":["application"],"title":"SimpleApplicationEditRequest","description":"Request body for `PUT /simple/applications/{application_id}`.\n\nCommits a new revision on the application's variant whenever fields other\nthan `id` are present. If only `id` is sent, the current state is returned\nwithout committing."},"SimpleApplicationFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"SimpleApplicationFlags"},"SimpleApplicationQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"SimpleApplicationQuery"},"SimpleApplicationQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"SimpleApplicationQueryFlags"},"SimpleApplicationQueryRequest":{"properties":{"application":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationQuery"},{"type":"null"}],"description":"Attribute filter. Supports `slug`, `slugs`, `flags`, and `meta`. `flags` filter both artifact flags (`is_application`, etc.) and revision flags (`is_chat`, `has_url`, etc.)."},"application_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Refs","description":"Restrict to specific applications by `id` or `slug`."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When `true`, include archived applications. Defaults to `false`.","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time-range controls."}},"type":"object","title":"SimpleApplicationQueryRequest","description":"Request body for `POST /simple/applications/query`.\n\nReturns one row per application with the currently resolved variant,\nrevision, and `data` merged in — the shape most clients want when listing\napplications for a dashboard or invocation picker."},"SimpleApplicationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when the application was found, `0` otherwise.","default":0},"application":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplication"},{"type":"null"}],"description":"The application with `variant_id`, `revision_id`, and the revision's `data` merged. `data.url` is the invocation URL."}},"type":"object","title":"SimpleApplicationResponse","description":"Simple-application single-row response envelope."},"SimpleApplicationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of applications in this page.","default":0},"applications":{"items":{"$ref":"#/components/schemas/SimpleApplication"},"type":"array","title":"Applications","description":"Applications with their current variant, revision, and `data` merged in."}},"type":"object","title":"SimpleApplicationsResponse","description":"Paginated list of simple-application rows."},"SimpleEnvironment":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleEnvironment"},"SimpleEnvironmentCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleEnvironmentCreate"},"SimpleEnvironmentCreateRequest":{"properties":{"environment":{"$ref":"#/components/schemas/SimpleEnvironmentCreate"}},"type":"object","required":["environment"],"title":"SimpleEnvironmentCreateRequest"},"SimpleEnvironmentEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleEnvironmentEdit"},"SimpleEnvironmentEditRequest":{"properties":{"environment":{"$ref":"#/components/schemas/SimpleEnvironmentEdit"}},"type":"object","required":["environment"],"title":"SimpleEnvironmentEditRequest"},"SimpleEnvironmentQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"SimpleEnvironmentQuery"},"SimpleEnvironmentQueryRequest":{"properties":{"environment":{"anyOf":[{"$ref":"#/components/schemas/SimpleEnvironmentQuery"},{"type":"null"}]},"environment_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Environment Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleEnvironmentQueryRequest"},"SimpleEnvironmentResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment":{"anyOf":[{"$ref":"#/components/schemas/SimpleEnvironment"},{"type":"null"}]}},"type":"object","title":"SimpleEnvironmentResponse"},"SimpleEnvironmentsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environments":{"items":{"$ref":"#/components/schemas/SimpleEnvironment"},"type":"array","title":"Environments","default":[]}},"type":"object","title":"SimpleEnvironmentsResponse"},"SimpleEvaluation":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluation"},"SimpleEvaluationCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationCreate"},"SimpleEvaluationCreateRequest":{"properties":{"evaluation":{"$ref":"#/components/schemas/SimpleEvaluationCreate"}},"type":"object","required":["evaluation"],"title":"SimpleEvaluationCreateRequest"},"SimpleEvaluationData":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"query_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Query Steps"},"testset_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Testset Steps"},"application_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Application Steps"},"evaluator_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluator Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"}},"type":"object","title":"SimpleEvaluationData"},"SimpleEvaluationEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationEdit"},"SimpleEvaluationEditRequest":{"properties":{"evaluation":{"$ref":"#/components/schemas/SimpleEvaluationEdit"}},"type":"object","required":["evaluation"],"title":"SimpleEvaluationEditRequest"},"SimpleEvaluationIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"evaluation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluation Id"}},"type":"object","title":"SimpleEvaluationIdResponse"},"SimpleEvaluationQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"SimpleEvaluationQuery"},"SimpleEvaluationQueryRequest":{"properties":{"evaluation":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationQueryRequest"},"SimpleEvaluationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"evaluation":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluation"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationResponse"},"SimpleEvaluationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"evaluations":{"items":{"$ref":"#/components/schemas/SimpleEvaluation"},"type":"array","title":"Evaluations","default":[]}},"type":"object","title":"SimpleEvaluationsResponse"},"SimpleEvaluator":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorData-Output"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleEvaluator"},"SimpleEvaluatorCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorCreate"},"SimpleEvaluatorCreateRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/SimpleEvaluatorCreate","description":"Simple evaluator payload (slug, name, flags, and `data` with `uri` + `parameters`)."}},"type":"object","required":["evaluator"],"title":"SimpleEvaluatorCreateRequest","description":"Body for creating an evaluator via the simple surface.\n\nCollapses artifact, variant, and first revision into one call. The\nresponse returns the same flat shape that `/simple/evaluators/query`\nexposes."},"SimpleEvaluatorData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleEvaluatorData"},"SimpleEvaluatorData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleEvaluatorData"},"SimpleEvaluatorEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorEdit"},"SimpleEvaluatorEditRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/SimpleEvaluatorEdit","description":"Simple evaluator edit payload. Requires the evaluator `id`. Renaming is temporarily disabled."}},"type":"object","required":["evaluator"],"title":"SimpleEvaluatorEditRequest","description":"Body for editing an evaluator via the simple surface."},"SimpleEvaluatorFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"SimpleEvaluatorFlags"},"SimpleEvaluatorQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"SimpleEvaluatorQuery"},"SimpleEvaluatorQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"SimpleEvaluatorQueryFlags"},"SimpleEvaluatorQueryRequest":{"properties":{"evaluator":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorQuery"},{"type":"null"}],"description":"Filter on evaluator attributes (slug, slugs, flags, meta)."},"evaluator_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs","description":"Restrict to these evaluators."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When true, include soft-deleted evaluators.","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination controls."}},"type":"object","title":"SimpleEvaluatorQueryRequest","description":"Body for filtering evaluators via the simple surface."},"SimpleEvaluatorResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when an evaluator is returned, 0 otherwise.","default":0},"evaluator":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluator"},{"type":"null"}],"description":"The flat evaluator record with latest variant and revision merged into `data`."}},"type":"object","title":"SimpleEvaluatorResponse","description":"Envelope for a single simple evaluator."},"SimpleEvaluatorsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of evaluators in `evaluators`.","default":0},"evaluators":{"items":{"$ref":"#/components/schemas/SimpleEvaluator"},"type":"array","title":"Evaluators","description":"Matching flat evaluator records."}},"type":"object","title":"SimpleEvaluatorsResponse","description":"Envelope for a list of simple evaluators."},"SimpleQueriesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queries":{"items":{"$ref":"#/components/schemas/SimpleQuery"},"type":"array","title":"Queries","default":[]}},"type":"object","title":"SimpleQueriesResponse"},"SimpleQuery":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Output"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleQuery"},"SimpleQueryCreate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleQueryCreate"},"SimpleQueryCreateRequest":{"properties":{"query":{"$ref":"#/components/schemas/SimpleQueryCreate"}},"type":"object","required":["query"],"title":"SimpleQueryCreateRequest"},"SimpleQueryEdit":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleQueryEdit"},"SimpleQueryEditRequest":{"properties":{"query":{"$ref":"#/components/schemas/SimpleQueryEdit"}},"type":"object","required":["query"],"title":"SimpleQueryEditRequest"},"SimpleQueryQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","title":"SimpleQueryQuery"},"SimpleQueryQueryRequest":{"properties":{"query":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueryQuery"},{"type":"null"}]},"query_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueryQueryRequest"},"SimpleQueryResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"$ref":"#/components/schemas/SimpleQuery"},{"type":"null"}]}},"type":"object","title":"SimpleQueryResponse"},"SimpleQueue":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"SimpleQueue"},"SimpleQueueCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueData"},{"type":"null"}]}},"type":"object","title":"SimpleQueueCreate"},"SimpleQueueCreateRequest":{"properties":{"queue":{"$ref":"#/components/schemas/SimpleQueueCreate"}},"type":"object","required":["queue"],"title":"SimpleQueueCreateRequest"},"SimpleQueueData":{"properties":{"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueKind"},{"type":"null"}]},"queries":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Queries"},"testsets":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testsets"},"evaluators":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluators"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"},"assignments":{"anyOf":[{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Assignments"},"settings":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueSettings"},{"type":"null"}]}},"type":"object","title":"SimpleQueueData"},"SimpleQueueIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Queue Id"}},"type":"object","title":"SimpleQueueIdResponse"},"SimpleQueueKind":{"type":"string","enum":["traces","testcases"],"title":"SimpleQueueKind"},"SimpleQueueQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueKind"},{"type":"null"}]},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"queue_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Queue Ids"}},"type":"object","title":"SimpleQueueQuery"},"SimpleQueueQueryRequest":{"properties":{"queue":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueueQueryRequest"},"SimpleQueueResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueue"},{"type":"null"}]}},"type":"object","title":"SimpleQueueResponse"},"SimpleQueueScenariosQuery":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"}},"type":"object","title":"SimpleQueueScenariosQuery"},"SimpleQueueScenariosQueryRequest":{"properties":{"queue":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueScenariosQuery"},{"type":"null"}]},"scenario":{"anyOf":[{"$ref":"#/components/schemas/EvaluationScenarioQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueueScenariosQueryRequest"},"SimpleQueueScenariosResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenario"},"type":"array","title":"Scenarios","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueueScenariosResponse"},"SimpleQueueSettings":{"properties":{"batch_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Size"},"batch_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Offset"}},"type":"object","title":"SimpleQueueSettings"},"SimpleQueueTestcasesCreateRequest":{"properties":{"testcase_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Testcase Ids"}},"type":"object","required":["testcase_ids"],"title":"SimpleQueueTestcasesCreateRequest"},"SimpleQueueTracesCreateRequest":{"properties":{"trace_ids":{"items":{"type":"string"},"type":"array","title":"Trace Ids"}},"type":"object","required":["trace_ids"],"title":"SimpleQueueTracesCreateRequest"},"SimpleQueuesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queues":{"items":{"$ref":"#/components/schemas/SimpleQueue"},"type":"array","title":"Queues","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueuesResponse"},"SimpleTestset":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Output"},{"type":"null"}]},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"}},"type":"object","title":"SimpleTestset"},"SimpleTestsetCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetCreate"},"SimpleTestsetCreateRequest":{"properties":{"testset":{"$ref":"#/components/schemas/SimpleTestsetCreate","description":"Simple testset to create. `data.testcases` is committed as the first revision on a single variant in one call."}},"type":"object","required":["testset"],"title":"SimpleTestsetCreateRequest"},"SimpleTestsetEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetEdit"},"SimpleTestsetEditRequest":{"properties":{"testset":{"$ref":"#/components/schemas/SimpleTestsetEdit","description":"Simple testset fields to update. If `data.testcases` is provided, a new revision is committed with those testcases."}},"type":"object","required":["testset"],"title":"SimpleTestsetEditRequest"},"SimpleTestsetQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"SimpleTestsetQuery"},"SimpleTestsetQueryRequest":{"properties":{"testset":{"anyOf":[{"$ref":"#/components/schemas/SimpleTestsetQuery"},{"type":"null"}],"description":"Attribute filter on the testset (flags, tags, meta)."},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs","description":"Restrict the query to specific testsets."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"Include soft-deleted testsets."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. See the Query Pattern guide."}},"type":"object","title":"SimpleTestsetQueryRequest"},"SimpleTestsetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a testset was returned, 0 otherwise.","default":0},"testset":{"anyOf":[{"$ref":"#/components/schemas/SimpleTestset"},{"type":"null"}],"description":"The testset with its latest revision testcases merged into `data.testcases`, and the revision ID on `revision_id`."}},"type":"object","title":"SimpleTestsetResponse"},"SimpleTestsetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of simple testsets returned.","default":0},"testsets":{"items":{"$ref":"#/components/schemas/SimpleTestset"},"type":"array","title":"Testsets","description":"Simple testsets, each with its latest revision testcases merged in."}},"type":"object","title":"SimpleTestsetsResponse"},"SimpleTrace":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"SimpleTrace"},"SimpleTraceChannel":{"type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel"},"SimpleTraceCreate":{"properties":{"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"SimpleTraceCreate"},"SimpleTraceCreateRequest":{"properties":{"trace":{"$ref":"#/components/schemas/SimpleTraceCreate","description":"The trace to create. Must include `data` (the payload being recorded) and typically `origin`, `kind`, and `channel` to describe where it came from. Optional `references` link the trace to Agenta entities (app, variant, revision, evaluator, testset, etc.)."}},"type":"object","required":["trace"],"title":"SimpleTraceCreateRequest","description":"Request body for creating a single-span \"simple\" trace."},"SimpleTraceEdit":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data"],"title":"SimpleTraceEdit"},"SimpleTraceEditRequest":{"properties":{"trace":{"$ref":"#/components/schemas/SimpleTraceEdit","description":"The fields to update. `data` is required. `tags`, `meta`, `references`, and `links` overwrite their current values when present."}},"type":"object","required":["trace"],"title":"SimpleTraceEditRequest","description":"Request body for editing an existing \"simple\" trace."},"SimpleTraceKind":{"type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind"},"SimpleTraceLinkResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a trace was removed, `0` otherwise.","default":0},"link":{"anyOf":[{"$ref":"#/components/schemas/OTelLink-Output"},{"type":"null"}],"description":"The `(trace_id, span_id)` pair that was removed."}},"type":"object","title":"SimpleTraceLinkResponse","description":"Response from `DELETE /simple/traces/{trace_id}`."},"SimpleTraceOrigin":{"type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin"},"SimpleTraceQuery":{"properties":{"origin":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceOrigin"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceKind"},{"type":"null"}]},"channel":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceChannel"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"SimpleTraceQuery"},"SimpleTraceQueryRequest":{"properties":{"trace":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceQuery"},{"type":"null"}],"description":"Filter fields on the trace itself — `origin`, `kind`, `channel`, `tags`, `meta`, `references`, and inbound `links`. Filtering by `trace.links.invocation` is the common pattern for finding annotations on a given span."},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links","description":"Batch GET by the trace's own `(trace_id, span_id)`. Each entry matches the trace whose own identity equals the pair. Distinct from `trace.links`, which filters on inbound links."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range."}},"type":"object","title":"SimpleTraceQueryRequest","description":"Request body for `POST /simple/traces/query`."},"SimpleTraceReferences":{"properties":{"query":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"testset":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"application":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"SimpleTraceResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if the trace was returned, `0` otherwise.","default":0},"trace":{"anyOf":[{"$ref":"#/components/schemas/SimpleTrace"},{"type":"null"}],"description":"The created or fetched trace, including server-assigned `trace_id` and `span_id`."}},"type":"object","title":"SimpleTraceResponse","description":"Response from a single-trace create/fetch/edit."},"SimpleTracesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of matching traces in this page.","default":0},"traces":{"items":{"$ref":"#/components/schemas/SimpleTrace"},"type":"array","title":"Traces","description":"The matching traces in the high-level `SimpleTrace` shape.","default":[]}},"type":"object","title":"SimpleTracesResponse","description":"Response from `POST /simple/traces/query`."},"SimpleWorkflow":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowData-Output"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleWorkflow"},"SimpleWorkflowCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleWorkflowCreate"},"SimpleWorkflowCreateRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/SimpleWorkflowCreate","description":"Simple-workflow create payload. Creates the artifact, a default variant, and an initial revision in one call."}},"type":"object","required":["workflow"],"title":"SimpleWorkflowCreateRequest"},"SimpleWorkflowData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleWorkflowData"},"SimpleWorkflowData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleWorkflowData"},"SimpleWorkflowEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleWorkflowEdit"},"SimpleWorkflowEditRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/SimpleWorkflowEdit","description":"Simple-workflow edit payload. Updates artifact-level fields and commits a new revision when `data` changes."}},"type":"object","required":["workflow"],"title":"SimpleWorkflowEditRequest"},"SimpleWorkflowFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"SimpleWorkflowFlags"},"SimpleWorkflowQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"SimpleWorkflowQuery"},"SimpleWorkflowQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"SimpleWorkflowQueryFlags"},"SimpleWorkflowQueryRequest":{"properties":{"workflow":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowQuery"},{"type":"null"}],"description":"Attribute filter on simple workflows (slug, slugs, flags, tags, meta)."},"workflow_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Workflow Refs","description":"Restrict results to workflows matching these references."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When true, include archived workflows."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination controls."}},"type":"object","title":"SimpleWorkflowQueryRequest"},"SimpleWorkflowResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a simple workflow is returned, `0` when none matched.","default":0},"workflow":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflow"},{"type":"null"}],"description":"Workflow artifact with its resolved variant and revision merged."}},"type":"object","title":"SimpleWorkflowResponse"},"SimpleWorkflowsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of workflows in the response.","default":0},"workflows":{"items":{"$ref":"#/components/schemas/SimpleWorkflow"},"type":"array","title":"Workflows","description":"Workflow artifacts each merged with their resolved variant and revision."}},"type":"object","title":"SimpleWorkflowsResponse"},"Span-Input":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Input"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Input"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Input"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"Span"},"Span-Output":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Output"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Output"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Output"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"Span"},"SpanResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a span was returned, `0` otherwise.","default":0},"span":{"anyOf":[{"$ref":"#/components/schemas/Span-Output"},{"type":"null"}],"description":"The matching span, or `null` if not found."}},"type":"object","title":"SpanResponse"},"SpanType":{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},"SpansNode-Input":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Input"},{"items":{"$ref":"#/components/schemas/SpansNode-Input"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Input"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Input"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Input"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"SpansNode"},"SpansNode-Output":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Output"},{"items":{"$ref":"#/components/schemas/SpansNode-Output"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Output"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Output"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Output"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"SpansNode"},"SpansQueryRequest":{"properties":{"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Input"},{"type":"null"}],"description":"Span-level conditions."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range."},"query_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve filtering/windowing from a saved query."},"query_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve from the latest revision of a specific query variant."},"query_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve from a specific query revision. Returns `409` when the revision's stored `formatting.focus` is `trace`."}},"type":"object","title":"SpansQueryRequest","description":"Request body for `POST /spans/query`."},"SpansResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Total number of matching spans in the window.","default":0},"spans":{"anyOf":[{"items":{"$ref":"#/components/schemas/Span-Output"},"type":"array"},{"type":"null"}],"title":"Spans","description":"Flat list of matching spans."}},"type":"object","title":"SpansResponse"},"SpansTree-Input":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Input"},{"items":{"$ref":"#/components/schemas/SpansNode-Input"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"SpansTree"},"SpansTree-Output":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Output"},{"items":{"$ref":"#/components/schemas/SpansNode-Output"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"SpansTree"},"StandardProviderDTO":{"properties":{"kind":{"$ref":"#/components/schemas/StandardProviderKind"},"provider":{"$ref":"#/components/schemas/StandardProviderSettingsDTO"}},"type":"object","required":["kind","provider"],"title":"StandardProviderDTO"},"StandardProviderKind":{"type":"string","enum":["openai","cohere","anyscale","deepinfra","alephalpha","groq","minimax","mistral","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"StandardProviderKind"},"StandardProviderSettingsDTO":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"StandardProviderSettingsDTO"},"Status":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","title":"Status"},"StringOperator":{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},"Testcase-Input":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"Testcase-Output":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"TestcaseResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a testcase was returned, 0 otherwise.","default":0},"testcase":{"anyOf":[{"$ref":"#/components/schemas/Testcase-Output"},{"type":"null"}],"description":"The testcase blob. `data` carries the user-defined columns; `testcase_dedup_id` (inside `data`) is the caller-supplied dedup key when present."}},"type":"object","title":"TestcaseResponse"},"TestcasesQueryRequest":{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids","description":"Explicit list of testcase IDs to fetch. Combine with `testset_id` or testset references to scope the lookup."},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id","description":"Return all testcases stored in this testset. The testset owns its testcases as a content-addressed bag; a revision references a subset of these."},"testset_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Testset reference used to resolve the latest revision on the default variant. The revision's ordered testcase IDs are used for the lookup and pagination."},"testset_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Testset variant reference used to resolve the latest revision on that variant."},"testset_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific testset revision reference. The revision's ordered testcase IDs drive the lookup and cursor pagination."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. When a revision reference is used, the cursor walks the revision's deterministic testcase ID list."}},"type":"object","title":"TestcasesQueryRequest"},"TestcasesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of testcases returned on this page.","default":0},"testcases":{"items":{"$ref":"#/components/schemas/Testcase-Output"},"type":"array","title":"Testcases","description":"Testcase blobs matching the query, in revision-order when scoped by a revision reference."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor for the next page, if more results exist."}},"type":"object","title":"TestcasesResponse"},"Testset":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Testset"},"TestsetCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetCreate"},"TestsetCreateRequest":{"properties":{"testset":{"$ref":"#/components/schemas/TestsetCreate","description":"Testset artifact to create. The call only creates the artifact row; testcases are added by committing a revision (see /testsets/revisions/commit) or by using the /simple/testsets/ surface."}},"type":"object","required":["testset"],"title":"TestsetCreateRequest"},"TestsetEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetEdit"},"TestsetEditRequest":{"properties":{"testset":{"$ref":"#/components/schemas/TestsetEdit","description":"Testset artifact fields to update. The `id` in the body must match the `testset_id` in the path."}},"type":"object","required":["testset"],"title":"TestsetEditRequest"},"TestsetFlags":{"properties":{},"type":"object","title":"TestsetFlags","description":"Placeholder for testset-level flags.\n\nThis model is intentionally empty but kept as a dedicated type so that:\n- existing references to `flags: Optional[TestsetFlags]` remain valid, and\n- structured flags can be added here in the future without breaking the\n surrounding DTOs."},"TestsetQuery":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"TestsetQuery"},"TestsetQueryRequest":{"properties":{"testset":{"anyOf":[{"$ref":"#/components/schemas/TestsetQuery"},{"type":"null"}],"description":"Attribute filter (name, description, slug, flags, tags, meta, folder)."},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs","description":"Restrict the query to specific testsets by reference (id or slug)."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"Include soft-deleted testsets."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. See the Query Pattern guide."}},"type":"object","title":"TestsetQueryRequest"},"TestsetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a testset was returned, 0 otherwise.","default":0},"testset":{"anyOf":[{"$ref":"#/components/schemas/Testset"},{"type":"null"}],"description":"The testset artifact. Does not include testcases."}},"type":"object","title":"TestsetResponse"},"TestsetRevision":{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"TestsetRevision"},"TestsetRevisionCommit":{"properties":{"testset_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"delta":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionDelta"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionCommit"},"TestsetRevisionCommitRequest":{"properties":{"testset_revision_commit":{"$ref":"#/components/schemas/TestsetRevisionCommit","description":"New revision to commit. Pass either `data` (full replacement of the testcase list) or `delta` (add/remove/replace operations against the base revision) — not both."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects in the response."}},"type":"object","required":["testset_revision_commit"],"title":"TestsetRevisionCommitRequest"},"TestsetRevisionCreate":{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetRevisionCreate"},"TestsetRevisionCreateRequest":{"properties":{"testset_revision":{"$ref":"#/components/schemas/TestsetRevisionCreate","description":"Revision to create on an existing variant. Typically used to seed an empty revision; use /testsets/revisions/commit to set testcases."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects in the response. Defaults to true when the response would carry revision data."}},"type":"object","required":["testset_revision"],"title":"TestsetRevisionCreateRequest"},"TestsetRevisionData-Input":{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Input"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},"TestsetRevisionData-Output":{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Output"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},"TestsetRevisionDelta":{"properties":{"rows":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionDeltaRows"},{"type":"null"}]},"columns":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionDeltaColumns"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionDelta","description":"Operations to apply to a testset revision."},"TestsetRevisionDeltaColumns":{"properties":{"add":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Add"},"remove":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Remove"},"replace":{"anyOf":[{"items":{"prefixItems":[{"type":"string"},{"type":"string"}],"type":"array","maxItems":2,"minItems":2},"type":"array"},{"type":"null"}],"title":"Replace"}},"type":"object","title":"TestsetRevisionDeltaColumns","description":"Column-level operations applied to ALL testcases in the revision."},"TestsetRevisionDeltaRows":{"properties":{"add":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Input"},"type":"array"},{"type":"null"}],"title":"Add"},"remove":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Remove"},"replace":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Input"},"type":"array"},{"type":"null"}],"title":"Replace"}},"type":"object","title":"TestsetRevisionDeltaRows","description":"Row-level operations applied to testcases in the revision."},"TestsetRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetRevisionEdit"},"TestsetRevisionEditRequest":{"properties":{"testset_revision":{"$ref":"#/components/schemas/TestsetRevisionEdit","description":"Revision fields to update. The `id` in the body must match the `testset_revision_id` in the path. Only metadata fields are editable; content is committed as a new revision."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects in the response."}},"type":"object","required":["testset_revision"],"title":"TestsetRevisionEditRequest"},"TestsetRevisionQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"TestsetRevisionQuery"},"TestsetRevisionQueryRequest":{"properties":{"testset_revision":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionQuery"},{"type":"null"}],"description":"Attribute filter on the revision (name, description, slug, author, date, message)."},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs","description":"Scope revisions to these testsets."},"testset_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Variant Refs","description":"Scope revisions to these variants."},"testset_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Revision Refs","description":"Restrict to specific revisions by reference (id, slug, or version)."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"Include soft-deleted revisions."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects for each returned revision. Defaults to true."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. See the Query Pattern guide."}},"type":"object","title":"TestsetRevisionQueryRequest"},"TestsetRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a revision was returned, 0 otherwise.","default":0},"testset_revision":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevision"},{"type":"null"}],"description":"The testset revision. `data.testcase_ids` is the ordered list of testcase IDs; `data.testcases` is populated when `include_testcases` is true."}},"type":"object","title":"TestsetRevisionResponse"},"TestsetRevisionRetrieveRequest":{"properties":{"testset_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Testset reference. If only the testset is provided, the latest revision on its default variant is returned."},"testset_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant reference. Returns the latest revision on that variant."},"testset_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Revision reference. Returns that specific revision."},"include_testcase_ids":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcase Ids","description":"Include the ordered list of testcase IDs. Defaults to true (opt-out)."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects. Defaults to true (opt-out). Note: this opt-out default is the opposite of `/queries/revisions/retrieve`, where trace materialization is opt-in."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Windowing applied to the testcases list when materialized."}},"type":"object","title":"TestsetRevisionRetrieveRequest"},"TestsetRevisionsLog":{"properties":{"testset_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"TestsetRevisionsLog"},"TestsetRevisionsLogRequest":{"properties":{"testset_revision":{"$ref":"#/components/schemas/TestsetRevisionsLog","description":"Scope for the log: one of `testset_id`, `testset_variant_id`, or `testset_revision_id`. Optional `depth` limits how far back to walk."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects for each returned revision."}},"type":"object","required":["testset_revision"],"title":"TestsetRevisionsLogRequest"},"TestsetRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of revisions returned.","default":0},"testset_revisions":{"items":{"$ref":"#/components/schemas/TestsetRevision"},"type":"array","title":"Testset Revisions","description":"Testset revisions matching the query, in the requested order."}},"type":"object","title":"TestsetRevisionsResponse"},"TestsetVariant":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetVariant"},"TestsetVariantCreate":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetVariantCreate"},"TestsetVariantCreateRequest":{"properties":{"testset_variant":{"$ref":"#/components/schemas/TestsetVariantCreate","description":"Variant to create on an existing testset. Pass `testset_id` to identify the parent artifact."}},"type":"object","required":["testset_variant"],"title":"TestsetVariantCreateRequest"},"TestsetVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetVariantEdit"},"TestsetVariantEditRequest":{"properties":{"testset_variant":{"$ref":"#/components/schemas/TestsetVariantEdit","description":"Variant fields to update. The `id` in the body must match the `testset_variant_id` in the path."}},"type":"object","required":["testset_variant"],"title":"TestsetVariantEditRequest"},"TestsetVariantQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"TestsetVariantQuery"},"TestsetVariantQueryRequest":{"properties":{"testset_variant":{"anyOf":[{"$ref":"#/components/schemas/TestsetVariantQuery"},{"type":"null"}],"description":"Attribute filter on the variant (name, description, slug, flags, tags, meta)."},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs","description":"Scope to variants whose parent testset matches one of these references."},"testset_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Variant Refs","description":"Restrict the query to specific variants by reference (id or slug)."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"Include soft-deleted variants."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. See the Query Pattern guide."}},"type":"object","title":"TestsetVariantQueryRequest"},"TestsetVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a variant was returned, 0 otherwise.","default":0},"testset_variant":{"anyOf":[{"$ref":"#/components/schemas/TestsetVariant"},{"type":"null"}],"description":"The testset variant (branch)."}},"type":"object","title":"TestsetVariantResponse"},"TestsetVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of variants returned.","default":0},"testset_variants":{"items":{"$ref":"#/components/schemas/TestsetVariant"},"type":"array","title":"Testset Variants","description":"Testset variants matching the query."}},"type":"object","title":"TestsetVariantsResponse"},"TestsetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of testsets returned on this page.","default":0},"testsets":{"items":{"$ref":"#/components/schemas/Testset"},"type":"array","title":"Testsets","description":"Testset artifacts matching the query, without testcases."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor for the next page, if more results exist."}},"type":"object","title":"TestsetsResponse"},"TextOptions":{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},"ToolAuthScheme":{"type":"string","enum":["oauth","api_key"],"title":"ToolAuthScheme"},"ToolCall":{"properties":{"data":{"$ref":"#/components/schemas/ToolCallData"}},"type":"object","required":["data"],"title":"ToolCall","description":"Request envelope — wraps the raw OpenAI tool call."},"ToolCallData":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type","default":"function"},"function":{"$ref":"#/components/schemas/ToolCallFunction"}},"type":"object","required":["id","function"],"title":"ToolCallData","description":"OpenAI tool_calls array item — passed verbatim from the LLM."},"ToolCallFunction":{"properties":{"name":{"type":"string","title":"Name"},"arguments":{"title":"Arguments"}},"type":"object","required":["name","arguments"],"title":"ToolCallFunction","description":"Mirrors OpenAI function call: {name, arguments}."},"ToolCallResponse":{"properties":{"call":{"$ref":"#/components/schemas/ToolResult"}},"type":"object","required":["call"],"title":"ToolCallResponse"},"ToolCatalogAction":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"}},"type":"object","required":["key","name"],"title":"ToolCatalogAction"},"ToolCatalogActionDetails":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"}},"type":"object","required":["key","name"],"title":"ToolCatalogActionDetails"},"ToolCatalogActionResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"action":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogAction"},{"$ref":"#/components/schemas/ToolCatalogActionDetails"},{"type":"null"}],"title":"Action"}},"type":"object","title":"ToolCatalogActionResponse"},"ToolCatalogActionsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"total":{"type":"integer","title":"Total","default":0},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"},"actions":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogAction"},{"$ref":"#/components/schemas/ToolCatalogActionDetails"}]},"type":"array","title":"Actions","default":[]}},"type":"object","title":"ToolCatalogActionsResponse"},"ToolCatalogIntegration":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"actions_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Actions Count"},"auth_schemes":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolAuthScheme"},"type":"array"},{"type":"null"}],"title":"Auth Schemes"}},"type":"object","required":["key","name"],"title":"ToolCatalogIntegration"},"ToolCatalogIntegrationDetails":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"actions_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Actions Count"},"auth_schemes":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolAuthScheme"},"type":"array"},{"type":"null"}],"title":"Auth Schemes"},"actions":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolCatalogAction"},"type":"array"},{"type":"null"}],"title":"Actions"}},"type":"object","required":["key","name"],"title":"ToolCatalogIntegrationDetails"},"ToolCatalogIntegrationResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"integration":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogIntegration"},{"$ref":"#/components/schemas/ToolCatalogIntegrationDetails"},{"type":"null"}],"title":"Integration"}},"type":"object","title":"ToolCatalogIntegrationResponse"},"ToolCatalogIntegrationsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"total":{"type":"integer","title":"Total","default":0},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"},"integrations":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogIntegration"},{"$ref":"#/components/schemas/ToolCatalogIntegrationDetails"}]},"type":"array","title":"Integrations","default":[]}},"type":"object","title":"ToolCatalogIntegrationsResponse"},"ToolCatalogProvider":{"properties":{"key":{"$ref":"#/components/schemas/ToolProviderKind"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"integrations_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Integrations Count"}},"type":"object","required":["key","name"],"title":"ToolCatalogProvider"},"ToolCatalogProviderDetails":{"properties":{"key":{"$ref":"#/components/schemas/ToolProviderKind"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"integrations_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Integrations Count"},"integrations":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolCatalogIntegration"},"type":"array"},{"type":"null"}],"title":"Integrations"}},"type":"object","required":["key","name"],"title":"ToolCatalogProviderDetails"},"ToolCatalogProviderResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"provider":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogProvider"},{"$ref":"#/components/schemas/ToolCatalogProviderDetails"},{"type":"null"}],"title":"Provider"}},"type":"object","title":"ToolCatalogProviderResponse"},"ToolCatalogProvidersResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"providers":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogProvider"},{"$ref":"#/components/schemas/ToolCatalogProviderDetails"}]},"type":"array","title":"Providers","default":[]}},"type":"object","title":"ToolCatalogProvidersResponse"},"ToolConnection":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"provider_key":{"$ref":"#/components/schemas/ToolProviderKind"},"integration_key":{"type":"string","title":"Integration Key"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"},"status":{"anyOf":[{"$ref":"#/components/schemas/ToolConnectionStatus"},{"type":"null"}]}},"type":"object","required":["provider_key","integration_key"],"title":"ToolConnection"},"ToolConnectionCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"provider_key":{"$ref":"#/components/schemas/ToolProviderKind"},"integration_key":{"type":"string","title":"Integration Key"},"data":{"anyOf":[{"$ref":"#/components/schemas/ToolConnectionCreateData"},{"type":"null"}]}},"type":"object","required":["provider_key","integration_key"],"title":"ToolConnectionCreate"},"ToolConnectionCreateData":{"properties":{"callback_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callback Url"},"auth_scheme":{"anyOf":[{"$ref":"#/components/schemas/ToolAuthScheme"},{"type":"null"}]}},"type":"object","title":"ToolConnectionCreateData"},"ToolConnectionCreateRequest":{"properties":{"connection":{"$ref":"#/components/schemas/ToolConnectionCreate"}},"type":"object","required":["connection"],"title":"ToolConnectionCreateRequest"},"ToolConnectionResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"connection":{"anyOf":[{"$ref":"#/components/schemas/ToolConnection"},{"type":"null"}]}},"type":"object","title":"ToolConnectionResponse"},"ToolConnectionStatus":{"properties":{"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Url"}},"type":"object","title":"ToolConnectionStatus"},"ToolConnectionsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"connections":{"items":{"$ref":"#/components/schemas/ToolConnection"},"type":"array","title":"Connections","default":[]}},"type":"object","title":"ToolConnectionsResponse"},"ToolProviderKind":{"type":"string","enum":["composio","agenta"],"title":"ToolProviderKind"},"ToolResult":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"anyOf":[{"$ref":"#/components/schemas/Status"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/ToolResultData"},{"type":"null"}]}},"type":"object","title":"ToolResult","description":"Response envelope with Agenta identity, status, and the OpenAI tool message."},"ToolResultData":{"properties":{"role":{"type":"string","title":"Role","default":"tool"},"tool_call_id":{"type":"string","title":"Tool Call Id"},"content":{"type":"string","title":"Content"}},"type":"object","required":["tool_call_id","content"],"title":"ToolResultData","description":"OpenAI tool message — passed verbatim back to the LLM."},"Trace-Input":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Input"},{"items":{"$ref":"#/components/schemas/SpansNode-Input"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Trace"},"Trace-Output":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Output"},{"items":{"$ref":"#/components/schemas/SpansNode-Output"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Trace"},"TraceIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a `trace_id` was returned, `0` otherwise.","default":0},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id","description":"32-char hex UUID identifying the trace that was created or edited."}},"type":"object","title":"TraceIdResponse"},"TraceIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of distinct trace IDs in this response.","default":0},"trace_ids":{"items":{"type":"string"},"type":"array","title":"Trace Ids","description":"32-char hex UUIDs of the traces that were ingested. Compare against the number you submitted to detect partial failures.","default":[]}},"type":"object","title":"TraceIdsResponse"},"TraceRequest":{"properties":{"trace":{"anyOf":[{"$ref":"#/components/schemas/Trace-Input"},{"type":"null"}],"description":"A single trace record (trace_id plus nested spans). The `trace_id` must match the path parameter on edit endpoints."}},"type":"object","title":"TraceRequest","description":"Ingest or edit payload for a single canonical `Trace`."},"TraceResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a trace was returned, `0` otherwise.","default":0},"trace":{"anyOf":[{"$ref":"#/components/schemas/Trace-Output"},{"type":"null"}],"description":"The trace in the canonical `Trace` shape (`trace_id` + nested `spans` tree)."}},"type":"object","title":"TraceResponse"},"TraceType":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},"TracesQueryRequest":{"properties":{"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Input"},{"type":"null"}],"description":"Span-level conditions. A trace matches when any of its spans matches."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range (see [Query Pattern](/reference/api-guide/query-pattern#windowing))."},"query_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve filtering/windowing from a saved query by `id`/`slug`. Only one of the three `query_*_ref` fields is needed."},"query_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve from the latest revision of a specific query variant."},"query_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve from a specific query revision. Returns `409` when the revision's stored `formatting.focus` is `span`."}},"type":"object","title":"TracesQueryRequest","description":"Request body for `POST /traces/query`."},"TracesRequest":{"properties":{"traces":{"anyOf":[{"items":{"$ref":"#/components/schemas/Trace-Input"},"type":"array"},{"type":"null"}],"title":"Traces","description":"List of trace records. Each record is a `trace_id` plus the nested `spans` tree. Equivalent to the map-shaped payload accepted by `POST /tracing/spans/ingest`."}},"type":"object","title":"TracesRequest","description":"Ingest payload in the canonical `Traces` list shape.\n\nUsed by `POST /traces/ingest`. Each entry is one trace with its\n`trace_id` and a nested `spans` tree."},"TracesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Total number of matching traces in the window.","default":0},"traces":{"anyOf":[{"items":{"$ref":"#/components/schemas/Trace-Output"},"type":"array"},{"type":"null"}],"title":"Traces","description":"List of traces in the canonical `Traces` shape. For the map-shaped payload keyed by `trace_id`, call `POST /tracing/spans/query` with `focus=\"trace\"`."}},"type":"object","title":"TracesResponse"},"TracingQuery":{"properties":{"formatting":{"anyOf":[{"$ref":"#/components/schemas/Formatting"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Output"},{"type":"null"}]}},"type":"object","title":"TracingQuery"},"UpdateProjectRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"make_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Make Default"}},"type":"object","title":"UpdateProjectRequest"},"UpdateSecretDTO":{"properties":{"header":{"anyOf":[{"$ref":"#/components/schemas/Header"},{"type":"null"}]},"secret":{"anyOf":[{"$ref":"#/components/schemas/SecretDTO"},{"type":"null"}]}},"type":"object","title":"UpdateSecretDTO"},"UpdateWorkspace":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","title":"UpdateWorkspace"},"UserIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of user IDs in this page.","default":0},"user_ids":{"items":{"type":"string"},"type":"array","title":"User Ids","description":"Distinct values of `ag.user.id` in this page.","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor for the next page. Pass verbatim as `windowing.next`."}},"type":"object","title":"UserIdsResponse"},"UserRole":{"properties":{"email":{"type":"string","title":"Email"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"organization_id":{"type":"string","title":"Organization Id"}},"type":"object","required":["email","organization_id"],"title":"UserRole"},"UserUpdate":{"properties":{"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","title":"UserUpdate"},"UsersQueryRequest":{"properties":{"realtime":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Realtime","description":"When `true`, paginate by `last_active`. When `false` or unset, paginate by the stable `first_active` cursor."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range."}},"type":"object","title":"UsersQueryRequest","description":"Request body for `POST /tracing/users/query`."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VariantFork":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"VariantFork"},"WebhookDeliveriesResponse":{"properties":{"count":{"type":"integer","title":"Count"},"deliveries":{"items":{"$ref":"#/components/schemas/WebhookDelivery"},"type":"array","title":"Deliveries","default":[]}},"type":"object","required":["count"],"title":"WebhookDeliveriesResponse"},"WebhookDelivery":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"$ref":"#/components/schemas/Status"},"data":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDelivery"},"WebhookDeliveryCreate":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"$ref":"#/components/schemas/Status"},"data":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDeliveryCreate"},"WebhookDeliveryCreateRequest":{"properties":{"delivery":{"$ref":"#/components/schemas/WebhookDeliveryCreate"}},"type":"object","required":["delivery"],"title":"WebhookDeliveryCreateRequest"},"WebhookDeliveryData":{"properties":{"event_type":{"anyOf":[{"$ref":"#/components/schemas/WebhookEventType"},{"type":"null"}]},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"response":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryResponseInfo"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["url"],"title":"WebhookDeliveryData"},"WebhookDeliveryQuery":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/Status"},{"type":"null"}]},"subscription_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Id"},"event_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Event Id"}},"type":"object","title":"WebhookDeliveryQuery"},"WebhookDeliveryQueryRequest":{"properties":{"delivery":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryQuery"},{"type":"null"}]},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"WebhookDeliveryQueryRequest"},"WebhookDeliveryResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"delivery":{"anyOf":[{"$ref":"#/components/schemas/WebhookDelivery"},{"type":"null"}]}},"type":"object","title":"WebhookDeliveryResponse"},"WebhookDeliveryResponseInfo":{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","title":"WebhookDeliveryResponseInfo"},"WebhookEventType":{"type":"string","enum":["environments.revisions.committed","webhooks.subscriptions.tested"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"WebhookProviderDTO":{"properties":{"provider":{"$ref":"#/components/schemas/WebhookProviderSettingsDTO"}},"type":"object","required":["provider"],"title":"WebhookProviderDTO"},"WebhookProviderSettingsDTO":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"WebhookProviderSettingsDTO"},"WebhookSubscription":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"$ref":"#/components/schemas/WebhookSubscriptionData"},"secret_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Secret Id"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscription"},"WebhookSubscriptionCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"data":{"$ref":"#/components/schemas/WebhookSubscriptionData"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscriptionCreate"},"WebhookSubscriptionCreateRequest":{"properties":{"subscription":{"$ref":"#/components/schemas/WebhookSubscriptionCreate"}},"type":"object","required":["subscription"],"title":"WebhookSubscriptionCreateRequest"},"WebhookSubscriptionData":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/WebhookEventType"},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"WebhookSubscriptionEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"$ref":"#/components/schemas/WebhookSubscriptionData"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscriptionEdit"},"WebhookSubscriptionEditRequest":{"properties":{"subscription":{"$ref":"#/components/schemas/WebhookSubscriptionEdit"}},"type":"object","required":["subscription"],"title":"WebhookSubscriptionEditRequest"},"WebhookSubscriptionQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"WebhookSubscriptionQuery"},"WebhookSubscriptionQueryRequest":{"properties":{"subscription":{"anyOf":[{"$ref":"#/components/schemas/WebhookSubscriptionQuery"},{"type":"null"}]},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"WebhookSubscriptionQueryRequest"},"WebhookSubscriptionResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"subscription":{"anyOf":[{"$ref":"#/components/schemas/WebhookSubscription"},{"type":"null"}]}},"type":"object","title":"WebhookSubscriptionResponse"},"WebhookSubscriptionTestRequest":{"properties":{"subscription_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Id"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/WebhookSubscriptionEdit"},{"$ref":"#/components/schemas/WebhookSubscriptionCreate"},{"type":"null"}],"title":"Subscription"}},"type":"object","title":"WebhookSubscriptionTestRequest"},"WebhookSubscriptionsResponse":{"properties":{"count":{"type":"integer","title":"Count"},"subscriptions":{"items":{"$ref":"#/components/schemas/WebhookSubscription"},"type":"array","title":"Subscriptions","default":[]}},"type":"object","required":["count"],"title":"WebhookSubscriptionsResponse"},"Windowing":{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},"Workflow":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowArtifactFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Workflow"},"WorkflowArtifactFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"WorkflowArtifactFlags"},"WorkflowCatalogFlags":{"properties":{"is_archived":{"type":"boolean","title":"Is Archived","default":false},"is_recommended":{"type":"boolean","title":"Is Recommended","default":false},"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"WorkflowCatalogFlags"},"WorkflowCatalogPreset":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"WorkflowCatalogPreset"},"WorkflowCatalogPresetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when the preset is returned, `0` when not found.","default":0},"preset":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogPreset"},{"type":"null"}],"description":"Named parameter set defined against a template."}},"type":"object","title":"WorkflowCatalogPresetResponse"},"WorkflowCatalogPresetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of presets returned.","default":0},"presets":{"items":{"$ref":"#/components/schemas/WorkflowCatalogPreset"},"type":"array","title":"Presets","description":"Named parameter sets defined against a template."}},"type":"object","title":"WorkflowCatalogPresetsResponse"},"WorkflowCatalogTemplate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"WorkflowCatalogTemplate"},"WorkflowCatalogTemplateResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when the template is returned, `0` when not found.","default":0},"template":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogTemplate"},{"type":"null"}],"description":"Workflow blueprint (key, name, description, flags, default data)."}},"type":"object","title":"WorkflowCatalogTemplateResponse"},"WorkflowCatalogTemplatesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of templates returned.","default":0},"templates":{"items":{"$ref":"#/components/schemas/WorkflowCatalogTemplate"},"type":"array","title":"Templates","description":"Workflow blueprints shipped with the product."}},"type":"object","title":"WorkflowCatalogTemplatesResponse"},"WorkflowCatalogType":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"json_schema":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Json Schema"}},"type":"object","required":["key","json_schema"],"title":"WorkflowCatalogType"},"WorkflowCatalogTypeResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a type definition is returned, `0` when not found.","default":0},"type":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogType"},{"type":"null"}],"description":"JSON Schema fragment referenced by workflow input/output schemas via `x-ag-type-ref`."}},"type":"object","title":"WorkflowCatalogTypeResponse"},"WorkflowCatalogTypesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of type definitions available.","default":0},"types":{"items":{"$ref":"#/components/schemas/WorkflowCatalogType"},"type":"array","title":"Types","description":"Shared JSON Schema fragments shipped with the product."}},"type":"object","title":"WorkflowCatalogTypesResponse"},"WorkflowCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowCreate"},"WorkflowCreateRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowCreate","description":"Workflow artifact to create. Must include a project-unique `slug`; `name`, `description`, `flags`, `tags`, and `meta` are optional."}},"type":"object","required":["workflow"],"title":"WorkflowCreateRequest"},"WorkflowEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowEdit"},"WorkflowEditRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowEdit","description":"Workflow fields to update. `id` is required and must match the path parameter; only supplied fields are modified."}},"type":"object","required":["workflow"],"title":"WorkflowEditRequest"},"WorkflowFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"WorkflowFlags","description":"Legacy full workflow flag set."},"WorkflowFork":{"properties":{"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFork"},{"type":"null"}]},"revision":{"anyOf":[{"$ref":"#/components/schemas/RevisionFork"},{"type":"null"}]},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFork"},{"type":"null"}]},"variant":{"anyOf":[{"$ref":"#/components/schemas/VariantFork"},{"type":"null"}]},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"WorkflowFork"},"WorkflowForkRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowFork","description":"Fork payload. Identify the source by `workflow_id` and `workflow_variant_id` (or equivalent slugs), supply a new `workflow_variant.slug` for the forked branch."}},"type":"object","required":["workflow"],"title":"WorkflowForkRequest"},"WorkflowResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a workflow is returned, `0` when none matched.","default":0},"workflow":{"anyOf":[{"$ref":"#/components/schemas/Workflow"},{"type":"null"}],"description":"The workflow artifact."}},"type":"object","title":"WorkflowResponse"},"WorkflowRevision-Input":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},"WorkflowRevision-Output":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},"WorkflowRevisionCommit":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"WorkflowRevisionCommit"},"WorkflowRevisionCommitRequest":{"properties":{"workflow_revision":{"$ref":"#/components/schemas/WorkflowRevisionCommit","description":"Revision to append to a variant's history. Requires `workflow_variant_id` and optional `message`; `data` carries the new configuration."}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionCommitRequest"},"WorkflowRevisionCreate":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowRevisionCreate"},"WorkflowRevisionCreateRequest":{"properties":{"workflow_revision":{"$ref":"#/components/schemas/WorkflowRevisionCreate","description":"Revision to create on an existing variant. The revision is immutable once persisted; to change the payload, commit a new revision."}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionCreateRequest"},"WorkflowRevisionData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"WorkflowRevisionData"},"WorkflowRevisionData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"WorkflowRevisionData"},"WorkflowRevisionDeployRequest":{"properties":{"workflow_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Workflow artifact to deploy. One of the workflow refs is required."},"workflow_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Workflow variant to deploy. Resolves to the latest revision of this variant."},"workflow_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific workflow revision to deploy."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment artifact. One of the environment refs is required."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment variant."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment revision."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Reference key to set on the environment revision. Defaults to `.revision` when omitted."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Commit message recorded on the resulting environment revision."}},"type":"object","title":"WorkflowRevisionDeployRequest"},"WorkflowRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowRevisionEdit"},"WorkflowRevisionEditRequest":{"properties":{"workflow_revision":{"$ref":"#/components/schemas/WorkflowRevisionEdit","description":"Revision fields to update (lifecycle metadata only). Data and configuration are immutable — commit a new revision to change them."}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionEditRequest"},"WorkflowRevisionFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"WorkflowRevisionFlags"},"WorkflowRevisionFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"WorkflowRevisionFork"},"WorkflowRevisionResolveRequest":{"properties":{"workflow_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Workflow artifact; resolves against its latest revision."},"workflow_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Workflow variant; resolves against its latest revision."},"workflow_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific workflow revision to resolve."},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevision-Input"},{"type":"null"}],"description":"Resolve the references embedded in this revision payload directly, without fetching it first."},"max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Depth","description":"Maximum recursive depth for nested `@ag.references`.","default":10},"max_embeds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Embeds","description":"Maximum number of embeds to resolve in one call.","default":100},"error_policy":{"anyOf":[{"$ref":"#/components/schemas/ErrorPolicy"},{"type":"null"}],"description":"How to handle unresolved references: `EXCEPTION` or `IGNORE`.","default":"exception"}},"type":"object","title":"WorkflowRevisionResolveRequest"},"WorkflowRevisionResolveResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a revision is returned, `0` when none matched.","default":0},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevision-Output"},{"type":"null"}],"description":"The workflow revision with `@ag.references` replaced by their resolved payloads."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Metadata describing which references were resolved, depth reached, and errors."}},"type":"object","title":"WorkflowRevisionResolveResponse"},"WorkflowRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a revision is returned, `0` when none matched.","default":0},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevision-Output"},{"type":"null"}],"description":"The workflow revision."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Reference-resolution metadata; populated when `resolve=true` on retrieve."}},"type":"object","title":"WorkflowRevisionResponse"},"WorkflowRevisionRetrieveRequest":{"properties":{"workflow_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Return the latest revision across all variants of this workflow."},"workflow_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Return the latest revision of this variant."},"workflow_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Return this exact revision (by `id`, or by `slug` + `version`)."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment artifact backing the deployment to resolve from."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment variant backing the deployment to resolve from."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific environment revision to resolve from."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Key into the environment revision's reference map. Required when retrieving via environment refs."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When true, resolve `@ag.references` tokens embedded in the revision configuration before returning it."}},"type":"object","title":"WorkflowRevisionRetrieveRequest"},"WorkflowRevisionsLog":{"properties":{"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"WorkflowRevisionsLog"},"WorkflowRevisionsLogRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowRevisionsLog","description":"Log query. Supply `workflow_id`, `workflow_variant_id`, or `workflow_revision_id` to scope the log, and an optional `depth`."}},"type":"object","required":["workflow"],"title":"WorkflowRevisionsLogRequest"},"WorkflowRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of revisions in this page.","default":0},"workflow_revisions":{"items":{"$ref":"#/components/schemas/WorkflowRevision-Output"},"type":"array","title":"Workflow Revisions","description":"Workflow revisions matching the query, ordered by commit time."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Pagination cursor."}},"type":"object","title":"WorkflowRevisionsResponse"},"WorkflowVariant":{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariant"},"WorkflowVariantCreate":{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowVariantCreate"},"WorkflowVariantCreateRequest":{"properties":{"workflow_variant":{"$ref":"#/components/schemas/WorkflowVariantCreate","description":"Variant to create under an existing workflow. Requires `workflow_id` (the artifact) and a project-unique `slug`."}},"type":"object","required":["workflow_variant"],"title":"WorkflowVariantCreateRequest"},"WorkflowVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariantEdit"},"WorkflowVariantEditRequest":{"properties":{"workflow_variant":{"$ref":"#/components/schemas/WorkflowVariantEdit","description":"Variant fields to update. `id` is required and must match the path parameter."}},"type":"object","required":["workflow_variant"],"title":"WorkflowVariantEditRequest"},"WorkflowVariantFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"WorkflowVariantFlags"},"WorkflowVariantFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowVariantFork"},"WorkflowVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a variant is returned, `0` when none matched.","default":0},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariant"},{"type":"null"}],"description":"The workflow variant."}},"type":"object","title":"WorkflowVariantResponse"},"WorkflowVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of variants in this page.","default":0},"workflow_variants":{"items":{"$ref":"#/components/schemas/WorkflowVariant"},"type":"array","title":"Workflow Variants","description":"Workflow variants matching the query."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Pagination cursor."}},"type":"object","title":"WorkflowVariantsResponse"},"WorkflowsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of workflows in this page.","default":0},"workflows":{"items":{"$ref":"#/components/schemas/Workflow"},"type":"array","title":"Workflows","description":"Workflow artifacts matching the query."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Pagination cursor; pass `windowing.next` back to fetch the following page."}},"type":"object","title":"WorkflowsResponse"},"Workspace":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","required":["name","type"],"title":"Workspace"},"WorkspaceMemberResponse":{"properties":{"user":{"additionalProperties":true,"type":"object","title":"User"},"roles":{"items":{"$ref":"#/components/schemas/WorkspacePermission"},"type":"array","title":"Roles"}},"type":"object","required":["user","roles"],"title":"WorkspaceMemberResponse"},"WorkspacePermission":{"properties":{"role_name":{"type":"string","title":"Role Name"},"role_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Description"},"permissions":{"anyOf":[{"items":{"$ref":"#/components/schemas/Permission"},"type":"array"},{"type":"null"}],"title":"Permissions"}},"type":"object","required":["role_name"],"title":"WorkspacePermission"},"WorkspaceResponse":{"properties":{"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"organization":{"type":"string","title":"Organization"},"members":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkspaceMemberResponse"},"type":"array"},{"type":"null"}],"title":"Members"}},"type":"object","required":["id","type","organization"],"title":"WorkspaceResponse"},"ee__src__models__api__organization_models__Organization":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"members":{"items":{"type":"string"},"type":"array","title":"Members"},"invitations":{"items":{},"type":"array","title":"Invitations"},"workspaces":{"items":{"type":"string"},"type":"array","title":"Workspaces"}},"type":"object","required":["id","owner_id"],"title":"Organization"},"oss__src__models__api__organization_models__Organization":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"members":{"items":{"type":"string"},"type":"array","title":"Members"},"invitations":{"items":{},"type":"array","title":"Invitations"},"workspaces":{"items":{"type":"string"},"type":"array","title":"Workspaces"}},"type":"object","required":["id","owner_id"],"title":"Organization"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","name":"Authorization","in":"header"}}},"tags":[{"name":"Status","description":"API server liveness and readiness status."},{"name":"Organizations","description":"Manage organizations, workspaces, SSO domains, and identity providers."},{"name":"Workspaces","description":"Manage workspaces within an organization and their members."},{"name":"Projects","description":"Manage projects within a workspace."},{"name":"Users","description":"User profile and account management — view profile, update username, reset password."},{"name":"Keys","description":"Create and revoke API keys used to authenticate programmatic requests."},{"name":"Workflows","description":"Workflow definitions — the runnable pipelines that back an application."},{"name":"Applications","description":"LLM applications — create, update, list, and delete apps."},{"name":"Evaluators","description":"Evaluator definitions — the metrics and judges used in evaluation runs."},{"name":"Testsets","description":"Test datasets — collections of input/output pairs used in evaluations."},{"name":"Testcases","description":"Individual test cases within a testset."},{"name":"Queries","description":"Saved query definitions used to filter and retrieve trace data."},{"name":"Traces","description":"Ingest and query traces, spans, and metrics from running applications."},{"name":"Invocations","description":"Run an application against a payload and capture the resulting trace."},{"name":"Annotations","description":"Attach evaluator-style feedback to existing traces and spans."},{"name":"Evaluations","description":"Evaluation runs — execute evaluators against variants and testsets."},{"name":"Environments","description":"Deployment environments (e.g. production, staging) and their active variants."},{"name":"Secrets","description":"Manage provider credentials and secret values stored in the vault."},{"name":"Tools","description":"External tool connections and OAuth integrations available to applications."},{"name":"Folders","description":"Organize applications and other resources into folder hierarchies."},{"name":"Webhooks","description":"Register and manage webhooks that fire on platform events."},{"name":"OpenTelemetry","description":"OTLP-compatible endpoints for ingesting traces directly from OpenTelemetry-instrumented services."},{"name":"Access","description":"Authentication discovery, organization access checks, and SSO callback endpoints."},{"name":"Billing","description":"Subscription, plan, and usage endpoints for workspace billing."},{"name":"Admin","description":"Internal administration endpoints — restricted to platform operators."},{"name":"Legacy","description":"Stable legacy endpoints retained for existing integrations — not deprecated, but new integrations should prefer the canonical surface."},{"name":"Deprecated","description":"Deprecated endpoints kept for backwards compatibility — avoid in new integrations."}],"security":[{"APIKeyHeader":[]}],"servers":[{"url":"/api"},{"url":"http://localhost/api"}]} \ No newline at end of file diff --git a/docs/docs/self-host/02-configuration.mdx b/docs/docs/self-host/02-configuration.mdx index 02f4edad2f..6f22f5f3c5 100644 --- a/docs/docs/self-host/02-configuration.mdx +++ b/docs/docs/self-host/02-configuration.mdx @@ -197,7 +197,38 @@ Only for EE deployments. | `STRIPE_API_KEY` | Stripe API key | _(empty)_ | | `STRIPE_WEBHOOK_SECRET` | Stripe webhook secret | _(empty)_ | | `STRIPE_WEBHOOK_TARGET` | Stripe webhook target | _(empty)_ | -| `STRIPE_PRICING` | Stripe pricing JSON | _(empty)_ | + +### Access controls & billing catalog [ee-only] + +Operators can override the built-in plans, billing catalog, Stripe pricing, and +role catalogs via JSON environment variables. Values are parsed once at API +startup; restart all API and worker processes after changing them. + +When any of these are present, validation is strict — invalid JSON, unknown +plan slugs, missing required roles, or inconsistent references across vars +fail startup with a clear error. All four default to the in-code values when +unset. + +| Variable | Purpose | Default | +|----------|---------|---------| +| `AGENTA_ACCESS_PLANS` | JSON object: plan slug → entitlements (flags, counters, gauges, throttles). | _(code defaults)_ | +| `AGENTA_ACCESS_ROLES` | JSON object: scope → list of custom roles (additive over the `owner`/`viewer` minima). | _(code defaults)_ | +| `AGENTA_ACCESS_ROLES_OVERLAY` | JSON object: per-role patch for workspace + project scopes (only `project` key accepted today; applied to both). Avoids restating the full scope catalog via `AGENTA_ACCESS_ROLES`. | _(no overlay)_ | +| `AGENTA_ACCESS_DEFAULT_PLAN` | Plan slug assigned to new orgs on signup. (Legacy: `AGENTA_DEFAULT_PLAN`.) | `self_hosted_enterprise` (Stripe off) / `cloud_v0_hobby` (Stripe on) | +| `AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY` | JSON object: partial entitlement patch applied to the default plan only (trace retention, throttle rates, single flags). Avoids restating the full plan in `AGENTA_ACCESS_PLANS`. | _(no overlay)_ | +| `AGENTA_BILLING_CATALOG` | JSON array: per-plan display metadata for `/billing/plans` (title, description, features, display prices). | _(code defaults)_ | +| `AGENTA_BILLING_PRICING` | JSON object: plan slug → Stripe line items and per-meter price IDs. Marks the free plan. | _(empty)_ | +| `AGENTA_BILLING_TRIAL_PLAN` | Plan slug for the reverse-trial flow on signup. Both this and `_TRIAL_DAYS` must be set together (or neither). | _(disabled)_ | +| `AGENTA_BILLING_TRIAL_DAYS` | Trial length in days (positive integer). | _(disabled)_ | + +When `AGENTA_BILLING_TRIAL_PLAN`/`_TRIAL_DAYS` are unset, signups on +Stripe-enabled deployments onboard directly on the free plan (the plan +marked `"free": true` in `AGENTA_BILLING_PRICING`). + +For full JSON schemas and examples, see: + +- [Dynamic access controls](./04-dynamic-access-controls.mdx) — plans, entitlements, roles. +- [Dynamic billing settings](./05-dynamic-billing-settings.mdx) — catalog, pricing, trial flow, migration from `STRIPE_PRICING`. ### Proxy - LLM Providers API keys for the LLM proxy. diff --git a/docs/docs/self-host/04-dynamic-access-controls.mdx b/docs/docs/self-host/04-dynamic-access-controls.mdx new file mode 100644 index 0000000000..f3d6a7b7b1 --- /dev/null +++ b/docs/docs/self-host/04-dynamic-access-controls.mdx @@ -0,0 +1,401 @@ +--- +title: Dynamic Access Controls +sidebar_label: Access Controls +description: Override the built-in plans, entitlements, and role catalogs at runtime via environment variables. +--- + +# Dynamic access controls + +Agenta EE ships with code-default plans, entitlements, and role catalogs. +Operators can override any of these at runtime by setting JSON environment +variables. This page documents the **access** layer: + +- `AGENTA_ACCESS_PLANS` — plan slugs and per-plan entitlement controls + (flags, counters, gauges, throttles). +- `AGENTA_ACCESS_ROLES` — custom roles per scope on top of the platform + minima (`owner` / `viewer`). + +The companion [Dynamic billing settings](./05-dynamic-billing-settings.mdx) +page covers the catalog, Stripe pricing, free plan and trial flow. + +:::warning Restart required +Both env vars are parsed once at process startup. After changing them, +restart **all** API and worker processes — they each load the controls into +memory and will otherwise enforce different limits. +::: + +:::tip Validation is strict +If either var is set, validation runs at startup: + +- invalid JSON → fail +- unknown flag / counter / gauge / permission slug → fail +- `AGENTA_ACCESS_PLANS` empty object → fail +- plan entry with no entitlement info (no `flags`/`counters`/`gauges`/`throttles`) → fail +- `AGENTA_ACCESS_ROLES` redefining the reserved `owner` or `viewer` slug → fail +- empty scope list → fail +- duplicate role slug within a scope → fail + +Run staging deploys with the new values before pushing to production. +::: + +## `AGENTA_ACCESS_PLANS` + +JSON **object** keyed by plan slug. The set of keys is the **effective plan +set** — every other plan reference (billing catalog, billing pricing, trial +plan, default plan, subscription rows in the DB) must point to one of these +slugs. + +### Top-level shape + +```text +{ + "": , + ... +} +``` + +### `PlanEntry` fields + +Every entry must define at least one of `flags`, `counters`, `gauges`, or +`throttles`. `description` is optional. + +| Field | Type | Required | Description | +|-------|------|----------|-------------| +| `description` | string | no | Operator-facing description (not shown to users). | +| `flags` | object | one-of | Map of flag slug → bool. See [flag keys](#flag-keys). | +| `counters` | object | one-of | Map of counter slug → `Quota`. See [counter keys](#counter-keys). | +| `gauges` | object | one-of | Map of gauge slug → `Quota`. See [gauge keys](#gauge-keys). | +| `throttles` | array | no | List of `Throttle` entries. See [throttles](#throttles). | + +### `Quota` shape + +Used by `counters` and `gauges` map values. + +| Field | Type | Default | Description | +|-------|------|---------|-------------| +| `free` | integer \| null | `null` | Free-tier allowance before metered billing kicks in. | +| `limit` | integer \| null | `null` | Hard cap; `null` = unlimited. | +| `monthly` | boolean | `null` | True if the counter resets monthly. Counters only. | +| `strict` | boolean | `false` | If true, requests exceeding the limit are blocked instead of metered. | +| `retention` | integer | `null` | Retention period in **minutes**. Used by `counters.traces` for span flush. | + +### Flag keys + +`hooks`, `rbac`, `access`, `domains`, `sso`. Values are booleans. + +### Counter keys + +`traces`, `events`, `evaluations`, `evaluators`, `annotations`, `credits`. + +`traces` and `events` are independent: each has its own counter, its own +retention period, its own admin flush endpoint (`/admin/spans/flush` and +`/admin/events/flush`), and its own cron schedule. Setting one does not +affect the other. The default for `events.retention` is `null` (kept +forever); opt in by setting it via overlay or full plan override. + +### Gauge keys + +`users`, `applications`. + +### `Throttle` shape + +| Field | Type | Description | +|-------|------|-------------| +| `bucket.capacity` | integer | Max tokens in the bucket. | +| `bucket.rate` | integer | Tokens added per minute. | +| `bucket.algorithm` | string \| null | Optional algorithm tag. | +| `mode` | string | `"include"` or `"exclude"`. | +| `categories` | array \| null | Endpoint categories the throttle applies to. | +| `endpoints` | array \| null | Explicit `[method, path]` pairs. | + +### Example + +```json +{ + "cloud_v0_hobby": { + "description": "Hobby — operator-facing description.", + "flags": { + "hooks": false, + "rbac": false, + "access": false, + "domains": false, + "sso": false + }, + "counters": { + "traces": {"limit": 5000, "free": 5000, "monthly": true, "retention": 44640}, + "evaluations": {"limit": 20, "free": 20, "monthly": true, "strict": true} + }, + "gauges": { + "users": {"limit": 2, "free": 2, "strict": true}, + "applications": {"strict": true} + } + }, + "cloud_v0_pro": { + "description": "Production team plan.", + "flags": {"hooks": true, "rbac": false, "access": false, "domains": false, "sso": false}, + "counters": { + "traces": {"free": 10000, "monthly": true, "retention": 131040}, + "evaluations": {"monthly": true, "strict": true} + }, + "gauges": { + "users": {"limit": 10, "free": 3, "strict": true} + } + } +} +``` + +## `AGENTA_ACCESS_ROLES` + +JSON **object** keyed by scope. Scope values are non-empty arrays of custom +role entries. The `owner` and `viewer` minima are platform-managed and +always synthesized for every scope — env can only **add** roles, never +redefine the minima. + +### Top-level shape + +```text +{ + "": [, ...], + ... +} +``` + +Recognized scopes: `organization`, `workspace`, `project`. Unknown scopes +fail startup. Omitted scopes keep their full code defaults. + +### `RoleEntry` fields + +| Field | Type | Required | Description | +|-------|------|----------|-------------| +| `role` | string | yes | Slug; cannot be `owner` or `viewer` (reserved). | +| `description` | string | no | Human-readable description for UIs. | +| `permissions` | string[] | yes | `Permission` enum slugs, or `"*"` for full access. | + +### Platform minima (always present) + +The platform always synthesizes `owner` and `viewer` in every scope. Their +permission sets are code-defined: + +| Scope | `owner` | `viewer` | +|-------|---------|----------| +| `organization` | `["*"]` | `[]` (membership marker, no permissions) | +| `workspace` | `["*"]` | Read-only set (sourced from the code-default `WorkspaceRole.VIEWER`) | +| `project` | `["*"]` | Same read-only set | + +Org-scope `viewer` having no permissions is intentional: organizations don't +have a permission concept today — `viewer` is purely a membership marker. + +### Example + +Add a `reviewer` role at the project scope: + +```json +{ + "project": [ + { + "role": "reviewer", + "description": "Can inspect runs and annotate traces.", + "permissions": ["read_system", "view_evaluation_runs", "edit_annotations"] + } + ] +} +``` + +After applying that override, `/workspace/roles/` and member serialization +return `owner`, `viewer`, and `reviewer` for the project scope. Workspace +and organization scopes are untouched. + +The `permissions` array entries must be valid `Permission` enum members or +the wildcard `"*"`. Unknown permissions fail startup. + +## `AGENTA_ACCESS_ROLES_OVERLAY` + +`AGENTA_ACCESS_ROLES` replaces the default extras within an overridden +scope — useful when you want to define a completely custom role catalog. +The overlay solves the smaller case: tweak one field on one existing role, +or add a single new role, without restating everything else. + +### Targeting + +The overlay accepts **only the `project` scope key today**. The patch is +applied to both the `workspace` and `project` scopes because they share +the same default role set. Setting `workspace` or `organization` as a +top-level key fails startup with a clear error — silent ignore would +mislead operators. + +### Shape + +```text +{ + "project": { + "": { + "description": "string (optional)", + "permissions": ["...permission slugs..."] + }, + ... + } +} +``` + +### Merge semantics + +| Role exists on scope? | Behavior | +|-----------------------|----------| +| Yes (e.g. `editor`, `developer`, `annotator`, custom roles) | Per-field replace. Setting `permissions` swaps the array entirely; setting `description` swaps the string. Fields not set on the patch are preserved from the existing role. | +| No (new role) | Appended. Both `description` and `permissions` must be supplied. | +| `owner` / `viewer` minima | Rejected at startup — platform-managed. | + +### Examples + +Give the `editor` role one extra permission on top of its default set: + +```json +{ + "project": { + "editor": { + "permissions": ["edit_annotations", "view_evaluation_runs", "read_system", "view_billing"] + } + } +} +``` + +(Note: `permissions` replaces the array; restate the full list you want.) + +Add a new `auditor` role to both workspace and project: + +```json +{ + "project": { + "auditor": { + "description": "Audit-only access.", + "permissions": ["read_system"] + } + } +} +``` + +Rename the `annotator` description without touching its permissions: + +```json +{ + "project": { + "annotator": { + "description": "Annotates traces for evaluation." + } + } +} +``` + +### Validation + +Failures at startup: + +- invalid JSON → fail +- empty object → fail +- top-level key other than `project` → fail +- empty `project` object → fail +- patching `owner` or `viewer` → fail +- unknown permission slug → fail +- new role without `permissions` → fail +- extra fields on a patch entry → fail + +## `AGENTA_ACCESS_DEFAULT_PLAN` + +Plan slug assigned to new organizations on signup. Must resolve to one of the +slugs in the effective plan map. When unset, falls back to: + +- `cloud_v0_hobby` when Stripe is enabled, or +- `self_hosted_enterprise` when Stripe is disabled. + +The legacy `AGENTA_DEFAULT_PLAN` env var is still honored; the canonical form +takes precedence when both are set. + +## `AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY` + +Self-hosted operators often want to tweak one or two entitlement values on +the default plan (trace retention, a throttle rate, a flag) without restating +the whole plan via `AGENTA_ACCESS_PLANS`. The overlay env var does exactly +that. + +### Targeting + +The overlay applies **only** to whatever `AGENTA_ACCESS_DEFAULT_PLAN` +resolves to. There is no multi-plan overlay; for cross-plan changes use +`AGENTA_ACCESS_PLANS`. + +### Shape + +Same top-level keys and units as a plan entry in `AGENTA_ACCESS_PLANS` +(`description`, `flags`, `counters`, `gauges`, `throttles`). Every field is +optional; what you set replaces or merges into the base plan field-by-field. +What you omit stays at the base plan's value. + +One divergence from the plan-entry shape: **`throttles` is a map keyed by +category slug** (`"standard"`, `"core_fast"`, …) instead of a list. That makes +per-category patches ergonomic. Throttles that combine multiple categories +or use `endpoints` cannot be addressed via the overlay — operators who need +that should use `AGENTA_ACCESS_PLANS`. + +### Merge semantics + +| Field | Merge behavior | +|-------|----------------| +| `description` | Replaces the base description. | +| `flags` | Per-key replace (`{"hooks": true}` only changes `hooks`). | +| `counters` / `gauges` | Per-quota field-merge: `{"traces": {"retention": X}}` keeps existing `free` / `limit` / `monthly` / `strict`. Pass `null` to clear a field. | +| `throttles[category]` | Looks up the existing throttle whose `categories` is `[category]`, then field-merges `bucket` and replaces `mode`. Fails fast if no single-category throttle matches. | + +### Examples + +Bump trace retention to 30 days (43200 minutes): + +```json +{ + "counters": { + "traces": {"retention": 43200} + } +} +``` + +Raise the STANDARD throttle's rate to 7200 tokens/minute without touching +the capacity: + +```json +{ + "throttles": { + "standard": {"bucket": {"rate": 7200}} + } +} +``` + +Both at once: + +```json +{ + "counters": {"traces": {"retention": 43200}}, + "throttles": {"standard": {"bucket": {"rate": 7200}}} +} +``` + +### Validation + +Failures at startup (same idiom as the other access-controls env vars): + +- invalid JSON → fail +- empty object → fail +- unknown flag / counter / gauge / throttle category slug → fail +- target plan slug not in the effective plan set → fail +- patching a single-category throttle that doesn't exist on the base plan + (e.g. overlaying `ai_services` on `self_hosted_enterprise`, which has no + AI-services throttle by default) → fail + +## Operational guidance + +- Store these JSON values in your deployment's secrets manager. They affect + runtime enforcement; don't keep them in source-controlled plain env files. +- Validate every change in staging before pushing to production. +- After changing either env var, restart all API workers and background + workers — each process loads controls into memory once. +- Logs at startup show the resolved source (`defaults` vs `env`) and a short + hash of the effective controls; grep API logs for `[access-controls]` to + verify all processes see the same configuration. diff --git a/docs/docs/self-host/05-dynamic-billing-settings.mdx b/docs/docs/self-host/05-dynamic-billing-settings.mdx new file mode 100644 index 0000000000..7802c8439f --- /dev/null +++ b/docs/docs/self-host/05-dynamic-billing-settings.mdx @@ -0,0 +1,236 @@ +--- +title: Dynamic Billing Settings +sidebar_label: Billing Settings +description: Override the billing catalog, Stripe pricing, free plan, and trial flow at runtime via environment variables. +--- + +# Dynamic billing settings + +This page documents the **billing** layer: + +- `AGENTA_BILLING_CATALOG` — per-plan display metadata for `/billing/plans`. +- `AGENTA_BILLING_PRICING` — Stripe line items, per-meter price IDs, and the + free-plan marker. +- `AGENTA_BILLING_TRIAL_PLAN` / `AGENTA_BILLING_TRIAL_DAYS` — reverse-trial + flow configuration. + +The companion [Dynamic access controls](./04-dynamic-access-controls.mdx) +page covers plan and role definitions. Plan slugs referenced here must exist +in the effective plan set defined by `AGENTA_ACCESS_PLANS` (or the code +defaults when that var is unset). + +:::warning Restart required +JSON env vars are parsed once at process startup. After changing them, +restart **all** API and worker processes — they each load the controls into +memory and will otherwise enforce different limits. +::: + +:::tip Validation is strict +If any of these env vars is set, validation runs at startup: + +- invalid JSON → fail +- `AGENTA_BILLING_CATALOG` referencing a plan not in the effective plan set → fail +- `AGENTA_BILLING_PRICING` referencing a plan not in the effective plan set → fail +- multiple `"free": true` plans → fail +- unknown keys inside a pricing entry → fail +- `AGENTA_BILLING_PRICING.stripe.meters[...]` entry without a `price` field → fail +- partial trial config (only one of `_TRIAL_PLAN`/`_TRIAL_DAYS`) → fail +- trial plan not in the effective plan set → fail +- trial days not a positive integer → fail +::: + +## `AGENTA_BILLING_CATALOG` + +JSON **array** of catalog entries served by `/billing/plans`. Drives the +pricing modal's titles, descriptions, feature bullets, and display prices. + +### Top-level shape + +```text +[, ...] +``` + +### `CatalogEntry` fields + +The catalog is intentionally permissive — fields beyond the ones below are +accepted and passed through to the frontend so you can extend the schema +without backend changes. + +| Field | Type | Required | Description | +|-------|------|----------|-------------| +| `plan` | string | conditional | Plan slug. Must exist in the effective plan set. Omit for tiers that don't map to a plan (e.g. contact-sales Enterprise). | +| `title` | string | yes | Display title for the pricing card. | +| `description` | string | yes | Short user-facing description. | +| `type` | string | yes | `"standard"` (shown to everyone) or `"custom"` (only shown when the org is on that plan). | +| `features` | string[] | yes | Bullet list shown on the pricing card. | +| `price` | object | no | Display pricing structure. See [Display price shape](#display-price-shape). | +| `retention` | integer | no | Display-only retention period in minutes. | + +Entries without a `plan` field are exempt from the plan-set cross-reference +check (used for contact-sales tiers). + +### Display price shape + +`price` is rendered as-is by the frontend. The standard shape: + +| Field | Type | Description | +|-------|------|-------------| +| `base.type` | string | `"flat"` (single fee) or `"tiered"` (volume-based). | +| `base.currency` | string | ISO currency code, e.g. `"USD"`. | +| `base.amount` | number | Base price in major units (dollars, euros…). | +| `.type` | string | `"tiered"`. Per-meter add-on pricing — meter slug is the key (`users`, `traces`, …). | +| `.currency` | string | ISO currency code. | +| `.tiers` | array | Each tier: `{limit?, amount, rate?}`. | + +### Example + +```json +[ + { + "title": "Hobby", + "description": "Great for hobby projects and POCs.", + "type": "standard", + "plan": "cloud_v0_hobby", + "price": {"base": {"type": "flat", "currency": "USD", "amount": 0}}, + "features": [ + "Unlimited prompts", + "5k traces/month", + "Community support" + ] + }, + { + "title": "Pro", + "description": "For production projects.", + "type": "standard", + "plan": "cloud_v0_pro", + "price": { + "base": {"type": "flat", "currency": "USD", "amount": 49}, + "users": { + "type": "tiered", + "currency": "USD", + "tiers": [ + {"limit": 3, "amount": 0}, + {"limit": 10, "amount": 20, "rate": 1} + ] + } + }, + "features": [ + "Unlimited evaluations", + "10k traces / month included then $5 per 10k", + "3 seats included then $20 per seat" + ] + }, + { + "title": "Enterprise", + "description": "For large organizations or custom needs.", + "type": "standard", + "features": ["Custom roles", "SSO", "Self-hosting options"] + } +] +``` + +## `AGENTA_BILLING_PRICING` + +JSON **object** keyed by plan slug. Drives Stripe checkout (line items) and +per-meter usage reporting. Exactly one entry may carry `"free": true` — +that plan becomes the free/downgrade fallback used when subscriptions are +cancelled. + +### Top-level shape + +```text +{ + "": , + ... +} +``` + +### `PricingEntry` fields + +| Field | Type | Required | Description | +|-------|------|----------|-------------| +| `free` | boolean | no | Marks this plan as the free/downgrade fallback. Exactly one entry may set this to `true`. | +| `stripe` | object | conditional | Required for plans that are purchasable via Stripe. See [Stripe block](#stripe-block). | + +Unknown top-level keys fail startup. The free plan typically has only +`{"free": true}` — no Stripe block needed. + +### Stripe block + +| Field | Type | Required | Description | +|-------|------|----------|-------------| +| `line_items` | array | yes | Passed verbatim to Stripe `checkout.Session.create` / `Subscription.create`. Each entry: `{price, quantity?}`. | +| `meters` | object | no | Per-meter price IDs. Keys are counter/gauge slugs (`users`, `traces`, …). Values: `{price}`. Used by usage reporting to find the right Stripe subscription item. | + +### Example + +```json +{ + "cloud_v0_hobby": { + "free": true + }, + "cloud_v0_pro": { + "stripe": { + "line_items": [ + {"price": "price_base_pro", "quantity": 1}, + {"price": "price_users_pro", "quantity": 1}, + {"price": "price_traces_pro"} + ], + "meters": { + "users": {"price": "price_users_pro"}, + "traces": {"price": "price_traces_pro"} + } + } + } +} +``` + +- `line_items` is what Agenta passes to Stripe checkout / subscription create. +- `meters` is what `meters/service.py` consults when reporting usage — + keys are counter/gauge slugs and values carry the matching Stripe price ID. + +### Migrating from `STRIPE_PRICING` + +The legacy `STRIPE_PRICING` / `AGENTA_PRICING` variables are no longer read. +A converter script ships in the design folder: + +```bash +STRIPE_PRICING='' python docs/designs/dynamic-access-and-billing/migrate_stripe_pricing.py \ + --env STRIPE_PRICING \ + --free cloud_v0_hobby \ + --pretty +``` + +It emits the new canonical shape; copy the output into `AGENTA_BILLING_PRICING`. + +## Trial flow + +`AGENTA_BILLING_TRIAL_PLAN` and `AGENTA_BILLING_TRIAL_DAYS` must be +configured together (either both set or neither). Behavior on signup: + +| Stripe enabled? | Trial configured? | Onboarding plan | +|-----------------|-------------------|-----------------| +| Yes | Yes | Reverse-trial flow on `AGENTA_BILLING_TRIAL_PLAN` for `_TRIAL_DAYS` days, then auto-downgrade to free. | +| Yes | No | Direct onboarding on the free plan (`AGENTA_BILLING_PRICING` entry marked `"free": true`). | +| No | _(ignored)_ | Direct onboarding on `AGENTA_DEFAULT_PLAN`. | + +### Field reference + +| Variable | Type | Description | +|----------|------|-------------| +| `AGENTA_BILLING_TRIAL_PLAN` | string | Plan slug for the reverse-trial. Must be in the effective plan set. | +| `AGENTA_BILLING_TRIAL_DAYS` | integer | Trial duration in days. Must be a positive integer. | + +Setting only one of the two fails startup with a clear error. + +## Operational guidance + +- Store these JSON values in your deployment's secrets manager. They affect + payment behavior and the free/downgrade fallback; don't keep them in + source-controlled plain env files. +- Validate every change in staging before pushing to production. +- After changing any of these env vars, restart all API workers and + background workers — each process loads the controls into memory once. +- Logs at startup show the resolved source (`defaults` vs `env`), the + detected free plan, and the trial status; grep API logs for + `[billing-settings]` to verify all processes see the same configuration. diff --git a/docs/openapi-cleanup/endpoints.md b/docs/openapi-cleanup/endpoints.md index 91f40aa0d4..ac73b1697c 100644 --- a/docs/openapi-cleanup/endpoints.md +++ b/docs/openapi-cleanup/endpoints.md @@ -418,7 +418,8 @@ Each row is a static FastAPI route discovered under `application/api/`. Routes a | `ee/src/apis/fastapi/billing/router.py` | `POST` | `/billing/subscription/cancel` | `` | `-` | | `ee/src/apis/fastapi/billing/router.py` | `POST` | `/billing/usage/report` | `` | `-` | | `ee/src/apis/fastapi/billing/router.py` | `POST` | `/billing/usage/report/unlock` | `` | `-` | -| `ee/src/apis/fastapi/billing/router.py` | `POST` | `/billing/usage/flush` | `` | `-` | +| `ee/src/apis/fastapi/spans/router.py` | `POST` | `/admin/spans/flush` | `` | `-` | +| `ee/src/apis/fastapi/events/router.py` | `POST` | `/admin/events/flush` | `` | `-` | | `oss/src/apis/fastapi/ai_services/router.py` | `GET` | `/status` | `ai_services_status` | `-` | | `oss/src/apis/fastapi/ai_services/router.py` | `POST` | `/tools/call` | `ai_services_tools_call` | `-` | | `oss/src/apis/fastapi/events/router.py` | `POST` | `/query` | `query_events_rpc` | `-` | diff --git a/hosting/docker-compose/ee/docker-compose.dev.yml b/hosting/docker-compose/ee/docker-compose.dev.yml index d74d0126d3..6af864418d 100644 --- a/hosting/docker-compose/ee/docker-compose.dev.yml +++ b/hosting/docker-compose/ee/docker-compose.dev.yml @@ -299,6 +299,7 @@ services: - ../../../api/oss/src/crons/queries.sh:/queries.sh - ../../../api/ee/src/crons/meters.sh:/meters.sh - ../../../api/ee/src/crons/spans.sh:/spans.sh + - ../../../api/ee/src/crons/events.sh:/events.sh # === CONFIGURATION ======================================== # env_file: - ${ENV_FILE:-./.env.ee.dev} diff --git a/hosting/docker-compose/ee/env.ee.dev.example b/hosting/docker-compose/ee/env.ee.dev.example index 3ff285c370..e018dad27f 100644 --- a/hosting/docker-compose/ee/env.ee.dev.example +++ b/hosting/docker-compose/ee/env.ee.dev.example @@ -198,7 +198,33 @@ AGENTA_CRYPT_KEY=replace-me # STRIPE_API_KEY= # STRIPE_WEBHOOK_SECRET= # STRIPE_WEBHOOK_TARGET= -# STRIPE_PRICING= + +# ================================================================== # +# Access controls & billing settings (EE) +# +# All access/billing env vars are optional. When unset, the API falls +# back to the code defaults (matching pre-change behavior). +# +# Full reference + JSON schemas: +# docs/docs/self-host/04-dynamic-access-controls.mdx +# docs/docs/self-host/05-dynamic-billing-settings.mdx +# +# Restart all API workers and background workers after changing any +# of these — each process parses env once at startup. +# ================================================================== # + +# Access controls +# AGENTA_ACCESS_PLANS= # JSON object: plan slug -> entitlements (flags/counters/gauges/throttles) +# AGENTA_ACCESS_ROLES= # JSON object: scope -> custom roles (additive over owner/viewer minima) +# AGENTA_ACCESS_ROLES_OVERLAY= # JSON object: per-role patch for 'project' scope (other scopes not supported) +# AGENTA_ACCESS_DEFAULT_PLAN= # Plan slug for new orgs on signup +# AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY= # Partial entitlement patch for the default plan only + +# Billing settings +# AGENTA_BILLING_CATALOG= # JSON array: per-plan display metadata for /billing/plans +# AGENTA_BILLING_PRICING= # JSON object: Stripe line items, per-meter price IDs, free marker. +# AGENTA_BILLING_TRIAL_PLAN= # Reverse-trial plan slug (must be set with _TRIAL_DAYS) +# AGENTA_BILLING_TRIAL_DAYS= # Trial length in days (positive integer) # ================================================================== # # Analytics - PostHog diff --git a/hosting/docker-compose/ee/env.ee.gh.example b/hosting/docker-compose/ee/env.ee.gh.example index 3ff285c370..e018dad27f 100644 --- a/hosting/docker-compose/ee/env.ee.gh.example +++ b/hosting/docker-compose/ee/env.ee.gh.example @@ -198,7 +198,33 @@ AGENTA_CRYPT_KEY=replace-me # STRIPE_API_KEY= # STRIPE_WEBHOOK_SECRET= # STRIPE_WEBHOOK_TARGET= -# STRIPE_PRICING= + +# ================================================================== # +# Access controls & billing settings (EE) +# +# All access/billing env vars are optional. When unset, the API falls +# back to the code defaults (matching pre-change behavior). +# +# Full reference + JSON schemas: +# docs/docs/self-host/04-dynamic-access-controls.mdx +# docs/docs/self-host/05-dynamic-billing-settings.mdx +# +# Restart all API workers and background workers after changing any +# of these — each process parses env once at startup. +# ================================================================== # + +# Access controls +# AGENTA_ACCESS_PLANS= # JSON object: plan slug -> entitlements (flags/counters/gauges/throttles) +# AGENTA_ACCESS_ROLES= # JSON object: scope -> custom roles (additive over owner/viewer minima) +# AGENTA_ACCESS_ROLES_OVERLAY= # JSON object: per-role patch for 'project' scope (other scopes not supported) +# AGENTA_ACCESS_DEFAULT_PLAN= # Plan slug for new orgs on signup +# AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY= # Partial entitlement patch for the default plan only + +# Billing settings +# AGENTA_BILLING_CATALOG= # JSON array: per-plan display metadata for /billing/plans +# AGENTA_BILLING_PRICING= # JSON object: Stripe line items, per-meter price IDs, free marker. +# AGENTA_BILLING_TRIAL_PLAN= # Reverse-trial plan slug (must be set with _TRIAL_DAYS) +# AGENTA_BILLING_TRIAL_DAYS= # Trial length in days (positive integer) # ================================================================== # # Analytics - PostHog diff --git a/web/ee/src/components/SidebarBanners/state/atoms.ts b/web/ee/src/components/SidebarBanners/state/atoms.ts index 0b98cfee6a..a97c8b31c4 100644 --- a/web/ee/src/components/SidebarBanners/state/atoms.ts +++ b/web/ee/src/components/SidebarBanners/state/atoms.ts @@ -6,7 +6,7 @@ import {BannerConfig} from "@/oss/components/SidebarBanners/types" import dayjs from "@/oss/lib/helpers/dateTimeHelper/dayjs" import {isBillingEnabled} from "@/oss/lib/helpers/isEE" import {isDemo} from "@/oss/lib/helpers/utils" -import {Plan} from "@/oss/lib/Types" +import {DefaultPlan} from "@/oss/lib/Types" import {urlAtom, URLState} from "@/oss/state/url" import {subscriptionQueryAtom} from "../../../state/billing/atoms" @@ -81,7 +81,7 @@ export const eeBannersAtom = atom((get): BannerConfig[] => { }) } // Upgrade banner (dismissible) - only if NOT on trial AND on Hobby plan - else if (subscription.plan === Plan.Hobby) { + else if (subscription.plan === DefaultPlan.Hobby) { banners.push({ id: "upgrade-banner-v1", type: "upgrade", diff --git a/web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/PricingCard/index.tsx b/web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/PricingCard/index.tsx index 1ef323c611..4898fdb090 100644 --- a/web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/PricingCard/index.tsx +++ b/web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/PricingCard/index.tsx @@ -2,7 +2,7 @@ import {memo, useMemo} from "react" import {Card, Button, Typography} from "antd" -import {Plan} from "@/oss/lib/Types" +import {DefaultPlan} from "@/oss/lib/Types" import {PricingCardProps} from "../types" @@ -17,11 +17,11 @@ const PricingCard = ({plan, currentPlan, onOptionClick, isLoading}: PricingCardP return true } - if (currentPlan?.plan === Plan.Enterprise) { + if (currentPlan?.plan === DefaultPlan.Enterprise) { return true } - if (currentPlan?.plan === Plan.Business && plan.plan === Plan.Pro) { + if (currentPlan?.plan === DefaultPlan.Business && plan.plan === DefaultPlan.Pro) { return true } @@ -45,12 +45,14 @@ const PricingCard = ({plan, currentPlan, onOptionClick, isLoading}: PricingCardP ) : ( diff --git a/web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/PricingModalContent/index.tsx b/web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/PricingModalContent/index.tsx index b5bbebc9c3..d9049a4b6b 100644 --- a/web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/PricingModalContent/index.tsx +++ b/web/ee/src/components/pages/settings/Billing/Modals/PricingModal/assets/PricingModalContent/index.tsx @@ -5,7 +5,7 @@ import {Spin, Typography} from "antd" import useURL from "@/oss/hooks/useURL" import {getEnv} from "@/oss/lib/helpers/dynamicEnv" -import {Plan} from "@/oss/lib/Types" +import {DefaultPlan} from "@/oss/lib/Types" import { checkoutNewSubscription, switchSubscription, @@ -34,10 +34,10 @@ const PricingModalContent = ({onCancelSubscription, onCloseModal}: PricingModalC // 2. subscription-pan is cloud_v0_hobby then we trigger the checkout endpoint // 3. if the user can custom plan like cloud_v0_business then we trigger the switch endpoint - if (plan.plan === Plan.Hobby && subscription?.plan !== Plan.Hobby) { + if (plan.plan === DefaultPlan.Hobby && subscription?.plan !== DefaultPlan.Hobby) { onCancelSubscription() return - } else if (!subscription || subscription?.plan === Plan.Hobby) { + } else if (!subscription || subscription?.plan === DefaultPlan.Hobby) { const data = await checkoutNewSubscription({ plan: plan.plan, success_url: `${getEnv("NEXT_PUBLIC_AGENTA_WEB_URL")}${projectURL || ""}/settings?tab=billing`, diff --git a/web/ee/src/components/pages/settings/Billing/index.tsx b/web/ee/src/components/pages/settings/Billing/index.tsx index 9171c2d7c0..50154d60b5 100644 --- a/web/ee/src/components/pages/settings/Billing/index.tsx +++ b/web/ee/src/components/pages/settings/Billing/index.tsx @@ -6,7 +6,7 @@ import dayjs from "dayjs" import {useRouter} from "next/router" import useURL from "@/oss/hooks/useURL" -import {Plan} from "@/oss/lib/Types" +import {DefaultPlan} from "@/oss/lib/Types" import {editSubscriptionInfo, useSubscriptionData, useUsageData} from "@/oss/services/billing" import UsageProgressBar from "./assets/UsageProgressBar" @@ -114,7 +114,7 @@ const Billing = () => { - {subscription?.plan !== Plan.Hobby && ( + {subscription?.plan !== DefaultPlan.Hobby && ( {subscription?.free_trial ? "Trial period will end on " @@ -125,14 +125,15 @@ const Billing = () => { )} - {subscription?.plan === Plan.Enterprise ? ( + {subscription?.plan === DefaultPlan.Enterprise ? ( For queries regarding your plan,{" "} click here to contact us - ) : subscription?.plan === Plan.Pro || subscription?.plan === Plan.Business ? ( + ) : subscription?.plan === DefaultPlan.Pro || + subscription?.plan === DefaultPlan.Business ? (