export type ClientOptions = { baseUrl: 'https://api.horizon.labelbox.com' | (string & {}); }; /** * Request body for adding one run-config version to a slot menu. */ export type AddMenuEntryBodyDto = { /** * Locked, slot-reachable run-config version to add to the menu. */ runConfigVersionId: string; /** * When true, star this entry (include it in the slot default set). */ isDefault?: boolean; }; /** * Aggregated platform-wide statistics. */ export type AdminStatsDto = { /** * Top-line entity counts across the platform. */ counts: { /** * Total number of organizations on the platform. */ organizations: number; /** * Total number of environments across all organizations. */ environments: number; /** * Total number of problems across all environments. */ problems: number; /** * Total number of problem runs ever executed. */ problemRuns: number; }; /** * Daily problem-run counts over the selected window. */ runsOverTime: Array<{ /** * Calendar day for the bucketed run count (ISO-8601 date, UTC). */ date: string; /** * Number of problem runs that started on this day. */ runs: number; }>; /** * Token usage broken down by LLM model. */ tokensByModel: Array<{ /** * LLM model identifier (e.g. provider/name). */ model: string; /** * Total tokens consumed by this model across all runs. */ tokens: number; }>; /** * Problem-run counts grouped by terminal status. */ runsByStatus: Array<{ /** * Terminal status label for the bucket (e.g. completed, failed). */ status: string; /** * Number of runs that ended in this status. */ runs: number; }>; }; /** * Agent-service transcript events, ordered by sequence ascending. */ export type AgentRunEventListDto = Array<{ /** * Monotonically increasing sequence number assigned by the agent-service. */ sequence: number; /** * Category of the event: lifecycle markers (started, launched, done, error), stdio (stdout, stderr), structured event payloads (event), agent observations (observation), and setup/snapshot phases. */ event_type: 'started' | 'stdout' | 'stderr' | 'event' | 'observation' | 'process_exited' | 'snapshotting' | 'launched' | 'setup_started' | 'setup_completed' | 'input_delivered' | 'done' | 'error'; /** * Payload of the event; shape varies by event_type. */ data: { [key: string]: unknown; }; /** * Timestamp when the agent-service emitted the event (ISO-8601, UTC). */ created_at: string; }>; /** * Skill detail: catalog metadata plus a signed URL for the current SKILL.md bundle contents. */ export type AgentSkillDetailDto = { /** * Stable skill identifier (UUID). Org-uploaded or platform-curated skill bundle mounted into an agent workspace. */ id: string; /** * Owning organization, or null for a platform skill visible to every org. */ organizationId: string | null; /** * URL-safe skill slug unique within the owning org (or among platform skills). Lowercase alphanumeric with hyphens. */ slug: string; /** * Human-readable skill name shown in the harness skills index. */ name: string; /** * Short description surfaced in the harness skills index. */ description: string; /** * Current SKILL.md bundle file id. Replacing this file_id is how a skill is updated. */ fileId: string; /** * Timestamp when the skill was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the skill was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Short-lived signed download URL for the current SKILL.md bundle contents (mirrors knowledge-base asset serving). */ contentUrl: string; }; /** * An unversioned, mutable skill catalog entry — org-scoped or platform-wide — whose SKILL.md bundle is mounted into managed-agent workspaces. */ export type AgentSkillDto = { /** * Stable skill identifier (UUID). Org-uploaded or platform-curated skill bundle mounted into an agent workspace. */ id: string; /** * Owning organization, or null for a platform skill visible to every org. */ organizationId: string | null; /** * URL-safe skill slug unique within the owning org (or among platform skills). Lowercase alphanumeric with hyphens. */ slug: string; /** * Human-readable skill name shown in the harness skills index. */ name: string; /** * Short description surfaced in the harness skills index. */ description: string; /** * Current SKILL.md bundle file id. Replacing this file_id is how a skill is updated. */ fileId: string; /** * Timestamp when the skill was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the skill was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Cursor-paginated page of agent skills (org skills plus platform skills). */ export type AgentSkillPageDto = { /** * Items in this page, ordered per the requested sort. */ items: Array<{ /** * Stable skill identifier (UUID). Org-uploaded or platform-curated skill bundle mounted into an agent workspace. */ id: string; /** * Owning organization, or null for a platform skill visible to every org. */ organizationId: string | null; /** * URL-safe skill slug unique within the owning org (or among platform skills). Lowercase alphanumeric with hyphens. */ slug: string; /** * Human-readable skill name shown in the harness skills index. */ name: string; /** * Short description surfaced in the harness skills index. */ description: string; /** * Current SKILL.md bundle file id. Replacing this file_id is how a skill is updated. */ fileId: string; /** * Timestamp when the skill was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the skill was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * Cursor for fetching the next page, or null when this is the last page. */ nextCursor: string | null; /** * Total number of items matching the filter across all pages. */ total: number; }; /** * One LLM-backed editor action (suggestion or generation) attached to a problem version. */ export type AiOperationDto = { /** * Stable AI-operation identifier (UUID). Captures a single LLM-backed action (suggestion, generation). */ id: string; /** * Kind of LLM-backed editor action performed against a problem version. */ type: 'improve_prompt' | 'generate_settings' | 'generate_rubrics'; /** * Lifecycle status of an LLM-backed operation. */ status: 'pending' | 'completed' | 'failed'; /** * Problem version this AI operation targets. */ versionId: string; /** * Operation-specific result payload produced on success. Null while pending or after failure. */ result: unknown | null; /** * Failure detail when the operation errored; null otherwise. */ errorMessage: string | null; /** * Timestamp when the AI operation was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the AI operation reached a terminal state (ISO-8601, UTC). Null while pending. */ completedAt: string | null; }; /** * Standard flat error response body emitted by the platform exception filter. `code` is the stable machine-readable discriminant. */ export type ApiErrorStatus405 = { /** * Stable machine-readable error code. */ code: 'method_not_allowed'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Standard flat error response body emitted by the platform exception filter. `code` is the stable machine-readable discriminant. */ export type ApiErrorStatus409 = { /** * Stable machine-readable error code. */ code: 'conflict'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Standard flat error response body emitted by the platform exception filter. `code` is the stable machine-readable discriminant. */ export type ApiErrorStatus422 = { /** * Stable machine-readable error code. */ code: 'unprocessable_entity'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Standard flat error response body emitted by the platform exception filter. `code` is the stable machine-readable discriminant. */ export type ApiErrorStatus502 = { /** * Stable machine-readable error code. */ code: 'bad_gateway'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Standard flat error response body emitted by the platform exception filter. `code` is the stable machine-readable discriminant. */ export type ApiErrorStatus503 = { /** * Stable machine-readable error code. */ code: 'service_unavailable'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Payload for applying an approved subset of a completed synthesizer run's diff back onto the problem version. */ export type ApplySynthesizerRunBodyDto = { /** * Subset of the diff-payload targets the caller approves; must be non-empty and free of duplicates. */ approvedTargets: Array<'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId' | 'rubrics' | 'formAnswers' | 'problemFiles' | 'supportingFiles' | 'graderSupportFiles'>; }; /** * Request body for attaching a customer secret to a run-config version. */ export type AttachCustomerSecretDto = { /** * Injection mode for this attachment. Must match the secret: 'proxy' for a secret with an upstream host and header, 'direct' for one without. Omit to use the secret's mode. */ injectionMode?: 'proxy' | 'direct'; }; /** * Request body for attaching an external ID to an environment that doesn't already have one. Fails with 409 if the environment already has any external ID set (detach it first), or if the supplied external ID is in use by another active environment. */ export type AttachEnvironmentExternalIdDto = { /** * External identifier to bind to the environment. Must not already be in use by another environment. */ externalId: string; }; /** * Acknowledgement response indicating an existing form was attached successfully. */ export type AttachExistingFormResponseDto = { /** * Always true when the attach succeeded. */ ok: true; }; /** * Request body for attaching a single environment file to a problem version with a role. */ export type AttachFileDto = { /** * Environment file to attach to the problem version. */ fileId: string; /** * Role of the attached file: solver-visible input, reference material, or grader-only assets. */ type: 'problem' | 'supporting' | 'grader_support'; }; /** * Payload for attaching an existing uploaded file to a QA config at a given mount path. */ export type AttachQaConfigFileBodyDto = { /** * Stable file identifier (UUID). Files are problem-scoped uploads. */ fileId: string; /** * Absolute path inside the QA container where the file is mounted; must not collide with reserved infrastructure paths. */ mountPath: string; }; /** * Input for attaching an uploaded file to a draft run-config version. */ export type AttachRunConfigFileDto = { /** * Identifier of the already-uploaded file object to attach. */ fileId: string; /** * Directory the file mounts under. Defaults to /workspace when omitted. */ mountDir?: string; /** * Mount mode. Defaults to read-only when omitted. */ mode?: 'ro' | 'rw'; }; /** * Payload for attaching an existing uploaded file to a synthesizer job at a given mount path. */ export type AttachSynthesizerJobFileBodyDto = { /** * Stable file identifier (UUID). Files are problem-scoped uploads. */ fileId: string; /** * Absolute container path where the file is mounted. Must avoid reserved tarball paths used by the synthesizer engine. */ mountPath: string; }; /** * Request body for a batch org-scoped file-metadata lookup. Rejects the whole batch if any id is missing or out of scope. */ export type BatchOrganizationFileMetadataRequestDto = { /** * File ids to resolve. Every id must be in the caller org scope or the request fails. */ fileIds: Array; }; /** * Bindable run-config catalog for an environment: system, organization, and environment scopes with locked-version summaries. */ export type BindableRunConfigListDto = Array<{ /** * Stable run-config identity identifier. */ id: string; /** * Human-readable display name shown in binding selectors. */ name: string; /** * Scope at which this run config lives. Bindable catalogs include system, org, and env scopes only. */ scope: { /** * Discriminator: scope is platform-wide. */ level: 'system'; /** * Always null for system scope (no owning resource). */ id: null; } | { /** * Discriminator: scope is an organization. */ level: 'org'; /** * Organization that owns this scope. */ id: string; } | { /** * Discriminator: scope is an environment. */ level: 'env'; /** * Environment that owns this scope. */ id: string; } | { /** * Discriminator: scope is a problem. */ level: 'problem'; /** * Problem that owns this scope. */ id: string; }; /** * Identity-level discriminator used for role slot filtering in selectors. */ type: 'agent-harness' | 'snapshot'; /** * Locked version pinned as the role-agnostic default at this scope, or null when unset. */ defaultRunConfigVersionId: string | null; /** * Locked, non-deleted versions for this identity, newest-first. Empty when no locked version exists. */ lockedVersions: Array<{ /** * Stable identifier of the locked run-config version. */ id: string; /** * Monotonic version number within the owning run-config identity. */ versionNumber: number; /** * Timestamp when the version was locked (ISO-8601, UTC). */ lockedAt: string; }>; }>; /** * Built-in synthesizer hardcoded into the platform binary and applied uniformly to every environment. */ export type BuiltInSynthesizerDto = { /** * Discriminator marking this synthesizer as a built-in shipped with the platform. */ kind: 'built-in'; /** * Stable string key identifying a hardcoded built-in synthesizer. */ key: 'improve-prompt' | 'generate-tools' | 'generate-rubrics'; /** * Display name of the built-in synthesizer. */ name: string; /** * Description of what this built-in synthesizer does. */ description: string; /** * Hardcoded system prompt the built-in sends to the agent. */ systemPrompt: string; /** * Inputs the built-in bundles into the synthesizer input tarball. */ contextInputs: { /** * File buckets to include in the synthesizer input tarball. */ files: { /** * Include the problem primary files in the input tarball. */ problem: boolean; /** * Include supporting (read-only) files in the input tarball. */ supporting: boolean; /** * Include grader-support files (non-gold) in the input tarball. */ graderSupport: boolean; /** * Include gold-standard files in the input tarball. */ goldStandard: boolean; }; /** * When true, include the problem version current rubrics in the input tarball. */ rubrics: boolean; /** * Existing problem-version field values to copy into the manifest so the synthesizer can condition on them. */ currentFieldValues: Array<'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId'>; /** * When true, include the active form schema and current answers in the manifest. Defaults to false for backward compatibility. */ forms: boolean; }; /** * Targets the built-in is allowed to write to. */ targetFields: Array<'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId' | 'rubrics' | 'formAnswers' | 'problemFiles' | 'supportingFiles' | 'graderSupportFiles'>; /** * Reflects the environment-level disable toggle; disabled built-ins are still listed for re-enabling but cannot be triggered. */ enabled: boolean; }; /** * Request body for attaching many environment files to a problem version in one call, all with the same role. */ export type BulkAttachFilesDto = { /** * Environment files to attach in one request; capped at 500 entries. */ fileIds: Array; /** * Role assigned to every file in the batch. */ type: 'problem' | 'supporting' | 'grader_support'; }; /** * Bulk-create `problem_runs` shells and spawn a v2 `problem_run_batch` root job that drives them. */ export type BulkCreateProblemRunsRequestDto = { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Display name for the batch, shown in the jobs-v2 list and detail views. Defaults to a generated label when omitted. */ name?: string; /** * Problem versions to run. Each must be locked and within the caller scope. Duplicates are rejected — use nAttemptsPerProblem to request multiple runs of one version. Capped at 1000 to match Send-to-Taiga. */ problemVersionIds: Array; /** * Number of solver attempts to spawn per problem version. One problem-run shell is inserted per (problem version, attempt) pair. Defaults to 1. */ nAttemptsPerProblem?: number; /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ runConfigVersionId?: string; /** * Solver run-config versions to fan out over — one solver branch per entry. Mutually exclusive with runConfigVersionId. Omit all solver inputs to resolve via the environment default binding chain. */ runConfigVersionIds?: Array; /** * Per-request grader override for a bulk problem-run submission. The grading config itself is read from the locked problem version server-side. */ grading?: { /** * Grader model override for this submission. Null permits a model-less run-config grader; omission leaves model selection to the resolved grader binding. */ modelName?: string | null; /** * Grader container-image override for this submission. Null permits an image-less run-config grader; omission leaves image selection to the resolved grader binding. */ imageId?: string | null; }; /** * Optional locked grader run-config version for rubric/agentic grading. When omitted, the problem-version/environment/scope-default grader binding chain is resolved and validated before dispatch. Labeler-supplied explicit picks must also be on the environment grader menu. Model-less programmatic grader pins are allowed when grading is programmatic-only. */ graderRunConfigVersionId?: string; }; /** * Result of a bulk problem-runs submission via the v2 path. */ export type BulkCreateProblemRunsResponseDto = { /** * New jobs-v2 root job id, a problem-run-batch orchestration root. Use the jobs-v2 surface to poll status, cancel, or fetch the orchestration tree. */ jobV2Id: string; /** * IDs of the problem-run shells inserted by this request — one per (problem version, attempt) pair. Read individual run status via the problem-run detail endpoint. */ problemRunIds: Array; }; /** * Request body for the bulk soft-delete endpoint. Selects problems by explicit ID list or by server-resolved filter; the two modes are mutually exclusive. */ export type BulkSoftDeleteBodyDto = { /** * Caller is supplying an explicit list of problem IDs to soft-delete. */ mode: 'ids'; /** * Explicit list of problem IDs to soft-delete. */ problemIds: Array; } | { /** * Caller is supplying a problem-list filter; the server resolves matching problems and soft-deletes them. */ mode: 'filter'; /** * Filter describing which problems to soft-delete, resolved server-side. */ filter: { /** * Free-text search filter applied across problem title and external id. */ search?: string; /** * Comma-separated list of model identifiers; matches problems with at least one run on any listed model. */ models?: Array; /** * Which aggregate (avg, min, or max) the score bounds apply to. Defaults to the average. */ avgScoreMetric?: 'avg' | 'min' | 'max'; /** * Inclusive lower bound on the selected score metric, expressed as a 0–100 percentage. */ avgScoreMin?: number; /** * Inclusive upper bound on the selected score metric, expressed as a 0–100 percentage. */ avgScoreMax?: number; /** * Inclusive lower bound on problem creation date, in YYYY-MM-DD form (UTC calendar day). */ createdAtFrom?: string; /** * Inclusive upper bound on problem creation date, in YYYY-MM-DD form (UTC calendar day). */ createdAtTo?: string; /** * JSON-encoded enrichment-dimension filters applied uniformly across list items, stats, analytics, and exports. */ enrichmentFilters: { [key: string]: Array; }; }; }; /** * Request payload for bulk-upserting permission overrides on an environment. */ export type BulkUpsertPermissionOverridesDto = { /** * List of override rows to upsert; each (userEmail, permission, field) combination must be unique within the array. */ overrides: Array<{ /** * Email of the user the override targets (lower-cased on accept), or null for an environment-wide override. */ userEmail: string | null; /** * Permission string to override (must be one of the whitelisted overridable permissions). */ permission: string; /** * Specific field to target, or null for a whole-permission override. */ field: 'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingStrategy' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId' | 'attemptCount' | null; /** * Whether the override grants or revokes the permission/field. */ effect: 'allow' | 'deny'; }>; }; /** * A background job tracked by the jobs_v2 framework. Scope ids are denormalized from the link tables for read convenience. */ export type CheckFixCycleResponseDto = { /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ id: string; /** * Parent jobs_v2 id when this row was spawned as a child via a waiting_children result. Null for root jobs. */ parentJobId: string | null; /** * The user that created this job. Not a scope handle. */ userId: string; /** * Discriminator mapping to a registered strategy bundle (e.g. taiga_send, taiga_run_problem_version). */ type: string; /** * Optional human-readable label shown in lists. */ name: string | null; /** * Lifecycle state of a jobs_v2 row. Claimable: pending, waiting_external (gated by poll_after), aggregating. Parked: executing, waiting_children, cancelling. Terminal: completed, failed, cancelled. */ status: 'pending' | 'executing' | 'waiting_external' | 'waiting_children' | 'aggregating' | 'cancelling' | 'completed' | 'failed' | 'cancelled'; /** * Strategy-typed input. Validated against the per-type Zod schema at insert and dispatch. */ payload: unknown; /** * Live state across waiting_external poll cycles. Null for sync strategies and before the first poll. */ externalState: unknown | null; /** * Terminal output payload set when status transitions to completed. */ output: unknown | null; /** * Terminal error message set when status transitions to failed. */ errorMessage: string | null; /** * Budget units consumed by this row. Bumped by claimPending on each run claim, and by scheduleRetryInTrx on each poll/aggregate retry (i.e. when the strategy returns { kind: "retry" } from poll or onChildrenComplete). Normal poll/aggregate reclaims that did not return retry are not counted. */ attempts: number; /** * Retry budget. The row becomes terminally failed once attempts reaches this value. Default 1 (single attempt, no retry); raised per-type via registerJobType or per-row via the spawn spec. */ maxAttempts: number; /** * Earliest time this row is eligible to be claimed from status=pending. */ scheduledAt: string; /** * While status=waiting_external, earliest time the poll loop will invoke PollStrategy.poll. */ pollAfter: string | null; /** * Wall-clock timestamp the row first transitioned out of pending. Null until claimed. */ startedAt: string | null; /** * Wall-clock timestamp the row entered a terminal status. Null until terminal. */ completedAt: string | null; /** * Row creation timestamp. */ createdAt: string; /** * Row last-modified timestamp. */ updatedAt: string; /** * Environments this job is linked to (denormalized from environment_jobs). */ environmentIds?: Array; /** * Organizations this job is linked to (denormalized from organization_jobs). */ organizationIds?: Array; /** * Display names for the ids in organizationIds, keyed by organization id. Present only on platform-admin cross-organization reads. */ organizationNames?: { [key: string]: string; }; /** * Problems this job is linked to (denormalized from problem_jobs). */ problemIds?: Array; }; /** * Request body for atomically claiming the next available problem (creating one if none exists) along with its initial version. */ export type ClaimNextWithVersionDto = { /** * External identifier to assign to the claimed problem if a new one is created. */ externalId: string; }; /** * Response for claim-next-with-version, bundling the problem, its initial version, and a created flag. */ export type ClaimNextWithVersionResponseDto = { /** * The claimed problem. */ problem: { /** * Stable problem identifier (UUID). */ id: string; /** * Environment this problem belongs to. */ environmentId: string; /** * Caller-provided external identifier for this problem. Null when no external system tracks it. */ externalId: string | null; /** * Human-readable problem title shown in lists and detail views. */ title?: string | null; /** * Free-text description of the problem. Null when unset. */ description?: string | null; /** * Problem domain (e.g. the subject area the task belongs to). Null when unset. */ domain?: string | null; /** * True for environment-scoped seed problems used as templates; false for regular problems. Templates are hidden from public lists and rejected by mutation routes. */ isTemplate: boolean; /** * Timestamp when the problem was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the problem was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * The initial version associated with the claimed problem. */ version: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ id: string; /** * Problem this version belongs to. */ problemId: string; /** * Environment the parent problem belongs to. Denormalized for scope checks. */ environmentId: string; /** * Sequential version label assigned at creation (e.g. "v1", "v2"). */ version: string; /** * Task prompt shown to the agent at run start. */ prompt: string; /** * Container image reference for the agent runtime (e.g. "python:3.12"). Null falls back to the platform default. */ containerImage: string | null; /** * CPU/memory tier for the run container. Null falls back to the platform default. */ containerSize: 'small' | 'medium' | 'large' | 'xlarge' | 'xlarge-highmem' | 'xxlarge' | null; /** * Optional GPU type attached to the run. Null means no GPU is attached. */ gpuType: 'T4' | 'L4' | 'A10G' | 'A100' | 'H100' | null; /** * Wall-clock timeout for the agent run, in seconds. Null falls back to the platform default. */ timeoutSeconds: number | null; /** * Sparse map of tool name to seconds. Only tools with explicit overrides are present. Null means all defaults apply. */ toolTimeouts: { [key: string]: number; } | null; /** * Maximum agent turns allowed for the run. Null means unlimited, subject to the wall-clock timeout. */ maxTurns: number | null; /** * Grading strategy and grader-specific configuration applied to runs of this problem version. */ gradingConfig: GradingConfig; /** * When true, a single agentic judge scores all rubric criteria together. When false, each criterion is judged independently. */ singleAgentRubric: boolean; /** * Run the container privileged (root on the host node). Only takes effect on the GKE launcher; requires unrestricted outbound networking because privileged containers bypass egress enforcement. */ privileged: boolean; /** * Markdown template that overrides the environment-wide global-issue template for issues filed against this version. Null inherits the environment template. */ issueTemplate: string | null; /** * Locked run-config version bound for solver invocations on this problem version. Null falls back to the environment-level binding. */ solverRunConfigVersionId: string | null; /** * Locked run-config version bound for grader invocations on this problem version. Null falls back to the environment-level binding. */ graderRunConfigVersionId: string | null; /** * Locked run-config version bound for QA invocations on this problem version. Null falls back to the environment-level binding. */ qaRunConfigVersionId: string | null; /** * Locked run-config version bound for synthesizer invocations on this problem version. Null falls back to the environment-level binding. */ synthesizerRunConfigVersionId: string | null; /** * Raw worldsim authoring payload persisted at lock. Each run materializes the per-version solver run config from it; also used for export/import and re-authoring. Null when the version has no worldsim config. */ worldsimConfig: { /** * ISO-8601 simulated wall-clock time for the run (WORLDSIM_SIMULATED_TIME). Null uses real time. */ simulatedTime: string | null; /** * Selected MCP service keys. Unless inheritSolverMcpTools is true, their tools form the mcp-tools.yaml allowlist, and an empty selection allows no tools. */ mcpServers: Array; /** * When true, each run keeps the resolved solver's own MCP tool allowlist (the tools file its WORLDSIM_MCP_TOOLS_FILE names, set on the run config or baked into the runner image, or every tool when it has none) and mcpServers is ignored. */ inheritSolverMcpTools?: boolean; /** * Ordered list of startup MCP tool calls, as an opaque JSON string (a StartupCall[]). Duplicate tools are allowed (e.g. create five users). The calls run through the run's MCP tool allowlist, so unless inheritSolverMcpTools is true each call's tool must come from a server in mcpServers. */ worldEffects: string; /** * Runtime environment type (mcp or computer). Maps to CUA_ENVIRONMENT_TYPE. */ envType?: 'mcp' | 'computer'; /** * Computer-use desktop flavor (chrome or full_desktop). Only meaningful when envType is "computer". Maps to CUA_DESKTOP_TYPE. */ desktopType?: 'chrome' | 'full_desktop'; /** * Whether the run may call the API. Maps to CUA_API_ALLOWED. */ apiAllowed?: boolean; /** * Whether the run may use the browser API. Maps to CUA_ALLOW_BROWSER_API. */ allowBrowserApi?: boolean; /** * Free-text system instructions for the Worldsim harness in MCP or Computer environments. Maps to CUA_SYSTEM_INSTRUCTIONS. Supersedes cuaSystemInstructions. */ systemInstructions?: string; /** * Deprecated: use systemInstructions. Retained for locked-version compatibility. Maps to CUA_SYSTEM_INSTRUCTIONS. * * @deprecated */ cuaSystemInstructions?: string; } | null; /** * Timestamp when this version was locked and made immutable (ISO-8601, UTC). Null while the version is still a draft. */ lockedAt: string | null; /** * Timestamp when the problem version was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the problem version was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Tool allowlist for the agent. Omitted means all known tools are allowed; an empty list means no tools are allowed. */ tools?: Array<'Bash' | 'Read' | 'Write' | 'Edit' | 'Glob' | 'Grep' | 'NotebookEdit' | 'WebFetch' | 'WebSearch' | 'TodoWrite' | 'Task' | 'TaskOutput' | 'TaskStop' | 'EnterPlanMode' | 'ExitPlanMode' | 'AskUserQuestion' | 'Skill' | 'ToolSearch'>; /** * Outbound network allowlist. Omitted uses the platform default, the unrestricted sentinel allows everything, and a non-empty list restricts access to those domains. */ allowedDomains?: [ '*' ] | Array; /** * Package managers pre-installed in the container. An empty list means none are provisioned. */ installedPackageManagers: Array<'pip' | 'uv' | 'npm' | 'cargo' | 'apt'>; }; /** * True when a new problem was created (201); false when an existing one was returned (200). */ created: boolean; }; /** * The pre-assembled command manifest the live `recursion` CLI fetches to build its command tree, help, and docs surfaces. */ export type CliManifestDto = { /** * Manifest schema version; the CLI rejects a version it does not understand. */ formatVersion: number; /** * Content hash of the manifest body — also returned as the ETag for conditional fetches. */ hash: string; /** * Executable operations keyed by operationId — the CLI command tree, flags, and shapes. */ operations: { [key: string]: unknown; }; /** * Reference resource hubs keyed by id — object shapes, operations, and intros. */ resources: { [key: string]: unknown; }; /** * How-to recipes keyed by id — composed SDK / CLI / cURL walkthroughs. */ recipes: { [key: string]: unknown; }; /** * Explanation concept pages keyed by id, each with its markdown body. */ concepts: { [key: string]: unknown; }; /** * Getting-started tutorials, each with its markdown body. */ tutorials: Array; /** * Authored product guides keyed by id, each with its rendered MDX body. */ guides?: { [key: string]: unknown; }; /** * The product-domain taxonomy that groups the browse surfaces. */ domains: Array; }; /** * Application readiness for opening browser access to a compute. */ export type ComputeAccessReadinessDto = { /** * Current application readiness state. */ status: 'pending' | 'ready' | 'failed'; /** * Reason the application readiness probe failed, when status is failed. */ reason?: string; }; /** * Short-lived access session for connecting to a running compute via the agent-service gateway. */ export type ComputeAccessSessionDto = { /** * Single-use URL the client redeems to open an interactive session against the compute. Served on the compute's own origin, not a shared gateway, so the host identifies the compute the session is for. */ redemptionUrl: string; /** * Timestamp when the redemption URL expires (ISO-8601, UTC). */ redemptionUrlExpiresAt: string; }; /** * The caller already holds the maximum number of active leased computes. */ export type ComputeActiveLeaseLimitReachedBodyDto = { /** * Stable machine-readable error code. */ code: 'compute_active_lease_limit_reached'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Conflict returned when the caller already has an active compute in the requested environment. */ export type ComputeAlreadyActiveBodyDto = { /** * Machine-readable error discriminator for the conflict. */ code: 'compute_already_active'; /** * Human-readable explanation with the recovery action. */ message: string; /** * Identifiers clients use to resume or inspect the compute that is already active. */ details: { /** * Identifier of the compute the caller already holds in this environment. */ existingComputeId: string; /** * Run-config version the existing compute was created from; null when none was associated. */ runConfigVersionId: string | null; }; }; /** * Conflict returned when the environment already has an active compute, compute admission changed concurrently, or the caller reached the active leased-compute limit. */ export type ComputeCreateConflictResponseDto = ({ code: 'compute_already_active'; } & ComputeAlreadyActiveBodyDto) | ({ code: 'compute_creation_in_progress'; } & ComputeCreationInProgressBodyDto) | ({ code: 'compute_active_lease_limit_reached'; } & ComputeActiveLeaseLimitReachedBodyDto); /** * Compute admission or reservation state changed concurrently; retrying later may succeed. */ export type ComputeCreationInProgressBodyDto = { /** * Stable machine-readable error code. */ code: 'compute_creation_in_progress'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Confirmation that the caller owns a compute. */ export type ComputeOwnershipDto = { /** * Whether the caller holds the reservation for this compute. */ ownsCompute: boolean; }; /** * Mirror of the agent-service ComputeResult payload — lifecycle metadata for a single compute. */ export type ComputeResultDto = { /** * Stable identifier of the compute (issued by agent-service). */ id: string; /** * Human-readable compute name. */ name: string; /** * Lifecycle status reported by agent-service (e.g. "pending", "running", "stopped"). */ status: string; /** * Error message emitted by the runtime if the compute failed; null otherwise. */ errorMessage: string | null; /** * Timestamp when the compute was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the compute entered the running state (ISO-8601, UTC); null while pending. */ startedAt: string | null; /** * Timestamp when the compute terminated (ISO-8601, UTC); null while still running. */ stoppedAt: string | null; /** * Container image the compute was launched with; null when not yet resolved. */ containerImage: string | null; /** * Size of the attached persistent volume claim in GiB. */ pvcSizeGi: number; /** * Container HTTP port exposed for redemption; null when no port was requested. */ httpPort: number | null; /** * Idle-stop timeout in seconds; maximum 30 days. */ idleStopAfterSeconds: number; /** * Stopped-to-deleted timeout in seconds; maximum 30 days. */ stoppedDeleteAfterSeconds: number; }; /** * Drill-down breakdown of platform spend along a single dimension (org, env, problem, model, ...). */ export type CostDrillDownItemsResponseDto = { /** * Cost aggregations grouped by the requested drill-down dimension. */ items: Array<{ /** * Stable identifier of the aggregation row (entity id for the drill level). */ id: string; /** * Human-readable label rendered for the row. */ label: string; /** * Number of runs aggregated into this row. */ totalRuns: number; /** * Total tokens across all runs in this row. */ totalTokens: number; /** * Total input tokens across all runs in this row. */ inputTokens: number; /** * Total output tokens across all runs in this row. */ outputTokens: number; /** * Total tokens read from prompt cache. */ cacheReadTokens: number; /** * Total tokens written to prompt cache. */ cacheCreationTokens: number; /** * Agent (LLM) inference cost for this row in USD. */ agentCostUsd: number; /** * Compute (sandbox) execution cost for this row in USD. */ computeCostUsd: number; /** * Sum of agent and compute costs for this row in USD. */ totalCostUsd: number; /** * Number of runs that produced a grading score (subset of totalRuns). */ scoredRuns?: number; /** * Mean grading score across scored runs in this row. */ avgScore?: number; /** * Number of distinct problems represented in this row. */ totalProblems?: number; }>; }; /** * A monthly USD spend cap for an environment or a specific problem. When the cap is reached, new runs against that scope are gated until the next billing window. */ export type CostLimitDto = { /** * Stable cost-limit identifier. */ id: string; /** * Environment this cost limit applies to. */ environmentId: string; /** * Problem this cost limit applies to. Null for environment-scope limits that cover all problems in the environment. */ problemId: string | null; /** * Whether this cap covers total environment spend or a single problem only. */ scope: 'environment' | 'problem'; /** * Monthly USD spend cap. Once exceeded, new runs against the affected scope are gated. */ limitUsd: number; /** * Timestamp when the cost limit was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the cost limit was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Array of cost limits configured for an environment. */ export type CostLimitListDto = Array<{ /** * Stable cost-limit identifier. */ id: string; /** * Environment this cost limit applies to. */ environmentId: string; /** * Problem this cost limit applies to. Null for environment-scope limits that cover all problems in the environment. */ problemId: string | null; /** * Whether this cap covers total environment spend or a single problem only. */ scope: 'environment' | 'problem'; /** * Monthly USD spend cap. Once exceeded, new runs against the affected scope are gated. */ limitUsd: number; /** * Timestamp when the cost limit was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the cost limit was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * Aggregated cost statistics powering the admin cost explorer. */ export type CostStatsDto = { /** * Headline key performance indicators for the cost explorer. */ kpis: { /** * Total cost in USD across all runs in the window. */ totalCost: number; /** * Average cost per run in USD. */ avgCostPerRun: number; /** * Total tokens consumed across all runs in the window. */ totalTokens: number; /** * Total number of runs included in the cost stats. */ totalRuns: number; /** * Portion of total cost spent on agent (LLM) inference in USD. */ agentCost: number; /** * Portion of total cost spent on compute (sandbox) execution in USD. */ computeCost: number; }; /** * Daily cost breakdown across the selected window. */ costOverTime: Array<{ /** * Calendar day for the bucketed cost (ISO-8601 date, UTC). */ date: string; /** * Total cost incurred on this day in USD. */ totalCostUsd: number; /** * Agent (LLM) inference cost on this day in USD. */ agentCostUsd: number; /** * Compute (sandbox) execution cost on this day in USD. */ computeCostUsd: number; /** * Number of runs that contributed to this day’s costs. */ runs: number; }>; /** * Cost broken down by run type, across every RunType value (solver, the grading variants, QA, and the non–problem-run surfaces: synthesizer, run-config probe, probe judge, grade extraction, transcript synthesis, title generation, transcript reformat). */ costByRunType: Array<{ /** * Run category. One of the RunType values — solver (the agent attempting the problem), the grading variants (agentic / rubric / programmatic / MCP-tool-call), qa, and the non–problem-run cost surfaces (synthesizer, run-config probe, probe judge, grade extraction, transcript synthesis, title generation, transcript reformat), plus the jobs-v2-rooted surfaces (rollout, check-fix cycle) and managed-agent turns. QA and the non–problem-run surfaces are attributed via their environment/problem rather than a problem run; managed-agent turns are attributed to their organization only. */ runType: 'solver' | 'agentic_grading' | 'rubric_grading' | 'programmatic_grading' | 'mcp_tool_call_grading' | 'qa' | 'synthesizer' | 'run_config_probe' | 'probe_judge' | 'grade_extraction' | 'transcript_synthesis' | 'title_generation' | 'transcript_reformat' | 'managed_agent_turn' | 'rollout' | 'check_fix_cycle' | 'run_config_run'; /** * Total cost incurred by this run type in USD. */ totalCost: number; /** * Number of runs of this type. */ runs: number; }>; /** * Cost broken down by LLM model with detailed token accounting. */ costByModel: Array<{ /** * LLM model identifier. */ model: string; /** * Total cost spent on this model in USD. */ totalCost: number; /** * Number of runs that used this model. */ runs: number; /** * Total input tokens sent to the model. */ inputTokens: number; /** * Total output tokens produced by the model. */ outputTokens: number; /** * Total tokens served from prompt cache. */ cacheReadTokens: number; /** * Total tokens written to prompt cache. */ cacheCreationTokens: number; }>; /** * Cost broken down by organization. */ costByOrganization: Array<{ /** * Stable identifier of the bucket: the organization UUID, or the platform sentinel for platform-wide spend not attributable to any organization (only present on unscoped responses). */ id: string; /** * Display name of the organization (or platform bucket). */ name: string; /** * Total cost attributed to the organization in USD. */ totalCost: number; /** * Number of cost records (billed rows) attributed to the organization. */ runs: number; }>; }; /** * Request body to create an org skill (or a platform skill when platform=true). */ export type CreateAgentSkillDto = { /** * URL-safe skill slug unique within the owning org (or among platform skills). Lowercase alphanumeric with hyphens. */ slug: string; /** * Human-readable skill name. */ name: string; /** * Short description for the harness skills index. */ description: string; /** * Previously uploaded SKILL.md bundle file id (via POST …/skills/upload or the signed-upload + finalize path). */ fileId: string; /** * When true, create a platform skill (organization_id NULL). Staff-admin only; ignored/rejected for non-admins. */ platform?: boolean; }; /** * Request body for creating a new form and attaching it to the target environment or problem. */ export type CreateAndAttachFormBodyDto = { /** * Optional human-readable title for the new bundle. Trimmed; an empty string is treated as no title. */ title?: string; /** * Optional initial schema for the new form; defaults to an empty schema when omitted. */ schema?: { /** * JSON Schema describing the form fields. */ data: { [key: string]: unknown; }; /** * UI schema controlling presentation of the form fields. */ ui: { [key: string]: unknown; }; }; }; /** * Create-request body for a check_fix_cycle: the problem under repair, the fork/commit target, the check run-config versions run each wave, the fix step, the submit run-config version, and the fix-attempt cap (organizationId is stamped from the route). */ export type CreateCheckFixCycleDto = { /** * The problem this fix cycle repairs. */ problemId: string; /** * The checkable artifact this cycle targets. git_fork is the only arm today. */ target: { /** * Discriminator for the git_fork target arm. */ kind: 'git_fork'; /** * Fork repository identifier the fix agent pushes to, e.g. "owner/repo". */ forkRepo: string; /** * Base commit SHA the fork PR is opened against, pinned for the whole cycle. */ baseSha: string; /** * Head commit SHA of the fork PR at cycle start. Advances only through check consensus, never a fix child's own claim. */ headSha: string; /** * The fork branch name whose current tip a branch-tip-mode check clones, and the same branch a fix child pushes fixes onto. */ headRef: string; /** * Git-repo-relative directory of the problem under repair, e.g. "problems/channel-diffuser-design". */ problemDir: string; }; /** * Locked, agent-harness run-config versions executed as check children every wave -- a fan-out ceiling of 16 parallel check containers per wave. */ checkRunConfigVersionIds: Array; /** * The fix step spawned on red. run_config is the only arm today. */ fixStep: { /** * Discriminator for the run_config fix-step arm. */ kind: 'run_config'; /** * Locked, agent-harness run-config version executed as the fix child. */ runConfigVersionId: string; }; /** * Locked, agent-harness run-config version executed as the submit child once a wave passes every check. */ submitRunConfigVersionId?: string; /** * Maximum number of fix children that may be spawned before the cycle terminates attempts_exhausted. N permits N fix children and N+1 check waves, each up to the check fan-out ceiling of check containers -- at the ceiling (N=50) that is 50 fix children + 51 x 16 = 866 containers authorized by a single request, each able to run to run_config_run's own 36-hour wall-clock cap. */ maxFixAttempts: number; /** * Opt-in early-abort for a cycle that stops making progress. Additive-optional and OFF by default: absent, the cycle always runs its full maxFixAttempts budget. When set, the cycle terminates stalled once this many consecutive decided red waves in a row report an identical outcome to the one before it -- i.e. the fixer made no measurable progress -- instead of burning the remaining fix-attempt budget on a cycle that has already shown it is not converging. Never triggers on a cycle's first red wave. */ earlyAbortAfterStallWaves?: number; }; /** * Request body for launching a new compute (container pod) inside an environment. */ export type CreateComputeRequestDto = { /** * Environment that owns the new compute. */ environmentId: string; /** * Human-readable compute name shown in the UI and logs. */ name: string; /** * Fully-qualified container image reference (registry/path:tag or digest) to launch. */ containerImage: string; /** * CPU request in milli-cores (e.g. 1000 = 1 vCPU). Falls back to the platform default when omitted. */ cpuMilli?: number; /** * Memory request in MiB. Falls back to the platform default when omitted. */ memoryMib?: number; /** * Maximum lifetime of the compute in seconds before it is forcefully terminated. */ timeoutSeconds?: number; /** * Seconds of inactivity before stopping the compute; maximum 30 days. */ idleStopAfterSeconds?: number; /** * Seconds stopped before deleting the compute and volume; maximum 30 days. */ stoppedDeleteAfterSeconds?: number; /** * Optional GPU accelerator to attach to the compute. */ accelerator?: { /** * Accelerator kind; only "gpu" is currently supported. */ type: 'gpu'; /** * GPU model identifier (e.g. "nvidia-l4", "nvidia-a100"). */ name: 'T4' | 'L4' | 'A10G' | 'A100' | 'H100'; }; /** * Whether the container runs in privileged mode. Requires elevated permissions. */ privileged?: boolean; /** * Whether to request KVM-backed nested virtualization. Requires privileged=true. */ nestedVirt?: boolean; /** * Size of the attached persistent volume claim in GiB. */ pvcSizeGi?: number; /** * TCP port the container exposes for HTTP access. Required to mint a redemption URL. */ httpPort?: number; /** * Environment variables injected into the container at launch. */ env?: { [key: string]: string; }; /** * Additional volume mounts (e.g. shared dataset volumes) to attach to the compute. */ mounts?: Array<{ /** * Platform file ID referencing an object already uploaded to GCS. */ source: string; /** * Absolute container path where the referenced file is mounted at compute creation time. Must be absolute and must not contain parent-directory segments. */ mountPath: string; }>; /** * Optional run-config version ID that produced this compute. Used to inherit secrets and config. */ runConfigVersionId?: string; }; /** * Request body for creating a new cost limit. Each scope, problem, and amount triple must be unique within the environment. */ export type CreateCostLimitDto = { /** * Whether this cap covers total environment spend or a single problem only. Must be the problem scope when a problem is referenced. */ scope: 'environment' | 'problem'; /** * Problem the cap applies to. Required for problem-scoped caps and omitted for environment-scoped caps. */ problemId?: string; /** * Monthly USD spend cap. Must be positive with at most 2 decimal places. */ limitUsd: number; }; /** * Request body for creating a customer secret. Carries the credential value and metadata; the value is stored securely and never returned again. */ export type CreateCustomerSecretDto = { /** * Scope at which the new secret will be visible. */ scope: { /** * System-wide secret available to every organization. */ level: 'system'; /** * Always null at system scope. */ id: null; } | { /** * Org-scoped secret available within one organization. */ level: 'org'; /** * Organization that owns the secret. */ id: string; } | { /** * Environment-scoped secret available within one environment. */ level: 'env'; /** * Environment that owns the secret. */ id: string; } | { /** * Problem-scoped secret available within one problem. */ level: 'problem'; /** * Problem that owns the secret. */ id: string; } | { /** * Problem-version-scoped secret pinned to one specific problem version. */ level: 'problem-version'; /** * Problem version that owns the secret. */ id: string; }; /** * Environment-variable name the runner will see when the secret is attached. */ name: string; /** * Injection mode of the new secret; its attachments always use the secret's mode. Defaults to 'proxy' when omitted. A 'proxy' secret requires upstreamHost and headerName; a 'direct' secret must omit both. */ injectionMode?: 'proxy' | 'direct'; /** * Upstream hostname the egress proxy will substitute the credential for. Required for proxy secrets; omit for direct-only secrets. */ upstreamHost?: string; /** * HTTP header the egress proxy will inject the credential into. Required for proxy secrets; omit for direct-only secrets. */ headerName?: string; /** * Full ready-to-send header value (for example, a complete bearer token); stored verbatim and substituted in by the egress proxy. */ value: string; }; /** * Request body for creating a new environment under an organization. */ export type CreateEnvironmentDto = { /** * Customer-provided external identifier used to address the env. Omit to create an environment without one (the env will only be reachable by its internal UUID and won't participate in upsert-by-externalId). */ externalId?: string; /** * Human-readable environment name shown in the UI. */ name: string; /** * Organization that will own the new environment. */ organizationId: string; }; /** * Request body for minting per-file signed upload URLs for environment files. */ export type CreateEnvironmentFileUploadUrlsRequestDto = { /** * Category the uploaded files will be classified under. */ type: 'instructions' | 'agent-input'; /** * Files for which signed upload URLs should be minted (at least one). */ files: Array<{ /** * Original file name the upload URL will be associated with. */ fileName: string; /** * Client-reported MIME type used only for the pre-upload policy check; re-verified server-side at finalize time. */ mimeType: string; /** * Client-reported byte size used only for the pre-upload policy check; re-verified server-side at finalize time. */ sizeBytes: number; }>; }; /** * Response containing signed upload URLs minted for environment files. */ export type CreateEnvironmentFileUploadUrlsResponseDto = { /** * Per-file signed upload URLs in the same order as the request. */ files: Array<{ /** * Signed URL the client must PUT the file bytes to. */ uploadUrl: string; /** * Server-issued object path identifying the uploaded blob in storage. */ objectPath: string; /** * Original file name the URL was minted for. */ fileName: string; }>; }; /** * Input for creating a multi-problem comparison evaluation across one or more solvers. */ export type CreateEvaluationBodyDto = { /** * Human-readable display name for the evaluation. */ name: string; /** * Free-form description of the evaluation. Omit to leave empty. */ description?: string; /** * Versioned orchestration metadata persisted on an evaluation. */ metadata: { /** * Version discriminant of the metadata shape. Always 1 today. */ schemaVersion: 1; /** * Number of attempts each solver makes against each problem (1-25). */ attemptsPerProblem: number; /** * Score at or above which an attempt counts as a pass in aggregated results. Omitted means the platform default (0.5) applies at read time. */ successThreshold?: number; /** * Infra-retry policy override applied to every problem run in this evaluation, taking precedence over the run-config-level override when both are set. Omit to use the run-config value (or the platform default if neither is set). */ retryPolicy?: { /** * Additional attempts allowed after a failure classified as infra (container eviction, image pull error, queue orphan) before the run terminates as failed. Omit to use the platform default (2). */ maxInfraRetries?: number; }; }; /** * Locked run-config version (kind "grader") to pin as the grader for every run in this evaluation. Omit to fall back to the problem-version / environment grader default. */ graderRunConfigVersionId?: string; /** * Free-form tags for list filtering. Omit to leave the evaluation untagged. */ tags?: Array; /** * Solvers to compare in the evaluation (1-20 entries). */ solvers: Array<{ /** * Human-readable label distinguishing this solver in evaluation results. */ displayName: string; /** * Locked run-config version (kind "solver") that governs this solver's invocation. */ runConfigVersionId: string; /** * Maximum solver runs this solver keeps alive on the agent service at once (1-2000). Omitted means the platform default applies. */ concurrency?: number; /** * Optional training-checkpoint context for this solver. When present, the solver container receives /input/checkpoint.json. A present checkpointContext with a null checkpointRef fails the evaluation fast, before any dispatch -- never silently runs the solver without its checkpoint. */ checkpointContext?: { /** * Opaque training-checkpoint reference the solver container should load. Never parsed by the platform. */ checkpointRef: string | null; /** * Training step the checkpoint was taken at. */ step: number; /** * Opaque, provider-owned payload relayed byte-identical from the source checkpoint announcement's own context -- never parsed by the platform. */ context?: { [key: string]: unknown; }; }; }>; /** * Problems to include in the evaluation (one or more). */ problems: Array<{ /** * Stable problem identifier (UUID). */ problemId: string; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Stable environment identifier (UUID). */ environmentId: string; }>; }; /** * Request body for creating an evaluation-results export. The evaluation id comes from the URL and the user from auth context. */ export type CreateEvaluationExportBodyDto = { /** * Output format for the export artifact. */ format: 'csv' | 'json' | 'harbor-basic'; /** * When true, include per-run cost columns in the output. */ includeCosts: boolean; /** * When true, include start/end timestamp columns in the output. */ includeTimestamps: boolean; /** * When true, include error-message columns for failed runs. */ includeErrors: boolean; /** * When true, include the grader rationale text alongside the score. */ includeGradingRationale: boolean; /** * When true, emit a tar.gz archive with the data file plus each available run transcript in the transcripts directory, named .txt and keyed by the full stable problem-run UUID. */ includeTranscripts: boolean; /** * Optional filter restricting the export to specific evaluation solvers. Omit to include all solvers. Empty arrays are rejected. */ solverIds?: Array; /** * Optional filter restricting the export to specific problem versions. Omit to include all problem versions. Empty arrays are rejected. */ problemVersionIds?: Array; }; /** * Request body for creating a problem-archive export. Selects problems by explicit ID list or by server-resolved filter; the two modes are mutually exclusive. */ export type CreateExportBodyDto = { /** * Caller is supplying an explicit list of problem IDs to export. */ mode: 'ids'; /** * Explicit list of problem IDs to include in the archive, capped at the worker hard problem limit. */ problemIds: Array; /** * Archive format for the export. Defaults to the standard layout when omitted. */ format?: 'default' | 'harbor-basic' | 'harbor-job'; } | { /** * Caller is supplying a problem-list filter; the server resolves matching problems at job-start. */ mode: 'filter'; /** * Filter describing which problems to include, resolved server-side at job-start. */ filter: { /** * Free-text search filter applied across problem title and external id. */ search?: string; /** * Comma-separated list of model identifiers; matches problems with at least one run on any listed model. */ models?: Array; /** * Which aggregate (avg, min, or max) the score bounds apply to. Defaults to the average. */ avgScoreMetric?: 'avg' | 'min' | 'max'; /** * Inclusive lower bound on the selected score metric, expressed as a 0–100 percentage. */ avgScoreMin?: number; /** * Inclusive upper bound on the selected score metric, expressed as a 0–100 percentage. */ avgScoreMax?: number; /** * Inclusive lower bound on problem creation date, in YYYY-MM-DD form (UTC calendar day). */ createdAtFrom?: string; /** * Inclusive upper bound on problem creation date, in YYYY-MM-DD form (UTC calendar day). */ createdAtTo?: string; /** * JSON-encoded enrichment-dimension filters applied uniformly across list items, stats, analytics, and exports. */ enrichmentFilters: { [key: string]: Array; }; }; /** * Archive format for the export. Defaults to the standard layout when omitted. */ format?: 'default' | 'harbor-basic' | 'harbor-job'; }; /** * Request body for creating a new draft version of an existing form. */ export type CreateFormVersionBodyDto = { /** * Optional initial schema for the new draft; defaults to a copy of the previous version when omitted. */ schema?: { /** * JSON Schema describing the form fields. */ data: { [key: string]: unknown; }; /** * UI schema controlling presentation of the form fields. */ ui: { [key: string]: unknown; }; }; }; /** * Request body for claiming a per-Aligner Forgejo repo for a coding task. The claiming Aligner is the authenticated caller — never a client-supplied identity — so one caller can never claim a repo under another Aligner’s identity. */ export type CreateGitRepoClaimDto = { /** * The problem this claim is for. */ problemId: string; }; /** * Input for running selected grader configurations over existing solver trajectories. */ export type CreateGradeOnlyEvaluationBodyDto = { /** * Human-readable display name for the evaluation. */ name: string; /** * Free-form description of the evaluation. Omit to leave empty. */ description?: string; /** * Optional orchestration metadata (success threshold, grader retry policy). Omit to accept platform defaults. */ metadata?: { /** * Version discriminant of the metadata shape. Always 1 today. */ schemaVersion: 1; /** * Score at or above which a grade counts as a pass in the comparison view. Omitted means the platform default (0.5) applies at read time. */ successThreshold?: number; /** * Infra-retry policy override applied to every grader container in this evaluation. Omit to use the grader run-config value (or the platform default if neither is set). */ retryPolicy?: { /** * Additional attempts allowed after a failure classified as infra (container eviction, image pull error, queue orphan) before the run terminates as failed. Omit to use the platform default (2). */ maxInfraRetries?: number; }; }; /** * Free-form tags for list filtering. Omit to leave the evaluation untagged. */ tags?: Array; /** * Grader configs to compare — the columns of the comparison matrix (1-20 entries). */ graders: Array<{ /** * Human-readable label distinguishing this grader column in the comparison matrix. */ displayName: string; /** * Locked run-config version (kind "grader") to run against every picked trajectory. */ runConfigVersionId: string; }>; /** * Existing trajectories (solver problem runs) to grade — the rows of the comparison matrix. Every id is individually authorized against the caller's scope; mixed-environment selections are rejected. */ sourceProblemRunIds: Array; }; /** * Request body for creating an issue on a problem. */ export type CreateIssueBodyDto = { /** * Markdown body of the new issue. */ description: string; /** * Optional child entity type to attach the issue to. Must be provided together with the entity identifier. */ entityType?: 'rubric'; /** * Identifier of the child entity to attach the issue to. Must be provided together with the entity type. */ entityId?: string; }; /** * Request body for creating an issue comment. */ export type CreateIssueCommentBodyDto = { /** * Comment body to post on the issue thread. */ content: string; }; /** * Request body for creating a new organization tenant on the platform. */ export type CreateOrganizationDto = { /** * External tenant identifier (typically the customer-system org ID) used to look up the organization. */ externalId: string; /** * Human-readable organization name shown in the UI. */ name: string; }; /** * Request body for creating a new secret binding. */ export type CreateOrganizationSecretDto = { /** * Environment-variable name the secret will be exposed under. */ name: string; /** * Upstream host the credential is allowed to be sent to. */ upstreamHost: string; /** * HTTP header the secret value is written into. */ headerName: string; /** * Ready-to-send header value, including any auth scheme prefix. Leading and trailing whitespace is trimmed; the result is written verbatim into the outbound request header. */ value: string; }; /** * Request body for creating a new secret binding. */ export type CreateProblemSecretDto = { /** * Environment-variable name the secret will be exposed under. */ name: string; /** * Upstream host the credential is allowed to be sent to. */ upstreamHost: string; /** * HTTP header the secret value is written into. */ headerName: string; /** * Ready-to-send header value, including any auth scheme prefix. Leading and trailing whitespace is trimmed; the result is written verbatim into the outbound request header. */ value: string; }; /** * Request body for creating a new draft problem version, optionally seeded from an existing version. */ export type CreateProblemVersionDto = { /** * Source version to seed the new version from (scalars, rubrics, file attachments). Must belong to the same problem. When omitted, the server copies from the most recent locked version, or starts blank if none exists. */ copyFromVersionId?: string; }; /** * Request body for creating a new secret binding. */ export type CreateProblemVersionSecretDto = { /** * Environment-variable name the secret will be exposed under. */ name: string; /** * Upstream host the credential is allowed to be sent to. */ upstreamHost: string; /** * HTTP header the secret value is written into. */ headerName: string; /** * Ready-to-send header value, including any auth scheme prefix. Leading and trailing whitespace is trimmed; the result is written verbatim into the outbound request header. */ value: string; }; /** * Request body for creating a problem together with its initial version in a single call, keyed by external ID. */ export type CreateProblemWithVersionDto = { /** * Caller-supplied external identifier for the new problem; the operation is idempotent on this value. */ externalId: string; }; /** * Response bundling a problem and its initial version, with a created flag distinguishing fresh from idempotent results. */ export type CreateProblemWithVersionResponseDto = { /** * The created or existing problem. */ problem: { /** * Stable problem identifier (UUID). */ id: string; /** * Environment this problem belongs to. */ environmentId: string; /** * Caller-provided external identifier for this problem. Null when no external system tracks it. */ externalId: string | null; /** * Human-readable problem title shown in lists and detail views. */ title?: string | null; /** * Free-text description of the problem. Null when unset. */ description?: string | null; /** * Problem domain (e.g. the subject area the task belongs to). Null when unset. */ domain?: string | null; /** * True for environment-scoped seed problems used as templates; false for regular problems. Templates are hidden from public lists and rejected by mutation routes. */ isTemplate: boolean; /** * Timestamp when the problem was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the problem was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * The initial version associated with the problem. */ version: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ id: string; /** * Problem this version belongs to. */ problemId: string; /** * Environment the parent problem belongs to. Denormalized for scope checks. */ environmentId: string; /** * Sequential version label assigned at creation (e.g. "v1", "v2"). */ version: string; /** * Task prompt shown to the agent at run start. */ prompt: string; /** * Container image reference for the agent runtime (e.g. "python:3.12"). Null falls back to the platform default. */ containerImage: string | null; /** * CPU/memory tier for the run container. Null falls back to the platform default. */ containerSize: 'small' | 'medium' | 'large' | 'xlarge' | 'xlarge-highmem' | 'xxlarge' | null; /** * Optional GPU type attached to the run. Null means no GPU is attached. */ gpuType: 'T4' | 'L4' | 'A10G' | 'A100' | 'H100' | null; /** * Wall-clock timeout for the agent run, in seconds. Null falls back to the platform default. */ timeoutSeconds: number | null; /** * Sparse map of tool name to seconds. Only tools with explicit overrides are present. Null means all defaults apply. */ toolTimeouts: { [key: string]: number; } | null; /** * Maximum agent turns allowed for the run. Null means unlimited, subject to the wall-clock timeout. */ maxTurns: number | null; /** * Grading strategy and grader-specific configuration applied to runs of this problem version. */ gradingConfig: GradingConfig; /** * When true, a single agentic judge scores all rubric criteria together. When false, each criterion is judged independently. */ singleAgentRubric: boolean; /** * Run the container privileged (root on the host node). Only takes effect on the GKE launcher; requires unrestricted outbound networking because privileged containers bypass egress enforcement. */ privileged: boolean; /** * Markdown template that overrides the environment-wide global-issue template for issues filed against this version. Null inherits the environment template. */ issueTemplate: string | null; /** * Locked run-config version bound for solver invocations on this problem version. Null falls back to the environment-level binding. */ solverRunConfigVersionId: string | null; /** * Locked run-config version bound for grader invocations on this problem version. Null falls back to the environment-level binding. */ graderRunConfigVersionId: string | null; /** * Locked run-config version bound for QA invocations on this problem version. Null falls back to the environment-level binding. */ qaRunConfigVersionId: string | null; /** * Locked run-config version bound for synthesizer invocations on this problem version. Null falls back to the environment-level binding. */ synthesizerRunConfigVersionId: string | null; /** * Raw worldsim authoring payload persisted at lock. Each run materializes the per-version solver run config from it; also used for export/import and re-authoring. Null when the version has no worldsim config. */ worldsimConfig: { /** * ISO-8601 simulated wall-clock time for the run (WORLDSIM_SIMULATED_TIME). Null uses real time. */ simulatedTime: string | null; /** * Selected MCP service keys. Unless inheritSolverMcpTools is true, their tools form the mcp-tools.yaml allowlist, and an empty selection allows no tools. */ mcpServers: Array; /** * When true, each run keeps the resolved solver's own MCP tool allowlist (the tools file its WORLDSIM_MCP_TOOLS_FILE names, set on the run config or baked into the runner image, or every tool when it has none) and mcpServers is ignored. */ inheritSolverMcpTools?: boolean; /** * Ordered list of startup MCP tool calls, as an opaque JSON string (a StartupCall[]). Duplicate tools are allowed (e.g. create five users). The calls run through the run's MCP tool allowlist, so unless inheritSolverMcpTools is true each call's tool must come from a server in mcpServers. */ worldEffects: string; /** * Runtime environment type (mcp or computer). Maps to CUA_ENVIRONMENT_TYPE. */ envType?: 'mcp' | 'computer'; /** * Computer-use desktop flavor (chrome or full_desktop). Only meaningful when envType is "computer". Maps to CUA_DESKTOP_TYPE. */ desktopType?: 'chrome' | 'full_desktop'; /** * Whether the run may call the API. Maps to CUA_API_ALLOWED. */ apiAllowed?: boolean; /** * Whether the run may use the browser API. Maps to CUA_ALLOW_BROWSER_API. */ allowBrowserApi?: boolean; /** * Free-text system instructions for the Worldsim harness in MCP or Computer environments. Maps to CUA_SYSTEM_INSTRUCTIONS. Supersedes cuaSystemInstructions. */ systemInstructions?: string; /** * Deprecated: use systemInstructions. Retained for locked-version compatibility. Maps to CUA_SYSTEM_INSTRUCTIONS. * * @deprecated */ cuaSystemInstructions?: string; } | null; /** * Timestamp when this version was locked and made immutable (ISO-8601, UTC). Null while the version is still a draft. */ lockedAt: string | null; /** * Timestamp when the problem version was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the problem version was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Tool allowlist for the agent. Omitted means all known tools are allowed; an empty list means no tools are allowed. */ tools?: Array<'Bash' | 'Read' | 'Write' | 'Edit' | 'Glob' | 'Grep' | 'NotebookEdit' | 'WebFetch' | 'WebSearch' | 'TodoWrite' | 'Task' | 'TaskOutput' | 'TaskStop' | 'EnterPlanMode' | 'ExitPlanMode' | 'AskUserQuestion' | 'Skill' | 'ToolSearch'>; /** * Outbound network allowlist. Omitted uses the platform default, the unrestricted sentinel allows everything, and a non-empty list restricts access to those domains. */ allowedDomains?: [ '*' ] | Array; /** * Package managers pre-installed in the container. An empty list means none are provisioned. */ installedPackageManagers: Array<'pip' | 'uv' | 'npm' | 'cargo' | 'apt'>; }; /** * True when a new problem was created (201); false when an existing one was returned (200). */ created: boolean; }; /** * Request body for bulk-creating problems in an environment by external ID. */ export type CreateProblemsDto = { /** * Caller-supplied external identifiers for the problems to create. */ externalIds: Array; }; /** * Response payload returned by the bulk problem-creation endpoint. */ export type CreateProblemsResponseDto = { /** * Number of problems created in this bulk request. */ created: number; /** * Problems created by this request, in creation order. */ problems: Array<{ /** * Stable problem identifier (UUID). */ id: string; /** * Environment this problem belongs to. */ environmentId: string; /** * Caller-provided external identifier for this problem. Null when no external system tracks it. */ externalId: string | null; /** * Human-readable problem title shown in lists and detail views. */ title?: string | null; /** * Free-text description of the problem. Null when unset. */ description?: string | null; /** * Problem domain (e.g. the subject area the task belongs to). Null when unset. */ domain?: string | null; /** * True for environment-scoped seed problems used as templates; false for regular problems. Templates are hidden from public lists and rejected by mutation routes. */ isTemplate: boolean; /** * Timestamp when the problem was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the problem was last updated (ISO-8601, UTC). */ updatedAt: string; }>; }; /** * Payload for creating a new QA config inside an environment. */ export type CreateQaConfigBodyDto = { /** * Display name of the QA config; unique within the environment. */ name: string; /** * Optional free-form description of what this QA config evaluates. */ description?: string; /** * CPU allocation for the QA container in milli-CPUs. */ cpuMilli?: number; /** * Memory allocation for the QA container in MiB. */ memoryMib?: number; /** * Hard timeout for the QA job in seconds. */ timeoutSeconds?: number; /** * Optional accelerator configuration to attach to the QA container. */ accelerator?: { /** * Hardware accelerator family: graphics processor or tensor processor. */ type: 'gpu' | 'tpu'; /** * Accelerator model name as recognized by the launcher. */ name: string; /** * Number of accelerators to attach to the job container; defaults to 1 when unset. */ count?: number; } | null; /** * Environment variables (name to value) injected into the QA container. */ envVars?: { [key: string]: string; }; /** * Command-line arguments passed to the QA container entrypoint. */ args?: Array; /** * Free-form parameters serialized to a parameters JSON file mounted into the container. */ parameters?: { [key: string]: unknown; }; /** * Optional launcher backend override; defaults to the environment-level setting when unset. */ launcherType?: 'modal' | 'cloud_batch' | 'gke'; /** * Maximum number of automatic retries on failure. Applies to single-container QA kinds (standard, grading-oracle, metrics-validator), where a failed or unusable attempt is re-dispatched until the budget is spent. Ignored by the composite kinds (gtGradingOracle, standard-composite), which always run a single attempt. */ maxRetries?: number; /** * Reference to a built-in QA template; when set, the QA config inherits that template behavior. */ builtInKey?: string; /** * Locked run-config-version bound to this QA config. When set, the QA submit path resolves the container image, environment variables, and arguments from this version instead of the legacy image fields on the row. */ runConfigVersionId?: string; }; /** * Request body for creating a QA gate that blocks a workflow stage until QA passes. */ export type CreateQaGateBodyDto = { /** * Stable QA-config identifier (UUID). */ qaConfigId: string; /** * Workflow stage this gate will block until QA passes. */ blockedStage?: 'locking' | 'running' | 'submitting'; /** * Minimum normalized QA score in [0, 1] required for the gate to pass. At least one of minimum score or accepted grades must be provided. */ minScore?: number; /** * Set of categorical QA grades that satisfy the gate. At least one of minimum score or accepted grades must be provided. */ acceptedGrades?: Array; }; /** * Request body for creating a QA trigger that fires a QA job when a platform event occurs. */ export type CreateQaTriggerBodyDto = { /** * Stable QA-config identifier (UUID). */ qaConfigId: string; /** * Platform event that fires this trigger. */ event: 'solver_completed' | 'problem_locked'; }; /** * Create-request body for a rollout_batch: dataset (M items) x agents (N specs). organizationId is stamped from the route. */ export type CreateRolloutBatchDto = { /** * Human-readable name for the batch. */ runName: string; /** * The dataset (M items) to run every agent against. */ dataset: { /** * Dataset items embedded directly in the payload. */ kind: 'inline'; /** * Materialized dataset items (M). Also the required shape of a fileRef dataset file: a JSON array of item records. */ items: Array<{ [key: string]: unknown; }>; } | { /** * Dataset items sourced from an uploaded file. */ kind: 'fileRef'; /** * Uploaded file whose content is a JSON array of item records. */ fileId: string; }; /** * Agent specs under test (N). Every item × every agent is run. */ agents: Array<{ /** * Materialize an ephemeral locked run-config version. */ kind: 'inline'; /** * Name for the ephemeral run-config identity. */ name: string; /** * Run-config payload shared by agent-harness and snapshot types. Container, invocation, and limit primitives the platform passes through verbatim without inspecting the harness shape. */ config: { /** * Fully qualified container image URL for the harness. Omit to inherit the platform default. */ harnessImageUrl?: string; /** * Fully qualified grader image URL paired with this harness. When set, new programmatic and mcp_tool_call grading configs pre-fill their grader image from it (the solver's companion grader image). Omit to use the platform default grader image. */ graderImageUrl?: string; /** * Container resource preset (CPU + memory). Omit to inherit the platform default. */ containerSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'xlarge-highmem' | 'xxlarge'; /** * GPU type attached to the container. Omit to run without GPU acceleration. */ gpuType?: 'T4' | 'L4' | 'A10G' | 'A100' | 'H100'; /** * When true, the container runs with elevated privileges. Required by harnesses that need Docker-in-Docker or raw block-device access. */ privileged?: boolean; /** * When true, requests KVM-backed nested virtualization. Requires privileged=true and a GKE launcher. */ nestedVirt?: boolean; /** * Explicit GKE node machine type (e.g. "e2-standard-16"), overriding the platform default. Not validated against a fixed set here — an invalid value is rejected by agent-service/GKE at submission. Takes priority over the machine type implied by nestedVirt when both are set. */ machineType?: string; /** * HTTP port the container exposes (snapshot/compute-only). Ignored by job submission and absent from the effective invocation. */ port?: number; /** * Package managers preinstalled in the harness image, used to drive setup snippets in the editor. */ installedPackageManagers?: Array<'pip' | 'uv' | 'npm' | 'cargo' | 'apt'>; /** * Extra CLI arguments appended to the harness command. Tokenized by whitespace split at submission time; quoted strings are not supported. */ args?: string; /** * Env vars injected into the container. Null values permitted for backward compatibility; the editor strips them on save. */ envVars?: { [key: string]: string | null; }; /** * External file mounts referencing previously uploaded objects. Valid only on snapshot-type configs; agent-harness configs attach files via the run_config_files join table instead and the server rejects this field on save. */ mounts?: Array<{ /** * Platform file ID referencing an object already uploaded to GCS. */ source: string; /** * Absolute container path where the referenced file is mounted at compute creation time. Must be absolute and must not contain parent-directory segments. */ mountPath: string; }>; /** * Env-var names this config expects the runner to inject. Resolved against the version's attached customer secrets at submit time. */ customerSecrets?: Array<{ /** * Env-var name (uppercase + digits + underscore, leading letter) the harness expects to receive at runtime; resolved against attached customer secrets at job-submit time. */ envVarName: string; }>; /** * Egress allowlist for the container. An empty list denies general outbound traffic; hosts independently authorized by attached proxy credentials remain reachable. Any list containing the exact '*' entry permits everything, and a nonempty list without '*' restricts general egress to those domains. Null explicitly selects no run-config egress policy and overrides an inherited problem-version allowlist; omission defers to the consuming context. */ allowedDomains?: Array | null; /** * Wall-clock timeout for the harness invocation (seconds). */ timeoutSeconds?: number; /** * MCP tools the harness exposes, as returned by the MCP service list_tools(). Metadata only — persisted for future grader-UI use and not consumed at submit time. */ mcpTools?: Array<{ /** * Tool name as exposed by the MCP service. The newer catalogue format encodes the service as a dotted prefix (e.g. "gitea.create_user"); use mcpToolServiceKey to extract it. */ name: string; /** * Human-readable description of what the tool does. */ description: string; /** * MCP service the tool belongs to. Omitted when encoded as the name prefix. */ service?: string; /** * Grouping category for the tool in UIs. */ category?: string; /** * Display ordering hint within a category. */ sortOrder?: number; /** * Whether the tool only reads state (no side effects). Omitted when unknown. */ readOnly?: boolean; /** * Tool invocation timeout in seconds. */ timeout?: number; /** * Tool input JSON Schema, stored as an opaque JSON string (see comment). */ inputSchema: string | { [key: string]: unknown; }; /** * Optional human-friendly label for the service (MCP wire key _service_label). */ serviceLabel?: string; }>; /** * The WORLDSIM_BAKE_REF the mcpTools catalogue was discovered against. Server-owned: set during MCP tool discovery. On other writes a client-supplied value is ignored, and the stored tag is carried forward while mcpTools is unchanged (a changed WORLDSIM_BAKE_REF keeps it, so worldsim validation detects the mismatch) and cleared when mcpTools changes. Used when submitting problem versions to reject an MCP allowlist that would be materialized from a catalogue stale relative to the dispatch-time parent bake. */ mcpToolsBakeRef?: string; /** * Seeded-entity overrides for the worldsim MCP functional tool checks, as an opaque JSON-object string with the runner's snake_case keys (e.g. {"erpnext_company":"Northline","keycloak_realm":"northline"}). Emitted as the probe_context block of the mounted mcp-tools.yaml when a run forks the worldsim solver child from this config. Ignored when the problem version inherits the solver's MCP tools: the runner then reads the probe_context block of the file this config names in WORLDSIM_MCP_TOOLS_FILE. Only read by runs that set WORLDSIM_RUN_MCP_TOOL_CHECKS=true. */ mcpToolsProbeContext?: string; /** * Declared execution environment for a snapshot run config's persistent compute (container ref, shared/grade dirs, and image-supplied solver verbs). Omit to inherit the platform defaults. */ computeEnv?: { /** * Child-container name the platform runs the solver/grade verbs in (via docker exec). Omit to inherit the platform default. */ containerRef?: string; /** * Directory bind-mounted from the pod into the container where grade mounts land and are read. Omit to inherit the platform default. */ sharedMountDir?: string; /** * Directory a compute_exec grade writes $GRADE_OUTPUT into (on a path the exec side both writes and reads). Omit to inherit the platform default. */ gradeOutputDir?: string; /** * Image-supplied solver-lifecycle verb scripts. Omit to use the platform default verbs. */ runVerbs?: { /** * Optional child-container readiness probe; prints a verdict token before launch. */ readiness?: string; /** * Terminate any in-flight agent and clear prior-run state (idempotent). */ reset: string; /** * Launch the agent on $PROMPT, detached; the platform polls status afterward. */ submit: string; /** * Print exactly one ComputeRunPhase token to stdout. */ status: string; /** * Print the successful run result to stdout (read on completed). */ result: string; /** * Print failure diagnostics to stdout (read on failed). */ error: string; }; }; /** * Infra-retry policy override for runs launched from this run-config. Omit to use the platform default; an eval-level override (EvaluationMetadataSchema.retryPolicy) takes precedence over this when both are set. */ retryPolicy?: { /** * Additional attempts allowed after a failure classified as infra (container eviction, image pull error, queue orphan) before the run terminates as failed. Omit to use the platform default (2). */ maxInfraRetries?: number; }; }; /** * Per-agent container timeout override. Omit to use the batch-level timeoutSeconds, then the run-config version default. */ timeoutSeconds?: number; /** * Existing customer secrets to attach to this agent's ephemeral run-config version at dispatch time, referenced by id — no secret value is ever accepted here. Resolved by the run_config_run leaf at submit time via the same mechanism a versionRef agent already gets automatically. */ customerSecrets?: Array<{ /** * Existing customer secret (already created via POST /customer-secrets) to attach to this agent's ephemeral version. */ customerSecretId: string; /** * Injection mode for this attachment. Must match the secret: 'proxy' if it has an upstream host and header, else 'direct'. Omit to use the secret's mode. */ injectionMode?: 'proxy' | 'direct'; }>; } | { /** * Reuse an existing locked run-config version as-is. */ kind: 'versionRef'; /** * Existing locked, agent-harness type run-config version to reuse as-is. */ runConfigVersionId: string; }>; /** * Batch-level container timeout override, applied to every child unless overridden per-agent (inline agents only). */ timeoutSeconds?: number; /** * Maximum rollouts this batch keeps alive on the agent service at once (1-75). Omitted means the platform default applies. */ concurrency?: number; }; /** * Input for creating a new run-config identity (and its v1 draft) at a chosen scope. */ export type CreateRunConfigDto = { /** * Scope this new run-config identity lives at. Determines which environments / problems can see and bind it. */ scope: { /** * Discriminator: scope is platform-wide. */ level: 'system'; /** * Always null for system scope (no owning resource). */ id: null; } | { /** * Discriminator: scope is an organization. */ level: 'org'; /** * Organization that owns this scope. */ id: string; } | { /** * Discriminator: scope is an environment. */ level: 'env'; /** * Environment that owns this scope. */ id: string; } | { /** * Discriminator: scope is a problem. */ level: 'problem'; /** * Problem that owns this scope. */ id: string; }; /** * Identity-level type. When forking from a parent, must match the parent run-config's type — cross-type forking is rejected. */ type: 'agent-harness' | 'snapshot'; /** * Human-readable display name. */ name: string; /** * Free-form description. Send null or omit to leave empty. */ description?: string | null; /** * Optional initial payload for the v1 draft. When omitted, v1 is created with an empty config; supply a parent run-config version id to seed from another version instead. */ config?: { /** * Fully qualified container image URL for the harness. Omit to inherit the platform default. */ harnessImageUrl?: string; /** * Fully qualified grader image URL paired with this harness. When set, new programmatic and mcp_tool_call grading configs pre-fill their grader image from it (the solver's companion grader image). Omit to use the platform default grader image. */ graderImageUrl?: string; /** * Container resource preset (CPU + memory). Omit to inherit the platform default. */ containerSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'xlarge-highmem' | 'xxlarge'; /** * GPU type attached to the container. Omit to run without GPU acceleration. */ gpuType?: 'T4' | 'L4' | 'A10G' | 'A100' | 'H100'; /** * When true, the container runs with elevated privileges. Required by harnesses that need Docker-in-Docker or raw block-device access. */ privileged?: boolean; /** * When true, requests KVM-backed nested virtualization. Requires privileged=true and a GKE launcher. */ nestedVirt?: boolean; /** * Explicit GKE node machine type (e.g. "e2-standard-16"), overriding the platform default. Not validated against a fixed set here — an invalid value is rejected by agent-service/GKE at submission. Takes priority over the machine type implied by nestedVirt when both are set. */ machineType?: string; /** * HTTP port the container exposes (snapshot/compute-only). Ignored by job submission and absent from the effective invocation. */ port?: number; /** * Package managers preinstalled in the harness image, used to drive setup snippets in the editor. */ installedPackageManagers?: Array<'pip' | 'uv' | 'npm' | 'cargo' | 'apt'>; /** * Extra CLI arguments appended to the harness command. Tokenized by whitespace split at submission time; quoted strings are not supported. */ args?: string; /** * Env vars injected into the container. Null values permitted for backward compatibility; the editor strips them on save. */ envVars?: { [key: string]: string | null; }; /** * External file mounts referencing previously uploaded objects. Valid only on snapshot-type configs; agent-harness configs attach files via the run_config_files join table instead and the server rejects this field on save. */ mounts?: Array<{ /** * Platform file ID referencing an object already uploaded to GCS. */ source: string; /** * Absolute container path where the referenced file is mounted at compute creation time. Must be absolute and must not contain parent-directory segments. */ mountPath: string; }>; /** * Env-var names this config expects the runner to inject. Resolved against the version's attached customer secrets at submit time. */ customerSecrets?: Array<{ /** * Env-var name (uppercase + digits + underscore, leading letter) the harness expects to receive at runtime; resolved against attached customer secrets at job-submit time. */ envVarName: string; }>; /** * Egress allowlist for the container. An empty list denies general outbound traffic; hosts independently authorized by attached proxy credentials remain reachable. Any list containing the exact '*' entry permits everything, and a nonempty list without '*' restricts general egress to those domains. Null explicitly selects no run-config egress policy and overrides an inherited problem-version allowlist; omission defers to the consuming context. */ allowedDomains?: Array | null; /** * Wall-clock timeout for the harness invocation (seconds). */ timeoutSeconds?: number; /** * MCP tools the harness exposes, as returned by the MCP service list_tools(). Metadata only — persisted for future grader-UI use and not consumed at submit time. */ mcpTools?: Array<{ /** * Tool name as exposed by the MCP service. The newer catalogue format encodes the service as a dotted prefix (e.g. "gitea.create_user"); use mcpToolServiceKey to extract it. */ name: string; /** * Human-readable description of what the tool does. */ description: string; /** * MCP service the tool belongs to. Omitted when encoded as the name prefix. */ service?: string; /** * Grouping category for the tool in UIs. */ category?: string; /** * Display ordering hint within a category. */ sortOrder?: number; /** * Whether the tool only reads state (no side effects). Omitted when unknown. */ readOnly?: boolean; /** * Tool invocation timeout in seconds. */ timeout?: number; /** * Tool input JSON Schema, stored as an opaque JSON string (see comment). */ inputSchema: string | { [key: string]: unknown; }; /** * Optional human-friendly label for the service (MCP wire key _service_label). */ serviceLabel?: string; }>; /** * The WORLDSIM_BAKE_REF the mcpTools catalogue was discovered against. Server-owned: set during MCP tool discovery. On other writes a client-supplied value is ignored, and the stored tag is carried forward while mcpTools is unchanged (a changed WORLDSIM_BAKE_REF keeps it, so worldsim validation detects the mismatch) and cleared when mcpTools changes. Used when submitting problem versions to reject an MCP allowlist that would be materialized from a catalogue stale relative to the dispatch-time parent bake. */ mcpToolsBakeRef?: string; /** * Seeded-entity overrides for the worldsim MCP functional tool checks, as an opaque JSON-object string with the runner's snake_case keys (e.g. {"erpnext_company":"Northline","keycloak_realm":"northline"}). Emitted as the probe_context block of the mounted mcp-tools.yaml when a run forks the worldsim solver child from this config. Ignored when the problem version inherits the solver's MCP tools: the runner then reads the probe_context block of the file this config names in WORLDSIM_MCP_TOOLS_FILE. Only read by runs that set WORLDSIM_RUN_MCP_TOOL_CHECKS=true. */ mcpToolsProbeContext?: string; /** * Declared execution environment for a snapshot run config's persistent compute (container ref, shared/grade dirs, and image-supplied solver verbs). Omit to inherit the platform defaults. */ computeEnv?: { /** * Child-container name the platform runs the solver/grade verbs in (via docker exec). Omit to inherit the platform default. */ containerRef?: string; /** * Directory bind-mounted from the pod into the container where grade mounts land and are read. Omit to inherit the platform default. */ sharedMountDir?: string; /** * Directory a compute_exec grade writes $GRADE_OUTPUT into (on a path the exec side both writes and reads). Omit to inherit the platform default. */ gradeOutputDir?: string; /** * Image-supplied solver-lifecycle verb scripts. Omit to use the platform default verbs. */ runVerbs?: { /** * Optional child-container readiness probe; prints a verdict token before launch. */ readiness?: string; /** * Terminate any in-flight agent and clear prior-run state (idempotent). */ reset: string; /** * Launch the agent on $PROMPT, detached; the platform polls status afterward. */ submit: string; /** * Print exactly one ComputeRunPhase token to stdout. */ status: string; /** * Print the successful run result to stdout (read on completed). */ result: string; /** * Print failure diagnostics to stdout (read on failed). */ error: string; }; }; /** * Infra-retry policy override for runs launched from this run-config. Omit to use the platform default; an eval-level override (EvaluationMetadataSchema.retryPolicy) takes precedence over this when both are set. */ retryPolicy?: { /** * Additional attempts allowed after a failure classified as infra (container eviction, image pull error, queue orphan) before the run terminates as failed. Omit to use the platform default (2). */ maxInfraRetries?: number; }; }; /** * Source version to seed v1 from (config, probe, attachments). For agent-harness configs the parent must be locked; snapshot configs also accept drafts. */ parentRunConfigVersionId?: string; /** * Free-form tags for list filtering. Omit to leave the run config untagged. */ tags?: Array; }; /** * Response returned after creating a run config together with its initial draft version. */ export type CreateRunConfigResponseDto = { /** * The newly-created run config. */ runConfig: { /** * Stable run-config identifier (UUID). Versioned reusable solver / grader / QA / synthesizer config. */ id: string; /** * Scope at which this run config lives. Determines which environments / problems can see and bind it. */ scope: { /** * Discriminator: scope is platform-wide. */ level: 'system'; /** * Always null for system scope (no owning resource). */ id: null; } | { /** * Discriminator: scope is an organization. */ level: 'org'; /** * Organization that owns this scope. */ id: string; } | { /** * Discriminator: scope is an environment. */ level: 'env'; /** * Environment that owns this scope. */ id: string; } | { /** * Discriminator: scope is a problem. */ level: 'problem'; /** * Problem that owns this scope. */ id: string; }; /** * Identity-level discriminator. Selects payload schema, submit pipeline, and editor form for every version. */ type: 'agent-harness' | 'snapshot'; /** * Human-readable display name shown in pickers and the catalog. */ name: string; /** * Free-form description of what this run config is for. Null when not provided. */ description: string | null; /** * Locked version pinned as the role-agnostic default at this scope. Resolved after explicit problem-version / environment bindings miss, walking problem → env → org → system. Null when no default is set. */ defaultRunConfigVersionId?: string | null; /** * Free-form tags for list filtering, matched with OR (any-of) semantics by tag-filtered list endpoints. Empty when the run config is untagged. */ tags: Array; /** * User who created this run config. */ createdByUserId: string; /** * User who last updated this run config. Null when never updated since creation. */ updatedByUserId: string | null; /** * Timestamp when the run config was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the run config was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Identifier of the draft version created alongside the run config. */ initialVersionId: string; }; /** * Public input for starting a generic run-config execution. */ export type CreateRunConfigRunDto = { /** * Locked, agent-harness type run-config version to execute. Re-resolved at submit time. */ runConfigVersionId: string; /** * Human-readable run name (platform-input run_name). */ runName: string; /** * Opaque trainer config blob — never inspected by the platform (B7). */ config: { [key: string]: unknown; }; /** * Wall-clock container timeout override. Omit to use the run-config version's own timeoutSeconds. */ timeoutSeconds?: number; /** * Additional platform-owned top-level fields a composing parent (e.g. tuning_run) merges into the platform-input envelope alongside run_name/config. Opaque passthrough — this generic leaf never interprets the keys (a tuning parent supplies task_ref/dataset_ref/reward_ref here); it only relays them into the envelope, keeping the leaf domain-agnostic (B7). */ platformInputRefs?: { [key: string]: string; }; /** * Optional second opaque JSON document, delivered only as a file mount inside the container workspace — never via the platform-input environment variable. Size-unbounded. Opaque passthrough like config: the platform never reads inside it. Requires a wrapper-run image to be read at all. */ platformAuxInput?: { [key: string]: unknown; }; /** * Composing-parent-supplied OS environment variables merged into the child container's real process environment. Applied before the run-config version's customer-secret-derived variables and before the platform-input environment variable, so this field can override neither. */ env?: { [key: string]: string; }; /** * How handleTerminal classifies this run's terminal state. 'training' (default when omitted, matches this job type's original behavior): completed requires an ingested or output.json training-contract terminal document within the grace window — agent-service status alone is not sufficient. 'generic': completed is derived directly from the agent-service run status once terminal, with no training-contract document required — for containers (e.g. a bare coding agent) that never emit training-contract telemetry. Omitting the field is equivalent to 'training', preserving every historical row's behavior exactly. */ completionMode?: 'training' | 'generic'; }; /** * Input for creating a new draft version under an existing run-config identity. */ export type CreateRunConfigVersionDto = { /** * Optional initial config for the new draft. When omitted, the draft is seeded from the parent version when provided, otherwise starts empty. */ config?: { /** * Fully qualified container image URL for the harness. Omit to inherit the platform default. */ harnessImageUrl?: string; /** * Fully qualified grader image URL paired with this harness. When set, new programmatic and mcp_tool_call grading configs pre-fill their grader image from it (the solver's companion grader image). Omit to use the platform default grader image. */ graderImageUrl?: string; /** * Container resource preset (CPU + memory). Omit to inherit the platform default. */ containerSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'xlarge-highmem' | 'xxlarge'; /** * GPU type attached to the container. Omit to run without GPU acceleration. */ gpuType?: 'T4' | 'L4' | 'A10G' | 'A100' | 'H100'; /** * When true, the container runs with elevated privileges. Required by harnesses that need Docker-in-Docker or raw block-device access. */ privileged?: boolean; /** * When true, requests KVM-backed nested virtualization. Requires privileged=true and a GKE launcher. */ nestedVirt?: boolean; /** * Explicit GKE node machine type (e.g. "e2-standard-16"), overriding the platform default. Not validated against a fixed set here — an invalid value is rejected by agent-service/GKE at submission. Takes priority over the machine type implied by nestedVirt when both are set. */ machineType?: string; /** * HTTP port the container exposes (snapshot/compute-only). Ignored by job submission and absent from the effective invocation. */ port?: number; /** * Package managers preinstalled in the harness image, used to drive setup snippets in the editor. */ installedPackageManagers?: Array<'pip' | 'uv' | 'npm' | 'cargo' | 'apt'>; /** * Extra CLI arguments appended to the harness command. Tokenized by whitespace split at submission time; quoted strings are not supported. */ args?: string; /** * Env vars injected into the container. Null values permitted for backward compatibility; the editor strips them on save. */ envVars?: { [key: string]: string | null; }; /** * External file mounts referencing previously uploaded objects. Valid only on snapshot-type configs; agent-harness configs attach files via the run_config_files join table instead and the server rejects this field on save. */ mounts?: Array<{ /** * Platform file ID referencing an object already uploaded to GCS. */ source: string; /** * Absolute container path where the referenced file is mounted at compute creation time. Must be absolute and must not contain parent-directory segments. */ mountPath: string; }>; /** * Env-var names this config expects the runner to inject. Resolved against the version's attached customer secrets at submit time. */ customerSecrets?: Array<{ /** * Env-var name (uppercase + digits + underscore, leading letter) the harness expects to receive at runtime; resolved against attached customer secrets at job-submit time. */ envVarName: string; }>; /** * Egress allowlist for the container. An empty list denies general outbound traffic; hosts independently authorized by attached proxy credentials remain reachable. Any list containing the exact '*' entry permits everything, and a nonempty list without '*' restricts general egress to those domains. Null explicitly selects no run-config egress policy and overrides an inherited problem-version allowlist; omission defers to the consuming context. */ allowedDomains?: Array | null; /** * Wall-clock timeout for the harness invocation (seconds). */ timeoutSeconds?: number; /** * MCP tools the harness exposes, as returned by the MCP service list_tools(). Metadata only — persisted for future grader-UI use and not consumed at submit time. */ mcpTools?: Array<{ /** * Tool name as exposed by the MCP service. The newer catalogue format encodes the service as a dotted prefix (e.g. "gitea.create_user"); use mcpToolServiceKey to extract it. */ name: string; /** * Human-readable description of what the tool does. */ description: string; /** * MCP service the tool belongs to. Omitted when encoded as the name prefix. */ service?: string; /** * Grouping category for the tool in UIs. */ category?: string; /** * Display ordering hint within a category. */ sortOrder?: number; /** * Whether the tool only reads state (no side effects). Omitted when unknown. */ readOnly?: boolean; /** * Tool invocation timeout in seconds. */ timeout?: number; /** * Tool input JSON Schema, stored as an opaque JSON string (see comment). */ inputSchema: string | { [key: string]: unknown; }; /** * Optional human-friendly label for the service (MCP wire key _service_label). */ serviceLabel?: string; }>; /** * The WORLDSIM_BAKE_REF the mcpTools catalogue was discovered against. Server-owned: set during MCP tool discovery. On other writes a client-supplied value is ignored, and the stored tag is carried forward while mcpTools is unchanged (a changed WORLDSIM_BAKE_REF keeps it, so worldsim validation detects the mismatch) and cleared when mcpTools changes. Used when submitting problem versions to reject an MCP allowlist that would be materialized from a catalogue stale relative to the dispatch-time parent bake. */ mcpToolsBakeRef?: string; /** * Seeded-entity overrides for the worldsim MCP functional tool checks, as an opaque JSON-object string with the runner's snake_case keys (e.g. {"erpnext_company":"Northline","keycloak_realm":"northline"}). Emitted as the probe_context block of the mounted mcp-tools.yaml when a run forks the worldsim solver child from this config. Ignored when the problem version inherits the solver's MCP tools: the runner then reads the probe_context block of the file this config names in WORLDSIM_MCP_TOOLS_FILE. Only read by runs that set WORLDSIM_RUN_MCP_TOOL_CHECKS=true. */ mcpToolsProbeContext?: string; /** * Declared execution environment for a snapshot run config's persistent compute (container ref, shared/grade dirs, and image-supplied solver verbs). Omit to inherit the platform defaults. */ computeEnv?: { /** * Child-container name the platform runs the solver/grade verbs in (via docker exec). Omit to inherit the platform default. */ containerRef?: string; /** * Directory bind-mounted from the pod into the container where grade mounts land and are read. Omit to inherit the platform default. */ sharedMountDir?: string; /** * Directory a compute_exec grade writes $GRADE_OUTPUT into (on a path the exec side both writes and reads). Omit to inherit the platform default. */ gradeOutputDir?: string; /** * Image-supplied solver-lifecycle verb scripts. Omit to use the platform default verbs. */ runVerbs?: { /** * Optional child-container readiness probe; prints a verdict token before launch. */ readiness?: string; /** * Terminate any in-flight agent and clear prior-run state (idempotent). */ reset: string; /** * Launch the agent on $PROMPT, detached; the platform polls status afterward. */ submit: string; /** * Print exactly one ComputeRunPhase token to stdout. */ status: string; /** * Print the successful run result to stdout (read on completed). */ result: string; /** * Print failure diagnostics to stdout (read on failed). */ error: string; }; }; /** * Infra-retry policy override for runs launched from this run-config. Omit to use the platform default; an eval-level override (EvaluationMetadataSchema.retryPolicy) takes precedence over this when both are set. */ retryPolicy?: { /** * Additional attempts allowed after a failure classified as infra (container eviction, image pull error, queue orphan) before the run terminates as failed. Omit to use the platform default (2). */ maxInfraRetries?: number; }; }; /** * Optional initial probe spec. When omitted, falls back to platform defaults or the parent version's probe. */ probe?: { /** * Deterministic stdin handed to the agent when the probe runs. The verifier judges the resulting transcript against the quality check. */ prompt: string; /** * Optional additional input files staged alongside the prompt, used for harness-specific fixtures. */ files?: Array<{ /** * GCS object path the agent-service FilesService reads when staging the probe. */ objectPath: string; /** * Absolute container path where the probe file is mounted at probe-run time. */ mountPath: string; }>; /** * Plain-English description of what a passing transcript looks like, fed to the LLM judge. Falls back to "Agent responded with the correct answer" when omitted. */ qualityCheck?: string; }; /** * Free-form notes attached to the new version. */ notes?: string; /** * Locked version to seed the new draft from (config, probe, attachments). Must reference a locked version. */ parentRunConfigVersionId?: string; }; /** * Request body for creating a new secret binding. */ export type CreateSecretDto = { /** * Environment-variable name the secret will be exposed under. */ name: string; /** * Upstream host the credential is allowed to be sent to. */ upstreamHost: string; /** * HTTP header the secret value is written into. */ headerName: string; /** * Ready-to-send header value, including any auth scheme prefix. Leading and trailing whitespace is trimmed; the result is written verbatim into the outbound request header. */ value: string; }; /** * Payload for creating a new user-defined synthesizer job inside an environment. */ export type CreateSynthesizerJobBodyDto = { /** * Display name for the synthesizer; unique within the environment. */ name: string; /** * Optional free-form description of what this synthesizer is for. */ description?: string | null; /** * System prompt sent to the agent that drives the synthesis pipeline. */ systemPrompt: string; /** * Pinned run-config version that supplies the harness and model for this synthesizer. Null falls back to the environment-level synthesizer binding. */ runConfigVersionId?: string | null; /** * Declares which problem-version artifacts to bundle into the input tarball for the agent. */ contextInputs: { /** * File buckets to include in the synthesizer input tarball. */ files: { /** * Include the problem primary files in the input tarball. */ problem: boolean; /** * Include supporting (read-only) files in the input tarball. */ supporting: boolean; /** * Include grader-support files (non-gold) in the input tarball. */ graderSupport: boolean; /** * Include gold-standard files in the input tarball. */ goldStandard: boolean; }; /** * When true, include the problem version current rubrics in the input tarball. */ rubrics: boolean; /** * Existing problem-version field values to copy into the manifest so the synthesizer can condition on them. */ currentFieldValues: Array<'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId'>; /** * When true, include the active form schema and current answers in the manifest. Defaults to false for backward compatibility. */ forms?: boolean; }; /** * Allowed write targets for this synthesizer; outputs touching any other target are filtered out. */ targetFields: Array<'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId' | 'rubrics' | 'formAnswers' | 'problemFiles' | 'supportingFiles' | 'graderSupportFiles'>; }; /** * Request body for creating a custom, environment-scoped tag. */ export type CreateTagDto = { /** * Human-readable tag label (e.g. "FINAL"). Trimmed; unique within its scope. */ label: string; /** * Badge color as a 6-digit hex string (e.g. "#22c55e"). */ color: string; /** * Optional description; omit or null for none. */ description?: string | null; }; /** * Request body for POST /v1/organizations/:organizationId/taiga-images. */ export type CreateTaigaImageDto = { /** * User-facing label for a catalog entry. Unique within an org so the env integration picker is unambiguous. */ name: string; /** * Free-form Dockerfile lines authored by the user. Inserted between the platform-managed head + tail templates at build time. Typically 'RUN pip install …' or 'RUN apt-get install …' — see the dialog's preview for the full assembled file. Empty means 'platform base, no extras'. */ userDockerfile: string; /** * Optional human notes about the image — what was built, when, with which deps. */ description?: string | null; }; /** * Request body for createTaigaSubmission. Recursion environmentId comes from the path; the Taiga-side env id travels in the body; problemIds resolve to their latest versions server-side. */ export type CreateTaigaSubmissionBodyDto = { /** * Taiga-side environment id, pasted by the user into the Send-to-Taiga dialog. Restricted to /^[a-zA-Z0-9_-]{1,255}$/ to prevent URL path injection (the value is interpolated into authenticated Taiga URLs). Server does NOT round-trip to Taiga to verify the id exists; a syntactically-valid-but-unknown id surfaces as a Taiga 4xx in the submit-job child. */ taigaEnvId: string; /** * Recursion problem ids selected for submission; each is resolved to its latest active problem version server-side. */ problemIds: Array; /** * Per-submission overrides for Taiga job-level controls. Omitted fields fall back to the environment integration defaults. */ jobConfigOverrides?: { /** * Solver model identifier forwarded to Taiga (e.g. claude-sonnet-4-6). */ apiModelName?: string; /** * Number of solver attempts per (problem × iteration). Defaults to 1. */ nAttemptsPerProblem?: number; /** * Per-attempt turn cap forwarded to Taiga. Omitted means use Taiga default. */ turnLimit?: number; /** * Per-attempt context-window cap forwarded to Taiga. */ maxCtx?: number; /** * Taiga job-level priority. Mothership defaults to "high". */ priority?: 'max' | 'high' | 'low'; /** * Taiga job iteration order over (problem × attempt) tuples. */ iterationOrder?: 'problems_first' | 'attempts_first'; /** * Enable Taiga-side memory/persistence between turns. */ enableMemory?: boolean; /** * Enable Taiga-side automatic transcript compaction when nearing context limits. */ enableAutocompact?: boolean; /** * Optional auxiliary model identifier for compaction / summarization passes. */ auxiliaryModelApiName?: string; }; /** * Per-submission override for the Taiga container image URL (must reference a ready row in the org catalog). Omitted falls back to environment_taiga_integrations.taiga_image_url. If neither is set, the submission is rejected with a clear "pick an image" error. */ taigaImageUrl?: string; /** * Per-submission override for whether Taiga problem-runs are imported back into Recursion as problem_run rows. When omitted, falls back to the environment-level default. */ importProblemRunResults?: boolean; }; /** * Create-request body for a tuning session: trainer run-config, per-checkpoint eval template, training problem set, cadence, and eval-concurrency cap (organizationId is stamped from the route). */ export type CreateTuningRunDto = { /** * Human-readable label for the session and its spawned children. */ runName: string; /** * Locked, agent-harness run-config version for the trainer container. */ trainerRunConfigVersionId: string; /** * Opaque trainer config blob -- never inspected by the platform (B7). */ trainerConfig: { [key: string]: unknown; }; /** * Template for the per-checkpoint evaluations a tuning_run spawns. */ evalTemplate: { /** * Primary environment for the spawned evaluations. */ environmentId: string; /** * Locked, agent-harness solver run-config version. Must accept a checkpoint-eval placeholder model (see the checkpointContext pass-through in this file). */ solverRunConfigVersionId: string; /** * Locked grader run-config version pinned on every spawned evaluation -- held constant across every checkpoint so score-over-checkpoints shares one reward scale. */ graderRunConfigVersionId: string; /** * Problems included in every spawned per-checkpoint evaluation (one or more). */ problems: Array<{ /** * Stable problem identifier (UUID). */ problemId: string; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Stable environment identifier (UUID). */ environmentId: string; }>; /** * Attempts each spawned checkpoint-eval makes per problem (pass@k), 1-25. Absent = 1, applied at dispatch. */ attemptsPerProblem?: number; }; /** * The training problem set a tuning_run materializes into the trainer dataset_ref. */ trainingTemplate?: { /** * Environment the training problem set is drawn from. */ environmentId: string; /** * Locked problem-versions materialized into the trainer dataset (one or more). */ problems: Array<{ /** * Stable problem identifier (UUID). */ problemId: string; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Stable environment identifier (UUID). */ environmentId: string; }>; }; /** * Which trainer checkpoint steps to evaluate. Step 0 (the untrained base model) is always included regardless of this cadence. */ cadence: { /** * Cadence variant discriminant. */ type: 'every_n_steps'; /** * Evaluate every Nth announced checkpoint step. */ n: number; } | { /** * Cadence variant discriminant. */ type: 'steps'; /** * Exact announced checkpoint steps to evaluate. */ steps: Array; }; /** * Maximum number of per-checkpoint evaluations in flight at once (1-10). */ evalConcurrencyCap: number; }; /** * Request body for provisioning a new platform user. */ export type CreateUserBodyDto = { /** * External user identifier from the customer auth system; null for users without one. */ externalId?: string | null; /** * Human-readable display name of the user. */ name: string; /** * Primary email address of the user. */ email: string; }; /** * A reusable customer-managed credential reference. The credential value itself is never returned after creation; only metadata is exposed. */ export type CustomerSecretDto = { /** * Stable customer-secret identifier (UUID). */ id: string; /** * Scope at which this secret is visible and reusable. */ scope: { /** * System-wide secret available to every organization. */ level: 'system'; /** * Always null at system scope. */ id: null; } | { /** * Org-scoped secret available within one organization. */ level: 'org'; /** * Organization that owns the secret. */ id: string; } | { /** * Environment-scoped secret available within one environment. */ level: 'env'; /** * Environment that owns the secret. */ id: string; } | { /** * Problem-scoped secret available within one problem. */ level: 'problem'; /** * Problem that owns the secret. */ id: string; } | { /** * Problem-version-scoped secret pinned to one specific problem version. */ level: 'problem-version'; /** * Problem version that owns the secret. */ id: string; }; /** * Environment-variable name the runner sees when the secret is attached. */ name: string; /** * Upstream hostname the egress proxy substitutes the real credential for; null for direct-only secrets. */ upstreamHost: string | null; /** * HTTP header the egress proxy injects the credential into for outbound requests; null for direct-only secrets. */ headerName: string | null; /** * Vendor-shaped placeholder injected into the runner environment for proxy-mode attachments, where the egress proxy substitutes the real credential on the wire. Inert for direct-mode attachments, which inject the real value as a plain env var. */ placeholderValue: string; /** * User who created the secret. */ createdByUserId: string; /** * User who last updated the secret; null when the secret has never been edited after creation. */ updatedByUserId: string | null; /** * Timestamp when the secret was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the secret was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Array of customer-managed secrets visible at the requested scope. */ export type CustomerSecretListDto = Array<{ /** * Stable customer-secret identifier (UUID). */ id: string; /** * Scope at which this secret is visible and reusable. */ scope: { /** * System-wide secret available to every organization. */ level: 'system'; /** * Always null at system scope. */ id: null; } | { /** * Org-scoped secret available within one organization. */ level: 'org'; /** * Organization that owns the secret. */ id: string; } | { /** * Environment-scoped secret available within one environment. */ level: 'env'; /** * Environment that owns the secret. */ id: string; } | { /** * Problem-scoped secret available within one problem. */ level: 'problem'; /** * Problem that owns the secret. */ id: string; } | { /** * Problem-version-scoped secret pinned to one specific problem version. */ level: 'problem-version'; /** * Problem version that owns the secret. */ id: string; }; /** * Environment-variable name the runner sees when the secret is attached. */ name: string; /** * Upstream hostname the egress proxy substitutes the real credential for; null for direct-only secrets. */ upstreamHost: string | null; /** * HTTP header the egress proxy injects the credential into for outbound requests; null for direct-only secrets. */ headerName: string | null; /** * Vendor-shaped placeholder injected into the runner environment for proxy-mode attachments, where the egress proxy substitutes the real credential on the wire. Inert for direct-mode attachments, which inject the real value as a plain env var. */ placeholderValue: string; /** * User who created the secret. */ createdByUserId: string; /** * User who last updated the secret; null when the secret has never been edited after creation. */ updatedByUserId: string | null; /** * Timestamp when the secret was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the secret was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * Conflict returned when a form version is published or is the form's only remaining version. */ export type DeleteFormVersionConflictResponseDto = ({ code: 'form_version_already_published'; } & FormVersionAlreadyPublishedErrorDto) | ({ code: 'form_last_version'; } & FormLastVersionErrorDto); /** * Target identifier and display name for a new environment duplicated from an existing one within the same organization. */ export type DuplicateEnvironmentBodyDto = { /** * External identifier for the duplicated environment, supplied by the caller (e.g. the cloned upstream project id). */ targetExternalId: string; /** * Human-readable display name for the duplicated environment. */ targetName: string; }; /** * A top-level container that groups problems, run configs, files, and permissions for one organization. */ export type DuplicateEnvironmentResultDto = { /** * Stable environment identifier (UUID). */ id: string; /** * Customer-provided external identifier. Null when the environment was created without an external id (e.g. via the in-app 'new environment' flow with no source-of-truth system). */ externalId: string | null; /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Human-readable display name of the environment. */ name: string; /** * Problem used as the template seed for new problems in this environment. Null when no template has been configured. */ templateProblemId: string | null; /** * Per-file size cap (bytes) applied to imported problem files. Null falls back to the platform default. */ maxImportFileSizeBytes: number | null; /** * Per-file size cap (bytes) applied to direct uploads. Null falls back to the platform default. */ maxUploadFileSizeBytes: number | null; /** * Aggregate size cap (bytes) across all files attached to one problem version. Null falls back to the platform default. */ maxVersionAggregateFileSizeBytes: number | null; /** * Default attempt count for the Run problem modal. Image and model policy is governed by run-config bindings and curated menus. */ runFieldConfig: { /** * Per-field config for the attempt-count input on the Run problem modal. */ attemptCount: { /** * Default number of attempts pre-filled in the Run problem modal. Null leaves the field empty. */ default: number | null; }; }; /** * When true, users must lock the current version before creating a new one. Prevents config loss from unlocked-version copies. */ requireLockBeforeNewVersion: boolean; /** * Markdown guidance surfaced to problem editors within the environment. Null suppresses it. */ problemEditorInstructions: string | null; /** * Markdown template used to pre-populate the body of new rubric issues. Null leaves the body empty; per-rubric overrides take precedence when set. */ rubricIssueTemplate: string | null; /** * Markdown template used to pre-populate the body of new global (non-rubric-attached) issues. Null leaves the body empty; per-version overrides take precedence when set. */ globalIssueTemplate: string | null; /** * QA-gate stages on which a user may override the gate verdict in this environment. Empty array disables overrides on all stages. */ qaGateOverrideAllowedStages: Array<'locking' | 'running' | 'submitting'>; /** * Built-in synthesizer keys disabled for this environment. Disabled entries are hidden from run pickers and rejected on submission, but remain visible in the Configurations list for re-enablement. */ disabledBuiltInSynthesizerKeys: Array<'improve-prompt' | 'generate-tools' | 'generate-rubrics'>; /** * Authored guided-tour flow shown in the in-editor right-rail checklist. Null hides the panel. */ guidedTour: { /** * Ordered list of tour steps; each step id must be unique within the tour. */ steps: Array<{ /** * Stable identifier of the step (must be unique within a tour). */ id: string; /** * Short title rendered as the step heading. */ title: string; /** * Markdown-capable body text explaining what the user should do for this step. */ body: string; /** * When true, the step can be skipped without blocking tour completion. */ optional?: boolean; /** * Actions to fire when the step becomes active. */ actions?: Array<{ /** * Verb to perform on the target element when the step becomes active. */ kind: 'highlight' | 'focus' | 'click'; /** * Identifier of the element the action runs against. */ target: string; }>; }>; } | null; /** * Filename of the preview asset shown on problem cards. Null hides the preview. */ previewFilename: string | null; /** * Locked run-config version bound as the env-level solver default. Resolved at job submission after per-version overrides; null means no env-level binding. */ solverRunConfigVersionId: string | null; /** * Locked run-config version bound as the env-level grader default. Resolved at job submission after per-version overrides; null means no env-level binding. */ graderRunConfigVersionId: string | null; /** * Locked run-config version that drives all programmatic grading in this environment, overriding the platform-wide programmatic grader default. Separate from the grader binding, which governs agentic and rubric grading only; null falls back to the platform default. */ programmaticGraderRunConfigVersionId: string | null; /** * Locked run-config version bound as the env-level QA default. Resolved at job submission after per-version overrides; null means no env-level binding. */ qaRunConfigVersionId: string | null; /** * Locked run-config version bound as the env-level synthesizer default. Resolved at job submission after per-version overrides; null means no env-level binding. */ synthesizerRunConfigVersionId: string | null; /** * Timestamp when the environment was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the environment was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Result of ensuring a template exists for an environment. Reuses an existing template when present, otherwise creates one. */ export type EnsureTemplateResponseDto = { /** * Stable problem identifier (UUID). */ problemId: string; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ versionId: string; /** * True when the template was created by this request, false when an existing template was returned. */ created: boolean; }; /** * Response describing the form currently attached at the environment scope, along with its higher-scope owner marker. */ export type EnvFormBundleResponseDto = { /** * The attached form bundle, or null when none is attached. */ form: { /** * Stable form identifier (UUID). Forms are versioned structured-input schemas. */ id: string; /** * Human-readable title for the bundle, surfaced in org catalog and picker UIs. Null when the bundle has not been named yet. */ title: string | null; /** * Timestamp when the form was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the form was last updated (ISO-8601, UTC). */ updatedAt: string; } | null; /** * Higher-scope owner of the bundle, or null when none is attached or when it is owned locally. */ ownerScope: 'organization' | null; }; /** * A top-level container that groups problems, run configs, files, and permissions for one organization. */ export type EnvironmentDto = { /** * Stable environment identifier (UUID). */ id: string; /** * Customer-provided external identifier. Null when the environment was created without an external id (e.g. via the in-app 'new environment' flow with no source-of-truth system). */ externalId: string | null; /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Human-readable display name of the environment. */ name: string; /** * Problem used as the template seed for new problems in this environment. Null when no template has been configured. */ templateProblemId: string | null; /** * Per-file size cap (bytes) applied to imported problem files. Null falls back to the platform default. */ maxImportFileSizeBytes: number | null; /** * Per-file size cap (bytes) applied to direct uploads. Null falls back to the platform default. */ maxUploadFileSizeBytes: number | null; /** * Aggregate size cap (bytes) across all files attached to one problem version. Null falls back to the platform default. */ maxVersionAggregateFileSizeBytes: number | null; /** * Default attempt count for the Run problem modal. Image and model policy is governed by run-config bindings and curated menus. */ runFieldConfig: { /** * Per-field config for the attempt-count input on the Run problem modal. */ attemptCount: { /** * Default number of attempts pre-filled in the Run problem modal. Null leaves the field empty. */ default: number | null; }; }; /** * When true, users must lock the current version before creating a new one. Prevents config loss from unlocked-version copies. */ requireLockBeforeNewVersion: boolean; /** * Markdown guidance surfaced to problem editors within the environment. Null suppresses it. */ problemEditorInstructions: string | null; /** * Markdown template used to pre-populate the body of new rubric issues. Null leaves the body empty; per-rubric overrides take precedence when set. */ rubricIssueTemplate: string | null; /** * Markdown template used to pre-populate the body of new global (non-rubric-attached) issues. Null leaves the body empty; per-version overrides take precedence when set. */ globalIssueTemplate: string | null; /** * QA-gate stages on which a user may override the gate verdict in this environment. Empty array disables overrides on all stages. */ qaGateOverrideAllowedStages: Array<'locking' | 'running' | 'submitting'>; /** * Built-in synthesizer keys disabled for this environment. Disabled entries are hidden from run pickers and rejected on submission, but remain visible in the Configurations list for re-enablement. */ disabledBuiltInSynthesizerKeys: Array<'improve-prompt' | 'generate-tools' | 'generate-rubrics'>; /** * Authored guided-tour flow shown in the in-editor right-rail checklist. Null hides the panel. */ guidedTour: { /** * Ordered list of tour steps; each step id must be unique within the tour. */ steps: Array<{ /** * Stable identifier of the step (must be unique within a tour). */ id: string; /** * Short title rendered as the step heading. */ title: string; /** * Markdown-capable body text explaining what the user should do for this step. */ body: string; /** * When true, the step can be skipped without blocking tour completion. */ optional?: boolean; /** * Actions to fire when the step becomes active. */ actions?: Array<{ /** * Verb to perform on the target element when the step becomes active. */ kind: 'highlight' | 'focus' | 'click'; /** * Identifier of the element the action runs against. */ target: string; }>; }>; } | null; /** * Filename of the preview asset shown on problem cards. Null hides the preview. */ previewFilename: string | null; /** * Locked run-config version bound as the env-level solver default. Resolved at job submission after per-version overrides; null means no env-level binding. */ solverRunConfigVersionId: string | null; /** * Locked run-config version bound as the env-level grader default. Resolved at job submission after per-version overrides; null means no env-level binding. */ graderRunConfigVersionId: string | null; /** * Locked run-config version that drives all programmatic grading in this environment, overriding the platform-wide programmatic grader default. Separate from the grader binding, which governs agentic and rubric grading only; null falls back to the platform default. */ programmaticGraderRunConfigVersionId: string | null; /** * Locked run-config version bound as the env-level QA default. Resolved at job submission after per-version overrides; null means no env-level binding. */ qaRunConfigVersionId: string | null; /** * Locked run-config version bound as the env-level synthesizer default. Resolved at job submission after per-version overrides; null means no env-level binding. */ synthesizerRunConfigVersionId: string | null; /** * Timestamp when the environment was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the environment was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Conflict returned when the environment already has a form attached. */ export type EnvironmentFormAlreadyAttachedErrorDto = { /** * Machine-readable discriminator for a duplicate environment form attachment. */ code: 'environment_form_already_attached'; /** * Human-readable explanation of the duplicate environment form attachment. */ message: string; /** * Optional structured context about the existing environment form attachment. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * All integration settings for one environment, keyed by integration name. Absent rows resolve to platform defaults. */ export type EnvironmentIntegrationsDto = { /** * Taiga integration settings for one environment. */ taiga: { /** * When true, the Send-to-Taiga button is visible in the env-overview toolbar. */ enabled: boolean; /** * Default Taiga env id pre-filled in the Send-to-Taiga dialog. Null leaves the field empty. */ defaultEnvId: string | null; /** * Default solver model forwarded to Taiga at submission time. Null falls back to the platform default at dialog render time. */ defaultApiModelName: string | null; /** * Default attempts-per-problem forwarded to Taiga at submission time. Null falls back to the platform default. */ defaultNAttemptsPerProblem: number | null; /** * When true, the problem editor disables grading shapes that Send-to-Taiga can't honor (max composition) and the backend rejects locking a draft whose grading_config contains any of them. A per-leaf programmatic graderImage is not gated — it is ignored on Taiga (the grade runs in the env image). */ strictCompatibility: boolean; /** * When true, locking a problem version eagerly pushes it to Taiga (creates/updates the corresponding Taiga problem + problem-version). When false, the push happens lazily on the next Send-to-Taiga. */ syncOnLock: boolean; /** * Per-env image URL used as the Taiga problem container. Required when sync-on-lock is enabled (lock validation rejects an empty value in that case) and on every Send-to-Taiga submission (the per-submission dialog can pick a different image, but one or the other must resolve). The gate does NOT fire merely because the integration is enabled. Picked from the org's Taiga image catalog via the integration UI — selection copies the built image URI here, snapshot-style. Stored as plain text with no FK to the catalog, so catalog deletions do not invalidate existing integrations. */ taigaImageUrl: string | null; /** * When true (default), Send-to-Taiga imports each Taiga problem-run back into Recursion as a problem_run row. When false, the export runs on Taiga but no Recursion problem_runs are created. */ importProblemRunResults: boolean; }; }; /** * Per-model, per-problem-version metric rollup for all problems in an environment. */ export type EnvironmentMetricsResponseDto = { /** * Stable environment identifier (UUID). */ environmentId: string; /** * One entry per (model, problem-version) pair that has at least one authoring run. */ cells: Array<{ /** * api_model_name value identifying the model that produced these runs. */ modelId: string; /** * Problem version these runs target. */ problemVersionId: string; /** * Sum of run costs in USD over the same ≤500 most-recent runs sampled per cell as the attempts array, or null when cost data is absent. */ totalCostUsd: number | null; /** * Per-attempt (score, status) data for dynamic tau and score-distribution charts, capped at 500 most-recent per cell. */ attempts: Array<{ /** * Graded score for this attempt, or null if unscored. */ score: number | null; /** * Terminal or in-flight status of this problem run. */ status: 'pending' | 'running' | 'grading' | 'completed' | 'failed' | 'cancelled'; }>; }>; }; /** * Cursor-paginated page of environments with their problem and run counts. */ export type EnvironmentWithCountsPageDto = { /** * Items in this page, ordered per the requested sort. */ items: Array<{ /** * Stable environment identifier (UUID). */ id: string; /** * Customer-provided external identifier. Null when the environment was created without an external id (e.g. via the in-app 'new environment' flow with no source-of-truth system). */ externalId: string | null; /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Human-readable display name of the environment. */ name: string; /** * Problem used as the template seed for new problems in this environment. Null when no template has been configured. */ templateProblemId: string | null; /** * Per-file size cap (bytes) applied to imported problem files. Null falls back to the platform default. */ maxImportFileSizeBytes: number | null; /** * Per-file size cap (bytes) applied to direct uploads. Null falls back to the platform default. */ maxUploadFileSizeBytes: number | null; /** * Aggregate size cap (bytes) across all files attached to one problem version. Null falls back to the platform default. */ maxVersionAggregateFileSizeBytes: number | null; /** * Default attempt count for the Run problem modal. Image and model policy is governed by run-config bindings and curated menus. */ runFieldConfig: { /** * Per-field config for the attempt-count input on the Run problem modal. */ attemptCount: { /** * Default number of attempts pre-filled in the Run problem modal. Null leaves the field empty. */ default: number | null; }; }; /** * When true, users must lock the current version before creating a new one. Prevents config loss from unlocked-version copies. */ requireLockBeforeNewVersion: boolean; /** * Markdown guidance surfaced to problem editors within the environment. Null suppresses it. */ problemEditorInstructions: string | null; /** * Markdown template used to pre-populate the body of new rubric issues. Null leaves the body empty; per-rubric overrides take precedence when set. */ rubricIssueTemplate: string | null; /** * Markdown template used to pre-populate the body of new global (non-rubric-attached) issues. Null leaves the body empty; per-version overrides take precedence when set. */ globalIssueTemplate: string | null; /** * QA-gate stages on which a user may override the gate verdict in this environment. Empty array disables overrides on all stages. */ qaGateOverrideAllowedStages: Array<'locking' | 'running' | 'submitting'>; /** * Built-in synthesizer keys disabled for this environment. Disabled entries are hidden from run pickers and rejected on submission, but remain visible in the Configurations list for re-enablement. */ disabledBuiltInSynthesizerKeys: Array<'improve-prompt' | 'generate-tools' | 'generate-rubrics'>; /** * Authored guided-tour flow shown in the in-editor right-rail checklist. Null hides the panel. */ guidedTour: { /** * Ordered list of tour steps; each step id must be unique within the tour. */ steps: Array<{ /** * Stable identifier of the step (must be unique within a tour). */ id: string; /** * Short title rendered as the step heading. */ title: string; /** * Markdown-capable body text explaining what the user should do for this step. */ body: string; /** * When true, the step can be skipped without blocking tour completion. */ optional?: boolean; /** * Actions to fire when the step becomes active. */ actions?: Array<{ /** * Verb to perform on the target element when the step becomes active. */ kind: 'highlight' | 'focus' | 'click'; /** * Identifier of the element the action runs against. */ target: string; }>; }>; } | null; /** * Filename of the preview asset shown on problem cards. Null hides the preview. */ previewFilename: string | null; /** * Locked run-config version bound as the env-level solver default. Resolved at job submission after per-version overrides; null means no env-level binding. */ solverRunConfigVersionId: string | null; /** * Locked run-config version bound as the env-level grader default. Resolved at job submission after per-version overrides; null means no env-level binding. */ graderRunConfigVersionId: string | null; /** * Locked run-config version that drives all programmatic grading in this environment, overriding the platform-wide programmatic grader default. Separate from the grader binding, which governs agentic and rubric grading only; null falls back to the platform default. */ programmaticGraderRunConfigVersionId: string | null; /** * Locked run-config version bound as the env-level QA default. Resolved at job submission after per-version overrides; null means no env-level binding. */ qaRunConfigVersionId: string | null; /** * Locked run-config version bound as the env-level synthesizer default. Resolved at job submission after per-version overrides; null means no env-level binding. */ synthesizerRunConfigVersionId: string | null; /** * Timestamp when the environment was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the environment was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Total number of problems in this environment. */ problemCount: number; /** * Total number of problem runs submitted across all problems in this environment. */ problemRunCount: number; }>; /** * Cursor for fetching the next page, or null when this is the last page. */ nextCursor: string | null; /** * Total number of items matching the filter across all pages. */ total: number; }; /** * Detail view of an evaluation, including the solver and problem rosters. */ export type EvaluationDetailResponseDto = { /** * Stable evaluation identifier (UUID). An evaluation is a multi-problem comparison run. */ id: string; /** * Which evaluation shape this is. Defaults to solve-and-grade for pre-kind records. */ kind: 'solve_and_grade' | 'grade_only'; /** * Human-readable display name of the evaluation. */ name: string; /** * Free-form description of the evaluation. Empty string when not provided. */ description: string; /** * Lifecycle status of the evaluation. */ status: 'pending' | 'running' | 'completed' | 'failed' | 'partial' | 'cancelled'; /** * Number of attempts each solver makes against each problem, read from the evaluation metadata. */ nAttemptsPerProblem: number; /** * Free-form tags for list filtering. Empty when the evaluation is untagged. */ tags: Array; /** * Locked run-config version (kind "grader") pinned as the grader for every run in this evaluation. Null when grading falls back to the problem-version / environment grader default. One grader per evaluation keeps every solver on the same reward scale. */ graderRunConfigVersionId: string | null; /** * Number of solvers participating in this evaluation. */ totalSolvers: number; /** * Number of problems included in this evaluation. */ totalProblems: number; /** * Timestamp when the evaluation was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the evaluation was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Timestamp when the evaluation began running (ISO-8601, UTC). Null while still pending. */ startedAt: string | null; /** * Timestamp when the evaluation reached a terminal status (ISO-8601, UTC). Null while still running or pending. */ completedAt: string | null; /** * Orchestration metadata persisted on the evaluation (attempts per problem, success threshold). */ metadata: { /** * Version discriminant of the metadata shape. Always 1 today. */ schemaVersion: 1; /** * Number of attempts each solver makes against each problem (1-25). */ attemptsPerProblem: number; /** * Score at or above which an attempt counts as a pass in aggregated results. Omitted means the platform default (0.5) applies at read time. */ successThreshold?: number; /** * Infra-retry policy override applied to every problem run in this evaluation, taking precedence over the run-config-level override when both are set. Omit to use the run-config value (or the platform default if neither is set). */ retryPolicy?: { /** * Additional attempts allowed after a failure classified as infra (container eviction, image pull error, queue orphan) before the run terminates as failed. Omit to use the platform default (2). */ maxInfraRetries?: number; }; }; /** * Solvers participating in this evaluation, in display order. */ solvers: Array<{ /** * Stable evaluation-solver identifier (UUID). Refers to one solver participating in an evaluation. */ id: string; /** * Stable evaluation identifier (UUID). An evaluation is a multi-problem comparison run. */ evaluationId: string; /** * Human-readable label distinguishing this solver in evaluation results. */ displayName: string; /** * Locked run-config version (kind "solver") that governs this solver's invocation. Null only on legacy solvers created before run-config-native evaluations. */ runConfigVersionId: string | null; /** * Display label for results, derived from the bound run-config name. "(legacy)" for pre-cutover solvers with no bound run-config. */ solverLabel: string; /** * Current aggregate status of the jobs executing this solver. Null before the evaluation has been started, and on pre-cutover solvers that predate the current execution engine. */ jobStatus: 'pending' | 'running' | 'completed' | 'failed' | 'partial' | 'cancelled' | null; /** * Position of this solver in evaluation results, left-to-right. */ sortOrder: number; /** * Orchestration metadata persisted on this solver (per-solver concurrency cap). */ metadata: { /** * Version discriminant of the metadata shape. Always 1 today. */ schemaVersion: 1; /** * Maximum solver runs this solver keeps alive on the agent service at once (requests are capped at 2000). Omitted means the platform default applies. */ concurrency?: number; /** * Durable copy of this checkpoint-eval solver's (step, checkpointRef), written in the SAME transaction as the evaluation/solver/jobs_v2 rows. This is the crash-safe dedup key tuning_run polls against — createV2 commits atomically, so once this field is set on a solver row, that (tuning_run, step) pair is guaranteed already spawned on every subsequent poll, regardless of what tuning_run's own in-memory bookkeeping lost to a crash. */ tuningRunCheckpoint?: { /** * Trainer checkpoint step this evaluation was spawned for. */ step: number; /** * Opaque training-checkpoint reference loaded by this solver. Null when the checkpoint announcement did not provide a loadable artifact reference. */ checkpointRef: string | null; }; }; }>; /** * Problems included in this evaluation, in display order. */ problems: Array<{ /** * Stable evaluation-problem identifier (UUID). Refers to one problem included in an evaluation. */ id: string; /** * Stable evaluation identifier (UUID). An evaluation is a multi-problem comparison run. */ evaluationId: string; /** * Stable problem identifier (UUID). */ problemId: string; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Stable environment identifier (UUID). */ environmentId: string; /** * Title of the referenced problem at the time it was added. Null when untitled. */ problemTitle: string | null; /** * Display name of the environment that owns the problem. */ environmentName: string; /** * Human-readable label of the pinned problem version (e.g., the version number). */ versionLabel: string; /** * Position of this problem in evaluation results, top-to-bottom. */ sortOrder: number; }>; }; /** * An evaluation-results export job and its progress, downloadable artifact, and persisted configuration. */ export type EvaluationExportResponseDto = { /** * Stable export-job identifier (UUID). */ id: string; /** * Discriminator selecting which scope identifier applies to this export. */ kind: 'problem_archive' | 'evaluation_results'; /** * Environment that owns the export. Set for problem-archive exports; null otherwise. */ environmentId: string | null; /** * Evaluation the export is scoped to. Set for evaluation-results exports; null otherwise. */ evaluationId: string | null; /** * User who created the export job. */ userId: string; /** * Current lifecycle status of the export job. */ status: 'pending' | 'processing' | 'completed' | 'failed' | 'cancelled'; /** * Archive format for problem-archive exports. Null for other export kinds, which carry their own format dimension. */ format: 'default' | 'harbor-basic' | 'harbor-job' | string | null; /** * Total work units to process. Semantics depend on kind — see ExportKind for per-kind details. */ totalProblems: number; /** * Work units processed so far, in the same unit as the total. */ processedProblems: number; /** * Signed download URL for the produced artifact. Null until the job completes. */ downloadUrl: string | null; /** * Size of the produced artifact in bytes. Null until the job completes. */ fileSizeBytes: number | null; /** * Failure reason when the job ended in failure. Null otherwise. */ errorMessage: string | null; /** * Timestamp when the job began processing (ISO-8601, UTC). Null while pending. */ startedAt: string | null; /** * Timestamp when the job reached a terminal state (ISO-8601, UTC). Null until the job ends. */ completedAt: string | null; /** * Timestamp when the export job was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the export job row was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Persisted configuration for evaluation-results exports, capturing format, included columns, and filters. Null for other export kinds. */ evaluationConfig: { /** * Output format for the export artifact. */ format: 'csv' | 'json' | 'harbor-basic'; /** * When true, include per-run cost columns in the output. */ includeCosts: boolean; /** * When true, include start/end timestamp columns in the output. */ includeTimestamps: boolean; /** * When true, include error-message columns for failed runs. */ includeErrors: boolean; /** * When true, include the grader rationale text alongside the score. */ includeGradingRationale: boolean; /** * When true, emit a tar.gz archive with the data file plus each available run transcript in the transcripts directory, named .txt and keyed by the full stable problem-run UUID. */ includeTranscripts: boolean; /** * Optional filter restricting the export to specific evaluation solvers. Omit to include all solvers. Empty arrays are rejected. */ solverIds?: Array; /** * Optional filter restricting the export to specific problem versions. Omit to include all problem versions. Empty arrays are rejected. */ problemVersionIds?: Array; } | null; }; /** * Array of evaluation export jobs. */ export type EvaluationExportResponseListDto = Array<{ /** * Stable export-job identifier (UUID). */ id: string; /** * Discriminator selecting which scope identifier applies to this export. */ kind: 'problem_archive' | 'evaluation_results'; /** * Environment that owns the export. Set for problem-archive exports; null otherwise. */ environmentId: string | null; /** * Evaluation the export is scoped to. Set for evaluation-results exports; null otherwise. */ evaluationId: string | null; /** * User who created the export job. */ userId: string; /** * Current lifecycle status of the export job. */ status: 'pending' | 'processing' | 'completed' | 'failed' | 'cancelled'; /** * Archive format for problem-archive exports. Null for other export kinds, which carry their own format dimension. */ format: 'default' | 'harbor-basic' | 'harbor-job' | string | null; /** * Total work units to process. Semantics depend on kind — see ExportKind for per-kind details. */ totalProblems: number; /** * Work units processed so far, in the same unit as the total. */ processedProblems: number; /** * Signed download URL for the produced artifact. Null until the job completes. */ downloadUrl: string | null; /** * Size of the produced artifact in bytes. Null until the job completes. */ fileSizeBytes: number | null; /** * Failure reason when the job ended in failure. Null otherwise. */ errorMessage: string | null; /** * Timestamp when the job began processing (ISO-8601, UTC). Null while pending. */ startedAt: string | null; /** * Timestamp when the job reached a terminal state (ISO-8601, UTC). Null until the job ends. */ completedAt: string | null; /** * Timestamp when the export job was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the export job row was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Persisted configuration for evaluation-results exports, capturing format, included columns, and filters. Null for other export kinds. */ evaluationConfig: { /** * Output format for the export artifact. */ format: 'csv' | 'json' | 'harbor-basic'; /** * When true, include per-run cost columns in the output. */ includeCosts: boolean; /** * When true, include start/end timestamp columns in the output. */ includeTimestamps: boolean; /** * When true, include error-message columns for failed runs. */ includeErrors: boolean; /** * When true, include the grader rationale text alongside the score. */ includeGradingRationale: boolean; /** * When true, emit a tar.gz archive with the data file plus each available run transcript in the transcripts directory, named .txt and keyed by the full stable problem-run UUID. */ includeTranscripts: boolean; /** * Optional filter restricting the export to specific evaluation solvers. Omit to include all solvers. Empty arrays are rejected. */ solverIds?: Array; /** * Optional filter restricting the export to specific problem versions. Omit to include all problem versions. Empty arrays are rejected. */ problemVersionIds?: Array; } | null; }>; /** * Full grade-only comparison matrix across trajectories and graders. */ export type EvaluationGradeOnlyResultsResponseDto = { /** * Discriminant identifying this as a grade-only results payload. */ kind: 'grade_only'; /** * Stable evaluation identifier (UUID). An evaluation is a multi-problem comparison run. */ evaluationId: string; /** * Ordered grader columns, including the labels and run-config versions for cell IDs. */ graders: Array<{ /** * Stable identifier referenced by grade-only matrix cells. */ id: string; /** * Human-readable label distinguishing this grader column in the comparison matrix. */ displayName: string; /** * Locked grader run-config version used for this matrix column. */ runConfigVersionId: string; /** * Position of this grader in the comparison matrix, left-to-right. */ sortOrder: number; }>; /** * One cell per (trajectory x grader) pair in the evaluation. */ cells: Array<{ /** * The picked trajectory (existing solver run) this cell grades — the matrix row. */ sourceProblemRunId: string; /** * The grader config that produced this cell — the matrix column. */ graderId: string; /** * This grader’s verdict on this trajectory. Null when the grade job has not yet produced a row (e.g. still pending). */ grade: { /** * Stable problem-run-grade identifier (UUID). One independent grader verdict on one trajectory (`problem_run_grades` row). */ id: string; /** * Locked run-config version (kind "grader") that produced this grade. */ graderRunConfigVersionId: string; /** * Lifecycle status of this grade, from queueing through grading to a terminal state. Shares the same status enum as the underlying problem run. */ status: 'pending' | 'running' | 'grading' | 'completed' | 'failed' | 'cancelled'; /** * Final score this grader awarded the trajectory. Null until grading completes. */ finalScore: number | null; /** * This grader's justification for the score. Null until grading completes. */ justification: string | null; /** * USD cost of running this grader against the trajectory. Null/absent while in-flight or when no cost was recorded. Excludes the source solver run cost, which is shown separately as reference to avoid double-counting. */ costUsd: number | null; /** * Timestamp when this grade finished grading (ISO-8601, UTC). Null until complete. */ gradedAt: string | null; /** * Error detail if this grade failed. Null on success or while still running. */ errorMessage: string | null; } | null; }>; /** * Per-trajectory grader-agreement summaries, one per picked trajectory. */ trajectories: Array<{ /** * The trajectory this agreement summarizes. */ sourceProblemRunId: string; /** * Mean score across the graders that produced a score for this trajectory. Null when no grader scored it. */ meanScore: number | null; /** * Standard deviation of grader scores for this trajectory — the grader-agreement metric (lower = more agreement). Null when fewer than two graders scored it. */ stddev: number | null; /** * Number of graders that produced a score for this trajectory. */ gradedCount: number; /** * Total number of graders in the evaluation (the expected scores per trajectory). */ graderCount: number; }>; }; /** * Cursor-paginated page of evaluation list entries. */ export type EvaluationPageResponseDto = { /** * Items in this page, ordered per the requested sort. */ items: Array<{ /** * Stable evaluation identifier (UUID). An evaluation is a multi-problem comparison run. */ id: string; /** * Which evaluation shape this is. Defaults to solve-and-grade for pre-kind records. */ kind: 'solve_and_grade' | 'grade_only'; /** * Human-readable display name of the evaluation. */ name: string; /** * Free-form description of the evaluation. Empty string when not provided. */ description: string; /** * Lifecycle status of the evaluation. */ status: 'pending' | 'running' | 'completed' | 'failed' | 'partial' | 'cancelled'; /** * Number of attempts each solver makes against each problem, read from the evaluation metadata. */ nAttemptsPerProblem: number; /** * Free-form tags for list filtering. Empty when the evaluation is untagged. */ tags: Array; /** * Locked run-config version (kind "grader") pinned as the grader for every run in this evaluation. Null when grading falls back to the problem-version / environment grader default. One grader per evaluation keeps every solver on the same reward scale. */ graderRunConfigVersionId: string | null; /** * Number of solvers participating in this evaluation. */ totalSolvers: number; /** * Number of problems included in this evaluation. */ totalProblems: number; /** * Timestamp when the evaluation was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the evaluation was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Timestamp when the evaluation began running (ISO-8601, UTC). Null while still pending. */ startedAt: string | null; /** * Timestamp when the evaluation reached a terminal status (ISO-8601, UTC). Null while still running or pending. */ completedAt: string | null; /** * Display name of the user who created the evaluation. */ createdByName: string; }>; /** * Cursor for fetching the next page, or null when this is the last page. */ nextCursor: string | null; /** * Total number of items matching the filter across all pages. */ total: number; }; /** * Full results matrix for an evaluation across solvers and problem versions. */ export type EvaluationResultsResponseDto = { /** * Stable evaluation identifier (UUID). An evaluation is a multi-problem comparison run. */ evaluationId: string; /** * One cell per solver and problem-version pair in the evaluation. */ cells: Array<{ /** * Stable evaluation-solver identifier (UUID). Refers to one solver participating in an evaluation. */ solverId: string; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Mean score across all completed attempts in this cell. Null when no attempt produced a score. */ meanScore: number | null; /** * Standard deviation of scores across completed attempts. Null when fewer than two scored attempts exist. */ stddev: number | null; /** * Minimum score across completed attempts. Null when no attempt produced a score. */ minScore: number | null; /** * Maximum score across completed attempts. Null when no attempt produced a score. */ maxScore: number | null; /** * Number of attempts in this cell that passed. */ passCount: number; /** * Number of attempts in this cell that failed. */ failCount: number; /** * Total number of attempts expected for this cell. */ totalRuns: number; /** * Number of attempts in this cell that have reached a terminal status. */ completedRuns: number; /** * Total USD cost across completed attempts in this cell. Null when no cost data is available. */ totalCostUsd: number | null; /** * Mean wall-clock execution time across completed attempts (milliseconds). Null when no timing data is available. */ meanExecutionTimeMs: number | null; /** * Per-attempt results in attempt-number order. */ attempts: Array<{ /** * Identifier of the underlying problem run that produced this attempt. */ problemRunId: string; /** * One-based index of the attempt within a solver/problem pairing. */ attemptNumber: number; /** * Final score awarded for the attempt. Null when the attempt did not produce a score (incomplete or errored). */ score: number | null; /** * Lifecycle status of the underlying problem run for this attempt; may be in-progress (pending/running/grading) as well as terminal. */ status: 'pending' | 'running' | 'grading' | 'completed' | 'failed' | 'cancelled'; /** * Total USD cost recorded for this attempt, summed across its cost rows (agent, compute, grading). Null/absent when no cost data is available. */ costUsd: number | null; /** * Wall-clock execution time for this attempt in milliseconds. Null/absent until the attempt completes. */ executionTimeMs: number | null; /** * Timestamp when this attempt started (ISO-8601, UTC). Null/absent until the attempt starts. */ startedAt: string | null; /** * Timestamp when this attempt reached a terminal status (ISO-8601, UTC). Null/absent while in-flight. */ completedAt: string | null; /** * Error detail recorded for this attempt. Null/absent on success or while still running. */ errorMessage: string | null; /** * Number of times this attempt was automatically resubmitted after an infra-classified failure (container eviction, image pull error, orphaned queue entry). Zero when the attempt never hit a retryable failure. */ infraRetryCount: number; /** * Input tokens consumed by this attempt, summed across its cost rows. Null/absent when no token data is available. */ inputTokens: number | null; /** * Output tokens produced by this attempt, summed across its cost rows. Null/absent when no token data is available. */ outputTokens: number | null; /** * Cache-read input tokens for this attempt, summed across its cost rows. Null/absent when no token data is available. */ cacheReadInputTokens: number | null; /** * Cache-creation input tokens for this attempt, summed across its cost rows. Null/absent when no token data is available. */ cacheCreationInputTokens: number | null; /** * jobs_v2 id of the leaf job that produced this attempt, used to key the rerun action. Null/absent for attempts with no linked v2 job (legacy pre-v2 data). */ jobV2Id?: string | null; }>; }>; }; /** * Request body to execute a one-off command inside a running compute. */ export type ExecCommandRequestDto = { /** * Executable to run inside the compute container. */ command: string; /** * Positional arguments passed to the command. */ args?: Array; /** * Optional standard-input payload streamed to the command (max 65536 code points). */ stdin?: string; /** * Maximum execution time before the long-poll returns and the command is killed. */ timeoutSeconds?: number; }; /** * Result of executing a one-off command inside a compute. */ export type ExecResultDto = { /** * Captured standard output emitted by the command. */ stdout: string; /** * Captured standard error emitted by the command. */ stderr: string; /** * Process exit code, or null when the command was terminated before exiting. */ exitCode: number | null; }; /** * An asynchronous export job and its progress, downloadable artifact, and persisted configuration. */ export type ExportResponseDto = { /** * Stable export-job identifier (UUID). */ id: string; /** * Discriminator selecting which scope identifier applies to this export. */ kind: 'problem_archive' | 'evaluation_results'; /** * Environment that owns the export. Set for problem-archive exports; null otherwise. */ environmentId: string | null; /** * Evaluation the export is scoped to. Set for evaluation-results exports; null otherwise. */ evaluationId: string | null; /** * User who created the export job. */ userId: string; /** * Current lifecycle status of the export job. */ status: 'pending' | 'processing' | 'completed' | 'failed' | 'cancelled'; /** * Archive format for problem-archive exports. Null for other export kinds, which carry their own format dimension. */ format: 'default' | 'harbor-basic' | 'harbor-job' | string | null; /** * Total work units to process. Semantics depend on kind — see ExportKind for per-kind details. */ totalProblems: number; /** * Work units processed so far, in the same unit as the total. */ processedProblems: number; /** * Signed download URL for the produced artifact. Null until the job completes. */ downloadUrl: string | null; /** * Size of the produced artifact in bytes. Null until the job completes. */ fileSizeBytes: number | null; /** * Failure reason when the job ended in failure. Null otherwise. */ errorMessage: string | null; /** * Timestamp when the job began processing (ISO-8601, UTC). Null while pending. */ startedAt: string | null; /** * Timestamp when the job reached a terminal state (ISO-8601, UTC). Null until the job ends. */ completedAt: string | null; /** * Timestamp when the export job was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the export job row was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Persisted configuration for evaluation-results exports, capturing format, included columns, and filters. Null for other export kinds. */ evaluationConfig: { /** * Output format for the export artifact. */ format: 'csv' | 'json' | 'harbor-basic'; /** * When true, include per-run cost columns in the output. */ includeCosts: boolean; /** * When true, include start/end timestamp columns in the output. */ includeTimestamps: boolean; /** * When true, include error-message columns for failed runs. */ includeErrors: boolean; /** * When true, include the grader rationale text alongside the score. */ includeGradingRationale: boolean; /** * When true, emit a tar.gz archive with the data file plus each available run transcript in the transcripts directory, named .txt and keyed by the full stable problem-run UUID. */ includeTranscripts: boolean; /** * Optional filter restricting the export to specific evaluation solvers. Omit to include all solvers. Empty arrays are rejected. */ solverIds?: Array; /** * Optional filter restricting the export to specific problem versions. Omit to include all problem versions. Empty arrays are rejected. */ problemVersionIds?: Array; } | null; }; /** * Array of export jobs. */ export type ExportResponseListDto = Array<{ /** * Stable export-job identifier (UUID). */ id: string; /** * Discriminator selecting which scope identifier applies to this export. */ kind: 'problem_archive' | 'evaluation_results'; /** * Environment that owns the export. Set for problem-archive exports; null otherwise. */ environmentId: string | null; /** * Evaluation the export is scoped to. Set for evaluation-results exports; null otherwise. */ evaluationId: string | null; /** * User who created the export job. */ userId: string; /** * Current lifecycle status of the export job. */ status: 'pending' | 'processing' | 'completed' | 'failed' | 'cancelled'; /** * Archive format for problem-archive exports. Null for other export kinds, which carry their own format dimension. */ format: 'default' | 'harbor-basic' | 'harbor-job' | string | null; /** * Total work units to process. Semantics depend on kind — see ExportKind for per-kind details. */ totalProblems: number; /** * Work units processed so far, in the same unit as the total. */ processedProblems: number; /** * Signed download URL for the produced artifact. Null until the job completes. */ downloadUrl: string | null; /** * Size of the produced artifact in bytes. Null until the job completes. */ fileSizeBytes: number | null; /** * Failure reason when the job ended in failure. Null otherwise. */ errorMessage: string | null; /** * Timestamp when the job began processing (ISO-8601, UTC). Null while pending. */ startedAt: string | null; /** * Timestamp when the job reached a terminal state (ISO-8601, UTC). Null until the job ends. */ completedAt: string | null; /** * Timestamp when the export job was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the export job row was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Persisted configuration for evaluation-results exports, capturing format, included columns, and filters. Null for other export kinds. */ evaluationConfig: { /** * Output format for the export artifact. */ format: 'csv' | 'json' | 'harbor-basic'; /** * When true, include per-run cost columns in the output. */ includeCosts: boolean; /** * When true, include start/end timestamp columns in the output. */ includeTimestamps: boolean; /** * When true, include error-message columns for failed runs. */ includeErrors: boolean; /** * When true, include the grader rationale text alongside the score. */ includeGradingRationale: boolean; /** * When true, emit a tar.gz archive with the data file plus each available run transcript in the transcripts directory, named .txt and keyed by the full stable problem-run UUID. */ includeTranscripts: boolean; /** * Optional filter restricting the export to specific evaluation solvers. Omit to include all solvers. Empty arrays are rejected. */ solverIds?: Array; /** * Optional filter restricting the export to specific problem versions. Omit to include all problem versions. Empty arrays are rejected. */ problemVersionIds?: Array; } | null; }>; /** * Map from caller-supplied problem external IDs to the platform problem IDs they resolve to. */ export type ExternalIdToProblemIdMapDto = { [key: string]: string; }; /** * An environment-scoped file upload that can be attached to problem versions or skill bundles. */ export type FileDto = { /** * Stable file identifier (UUID). Files are problem-scoped uploads. */ id: string; /** * Signed download URL for the file contents. */ url: string; /** * Original filename of the upload as provided by the user. */ filename: string; /** * Size of the file in bytes; null when the size has not yet been recorded. */ sizeBytes: number | null; /** * Timestamp when the file was uploaded (ISO-8601, UTC). */ createdAt: string; /** * User who uploaded the file; null for system-uploaded or pre-attribution files. */ createdById: string | null; }; /** * Array of files. */ export type FileListDto = Array<{ /** * Stable file identifier (UUID). Files are problem-scoped uploads. */ id: string; /** * Signed download URL for the file contents. */ url: string; /** * Original filename of the upload as provided by the user. */ filename: string; /** * Size of the file in bytes; null when the size has not yet been recorded. */ sizeBytes: number | null; /** * Timestamp when the file was uploaded (ISO-8601, UTC). */ createdAt: string; /** * User who uploaded the file; null for system-uploaded or pre-attribution files. */ createdById: string | null; }>; /** * Request body for finalizing uploads after the client has PUT the bytes. */ export type FinalizeEnvironmentFileUploadsRequestDto = { /** * Category the finalized files will be classified under. */ type: 'instructions' | 'agent-input'; /** * Files to finalize after a successful upload (at least one). */ files: Array<{ /** * Server-issued object path returned by the upload-URL step. */ objectPath: string; /** * Original file name to record alongside the upload. */ fileName: string; /** * Optional user-facing display name; null clears any prior value. */ displayName?: string | null; }>; }; /** * Response containing the persisted environment files after finalize. */ export type FinalizeEnvironmentFileUploadsResponseDto = { /** * Newly-persisted environment-file rows for the finalized uploads. */ files: Array<{ /** * Stable environment-file identifier (UUID). Files scoped to an environment (templates, shared assets). */ id: string; /** * Stable environment identifier (UUID). */ environmentId: string; /** * Category of this environment-scoped file. */ type: 'instructions' | 'agent-input'; /** * Original file name as uploaded by the client. */ fileName: string; /** * Optional user-facing display name. Null falls back to the original file name. */ displayName: string | null; /** * MIME type detected server-side from the uploaded bytes. */ mimeType: string; /** * Size of the uploaded object in bytes. */ sizeBytes: number; /** * User who uploaded the file. Null for system-uploaded files. */ createdById: string | null; /** * Timestamp when the file was uploaded (ISO-8601, UTC). */ createdAt: string; /** * Short-lived signed URL for download or preview. */ downloadUrl: string; }>; }; /** * Request body that finalizes a batch of direct-to-object-storage uploads into file records on the environment. */ export type FinalizeUploadRequestDto = { /** * Uploaded objects to finalize; must come from a previously-issued signed upload batch. */ files: Array<{ /** * Object-storage path returned from the signed-upload request. */ objectPath: string; }>; }; /** * One submitted answer payload for a form version, attached to a specific problem version. */ export type FormAnswerDto = { /** * Stable form-answer identifier (UUID). One submitted answer payload. */ id: string; /** * Form version this answer payload validates against. */ formVersionId: string; /** * User who submitted this answer payload. */ createdByUserId: string; /** * Problem version this answer is attached to. */ problemVersionId: string; /** * Submitted answer payload, keyed by form field name. */ answers: { [key: string]: unknown; }; /** * Timestamp when the answer was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the answer was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Response listing form answers submitted against a form version. */ export type FormAnswerListResponseDto = { /** * Form answers submitted against the requested scope. */ answers: Array<{ /** * Stable form-answer identifier (UUID). One submitted answer payload. */ id: string; /** * Form version this answer payload validates against. */ formVersionId: string; /** * User who submitted this answer payload. */ createdByUserId: string; /** * Problem version this answer is attached to. */ problemVersionId: string; /** * Submitted answer payload, keyed by form field name. */ answers: { [key: string]: unknown; }; /** * Timestamp when the answer was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the answer was last updated (ISO-8601, UTC). */ updatedAt: string; }>; }; /** * A versioned structured-input form, attached to an environment or specific problem. */ export type FormDto = { /** * Stable form identifier (UUID). Forms are versioned structured-input schemas. */ id: string; /** * Human-readable title for the bundle, surfaced in org catalog and picker UIs. Null when the bundle has not been named yet. */ title: string | null; /** * Timestamp when the form was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the form was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Conflict returned when deleting the only remaining version of a form. */ export type FormLastVersionErrorDto = { /** * Machine-readable discriminator for an attempt to delete the final form version. */ code: 'form_last_version'; /** * Human-readable explanation that the final form version cannot be deleted. */ message: string; /** * Optional structured context about the form whose final version would be deleted. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Conflict returned when a locked problem version cannot accept form answers. */ export type FormProblemVersionLockedErrorDto = { /** * Machine-readable discriminator for a locked problem version. */ code: 'form_problem_version_locked'; /** * Human-readable explanation that the locked problem version rejects form answers. */ message: string; /** * Optional structured context about the locked problem version. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Conflict returned when environment or problem attachments still reference the form. */ export type FormStillReferencedBodyDto = { /** * Machine-readable error discriminator for the conflict. */ code: 'form_still_referenced'; /** * Human-readable explanation with the recovery action. */ message: string; /** * Environment and problem identifiers that must release the form before it can be detached. */ details: { /** * Identifiers of environments that still reference the form bundle. */ environmentIds: Array; /** * Identifiers of problems that still reference the form bundle. */ problemIds: Array; }; }; /** * Conflict returned when an operation requires a draft form version. */ export type FormVersionAlreadyPublishedErrorDto = { /** * Machine-readable discriminator for an already-published form version. */ code: 'form_version_already_published'; /** * Human-readable explanation that the form version is already published. */ message: string; /** * Optional structured context about the already-published form version. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * One version of a form. Versions follow a draft to published lifecycle and answers are tied to a specific version. */ export type FormVersionDto = { /** * Stable form-version identifier (UUID). */ id: string; /** * Parent form this version belongs to. */ formId: string; /** * Monotonically increasing version number, starting at 1 for the first version. */ versionNumber: number; /** * Field schema and UI hints captured by this version. */ schema: { /** * JSON Schema describing the form fields. */ data: { [key: string]: unknown; }; /** * UI schema controlling presentation of the form fields. */ ui: { [key: string]: unknown; }; }; /** * Timestamp when this version was published (ISO-8601, UTC). Null for drafts. */ publishedAt: string | null; /** * User who published this version; null for drafts that have not yet been published. */ publishedByUserId: string | null; /** * User who last edited this version. */ updatedByUserId: string; /** * Timestamp when this version was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when this version was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Conflict returned when answers target a form version that is not published. */ export type FormVersionNotPublishedErrorDto = { /** * Machine-readable discriminator for an unpublished form version. */ code: 'form_version_not_published'; /** * Human-readable explanation that answers require a published form version. */ message: string; /** * Optional structured context about the unpublished form version. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Response returned when creating a form alongside its first version in a single call. */ export type FormWithInitialVersionResponseDto = { /** * The created form. */ form: { /** * Stable form identifier (UUID). Forms are versioned structured-input schemas. */ id: string; /** * Human-readable title for the bundle, surfaced in org catalog and picker UIs. Null when the bundle has not been named yet. */ title: string | null; /** * Timestamp when the form was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the form was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * The initial version associated with the form. */ version: { /** * Stable form-version identifier (UUID). */ id: string; /** * Parent form this version belongs to. */ formId: string; /** * Monotonically increasing version number, starting at 1 for the first version. */ versionNumber: number; /** * Field schema and UI hints captured by this version. */ schema: { /** * JSON Schema describing the form fields. */ data: { [key: string]: unknown; }; /** * UI schema controlling presentation of the form fields. */ ui: { [key: string]: unknown; }; }; /** * Timestamp when this version was published (ISO-8601, UTC). Null for drafts. */ publishedAt: string | null; /** * User who published this version; null for drafts that have not yet been published. */ publishedByUserId: string | null; /** * User who last edited this version. */ updatedByUserId: string; /** * Timestamp when this version was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when this version was last updated (ISO-8601, UTC). */ updatedAt: string; }; }; /** * Response bundling a form with the full list of its versions. */ export type FormWithVersionsResponseDto = { /** * The form metadata. */ form: { /** * Stable form identifier (UUID). Forms are versioned structured-input schemas. */ id: string; /** * Human-readable title for the bundle, surfaced in org catalog and picker UIs. Null when the bundle has not been named yet. */ title: string | null; /** * Timestamp when the form was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the form was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * All versions of the form, ordered by creation time. */ versions: Array<{ /** * Stable form-version identifier (UUID). */ id: string; /** * Parent form this version belongs to. */ formId: string; /** * Monotonically increasing version number, starting at 1 for the first version. */ versionNumber: number; /** * Field schema and UI hints captured by this version. */ schema: { /** * JSON Schema describing the form fields. */ data: { [key: string]: unknown; }; /** * UI schema controlling presentation of the form fields. */ ui: { [key: string]: unknown; }; }; /** * Timestamp when this version was published (ISO-8601, UTC). Null for drafts. */ publishedAt: string | null; /** * User who published this version; null for drafts that have not yet been published. */ publishedByUserId: string | null; /** * User who last edited this version. */ updatedByUserId: string; /** * Timestamp when this version was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when this version was last updated (ISO-8601, UTC). */ updatedAt: string; }>; }; /** * Response payload from the LLM title-suggestion endpoint. */ export type GenerateTitleResponseDto = { /** * Suggested title for the problem produced by the LLM. Null when no suggestion could be generated. */ suggestion: string | null; }; /** * A provisioned per-Aligner Forgejo repo claim: clone URL, default branch, and a push token. */ export type GitRepoClaimDto = { /** * HTTP(S) clone URL for the claimed repo. */ cloneUrl: string; /** * The repo's default branch name. */ defaultBranch: string; /** * Forgejo access token for this claim's Aligner user, granting write access to every repo that user owns. Does not expire by default; a later claim by the same Aligner rotates it, invalidating this value. Returned once; not stored. */ pushToken: string; }; /** * Superseded grades for a problem run, most recent re-grade first. */ export type GradeHistoryResponseDto = { /** * Items in this page, ordered per the requested sort. */ items: Array<{ /** * Identifier of the archived grade snapshot. */ id: string; /** * Aggregated final score of this superseded grade. */ finalScore: number | null; /** * When this grade finished grading (ISO-8601, UTC). */ gradedAt: string | null; /** * Aggregated grader justification of this superseded grade. */ justification: string | null; /** * Grader model recorded for this superseded grade, or null. */ gradingModelName: string | null; /** * When this grade was superseded by a re-grade (ISO-8601, UTC). */ archivedAt: string; }>; /** * Cursor for fetching the next page, or null when this is the last page. */ nextCursor: string | null; /** * Total number of items matching the filter across all pages. */ total: number; }; /** * Recursive grading configuration tree for a problem version: a leaf strategy (none, rubric, agentic, programmatic, mcp_tool_call, compute_exec) or a composition group (weighted-sum, max) of further configs. Tree depth must be ≤ 3. */ export type GradingConfig = { /** * Discriminator: no grading is performed for this node. */ type: 'none'; } | { /** * Discriminator: grade by scoring against the problem’s rubric. */ type: 'rubric'; } | { /** * Discriminator: grade with an LLM judge using a custom prompt. */ type: 'agentic'; /** * Prompt sent to the LLM judge to produce a score for the run. */ agenticGradingPrompt: string; } | { /** * Discriminator: grade by running a shell command inside a sandboxed container. */ type: 'programmatic'; /** * Shell command executed inside the grader container to produce a score. */ command: string; /** * Format the grader command writes to stdout, used to parse the score. */ outputFormat: 'json' | 'json_rubric' | 'junit'; /** * Custom grader container image; null/undefined uses the platform default image. */ graderImage?: string | null; } | { /** * Discriminator: grade by calling fixed read-only MCP tools and comparing outputs. */ type: 'mcp_tool_call'; /** * Read-only MCP tool calls to execute against the solver end-state (at least one). */ tools: Array<{ /** * Name of the MCP tool to call, as exposed by the harness mcpTools catalog. */ toolName: string; /** * Arguments passed to the tool, stored as an opaque JSON string (see comment). */ toolParams: string; }>; /** * Optional JSONPath into the captured tool output; the result is what gets compared. */ responsePath?: string; /** * Deterministic comparator applied to the (optionally response-path-extracted) MCP tool output against the expected value. */ comparator: 'exact_match' | 'contains' | 'regex' | 'between' | 'greater_than' | 'less_than' | 'greater_than_or_equal' | 'less_than_or_equal'; /** * Expected value the (response-path-extracted) tool output is compared against. */ expected: string; /** * MCP-verify grader image; required for grading (pre-filled from the solver run config grader image). No platform default — grading fails fast if unset. */ graderImage?: string | null; } | { /** * Discriminator: grade by executing a command against the solver’s persistent compute (no separate grader container). */ type: 'compute_exec'; /** * Command executed against the persistent compute to start grading. */ command: string; /** * Optional command polled repeatedly until the grade result is ready or failed. */ pollCommand?: string; /** * Format the grade command writes to the grade-output file, used to parse the score. */ outputFormat: 'json' | 'json_rubric' | 'junit'; /** * Files copied into the compute (at their mountPath) before the grade command runs. */ mounts?: Array<{ /** * Identifier of the already-uploaded platform file to mount. */ fileId: string; /** * Absolute container path the file is copied to on the compute before grading; must live under the run config's computeEnv.sharedMountDir (default /workspace/files) and outside the reserved /workspace/files/problem/ subtree. */ mountPath: string; }>; } | { /** * Discriminator: aggregate children as a weighted sum of their scores. */ type: 'weighted-sum'; /** * Child grading configs and weights (1–10 entries); weights produce a weighted average. */ children: Array; } | { /** * Discriminator: aggregate children by selecting the highest child score. */ type: 'max'; /** * Child grading configs (1–10 entries); child weights are ignored for max selection. */ children: Array; }; /** * A child entry in a composition group (weighted-sum or max), pairing a config with its weight. */ export type GradingConfigCompositionChild = { /** * Nested grading config; may itself be a composition. */ node: GradingConfig; /** * Relative weight of this child within its parent composition (between 0 and 1). */ weight: number; }; /** * Recursive grading configuration tree for a problem version: a leaf strategy (none, rubric, agentic, programmatic, mcp_tool_call, compute_exec) or a composition group (weighted-sum, max) of further configs. Tree depth must be ≤ 3. */ export type GradingConfigInput = { /** * Discriminator: no grading is performed for this node. */ type: 'none'; } | { /** * Discriminator: grade by scoring against the problem’s rubric. */ type: 'rubric'; } | { /** * Discriminator: grade with an LLM judge using a custom prompt. */ type: 'agentic'; /** * Prompt sent to the LLM judge to produce a score for the run. */ agenticGradingPrompt: string; } | { /** * Discriminator: grade by running a shell command inside a sandboxed container. */ type: 'programmatic'; /** * Shell command executed inside the grader container to produce a score. */ command: string; /** * Format the grader command writes to stdout, used to parse the score. */ outputFormat: 'json' | 'json_rubric' | 'junit'; /** * Custom grader container image; null/undefined uses the platform default image. */ graderImage?: string | null; } | { /** * Discriminator: grade by calling fixed read-only MCP tools and comparing outputs. */ type: 'mcp_tool_call'; /** * Read-only MCP tool calls to execute against the solver end-state (at least one). */ tools: Array<{ /** * Name of the MCP tool to call, as exposed by the harness mcpTools catalog. */ toolName: string; /** * Arguments passed to the tool, stored as an opaque JSON string (see comment). */ toolParams: string | { [key: string]: unknown; }; }>; /** * Optional JSONPath into the captured tool output; the result is what gets compared. */ responsePath?: string; /** * Deterministic comparator applied to the (optionally response-path-extracted) MCP tool output against the expected value. */ comparator: 'exact_match' | 'contains' | 'regex' | 'between' | 'greater_than' | 'less_than' | 'greater_than_or_equal' | 'less_than_or_equal'; /** * Expected value the (response-path-extracted) tool output is compared against. */ expected: string; /** * MCP-verify grader image; required for grading (pre-filled from the solver run config grader image). No platform default — grading fails fast if unset. */ graderImage?: string | null; } | { /** * Discriminator: grade by executing a command against the solver’s persistent compute (no separate grader container). */ type: 'compute_exec'; /** * Command executed against the persistent compute to start grading. */ command: string; /** * Optional command polled repeatedly until the grade result is ready or failed. */ pollCommand?: string; /** * Format the grade command writes to the grade-output file, used to parse the score. */ outputFormat: 'json' | 'json_rubric' | 'junit'; /** * Files copied into the compute (at their mountPath) before the grade command runs. */ mounts?: Array<{ /** * Identifier of the already-uploaded platform file to mount. */ fileId: string; /** * Absolute container path the file is copied to on the compute before grading; must live under the run config's computeEnv.sharedMountDir (default /workspace/files) and outside the reserved /workspace/files/problem/ subtree. */ mountPath: string; }>; } | { /** * Discriminator: aggregate children as a weighted sum of their scores. */ type: 'weighted-sum'; /** * Child grading configs and weights (1–10 entries); weights produce a weighted average. */ children: Array; } | { /** * Discriminator: aggregate children by selecting the highest child score. */ type: 'max'; /** * Child grading configs (1–10 entries); child weights are ignored for max selection. */ children: Array; }; /** * A child entry in a composition group (weighted-sum or max), pairing a config with its weight. */ export type GradingConfigInputCompositionChild = { /** * Nested grading config; may itself be a composition. */ node: GradingConfigInput; /** * Relative weight of this child within its parent composition (between 0 and 1). */ weight: number; }; /** * Array of grading sub-runs. */ export type GradingSubRunResponseArrayDto = Array<{ /** * Stable grading-run identifier (UUID). One grader execution producing rubric scores for a problem run. */ id: string; /** * Grading strategy executed by this sub-run. */ strategy: 'rubric' | 'agentic' | 'programmatic' | 'mcp_tool_call' | 'compute_exec'; /** * Weight of this sub-run when aggregating the overall score. A weight of zero marks the strategy as auxiliary, meaning it is evaluated but excluded from the final score. */ weight: number; /** * Current lifecycle status of the sub-run. */ status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled'; /** * Score produced by this sub-run, passed through faithfully from the grader with no domain limits (may be negative, e.g. a penalty). Null until completion. */ score: number | null; /** * Error message if the sub-run failed. Null on success or while still running. */ error: string | null; /** * Grader-authored justification for the score. Null for rubric sub-runs and for legacy data. */ justification: string | null; /** * True if a transcript was captured for this sub-run and can be fetched separately. */ hasTranscript: boolean; /** * Position of this sub-run within the grading-config tree (slash-delimited). Null for legacy sub-runs. */ nodePath: string | null; /** * Run-config-version that drove this grader sub-run, captured at INSERT time. Null when no binding hit. */ graderRunConfigVersionId: string | null; /** * Display name of the grader run-config. Non-null when the grader run-config-version id is non-null. */ graderRunConfigName: string | null; /** * Version number of the grader run-config-version, starting at one. Non-null when the grader run-config-version id is non-null. */ graderRunConfigVersionNumber: number | null; }>; /** * Response payload indicating whether a problem has any completed runs. */ export type HasCompletedRunResponseDto = { /** * True when the problem has at least one run that reached a terminal status. */ hasCompletedRun: boolean; }; /** * Healthy-branch response from the liveness endpoint, returned with HTTP 200. */ export type HealthOkResponseDto = { /** * Constant literal indicating the service is healthy. */ status: 'ok'; /** * Process uptime in seconds since the backend started. */ uptime: number; /** * Timestamp when the health check ran (ISO-8601, UTC). */ timestamp: string; /** * Database connectivity probe result. */ db: { /** * Constant literal indicating the database is reachable. */ status: 'ok'; /** * Round-trip latency of the database health probe, in milliseconds. */ latencyMs: number; }; }; /** * Detailed view of a runtime image including its compatible models. */ export type ImageDetailDto = { /** * Stable identifier for a runtime container image. */ id: string; /** * Human-readable name of the image shown in selection UIs. */ displayName: string; /** * Image version tag identifying the published build. */ version: string; /** * Fully-qualified default container image reference used when this image is selected. */ defaultImage: string; /** * Models compatible with this image. */ models: Array; }; /** * Response payload listing available runtime images. */ export type ImagesResponseDto = { /** * Image summaries available to the caller. */ images: Array<{ /** * Stable identifier for a runtime container image. */ id: string; /** * Human-readable name of the image shown in selection UIs. */ displayName: string; }>; }; /** * Effective platform import limits for the current environment, surfaced to the upload UI. */ export type ImportPlatformLimitsDto = { /** * Platform import-file ceiling in bytes derived from the import worker memory limit; null means no platform ceiling is available. */ maxImportFileSizeBytes: number | null; }; /** * An asynchronous import job and its progress, per-row errors, and lifecycle timestamps. */ export type ImportResponseDto = { /** * Stable import-job identifier (UUID). */ id: string; /** * Environment the import job targets. */ environmentId: string; /** * User who initiated the import. */ userId: string; /** * Current lifecycle status of the import job. */ status: 'pending' | 'processing' | 'completed' | 'completed_with_errors' | 'failed' | 'cancelled'; /** * Detected wire format of the uploaded archive. */ format: 'json' | 'tar.gz' | 'harbor'; /** * Whether this import assigns the archive's external IDs to the imported problems. */ assignExternalIds: boolean; /** * Total number of problems detected in the archive. */ totalProblems: number; /** * Problems the processor has finished examining so far. */ processedProblems: number; /** * Problems newly created in the environment by this import. */ createdProblems: number; /** * Problems skipped because they already existed and matched an existing row. */ skippedProblems: number; /** * Problems that failed to import. */ failedProblems: number; /** * Top-level failure reason when the job ended in a failed state; null otherwise. */ errorMessage: string | null; /** * Per-row errors and warnings captured during import. */ errors: Array<{ /** * External identifier of the problem the error is associated with. */ externalId: string; /** * Human-readable description of what went wrong for this row. */ message: string; /** * Severity of the entry; defaults to error when omitted by legacy producers. */ severity?: 'error' | 'warning'; }>; /** * Timestamp when the job started processing (ISO-8601, UTC); null while pending. */ startedAt: string | null; /** * Timestamp when the job reached a terminal state (ISO-8601, UTC); null until the job ends. */ completedAt: string | null; /** * Timestamp when the import job was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the import job row was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Array of import jobs. */ export type ImportResponseListDto = Array<{ /** * Stable import-job identifier (UUID). */ id: string; /** * Environment the import job targets. */ environmentId: string; /** * User who initiated the import. */ userId: string; /** * Current lifecycle status of the import job. */ status: 'pending' | 'processing' | 'completed' | 'completed_with_errors' | 'failed' | 'cancelled'; /** * Detected wire format of the uploaded archive. */ format: 'json' | 'tar.gz' | 'harbor'; /** * Whether this import assigns the archive's external IDs to the imported problems. */ assignExternalIds: boolean; /** * Total number of problems detected in the archive. */ totalProblems: number; /** * Problems the processor has finished examining so far. */ processedProblems: number; /** * Problems newly created in the environment by this import. */ createdProblems: number; /** * Problems skipped because they already existed and matched an existing row. */ skippedProblems: number; /** * Problems that failed to import. */ failedProblems: number; /** * Top-level failure reason when the job ended in a failed state; null otherwise. */ errorMessage: string | null; /** * Per-row errors and warnings captured during import. */ errors: Array<{ /** * External identifier of the problem the error is associated with. */ externalId: string; /** * Human-readable description of what went wrong for this row. */ message: string; /** * Severity of the entry; defaults to error when omitted by legacy producers. */ severity?: 'error' | 'warning'; }>; /** * Timestamp when the job started processing (ISO-8601, UTC); null while pending. */ startedAt: string | null; /** * Timestamp when the job reached a terminal state (ISO-8601, UTC); null until the job ends. */ completedAt: string | null; /** * Timestamp when the import job was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the import job row was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * Input for ingesting a file from a remote https URL: the backend streams it into storage and returns the (unattached) file. The caller attaches it to a draft run-config version in a separate step. */ export type IngestRunConfigFileFromUrlDto = { /** * Remote https URL the backend fetches and stores its own copy of. */ url: string; /** * Filename to store the fetched object as. Derived from the URL path when omitted. */ filename?: string; }; /** * Resolved scope-default lookup for the env-overview picker — what default would be inherited at this env (or at a specific problem beneath it) along with enough metadata to render an "inherited" label without a follow-up fetch. */ export type InheritedRunConfigDefaultDto = { /** * Locked version that would be inherited at this scope. */ runConfigVersionId: string; /** * Run-config identity that owns the inherited version. */ runConfigId: string; /** * Display name of the inherited run-config identity. */ runConfigName: string; /** * Version number of the inherited version. */ versionNumber: number; /** * Scope level the inherited default lives at. */ scopeLevel: 'problem' | 'env' | 'org' | 'system'; }; /** * Request body for initiating an import: declares filename and size and receives a signed upload URL the client uses to deliver bytes directly to object storage. */ export type InitiateImportBodyDto = { /** * Filename of the archive the caller intends to upload. */ filename: string; /** * Total size of the upload in bytes; the per-environment cap is enforced separately at the controller level. */ fileSizeBytes: number; /** * User-selected import format; when omitted, the format is detected from the file extension. */ format?: 'default' | 'harbor-basic'; /** * When true (also the default when omitted) imported problems keep the external IDs from the archive; when false they are imported without external IDs so they can be claimed later. */ assignExternalIds?: boolean; }; /** * Signed URL and metadata for initiating a GCS resumable upload session for the import archive. */ export type InitiateImportResponseDto = { /** * Identifier of the newly created import job. */ importId: string; /** * GCS resumable-upload signed URL. POST this URL with header x-goog-resumable: start to obtain a session URI, then PUT byte-range chunks against it using Content-Range headers. */ uploadUrl: string; /** * Content-Type to send on both the session-init POST and each chunk PUT. Must match what the backend signed or GCS rejects the upload. */ contentType: string; }; /** * A comment posted on an issue thread. */ export type IssueCommentDto = { /** * Stable issue-comment identifier (UUID). */ id: string; /** * Issue this comment belongs to. */ issueId: string; /** * User who wrote the comment. */ authorId: string; /** * Comment body, as authored. */ content: string; /** * Timestamp when the comment was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the comment was last edited (ISO-8601, UTC). */ updatedAt: string; }; /** * Cursor-paginated page of issue comments. */ export type IssueCommentPageDto = { /** * Items in this page, ordered per the requested sort. */ items: Array<{ /** * Stable issue-comment identifier (UUID). */ id: string; /** * Issue this comment belongs to. */ issueId: string; /** * User who wrote the comment. */ authorId: string; /** * Comment body, as authored. */ content: string; /** * Timestamp when the comment was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the comment was last edited (ISO-8601, UTC). */ updatedAt: string; }>; /** * Cursor for fetching the next page, or null when this is the last page. */ nextCursor: string | null; /** * Total number of items matching the filter across all pages. */ total: number; }; /** * An author-flagged note attached to a problem or one of its child entities. */ export type IssueDto = { /** * Stable issue identifier (UUID). Issues are author-flagged notes attached to a problem. */ id: string; /** * Stable problem identifier (UUID). */ problemId: string; /** * Optional child entity type the issue is anchored to. Null when the issue is attached to the problem itself. */ entityType: 'rubric' | null; /** * Identifier of the child entity the issue is anchored to. Null when no child entity is attached. */ entityId: string | null; /** * User who created the issue. Null for system-authored issues. */ createdById: string | null; /** * Markdown body of the issue. */ description: string; /** * Current lifecycle status of the issue. */ status: 'open' | 'closed'; /** * Timestamp when the issue was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the issue was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Array of issues. */ export type IssueListDto = Array<{ /** * Stable issue identifier (UUID). Issues are author-flagged notes attached to a problem. */ id: string; /** * Stable problem identifier (UUID). */ problemId: string; /** * Optional child entity type the issue is anchored to. Null when the issue is attached to the problem itself. */ entityType: 'rubric' | null; /** * Identifier of the child entity the issue is anchored to. Null when no child entity is attached. */ entityId: string | null; /** * User who created the issue. Null for system-authored issues. */ createdById: string | null; /** * Markdown body of the issue. */ description: string; /** * Current lifecycle status of the issue. */ status: 'open' | 'closed'; /** * Timestamp when the issue was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the issue was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * Cloud Run job executions for import and export jobs over a chosen time range. */ export type JobExecutionsResponseDto = { /** * Lookback window for monitoring queries. */ timeRange: '1h' | '6h' | '24h' | '7d'; /** * Whether an import job is configured on this platform. */ importJobConfigured: boolean; /** * Whether an export job is configured on this platform. */ exportJobConfigured: boolean; /** * True if the Cloud Run API returned more executions than the page size; some results may be missing. */ truncated?: boolean; /** * Job executions within the requested time range, newest first. */ executions: Array<{ /** * Full resource name of the execution (projects/…/executions/…). */ name: string; /** * Whether this execution belongs to the import or export job. */ jobType: 'import' | 'export'; /** * Resolved status of a Cloud Run job execution. */ status: 'running' | 'succeeded' | 'failed' | 'unknown'; /** * When the execution was created (ISO-8601 UTC). */ createTime: string; /** * When the execution started running (ISO-8601 UTC). */ startTime?: string; /** * When the execution finished (ISO-8601 UTC). */ completionTime?: string; }>; }; /** * Paginated list of jobs_v2 rows for a scope. */ export type JobV2ListResponseDto = { /** * Jobs_v2 rows on the current page. */ items: Array<{ /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ id: string; /** * Parent jobs_v2 id when this row was spawned as a child via a waiting_children result. Null for root jobs. */ parentJobId: string | null; /** * The user that created this job. Not a scope handle. */ userId: string; /** * Discriminator mapping to a registered strategy bundle (e.g. taiga_send, taiga_run_problem_version). */ type: string; /** * Optional human-readable label shown in lists. */ name: string | null; /** * Lifecycle state of a jobs_v2 row. Claimable: pending, waiting_external (gated by poll_after), aggregating. Parked: executing, waiting_children, cancelling. Terminal: completed, failed, cancelled. */ status: 'pending' | 'executing' | 'waiting_external' | 'waiting_children' | 'aggregating' | 'cancelling' | 'completed' | 'failed' | 'cancelled'; /** * Strategy-typed input. Validated against the per-type Zod schema at insert and dispatch. */ payload: unknown; /** * Live state across waiting_external poll cycles. Null for sync strategies and before the first poll. */ externalState: unknown | null; /** * Terminal output payload set when status transitions to completed. */ output: unknown | null; /** * Terminal error message set when status transitions to failed. */ errorMessage: string | null; /** * Budget units consumed by this row. Bumped by claimPending on each run claim, and by scheduleRetryInTrx on each poll/aggregate retry (i.e. when the strategy returns { kind: "retry" } from poll or onChildrenComplete). Normal poll/aggregate reclaims that did not return retry are not counted. */ attempts: number; /** * Retry budget. The row becomes terminally failed once attempts reaches this value. Default 1 (single attempt, no retry); raised per-type via registerJobType or per-row via the spawn spec. */ maxAttempts: number; /** * Earliest time this row is eligible to be claimed from status=pending. */ scheduledAt: string; /** * While status=waiting_external, earliest time the poll loop will invoke PollStrategy.poll. */ pollAfter: string | null; /** * Wall-clock timestamp the row first transitioned out of pending. Null until claimed. */ startedAt: string | null; /** * Wall-clock timestamp the row entered a terminal status. Null until terminal. */ completedAt: string | null; /** * Row creation timestamp. */ createdAt: string; /** * Row last-modified timestamp. */ updatedAt: string; /** * Environments this job is linked to (denormalized from environment_jobs). */ environmentIds?: Array; /** * Organizations this job is linked to (denormalized from organization_jobs). */ organizationIds?: Array; /** * Display names for the ids in organizationIds, keyed by organization id. Present only on platform-admin cross-organization reads. */ organizationNames?: { [key: string]: string; }; /** * Problems this job is linked to (denormalized from problem_jobs). */ problemIds?: Array; }>; /** * Opaque cursor for fetching the next page. Null when there are no more rows. */ nextCursor: string | null; /** * Total row count for the query when the backend chose to compute it. */ total?: number; }; /** * A background job tracked by the jobs_v2 framework. Scope ids are denormalized from the link tables for read convenience. */ export type JobV2ResponseDto = { /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ id: string; /** * Parent jobs_v2 id when this row was spawned as a child via a waiting_children result. Null for root jobs. */ parentJobId: string | null; /** * The user that created this job. Not a scope handle. */ userId: string; /** * Discriminator mapping to a registered strategy bundle (e.g. taiga_send, taiga_run_problem_version). */ type: string; /** * Optional human-readable label shown in lists. */ name: string | null; /** * Lifecycle state of a jobs_v2 row. Claimable: pending, waiting_external (gated by poll_after), aggregating. Parked: executing, waiting_children, cancelling. Terminal: completed, failed, cancelled. */ status: 'pending' | 'executing' | 'waiting_external' | 'waiting_children' | 'aggregating' | 'cancelling' | 'completed' | 'failed' | 'cancelled'; /** * Strategy-typed input. Validated against the per-type Zod schema at insert and dispatch. */ payload: unknown; /** * Live state across waiting_external poll cycles. Null for sync strategies and before the first poll. */ externalState: unknown | null; /** * Terminal output payload set when status transitions to completed. */ output: unknown | null; /** * Terminal error message set when status transitions to failed. */ errorMessage: string | null; /** * Budget units consumed by this row. Bumped by claimPending on each run claim, and by scheduleRetryInTrx on each poll/aggregate retry (i.e. when the strategy returns { kind: "retry" } from poll or onChildrenComplete). Normal poll/aggregate reclaims that did not return retry are not counted. */ attempts: number; /** * Retry budget. The row becomes terminally failed once attempts reaches this value. Default 1 (single attempt, no retry); raised per-type via registerJobType or per-row via the spawn spec. */ maxAttempts: number; /** * Earliest time this row is eligible to be claimed from status=pending. */ scheduledAt: string; /** * While status=waiting_external, earliest time the poll loop will invoke PollStrategy.poll. */ pollAfter: string | null; /** * Wall-clock timestamp the row first transitioned out of pending. Null until claimed. */ startedAt: string | null; /** * Wall-clock timestamp the row entered a terminal status. Null until terminal. */ completedAt: string | null; /** * Row creation timestamp. */ createdAt: string; /** * Row last-modified timestamp. */ updatedAt: string; /** * Environments this job is linked to (denormalized from environment_jobs). */ environmentIds?: Array; /** * Organizations this job is linked to (denormalized from organization_jobs). */ organizationIds?: Array; /** * Display names for the ids in organizationIds, keyed by organization id. Present only on platform-admin cross-organization reads. */ organizationNames?: { [key: string]: string; }; /** * Problems this job is linked to (denormalized from problem_jobs). */ problemIds?: Array; }; /** * Listing of files attached to an environment. */ export type ListEnvironmentFilesResponseDto = { /** * All environment-scoped files visible to the caller. */ files: Array<{ /** * Stable environment-file identifier (UUID). Files scoped to an environment (templates, shared assets). */ id: string; /** * Stable environment identifier (UUID). */ environmentId: string; /** * Category of this environment-scoped file. */ type: 'instructions' | 'agent-input'; /** * Original file name as uploaded by the client. */ fileName: string; /** * Optional user-facing display name. Null falls back to the original file name. */ displayName: string | null; /** * MIME type detected server-side from the uploaded bytes. */ mimeType: string; /** * Size of the uploaded object in bytes. */ sizeBytes: number; /** * User who uploaded the file. Null for system-uploaded files. */ createdById: string | null; /** * Timestamp when the file was uploaded (ISO-8601, UTC). */ createdAt: string; /** * Short-lived signed URL for download or preview. */ downloadUrl: string; }>; }; /** * One page of a run workspace directory listing under output/. */ export type ListWorkspaceEntriesResponseDto = { /** * Entries in this page, directories first then files, each sorted by name. */ items: Array<{ /** * Entry name within its parent directory. */ name: string; /** * Path of the entry relative to the run's output directory (e.g. core/report.md). */ path: string; /** * Whether the entry is a file or a directory. */ type: 'file' | 'directory'; /** * File size in bytes. Null for directories or when the size is unknown. */ sizeBytes: number | null; }>; /** * Cursor for fetching the next page, or null when this is the last page. */ nextCursor: string | null; /** * False when the live workspace can no longer be listed (retention window elapsed, run unknown, or the directory is gone). Items are empty in that case; fall back to the persisted output files. */ workspaceAvailable: boolean; /** * True when the directory holds more entries than the server-side listing buffer; entries beyond the buffer are not reachable through pagination. */ directoryTruncated: boolean; }; /** * Live transcript events together with the generation token of the run they came from. */ export type LiveTranscriptEnvelopeDto = { /** * Live transcript events, ordered by sequence ascending. */ events: Array<{ /** * Monotonically increasing sequence number assigned by the agent-service. */ sequence: number; /** * Category of the event: lifecycle markers (started, launched, done, error), stdio (stdout, stderr), structured event payloads (event), agent observations (observation), and setup/snapshot phases. */ event_type: 'started' | 'stdout' | 'stderr' | 'event' | 'observation' | 'process_exited' | 'snapshotting' | 'launched' | 'setup_started' | 'setup_completed' | 'input_delivered' | 'done' | 'error'; /** * Payload of the event; shape varies by event_type. */ data: { [key: string]: unknown; }; /** * Timestamp when the agent-service emitted the event (ISO-8601, UTC). */ created_at: string; }>; /** * Opaque token identifying the run the events came from. It changes when the run is resubmitted and sequences restart, so a client holding an after cursor should discard what it holds and re-read; null while the job has no run yet. */ generation: string | null; }; /** * Optional request body for locking a problem version. */ export type LockProblemVersionDto = { /** * Worldsim solver authoring payload (MCP servers, world effects, simulated time, CUA env-config). When present, it is persisted on the locked version; each run forks a per-version solver child from the solver the environment resolves at that time. */ worldsimSolver?: { /** * ISO-8601 simulated wall-clock time for the run (WORLDSIM_SIMULATED_TIME). Null uses real time. */ simulatedTime: string | null; /** * Selected MCP service keys. Unless inheritSolverMcpTools is true, their tools form the mcp-tools.yaml allowlist, and an empty selection allows no tools. */ mcpServers: Array; /** * When true, each run keeps the resolved solver's own MCP tool allowlist (the tools file its WORLDSIM_MCP_TOOLS_FILE names, set on the run config or baked into the runner image, or every tool when it has none) and mcpServers is ignored. */ inheritSolverMcpTools?: boolean; /** * Ordered list of startup MCP tool calls, as an opaque JSON string (a StartupCall[]). Duplicate tools are allowed (e.g. create five users). The calls run through the run's MCP tool allowlist, so unless inheritSolverMcpTools is true each call's tool must come from a server in mcpServers. */ worldEffects: string | Array | { [key: string]: unknown; }; /** * Runtime environment type (mcp or computer). Maps to CUA_ENVIRONMENT_TYPE. */ envType?: 'mcp' | 'computer'; /** * Computer-use desktop flavor (chrome or full_desktop). Only meaningful when envType is "computer". Maps to CUA_DESKTOP_TYPE. */ desktopType?: 'chrome' | 'full_desktop'; /** * Whether the run may call the API. Maps to CUA_API_ALLOWED. */ apiAllowed?: boolean; /** * Whether the run may use the browser API. Maps to CUA_ALLOW_BROWSER_API. */ allowBrowserApi?: boolean; /** * Free-text system instructions for the Worldsim harness in MCP or Computer environments. Maps to CUA_SYSTEM_INSTRUCTIONS. Supersedes cuaSystemInstructions. */ systemInstructions?: string; /** * Deprecated: use systemInstructions. Retained for locked-version compatibility. Maps to CUA_SYSTEM_INSTRUCTIONS. * * @deprecated */ cuaSystemInstructions?: string; }; }; /** * One accelerator model this deployment is configured to offer, listed regardless of live provider availability, with whatever provider quota and capacity evidence is currently known. Deployment capability, identical for every organization; nothing here provisions or reserves compute. */ export type ManagedAgentsAcceleratorCatalogEntry = { /** * Human-readable model label. */ display_name: string; /** * Canonical provider-neutral model stored on environments, e.g. a100, l4, or t4. */ name: string; /** * Provider evidence; empty means unknown, not unavailable. */ providers: Array | null; /** * Nominal per-accelerator memory in vendor-quoted gigabytes. */ vram_gb?: number; }; /** * One provider's evidence for an accelerator model, kept in separate signals: quota is an administrative ceiling, warm slots are scheduler telemetry, and a recent launch is historical. None of them is physical GPU stock; only allocation proves that. */ export type ManagedAgentsAcceleratorProviderEvidence = { /** * fresh_count, advisory, or probe_on_launch. probe_on_launch means physical capacity is proven only by allocation. */ capacity_confidence: string; /** * When quota or scheduler telemetry was observed. */ observed_at?: string; /** * Configured or reporting compute provider. */ provider: string; /** * quota_limit minus quota_usage when both are known. Administrative headroom only. */ quota_headroom?: number; /** * Provider quota limit. Absent means unknown. Positive headroom does not prove physical capacity. */ quota_limit?: number; /** * Current provider quota allocation usage. Absent means unknown. This is not physical GPU stock. */ quota_usage?: number; /** * Most recent successful launch known to this deployment. Historical evidence only. */ recent_launch_at?: string; /** * Provider region this evidence covers. Empty when configuration is provider-wide. */ region?: string; /** * Whether live provider telemetry is known to be stale. */ telemetry_stale: boolean; /** * Warm GPU slots upstream reports allocatable now. Absent means unreported; zero is a measured zero. */ warm_allocatable_slots?: number; }; /** * Public, credential-free state of a browser handoff that is awaiting a person, currently driven by one, or being resolved back to the agent. */ export type ManagedAgentsActiveHandoff = { /** * Latest time the current display access remains usable; never later than deadline_at. */ access_expires_at?: string; /** * When the handoff automatically expires and the agent resumes. */ deadline_at: string; /** * Stable identifier for this browser handoff. */ handoff_id: string; /** * Why the agent asked a person to take over the shared browser. */ reason: string; /** * When the agent requested the handoff. */ requested_at: string; /** * Whether nobody has opened access yet, one person currently owns the display, or hand-back/deadline resolution is being delivered. */ state: 'awaiting_user' | 'user_driving' | 'resolved'; /** * Resolution cause once resolved: user_handed_back, deadline_elapsed, cancelled, or interrupted. */ wake_cause?: string; }; /** * Request body for attaching files to a running session. The files are staged into the sandbox on the session's next tool call and are visible to the agent from its next turn. */ export type ManagedAgentsAddSessionResourcesRequest = { /** * Files to attach. All-or-nothing: one unknown file_id or one path collision refuses the whole batch and attaches nothing. */ resources?: Array | null; }; /** * A configured agent: its versioned execution definition plus current mutable classification tags. Publishing the execution definition mints a new immutable AgentVersion; applying tags does not. A session records the version it ran and never snapshots tags. */ export type ManagedAgentsAgent = { /** * Server-assigned id of the agent, used in the agent, agent-version, and session routes. */ agent_id: string; /** * Built-in integrations this agent may use, each naming an active organization connection an admin added on the Integrations page. Sessions receive short-lived access restricted to exactly those apps and each connection's tool allow-list. Not a vault grant: nothing about these appears under credential access. A version write carries the list in full: omitting it publishes a version with none. */ built_in_integrations?: Array; /** * Server-assigned RFC 3339 timestamp of when the agent was created. */ created_at: string; /** * Narrows the default vaults to individual credentials. Every credential is selected when a vault is first added, and may then be unchecked. */ default_credential_refs: Array | null; /** * Labelbox project copied into new sessions when their create request omits project_id. A non-empty session project_id overrides it. Carried in full on every version write: omitting it publishes a version with no default. */ default_project_id?: string; /** * Markdown rubric that sessions started from this agent are graded against when their create request omits an outcome. A session that supplies its own outcome ignores this entirely. Carried in full on every version write: omitting it publishes a version with no rubric. */ default_rubric?: string; /** * Vaults whose credentials are copied into a new session when its create request omits vault_ids. Sending an explicit empty list on the session still overrides these. */ default_vault_ids: Array | null; /** * Free-text note about what this agent is for. */ description?: string; /** * Native integration providers whose MCP tools new sessions of this agent do not receive, even though the grant is present. The grant still authenticates the provider's sandbox tools where it has any (git and gh for GitHub). Suppresses integration-derived servers only, never the agent's own mcp_servers. New agents decline github by default when the field is omitted on create (JSON null counts as omitted); send an explicit [] on create to receive every provider's MCP tools. A version write carries the list in full: omitting it publishes a version with none. */ disabled_integration_mcp_providers: Array | null; /** * Server-maintained id of the newest version of this agent; sessions started without an explicit version use it. */ latest_agent_version_id?: string; /** * Maximum number of this agent's root sessions that may run or wait on compute at once. Omit for unlimited. Sessions beyond the cap are accepted with execution_state=queued and wait until a slot frees; child/subagent sessions do not count. Carried in full on every version write: omitting it publishes a version with no cap. */ max_concurrent_sessions?: number; /** * Remote MCP servers to attach. Each entry is an object with name (the label the server's tools are grouped under) and url (its http/https endpoint); any further keys are passed to the runtime unchanged. Credentials come from the vaults granted to the session, not from this entry. Tools are discovered and snapshotted at session start. */ mcp_servers: Array<{ [key: string]: unknown; }> | null; /** * Caller-owned key/value data stored with the agent and returned unchanged. */ metadata?: { [key: string]: unknown; }; /** * Model the agent runs on. Pass a model id exactly as the models catalog (GET /v1/models) lists it, e.g. anthropic/claude-sonnet-4-5; reads return the stored form, which adds a provider prefix before that id. An explicitly provider-qualified string such as anthropic:claude-sonnet-4-5 selects that provider directly and is left as written. An id the catalog does not list is rejected here, not at the session's first turn. */ model: string; /** * Default inference settings applied to every turn unless a session overrides them. */ model_config: ManagedAgentsInferenceConfig; /** * Multi-agent orchestration settings, such as subagent definitions and delegation limits. */ multiagent?: { [key: string]: unknown; }; /** * Human-readable label shown wherever agents are listed. Not required to be unique. */ name: string; /** * Native connections this agent may use, with provider-enforced permission and resource restrictions. Omit or send [] for none. Stored in full on each agent version; secrets remain on the connection. */ nativeIntegrations?: Array; /** * Organization that owns the agent. Server-assigned from the caller's credentials; a value sent in a request body is ignored. */ organization_id: string; /** * Skill packages loaded into the agent's runtime, each an entry with the skill reference and its metadata. */ skills: Array<{ [key: string]: unknown; }> | null; /** * System prompt prepended to every conversation this agent runs. */ system: string; /** * Current organization-scoped classification tags applied to this agent. Always an array. Tags are mutable catalog metadata and are deliberately absent from AgentVersion and session runtime snapshots. */ tags: Array; /** * The bare evaluation marker, when this is an evaluator agent. Historical stored agents may contain ignored declarations, omitted from current API responses. Built-in sandbox tools need no marker. */ toolsets: Array<{ /** * The evaluation marker is the only supported toolset type. */ type: 'evaluation'; }> | null; /** * Server-assigned RFC 3339 timestamp of the most recent update to the agent. */ updated_at: string; /** * Whether new sessions may use the native web_search tool. Omitted on legacy agents and interpreted as enabled. */ web_search_enabled?: boolean; }; /** * Response body of GET /v1/agents. Unpaginated: the whole organization is returned in one document, so callers need no cursor here. Each row is the agent's current mutable definition; its immutable snapshots are listed by GET /v1/agents/{agent_id}/versions. */ export type ManagedAgentsAgentListResponse = { /** * Every agent in the caller's organization, newest first. Null rather than an empty array when the organization has no agents. Soft-deleted agents are omitted. */ agents: Array | null; }; /** * A searchable page of an agent's current memories. */ export type ManagedAgentsAgentMemoriesPage = { /** * Current memories matching the query, without full content. */ memories: Array; /** * Opaque cursor for the next page; absent on the final page. */ next_cursor?: string; /** * Topics from the entire current collection, independent of search and pagination. */ topics: Array; }; /** * Current memory and learning status across the organization's agents. */ export type ManagedAgentsAgentMemoryListResponse = { /** * Memory summary for every customer agent in the calling organization, including empty collections. */ agents: Array; }; /** * One agent's living memory collection and automatic learning progress. */ export type ManagedAgentsAgentMemorySummary = { /** * Agent whose sessions contribute to this memory. */ agent_id: string; /** * Current display name of the agent. */ agent_name: string; /** * Resolved memory model, inherited from this agent unless overridden. */ effective_model: string; /** * Sessions whose extraction failed permanently and will not be retried automatically. */ failed_session_count: number; /** * Most recent successful automatic memory update, including checks that changed nothing. */ last_checked_at?: string; /** * Most recent change to current memory content. */ last_updated_at?: string; /** * Number of current memories available for recall. */ memory_count: number; /** * Explicit model override; absent means same as agent. */ memory_model_ref?: string; /** * Permanent collection id; absent before its first session starts. */ memory_store_id?: string; /** * Earliest next retry after a failed learning run. */ next_retry_at?: string; /** * Useful session reports waiting to be incorporated. */ pending_session_count: number; /** * Committed collection revision, increased by each applied update. */ revision: number; /** * Whether memory is waiting for evidence, current, updating, or retrying after a failure. */ state: 'waiting' | 'idle' | 'updating' | 'delayed'; /** * Total bytes of current memory content. */ total_bytes: number; }; /** * One target-agent row with overall and aligned criterion metrics plus newest failures. */ export type ManagedAgentsAgentRow = { /** * Metrics aligned positionally with criterion_columns; null marks no observations for that key. */ criterion_metrics: Array; /** * Immutable evaluation snapshots for this target agent in the current window. */ evaluation_count: number; /** * Up to three newest failing evaluations for this target agent. */ newest_failures: Array; /** * Overall current and prior pass metric for this target agent. */ overall_pass: ManagedAgentsVerdictMetric; /** * Target agent represented by this Overview table row. */ target_agent_id: string; }; /** * Request body for creating an agent: its system prompt, model, tool surface, and default vault grants. Sessions snapshot the agent version at start, so later edits do not change a running session. */ export type ManagedAgentsAgentTemplateDefinition = { /** * Built-in integrations this agent may use, each naming an active organization connection an admin added on the Integrations page. Sessions receive short-lived access restricted to exactly those apps and each connection's tool allow-list; nothing is granted through a vault. Omit or send [] for none. Carried in full on every version write. */ built_in_integrations?: Array; /** * Individual default items within default_vault_ids. The list is a whitelist across every default vault, not a filter within one, so it must name every item the agent should receive. Omit to select every current item; [] alongside a non-empty default_vault_ids is rejected because it would select none. */ default_credential_refs?: Array; /** * Labelbox project copied into sessions started from this agent when their create request omits project_id. A non-empty session project_id overrides it. */ default_project_id?: string; /** * Markdown rubric that sessions started from this agent are graded against when their create request omits an outcome. Must contain at least one gradeable criterion, written as markdown list items. A session that supplies its own outcome ignores this entirely. */ default_rubric?: string; /** * Vaults granted by default when a session create request omits vault_ids. default_credential_refs may narrow their items. */ default_vault_ids?: Array; /** * Optional free-text note about what the agent is for. Not sent to the model. */ description?: string; /** * Native integration providers whose MCP tools sessions of this agent do not receive even though the grant is present. The grant still authenticates the provider's sandbox tools where it has any (git and gh for GitHub); the agent's own mcp_servers are never affected. Omission differs by operation: on createAgent it defaults to ["github"] (new agents use gh and git in the sandbox); on createAgentVersion it means none, as for every other field there; send [] to receive every provider's MCP tools. */ disabled_integration_mcp_providers?: Array; /** * Maximum number of this agent's root sessions that may run or wait on compute at once. Omit for unlimited. Sessions beyond the cap are accepted with execution_state=queued and wait until a slot frees. */ max_concurrent_sessions?: number; /** * Remote MCP servers whose tools are added to the agent's tool surface. Each entry is an object with name and url, e.g. {"name": "docs", "url": "https://example.com/mcp"}. Credentials come from the vaults granted to the session, and the discovered tool list is snapshotted at session start, so a later edit here does not change a running session. */ mcp_servers?: Array<{ [key: string]: unknown; }>; /** * Free-form caller-owned JSON stored with the agent and returned on reads. Not interpreted by the service and never sent to the model. */ metadata?: { [key: string]: unknown; }; /** * Model id, copied verbatim from the models catalog, GET /v1/models (e.g. anthropic/claude-sonnet-4-5). Reads return the stored form, which adds a provider prefix before that id. An id the catalog does not list is rejected with the list of ids that it does. */ model: string; /** * Default inference config applied to sessions started from this agent. Omit model_config or send {} to use provider defaults; null is invalid. reasoning_effort is normalized and validated for direct providers, and must exactly match the selected catalog model's supportedReasoningEfforts. An unsupported value, including any value for a catalog model that lists no exact options, returns 400; a model catalog that cannot be read to verify it returns 503. */ model_config: ManagedAgentsInferenceConfig; /** * Multiagent roster: the delegation targets this agent may hand work to, an optional advisor entry, and the interventionist posture. Snapshotted at session start; a child roster may tighten the recursion depth ceiling, never widen it. */ multiagent?: { [key: string]: unknown; }; /** * Human-readable label for the agent. Required. */ name: string; /** * Native connections this agent may use, with provider-enforced permission and resource restrictions. Omit or send [] for none. Stored in full on each agent version; secrets remain on the connection. */ nativeIntegrations?: Array; /** * Skill declarations made available to the agent, passed through as given and snapshotted into the session at start. Capped at the 100 skills a session can carry. */ skills?: Array<{ [key: string]: unknown; }>; /** * System prompt for the agent. */ system: string; /** * Deprecated alias for toolsets; accepts only the bare evaluation marker. * * @deprecated */ tools?: Array<{ /** * The evaluation marker is the only supported toolset type. */ type: 'evaluation'; }>; /** * Only the bare {type: evaluation} marker is supported, for evaluator agents. Omit or send [] for ordinary agents; built-in sandbox tools, MCP servers, and skills do not require a toolset. The tools field is a deprecated alias. */ toolsets?: Array<{ /** * The evaluation marker is the only supported toolset type. */ type: 'evaluation'; }>; /** * Whether sessions started from this agent may use the native web_search tool. Omit to enable it. The setting is snapshotted when a session starts. */ web_search_enabled?: boolean; }; /** * Response body of GET /v1/agent-templates: the static startup-validated agent template catalog. */ export type ManagedAgentsAgentTemplateListResponse = { /** * Stable evaluation-agent templates sorted by template_id. Definitions are ordinary createAgent request bodies copied into the create form; reading this catalog never creates or mutates an agent. */ agent_templates: Array; }; /** * An immutable snapshot of an agent's configuration, minted on every update. Sessions reference a version rather than the agent, so a running session's behaviour cannot change under it. */ export type ManagedAgentsAgentVersion = { /** * Agent this version belongs to (UUID). */ agent_id: string; /** * Identifier for this agent version (UUID). Server-assigned. Pass it when starting a session that must run a specific version. */ agent_version_id: string; /** * Built-in integrations sessions started from this version may use, each naming an organization connection an admin added. Snapshotted with the version. */ built_in_integrations?: Array; /** * RFC 3339 timestamp of when this record was created. Server-assigned. */ created_at: string; /** * User who made the edit that produced this version, for audit. Empty when the version was created by an automated caller. */ created_by?: string; /** * Narrows this version's default vaults to individual credentials. */ default_credential_refs: Array | null; /** * Labelbox project copied into sessions started from this version when their create request omits project_id. A non-empty session project_id overrides it. */ default_project_id?: string; /** * Markdown rubric that sessions started from this version are graded against when their create request omits an outcome. A session that supplies its own outcome ignores this entirely. */ default_rubric?: string; /** * Vaults whose credentials are copied into a new session started from this version when the create request omits vault_ids. */ default_vault_ids: Array | null; /** * The agent's free-text note as it stood at this version. */ description?: string; /** * Native integration providers whose MCP tools sessions started from this version do not receive. The grant and its sandbox credentials are unaffected. */ disabled_integration_mcp_providers: Array | null; /** * Maximum concurrent root sessions configured on the agent when this version was minted. Unset means unlimited. Live admission uses the agent head's current value, not this snapshot. */ max_concurrent_sessions?: number; /** * Remote MCP servers attached at this version. Each entry is an object with name and url (http/https); further keys pass to the runtime unchanged. Credentials come from the session's granted vaults. */ mcp_servers: Array<{ [key: string]: unknown; }> | null; /** * Free-form caller-supplied key/value labels. Stored verbatim and never interpreted by the service. */ metadata?: { [key: string]: unknown; }; /** * Model this version runs on, in the same form as an agent's model: a models-catalog id such as anthropic/claude-sonnet-4-5, returned in its stored form with a provider prefix added. */ model?: string; /** * Default inference settings this version applies to every turn unless a session overrides them. */ model_config: ManagedAgentsInferenceConfig; /** * Multi-agent orchestration settings at this version, such as subagent definitions and delegation limits. */ multiagent?: { [key: string]: unknown; }; /** * The agent's human-readable label as it stood at this version. */ name: string; /** * Native connections this agent may use, with provider-enforced permission and resource restrictions. Omit or send [] for none. Stored in full on each agent version; secrets remain on the connection. */ nativeIntegrations?: Array; /** * Organization that owns this record. Resolved from the API key; never accepted from the caller. */ organization_id: string; /** * Skill packages loaded into the runtime at this version, each an entry with the skill reference and its metadata. */ skills: Array<{ [key: string]: unknown; }> | null; /** * System prompt this version prepends to every conversation. */ system: string; /** * The bare evaluation marker, when this is an evaluator version. Historical stored versions may contain ignored declarations, omitted from current API responses. Built-in sandbox tools need no marker. */ toolsets: Array<{ /** * The evaluation marker is the only supported toolset type. */ type: 'evaluation'; }> | null; /** * Monotonically increasing version counter within the agent, starting at 1. Server-assigned. */ version_number: number; /** * Whether sessions created from this version may use the native web_search tool. Omitted on legacy versions and interpreted as enabled. */ web_search_enabled?: boolean; }; /** * Response body of GET /v1/agents/{agent_id}/versions. Scoped to the one agent in the path, so an empty list means that agent has no versions yet, not that no agents exist. Versions are immutable snapshots: pin one to make a session reproducible. */ export type ManagedAgentsAgentVersionListResponse = { /** * Every published version of the requested agent, newest first. Null rather than an empty array when the agent exists but has never been versioned. */ agent_versions: Array | null; }; /** * One dimension's groups for the requested window. Which dimensions appear is chosen by the family and the scope: a tenant or global read leads with workspace, since that is the question the narrower groupings cannot answer. */ export type ManagedAgentsAnalyticsBreakdown = { /** * Dimension these rows are grouped by, e.g. tool_name, executing_agent_id, model, sandbox_provider, or compute_class. */ dimension: string; /** * Groups ordered by the family's ranking measure, descending, capped by limit. */ rows: Array | null; }; /** * Aggregated analytics measures for one window, group, or time bucket. Counters and sums are exact; p50_ms, p90_ms and p95_ms are approximate, derived from a histogram so they can be combined across time buckets and groups. */ export type ManagedAgentsAnalyticsBreakdownRow = { /** * Prompt tokens served from the provider's cache. */ cache_read_tokens: number; /** * Prompt tokens written into the provider's cache. */ cache_write_tokens: number; /** * Immutable criterion verdict facts in the quality family. */ criterion_count?: number; /** * Quality criterion verdicts that are fail. */ criterion_fail_count?: number; /** * Quality criterion verdicts that are not applicable. */ criterion_not_applicable_count?: number; /** * Quality criterion verdicts that are pass. */ criterion_pass_count?: number; /** * Passed criteria divided by passed plus failed criteria. Null when that denominator is zero. */ criterion_pass_rate?: number | null; /** * How many measurements the percentiles below were derived from. Compare with tool_calls or environment_starts to see the coverage. */ duration_samples: number; /** * Environment startups that failed or were cancelled before the sandbox ran. */ environment_failed: number; /** * Environment startups that reached a running sandbox. */ environment_ready: number; /** * Sandbox environment startups observed, including those still in progress. */ environment_starts: number; /** * Summed time from the first provisioning transition to the first running transition, in milliseconds, over successful startups only. */ environment_startup_ms: number; /** * Immutable evaluation snapshots in the quality family. */ evaluation_count?: number; /** * Quality evaluations whose parent verdict is fail. */ evaluation_fail_count?: number; /** * Quality evaluations whose parent verdict is not applicable. */ evaluation_not_applicable_count?: number; /** * Quality evaluations whose parent verdict is pass. */ evaluation_pass_count?: number; /** * Passed evaluations divided by passed plus failed evaluations. Null when that denominator is zero. */ evaluation_pass_rate?: number | null; /** * Units of work recorded: every tool call, model call, and environment startup. */ event_count: number; /** * Prompt tokens billed in the window. */ input_tokens: number; /** * Human-readable name for value, resolved when the request is served. Present for identifier dimensions (agent, agent version, environment); absent for dimensions that are already readable, and for an identifier whose subject has since been deleted. */ label?: string; /** * Distinct model inference calls. A response persisted across several events is charged once. */ model_calls: number; /** * Model spend in micro-USD (1,000,000 = 1 USD). */ model_cost_micros: number; /** * Completion tokens billed in the window. */ output_tokens: number; /** * Approximate median duration in milliseconds, interpolated within a fixed histogram bucket. Absent when nothing in the window reported a duration. */ p50_ms?: number; /** * Approximate 90th percentile duration in milliseconds, interpolated within a fixed histogram bucket. Absent when nothing in the window reported a duration. */ p90_ms?: number; /** * Approximate 95th percentile duration in milliseconds, interpolated within a fixed histogram bucket. Absent when nothing in the window reported a duration. */ p95_ms?: number; /** * Sum of creation-to-first-recorded-successful-completion durations in milliseconds. Divide by sessions for the mean in the completion family. Earlier sessions without a recorded completion milestone are excluded. */ session_completion_ms?: number; /** * For managed_agent_completion: root sessions with a first recorded successful completion in the window, bucketed by completion time. For other families: sessions counted once in the bucket they started in. */ sessions: number; /** * Tool invocations in the window. A call is counted once, in the bucket it started in, whether or not it has finished. */ tool_calls: number; /** * Tool calls whose result reported success. */ tool_completed: number; /** * Directly attributable tool spend in micro-USD, such as a metered built-in tool. */ tool_cost_micros: number; /** * Summed measured duration of every tool call that reported one, in milliseconds. Model thinking time is not included. */ tool_duration_ms: number; /** * Tool calls whose result reported an error, plus invocations that failed before any result was recorded. */ tool_failed: number; /** * Tool calls with no result yet. A call that never receives one stays here permanently. */ tool_in_flight: number; /** * model_cost_micros plus tool_cost_micros. */ total_cost_micros: number; /** * Model turns, counted once each from the runtime's own turn grouping. Only the managed_agent_turn family records these; divided by sessions it is turns per session. */ turns: number; /** * The dimension's value for this group, and the value to pass back as a filter. Empty means the dimension was not recorded on the underlying work. */ value: string; }; /** * Pre-aggregated analytics for one metric family, scope, and time window. Figures are kept up to date as work happens rather than recomputed from session events, so a response is fast regardless of how much history the organization has, and states its own freshness through as_of and lag_seconds. */ export type ManagedAgentsAnalyticsResponse = { /** * How current these figures are. Activity after this instant is counted in a later read. */ as_of: string; /** * The family's default groupings, each capped by limit. */ breakdowns: Array | null; /** * Metric family these figures come from. */ family: string; /** * Version of the family's definition. A change here means how the figures are derived changed. */ family_version: number; /** * Inclusive start actually aggregated, widened outward to a bucket boundary. */ from: string; /** * Width of each series bucket. Chosen from the window: hourly up to two days, daily beyond that. */ granularity: 'hour' | 'day'; /** * Seconds between as_of and now. A steady value under a minute is normal; a growing one means the figures are catching up. */ lag_seconds: number; /** * Read locality the figures were aggregated at, after authorization. This may be narrower than the scope requested. */ scope: 'workspace' | 'tenant' | 'global'; /** * One point per time bucket, ascending. Buckets with no activity are omitted rather than zero-filled. */ series: Array | null; /** * Dimension series_groups is split by, echoing the request. Absent when no stacked series was asked for. */ series_group_by?: string; /** * One band per dimension value, for a stacked chart. Present only when series_group_by was requested. */ series_groups?: Array; /** * Exclusive end actually aggregated, widened outward to a bucket boundary. */ to: string; /** * The whole window aggregated into one figure set. */ totals: ManagedAgentsAnalyticsTotals; }; /** * One band of a stacked series. Percentiles are omitted on these points, because a stacked chart plots additive counts. */ export type ManagedAgentsAnalyticsSeriesGroup = { /** * Human-readable name for value, resolved when the request is served, on the same terms as a breakdown row's label. */ label?: string; /** * This line's buckets, ascending. Buckets where this group recorded nothing are omitted, so a stacked chart must zero-fill them. */ points: Array | null; /** * The dimension's value for this line, and the value to pass back as a filter. Empty means the dimension was not recorded on the underlying work. */ value: string; }; /** * Aggregated analytics measures for one window, group, or time bucket. Counters and sums are exact; p50_ms, p90_ms and p95_ms are approximate, derived from a histogram so they can be combined across time buckets and groups. */ export type ManagedAgentsAnalyticsSeriesPoint = { /** * Inclusive start of this bucket, in UTC. Its width is the response's granularity. */ bucket_start: string; /** * Prompt tokens served from the provider's cache. */ cache_read_tokens: number; /** * Prompt tokens written into the provider's cache. */ cache_write_tokens: number; /** * Immutable criterion verdict facts in the quality family. */ criterion_count?: number; /** * Quality criterion verdicts that are fail. */ criterion_fail_count?: number; /** * Quality criterion verdicts that are not applicable. */ criterion_not_applicable_count?: number; /** * Quality criterion verdicts that are pass. */ criterion_pass_count?: number; /** * Passed criteria divided by passed plus failed criteria. Null when that denominator is zero. */ criterion_pass_rate?: number | null; /** * How many measurements the percentiles below were derived from. Compare with tool_calls or environment_starts to see the coverage. */ duration_samples: number; /** * Environment startups that failed or were cancelled before the sandbox ran. */ environment_failed: number; /** * Environment startups that reached a running sandbox. */ environment_ready: number; /** * Sandbox environment startups observed, including those still in progress. */ environment_starts: number; /** * Summed time from the first provisioning transition to the first running transition, in milliseconds, over successful startups only. */ environment_startup_ms: number; /** * Immutable evaluation snapshots in the quality family. */ evaluation_count?: number; /** * Quality evaluations whose parent verdict is fail. */ evaluation_fail_count?: number; /** * Quality evaluations whose parent verdict is not applicable. */ evaluation_not_applicable_count?: number; /** * Quality evaluations whose parent verdict is pass. */ evaluation_pass_count?: number; /** * Passed evaluations divided by passed plus failed evaluations. Null when that denominator is zero. */ evaluation_pass_rate?: number | null; /** * Units of work recorded: every tool call, model call, and environment startup. */ event_count: number; /** * Prompt tokens billed in the window. */ input_tokens: number; /** * Distinct model inference calls. A response persisted across several events is charged once. */ model_calls: number; /** * Model spend in micro-USD (1,000,000 = 1 USD). */ model_cost_micros: number; /** * Completion tokens billed in the window. */ output_tokens: number; /** * Approximate median duration in milliseconds, interpolated within a fixed histogram bucket. Absent when nothing in the window reported a duration. */ p50_ms?: number; /** * Approximate 90th percentile duration in milliseconds, interpolated within a fixed histogram bucket. Absent when nothing in the window reported a duration. */ p90_ms?: number; /** * Approximate 95th percentile duration in milliseconds, interpolated within a fixed histogram bucket. Absent when nothing in the window reported a duration. */ p95_ms?: number; /** * Sum of creation-to-first-recorded-successful-completion durations in milliseconds. Divide by sessions for the mean in the completion family. Earlier sessions without a recorded completion milestone are excluded. */ session_completion_ms?: number; /** * For managed_agent_completion: root sessions with a first recorded successful completion in the window, bucketed by completion time. For other families: sessions counted once in the bucket they started in. */ sessions: number; /** * Tool invocations in the window. A call is counted once, in the bucket it started in, whether or not it has finished. */ tool_calls: number; /** * Tool calls whose result reported success. */ tool_completed: number; /** * Directly attributable tool spend in micro-USD, such as a metered built-in tool. */ tool_cost_micros: number; /** * Summed measured duration of every tool call that reported one, in milliseconds. Model thinking time is not included. */ tool_duration_ms: number; /** * Tool calls whose result reported an error, plus invocations that failed before any result was recorded. */ tool_failed: number; /** * Tool calls with no result yet. A call that never receives one stays here permanently. */ tool_in_flight: number; /** * model_cost_micros plus tool_cost_micros. */ total_cost_micros: number; /** * Model turns, counted once each from the runtime's own turn grouping. Only the managed_agent_turn family records these; divided by sessions it is turns per session. */ turns: number; }; /** * Aggregated analytics measures for one window, group, or time bucket. Counters and sums are exact; p50_ms, p90_ms and p95_ms are approximate, derived from a histogram so they can be combined across time buckets and groups. */ export type ManagedAgentsAnalyticsTotals = { /** * Prompt tokens served from the provider's cache. */ cache_read_tokens: number; /** * Prompt tokens written into the provider's cache. */ cache_write_tokens: number; /** * Immutable criterion verdict facts in the quality family. */ criterion_count?: number; /** * Quality criterion verdicts that are fail. */ criterion_fail_count?: number; /** * Quality criterion verdicts that are not applicable. */ criterion_not_applicable_count?: number; /** * Quality criterion verdicts that are pass. */ criterion_pass_count?: number; /** * Passed criteria divided by passed plus failed criteria. Null when that denominator is zero. */ criterion_pass_rate?: number | null; /** * How many measurements the percentiles below were derived from. Compare with tool_calls or environment_starts to see the coverage. */ duration_samples: number; /** * Environment startups that failed or were cancelled before the sandbox ran. */ environment_failed: number; /** * Environment startups that reached a running sandbox. */ environment_ready: number; /** * Sandbox environment startups observed, including those still in progress. */ environment_starts: number; /** * Summed time from the first provisioning transition to the first running transition, in milliseconds, over successful startups only. */ environment_startup_ms: number; /** * Immutable evaluation snapshots in the quality family. */ evaluation_count?: number; /** * Quality evaluations whose parent verdict is fail. */ evaluation_fail_count?: number; /** * Quality evaluations whose parent verdict is not applicable. */ evaluation_not_applicable_count?: number; /** * Quality evaluations whose parent verdict is pass. */ evaluation_pass_count?: number; /** * Passed evaluations divided by passed plus failed evaluations. Null when that denominator is zero. */ evaluation_pass_rate?: number | null; /** * Units of work recorded: every tool call, model call, and environment startup. */ event_count: number; /** * Prompt tokens billed in the window. */ input_tokens: number; /** * Distinct model inference calls. A response persisted across several events is charged once. */ model_calls: number; /** * Model spend in micro-USD (1,000,000 = 1 USD). */ model_cost_micros: number; /** * Completion tokens billed in the window. */ output_tokens: number; /** * Approximate median duration in milliseconds, interpolated within a fixed histogram bucket. Absent when nothing in the window reported a duration. */ p50_ms?: number; /** * Approximate 90th percentile duration in milliseconds, interpolated within a fixed histogram bucket. Absent when nothing in the window reported a duration. */ p90_ms?: number; /** * Approximate 95th percentile duration in milliseconds, interpolated within a fixed histogram bucket. Absent when nothing in the window reported a duration. */ p95_ms?: number; /** * Sum of creation-to-first-recorded-successful-completion durations in milliseconds. Divide by sessions for the mean in the completion family. Earlier sessions without a recorded completion milestone are excluded. */ session_completion_ms?: number; /** * For managed_agent_completion: root sessions with a first recorded successful completion in the window, bucketed by completion time. For other families: sessions counted once in the bucket they started in. */ sessions: number; /** * Tool invocations in the window. A call is counted once, in the bucket it started in, whether or not it has finished. */ tool_calls: number; /** * Tool calls whose result reported success. */ tool_completed: number; /** * Directly attributable tool spend in micro-USD, such as a metered built-in tool. */ tool_cost_micros: number; /** * Summed measured duration of every tool call that reported one, in milliseconds. Model thinking time is not included. */ tool_duration_ms: number; /** * Tool calls whose result reported an error, plus invocations that failed before any result was recorded. */ tool_failed: number; /** * Tool calls with no result yet. A call that never receives one stays here permanently. */ tool_in_flight: number; /** * model_cost_micros plus tool_cost_micros. */ total_cost_micros: number; /** * Model turns, counted once each from the runtime's own turn grouping. Only the managed_agent_turn family records these; divided by sessions it is turns per session. */ turns: number; }; /** * Standard flat error response. */ export type ManagedAgentsApiError = { /** * Stable machine-readable error code. */ code: 'analytics' | 'analytics_not_ready' | 'artifact_fetch_unavailable' | 'artifact_generation_mismatch' | 'artifact_hash_mismatch' | 'artifact_invalid_events' | 'artifact_invalid_json' | 'artifact_not_allowlisted' | 'artifact_size_mismatch' | 'atlassian_rate_limited' | 'atlassian_unavailable' | 'atomic_ingest_timeout' | 'auth_unavailable' | 'automation_event_source_invalid' | 'automation_memory_unavailable' | 'automation_reference_invalid' | 'automation_runs_unconfigured' | 'automations_unconfigured' | 'bad_gateway' | 'built_in_catalog_unavailable' | 'built_in_integrations_disabled' | 'built_in_integrations_unconfigured' | 'compute_offerings_unavailable' | 'conflict' | 'content_store_request_canceled' | 'content_store_unavailable' | 'content_store_upload_timeout' | 'credential_encryption_unconfigured' | 'delegate_preparation_failed' | 'entity_family_not_permitted' | 'environment_not_verified' | 'evaluation_cancellation_pending' | 'evaluation_deletion_pending' | 'event_admission_unavailable' | 'event_ingress_unavailable' | 'event_source_verification_credential_invalid' | 'event_sources_unconfigured' | 'execution_unconfigured' | 'file_quota_exceeded' | 'file_storage_unconfigured' | 'forbidden' | 'gateway_timeout' | 'gestalt_unconfigured' | 'github_rate_limited' | 'github_unavailable' | 'handoff_access_invalid' | 'handoff_access_unavailable' | 'handoff_access_unsupported' | 'handoff_capture_unavailable' | 'handoff_requires_retest' | 'handoff_revoke_unavailable' | 'handoff_signal_unavailable' | 'idempotency_conflict' | 'idempotency_in_progress' | 'idempotency_unavailable' | 'ingest_policy_changed' | 'ingest_policy_not_found' | 'ingest_policy_revoked' | 'integrations_unconfigured' | 'internal_error' | 'invalid_json' | 'invalid_pull_request_review_result' | 'invalid_request' | 'invalid_scope' | 'invariant_violation' | 'launchdarkly_rate_limited' | 'launchdarkly_unavailable' | 'live_fleet_unconfigured' | 'managed_agents_unavailable' | 'merge_key_rejected' | 'merge_link_unavailable' | 'merge_rate_limited' | 'merge_unavailable' | 'missing_dependency' | 'model_gateway_metadata_missing' | 'model_gateway_unconfigured' | 'model_gateway_unreachable' | 'mutation_transaction_budget_exceeded' | 'not_found' | 'page_token_expired' | 'payload_too_large' | 'persistence_busy' | 'precondition_failed' | 'precondition_required' | 'provider_registration_unsupported' | 'provider_selection_unsupported' | 'rate_limit_exceeded' | 'rate_limited' | 'repository_automation_unconfigured' | 'request_too_large' | 'reserved_source_type' | 'revision_conflict' | 'run_log_store_unavailable' | 'runner_image_resolution_failed' | 'sandbox_provider_disabled' | 'service_unavailable' | 'session_analyst_busy' | 'session_analyst_model_unavailable' | 'session_analyst_unconfigured' | 'session_start_admission_unavailable' | 'session_start_not_admitted' | 'setup_fallback_environment_unsafe' | 'setup_run_finished' | 'setup_run_in_progress' | 'setup_run_limit' | 'setup_run_not_started' | 'setup_runs_unavailable' | 'skill_storage_unconfigured' | 'slack_channels_rejected' | 'slack_channels_unavailable' | 'slack_channels_unconfigured' | 'slack_connection_malformed' | 'slack_event_intake_unavailable' | 'slack_installation_mismatch' | 'slack_missing_scope' | 'slack_rate_limited' | 'slack_reapproval_required' | 'source_ownership_mismatch' | 'source_revision_conflict' | 'spanner_unavailable' | 'streaming_unsupported' | 'submission_transaction_budget_exceeded' | 'task_version_number_conflict' | 'team_board_unconfigured' | 'too_many_streams' | 'unauthorized' | 'unsupported_media_type' | 'vault_creation_retired' | 'version_content_conflict' | 'webhook_delivery_too_large' | 'workspace_boundary_denied'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorAuthUnavailable = { /** * Stable machine-readable error code. */ code: 'auth_unavailable'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorBadGateway = { /** * Stable machine-readable error code. */ code: 'bad_gateway'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorConflict = { /** * Stable machine-readable error code. */ code: 'conflict'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorFileQuotaExceeded = { /** * Stable machine-readable error code. */ code: 'file_quota_exceeded'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorForbidden = { /** * Stable machine-readable error code. */ code: 'forbidden'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorGatewayTimeout = { /** * Stable machine-readable error code. */ code: 'gateway_timeout'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorIdempotencyConflict = { /** * Stable machine-readable error code. */ code: 'idempotency_conflict'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorIdempotencyInProgress = { /** * Stable machine-readable error code. */ code: 'idempotency_in_progress'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorIdempotencyUnavailable = { /** * Stable machine-readable error code. */ code: 'idempotency_unavailable'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorIntegrationsUnconfigured = { /** * Stable machine-readable error code. */ code: 'integrations_unconfigured'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorInternalError = { /** * Stable machine-readable error code. */ code: 'internal_error'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorInvalidRequest = { /** * Stable machine-readable error code. */ code: 'invalid_request'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorInvariantViolation = { /** * Stable machine-readable error code. */ code: 'invariant_violation'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorManagedAgentsUnavailable = { /** * Stable machine-readable error code. */ code: 'managed_agents_unavailable'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorModelGatewayUnconfigured = { /** * Stable machine-readable error code. */ code: 'model_gateway_unconfigured'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorModelGatewayUnreachable = { /** * Stable machine-readable error code. */ code: 'model_gateway_unreachable'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorNotFound = { /** * Stable machine-readable error code. */ code: 'not_found'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorPayloadTooLarge = { /** * Stable machine-readable error code. */ code: 'payload_too_large'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorPreconditionFailed = { /** * Stable machine-readable error code. */ code: 'precondition_failed'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorPreconditionRequired = { /** * Stable machine-readable error code. */ code: 'precondition_required'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorRateLimitExceeded = { /** * Stable machine-readable error code. */ code: 'rate_limit_exceeded'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorRateLimited = { /** * Stable machine-readable error code. */ code: 'rate_limited'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorSemanticValidationFailed = { /** * Stable machine-readable error code. */ code: 'semantic_validation_failed'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorServiceUnavailable = { /** * Stable machine-readable error code. */ code: 'service_unavailable'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorSetupRunsUnavailable = { /** * Stable machine-readable error code. */ code: 'setup_runs_unavailable'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorSlackChannelsRejected = { /** * Stable machine-readable error code. */ code: 'slack_channels_rejected'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorSlackChannelsUnavailable = { /** * Stable machine-readable error code. */ code: 'slack_channels_unavailable'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorSlackChannelsUnconfigured = { /** * Stable machine-readable error code. */ code: 'slack_channels_unconfigured'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorSlackConnectionMalformed = { /** * Stable machine-readable error code. */ code: 'slack_connection_malformed'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorSlackInstallationMismatch = { /** * Stable machine-readable error code. */ code: 'slack_installation_mismatch'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorSlackMissingScope = { /** * Stable machine-readable error code. */ code: 'slack_missing_scope'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorSlackRateLimited = { /** * Stable machine-readable error code. */ code: 'slack_rate_limited'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorSlackReapprovalRequired = { /** * Stable machine-readable error code. */ code: 'slack_reapproval_required'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorUnauthorized = { /** * Stable machine-readable error code. */ code: 'unauthorized'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * Standard flat error response. */ export type ManagedAgentsApiErrorUnsupportedMediaType = { /** * Stable machine-readable error code. */ code: 'unsupported_media_type'; /** * Human-readable error message. */ message: string; /** * Optional structured error details. */ details?: { [key: string]: unknown; }; }; /** * One provider-defined account or authorization action the operator may choose to continue an integration install. Its value is opaque and is accepted only through a fresh, single-use install state. */ export type ManagedAgentsAuthorizationOption = { /** * Optional explanation of the account or action represented by this option. */ description?: string; /** * Operator-facing name for this account or authorization action. */ label: string; /** * Short opaque provider option value to pass back when continuing this authorization flow. */ value: string; }; /** * A provider-neutral rule that starts or continues an ordinary managed-agent session from verified webhook events or structured manual input. */ export type ManagedAgentsAutomation = { /** * Managed agent started for each new matching conversation. */ agent_id: string; /** * Concrete agent version every run uses. Resolved from agent_id at write time and echoed back, so a scheduled job's behaviour cannot change underneath it; send it explicitly to pin a specific version. */ agent_version_id?: string; /** * Server-assigned RFC 3339 instant the automation was archived. */ archived_at?: string; /** * Server-assigned automation identifier. */ automation_id: string; /** * Conditions that append a delivery to the existing conversation selected by conversation_key. */ continue_filter: ManagedAgentsWebhookFilter; /** * Ordered values joined into a stable external conversation identity; omit to start an independent session per matching delivery. Deprecated: use triggers[].webhook.conversation_key. */ conversation_key?: Array; /** * Server-assigned RFC 3339 creation timestamp. */ created_at: string; /** * Authenticated principal that created the automation. */ created_by?: string; /** * Explicit credential grants made available to automation sessions. */ credential_refs?: Array; /** * Human-readable name shown in the automation catalog and session provenance. */ display_name: string; /** * Whether this automation may start work. Deprecated projection of status: true means active. */ enabled: boolean; /** * Agent Service environment used to run sessions created by this automation. */ environment_id: string; /** * Initial user message for each new session, followed by the trigger context. Scheduled runs also include run_defaults.payload when configured. */ initial_message: string; /** * Organization that owns the automation, resolved from the authenticated request scope. */ organization_id: string; /** * Why the automation is not firing. Present exactly when status is paused. */ paused_reason?: ManagedAgentsAutomationPausedReason; /** * The session shape every run produces. */ run_defaults?: ManagedAgentsAutomationRunDefaults; /** * Conditions that start a new session for a verified webhook delivery. */ start_filter: ManagedAgentsWebhookFilter; /** * Lifecycle state. archived is terminal. Server-assigned; change it through the pause, unpause, and archive operations. */ status?: 'active' | 'paused' | 'archived'; /** * Opaque client-owned template identifier used to select a guided editor; unknown identifiers remain valid custom automations. */ template_id?: string; /** * Reasons this automation starts work. When present, authoritative over the deprecated flat webhook fields. */ triggers?: Array; /** * Server-assigned RFC 3339 timestamp of the most recent configuration change. */ updated_at: string; /** * Vaults available to automation sessions, further narrowed by credential_refs when configured. */ vault_ids?: Array; /** * Webhook endpoint that supplies automatic events; omit for a manual-only automation. */ webhook_endpoint_id?: string; }; /** * An exact credential grant within a selected vault. */ export type ManagedAgentsAutomationDefinitionCredentialRef = { /** * Credential to grant to the session. */ credentialId: string; /** * Selected vault containing the credential. */ vaultId: string; }; /** * A memory store attached to each automation session with explicit access and optional instructions. */ export type ManagedAgentsAutomationDefinitionMemoryStore = { /** * Access to the attached memory store. */ access: 'read_only' | 'read_write'; /** * Instructions for using this memory store. */ instructions?: string; /** * Active memory store in this workspace. */ memoryStoreId: string; }; /** * A memory store attached to each automation session with explicit access and optional instructions. */ export type ManagedAgentsAutomationDefinitionMemoryStoreRequest = { /** * Access to the attached memory store. */ access: 'read_only' | 'read_write'; /** * Instructions for using this memory store. */ instructions?: string; /** * Active memory store in this workspace. */ memoryStoreId: string; }; /** * Bounded page of canonical automation summaries. */ export type ManagedAgentsAutomationDefinitionPageResponse = { /** * Canonical automations in newest-first order. */ items: Array; /** * Opaque cursor for the next page, or null at the end. */ nextCursor: null | string; /** * Total canonical automations visible to the caller. */ total: number; }; /** * Complete writable shape for creating or replacing a canonical automation. */ export type ManagedAgentsAutomationDefinitionRequest = { /** * Managed agent selected by this automation. */ agentId: string; /** * Immutable agent version pinned for all admitted runs. */ agentVersionId: string; /** * Human-readable automation name. */ displayName: string; /** * Execution environment selected for admitted sessions. */ environmentId: string; /** * Prompt definition frozen onto admitted runs. */ initialPrompt: ManagedAgentsAutomationLiteralPrompt; /** * Run defaults frozen onto admitted runs. */ runDefaults: ManagedAgentsCanonicalAutomationRunDefaultsRequest; /** * Complete trigger set for this automation aggregate. */ triggers: Array; }; /** * A workspace file mounted at an explicit path for each automation session. */ export type ManagedAgentsAutomationDefinitionResource = { /** * File to attach from this workspace. */ fileId: string; /** * Absolute mount path beneath the session files directory. */ mountPath: string; }; /** * Full round-trippable canonical automation aggregate. */ export type ManagedAgentsAutomationDefinitionResponse = { /** * Managed agent selected by this automation. */ agentId: string; /** * Immutable agent version pinned for all admitted runs. */ agentVersionId: string; /** * Stable canonical automation identifier. */ readonly automationId: string; /** * Time the automation was created. */ readonly createdAt: string; /** * Human-readable automation name. */ displayName: string; /** * Execution environment selected for admitted sessions. */ environmentId: string; /** * Prompt definition frozen onto admitted runs. */ initialPrompt: ManagedAgentsAutomationLiteralPrompt; /** * Monotonic aggregate revision represented by the response ETag. */ readonly revision: number; /** * Run defaults frozen onto admitted runs. */ runDefaults: ManagedAgentsCanonicalAutomationRunDefaults; /** * Lifecycle state. New automations start paused. */ readonly status: 'paused' | 'active'; /** * Complete ordered trigger set. */ triggers: Array; /** * Time the aggregate was last changed. */ readonly updatedAt: string; }; /** * Terminal failure that stopped a canonical automation run before or during session admission. */ export type ManagedAgentsAutomationDefinitionRunErrorResponse = { /** * Stable machine-readable failure code. */ code: string; /** * Automation field responsible for the failure, when applicable. */ field?: string; /** * Human-readable failure detail safe to show an operator. */ message: string; /** * Referenced resource responsible for the failure, when applicable. */ resourceId?: string; /** * Whether another admission may succeed without a configuration change. */ retryable: boolean; }; /** * A bounded snapshot-consistent page of canonical automation runs. */ export type ManagedAgentsAutomationDefinitionRunPageResponse = { /** * Canonical automation runs, newest first. */ items: Array; /** * Opaque continuation cursor, or null at the end. */ nextCursor: null | string; /** * Total matching runs at the page's read snapshot. */ total: number; }; /** * Canonical record of one admitted automation run and its frozen execution context. */ export type ManagedAgentsAutomationDefinitionRunResponse = { /** * Automation whose frozen configuration admitted the run. */ automationId: string; /** * Stable run identifier and asynchronous status handle. */ automationRunId: string; /** * Bounded non-secret automation configuration frozen at admission. */ automationSnapshot: { [key: string]: unknown; } | null; /** * Time session creation succeeded or failed. */ completedAt?: string; /** * Time the run was admitted. */ createdAt: string; /** * Complete initial message supplied to the admitted session. */ effectiveInitialMessage: string; /** * Terminal admission failure. Present only for failed runs. */ error?: ManagedAgentsAutomationDefinitionRunErrorResponse; /** * Bounded normalized delivery context or deliberately open manual payload. */ eventContext?: { [key: string]: unknown; }; /** * Event source that received the delivery for provider and custom-webhook runs. */ eventSourceId?: string; /** * Schedule occurrence represented by this run. */ occurrenceAt?: string; /** * Prompt definition frozen at admission. */ promptSnapshot: { [key: string]: unknown; } | null; /** * Verified provider delivery identity used for deduplication. */ providerDeliveryId?: string; /** * Created managed-agent session. Present only for created runs. */ sessionId?: string; /** * Bounded non-secret source configuration frozen for event runs. */ sourceSnapshot?: { [key: string]: unknown; }; /** * Session-creation outcome. */ status: 'pending' | 'created' | 'failed'; /** * Canonical member URL for polling this run. */ statusUrl: string; /** * Stored trigger that admitted the run. Absent for manual runs. */ triggerId?: string; /** * Trigger incarnation frozen at admission. Absent for manual runs. */ triggerIncarnation?: number; /** * Bounded trigger configuration frozen at admission. Absent for manual runs. */ triggerSnapshot?: { [key: string]: unknown; }; /** * Admission kind. */ triggerType: 'manual' | 'schedule' | 'slack' | 'github' | 'webhook'; /** * Time the run outcome last changed. */ updatedAt: string; }; /** * A canonical automation run without its frozen snapshots; read the member for those. */ export type ManagedAgentsAutomationDefinitionRunSummary = { /** * Automation whose frozen configuration admitted the run. */ automationId: string; /** * Stable run identifier and asynchronous status handle. */ automationRunId: string; /** * Time session creation succeeded or failed. */ completedAt?: string; /** * Time the run was admitted. */ createdAt: string; /** * Terminal admission failure. Present only for failed runs. */ error?: ManagedAgentsAutomationDefinitionRunErrorResponse; /** * Event source that received the delivery for provider and custom-webhook runs. */ eventSourceId?: string; /** * Schedule occurrence represented by this run. */ occurrenceAt?: string; /** * Verified provider delivery identity used for deduplication. */ providerDeliveryId?: string; /** * Created managed-agent session. Present only for created runs. */ sessionId?: string; /** * Session-creation outcome. */ status: 'pending' | 'created' | 'failed'; /** * Canonical member URL for polling this run. */ statusUrl: string; /** * Stored trigger that admitted the run. Absent for manual runs. */ triggerId?: string; /** * Trigger incarnation frozen at admission. Absent for manual runs. */ triggerIncarnation?: number; /** * Admission kind. */ triggerType: 'manual' | 'schedule' | 'slack' | 'github' | 'webhook'; /** * Time the run outcome last changed. */ updatedAt: string; }; /** * Read-only scheduler state for a canonical automation, independent of its writable definition. */ export type ManagedAgentsAutomationDefinitionRuntimeStatus = { /** * Automation whose scheduler state was read. */ automationId: string; /** * Runtime status of each configured schedule trigger. */ triggers: Array; }; /** * Synchronization, availability, occurrence previews and counters for one schedule trigger. */ export type ManagedAgentsAutomationDefinitionScheduleStatus = { /** * Whether live scheduler state was read successfully. */ available: boolean; /** * Latest actual scheduler action, or null when unknown. */ lastRunAt: null | string; /** * Occurrences outside the scheduler catch-up window. */ missedCatchupWindow: number; /** * Next scheduler occurrence, or null when unavailable or paused. */ nextRunAt: null | string; /** * Whether this schedule is paused by its automation or trigger. */ paused: boolean; /** * Occurrences skipped because an earlier execution was active. */ skippedOverlap: number; /** * Delivery of saved configuration to the scheduler. */ synchronization: 'pending' | 'synced' | 'error' | 'unavailable'; /** * Schedule trigger identifier. */ triggerId: string; /** * Bounded scheduler preview; empty when unavailable or paused. */ upcomingRuns: Array; }; /** * Compact canonical automation representation without prompts, defaults, or trigger configuration. */ export type ManagedAgentsAutomationDefinitionSummary = { /** * Managed agent selected by this automation. */ agentId: string; /** * Immutable agent version pinned for runs. */ agentVersionId: string; /** * Stable canonical automation identifier. */ automationId: string; /** * Time the automation was created. */ createdAt: string; /** * Human-readable automation name. */ displayName: string; /** * Execution environment selected for sessions. */ environmentId: string; /** * Monotonic aggregate revision. */ revision: number; /** * Current lifecycle state. */ status: 'paused' | 'active'; /** * Time the aggregate was last changed. */ updatedAt: string; }; /** * Optional conditions on the verified GitHub delivery body. Every present condition must match; empty lists accept any value. */ export type ManagedAgentsAutomationGitHubFilters = { /** * GitHub delivery action values that may match, such as opened, labeled, submitted, or completed. Empty accepts every action. */ actions?: Array; /** * For labeled deliveries: the added label must be one of these. */ addedLabels?: Array; /** * Pull request base branch globs. An asterisk matches any characters, including slashes; a question mark matches one character. */ baseBranches?: Array; /** * Branch globs for push and workflow run deliveries, with the same syntax as baseBranches. */ branches?: Array; /** * For issue_comment deliveries: whether the comment is on a pull request or on an issue. */ commentOn?: 'pull_request' | 'issue'; /** * For completed workflow runs: conclusions such as failure, success, or cancelled. Empty accepts any conclusion. */ conclusions?: Array; /** * Reject draft pull requests. */ excludeDrafts?: boolean; /** * Reject deliveries whose sender is a GitHub bot account. */ ignoreBots?: boolean; /** * Match only when the pull request or issue carries at least one of these labels. */ labelsAny?: Array; /** * Reject when the pull request or issue carries any of these labels. */ labelsNone?: Array; /** * For closed pull requests: true matches merged, false matches closed without merging. */ merged?: boolean; /** * Repository full names (owner/name), compared case-insensitively. Empty accepts every repository. */ repositories?: Array; /** * For submitted reviews: approved, changes_requested, or commented. Empty accepts any review. */ reviewStates?: Array; /** * GitHub logins of the account that caused the delivery. Empty accepts anyone. */ senders?: Array; /** * For comment deliveries: the comment must contain at least one of these phrases, ignoring case. */ textContains?: Array; /** * For comment deliveries: the comment must contain none of these phrases, ignoring case. */ textExcludes?: Array; /** * For comment deliveries: an RE2 regular expression the comment must match, ignoring case. */ textMatches?: string; }; /** * Optional conditions on the verified GitHub delivery body. Every present condition must match; empty lists accept any value. */ export type ManagedAgentsAutomationGitHubFiltersRequest = { /** * GitHub delivery action values that may match, such as opened, labeled, submitted, or completed. Empty accepts every action. */ actions?: Array; /** * For labeled deliveries: the added label must be one of these. */ addedLabels?: Array; /** * Pull request base branch globs. An asterisk matches any characters, including slashes; a question mark matches one character. */ baseBranches?: Array; /** * Branch globs for push and workflow run deliveries, with the same syntax as baseBranches. */ branches?: Array; /** * For issue_comment deliveries: whether the comment is on a pull request or on an issue. */ commentOn?: 'pull_request' | 'issue'; /** * For completed workflow runs: conclusions such as failure, success, or cancelled. Empty accepts any conclusion. */ conclusions?: Array; /** * Reject draft pull requests. */ excludeDrafts?: boolean; /** * Reject deliveries whose sender is a GitHub bot account. */ ignoreBots?: boolean; /** * Match only when the pull request or issue carries at least one of these labels. */ labelsAny?: Array; /** * Reject when the pull request or issue carries any of these labels. */ labelsNone?: Array; /** * For closed pull requests: true matches merged, false matches closed without merging. */ merged?: boolean; /** * Repository full names (owner/name), compared case-insensitively. Empty accepts every repository. */ repositories?: Array; /** * For submitted reviews: approved, changes_requested, or commented. Empty accepts any review. */ reviewStates?: Array; /** * GitHub logins of the account that caused the delivery. Empty accepts anyone. */ senders?: Array; /** * For comment deliveries: the comment must contain at least one of these phrases, ignoring case. */ textContains?: Array; /** * For comment deliveries: the comment must contain none of these phrases, ignoring case. */ textExcludes?: Array; /** * For comment deliveries: an RE2 regular expression the comment must match, ignoring case. */ textMatches?: string; }; /** * Closed GitHub webhook trigger configuration. */ export type ManagedAgentsAutomationGitHubTrigger = { /** * Whether this trigger may admit runs while the automation is active. */ enabled: boolean; /** * Compatible GitHub webhook source. */ eventSourceId: string; /** * GitHub webhook event names that may match this trigger. */ events: Array; /** * Optional conditions on the delivery body. Omit to match on event name alone. */ filters?: ManagedAgentsAutomationGitHubFilters; /** * Caller-generated stable trigger identifier. */ triggerId: string; /** * GitHub trigger discriminant. */ type: 'github'; }; /** * Closed GitHub webhook trigger configuration. */ export type ManagedAgentsAutomationGitHubTriggerRequest = { /** * Whether this trigger may admit runs while the automation is active. */ enabled: boolean; /** * Compatible GitHub webhook source. */ eventSourceId: string; /** * GitHub webhook event names that may match this trigger. */ events: Array; /** * Optional conditions on the delivery body. Omit to match on event name alone. */ filters?: ManagedAgentsAutomationGitHubFiltersRequest; /** * Caller-generated stable trigger identifier. */ triggerId: string; /** * GitHub trigger discriminant. */ type: 'github'; }; /** * Automations available in the calling organization. */ export type ManagedAgentsAutomationListResponse = { /** * Automations owned by the calling organization. */ automations: Array | null; }; /** * Literal initial prompt frozen onto each admitted automation run. */ export type ManagedAgentsAutomationLiteralPrompt = { /** * Initial instruction supplied to every admitted run. */ text: string; /** * Literal prompt text with no interpolation. */ type: 'literal'; }; /** * Why an automation is not firing, and which resource to repair. */ export type ManagedAgentsAutomationPausedReason = { /** * Human-readable detail, safe to show an operator. */ message?: string; /** * Server-assigned RFC 3339 instant the pause took effect. */ occurred_at: string; /** * Authenticated principal, when a person paused it. */ paused_by?: string; /** * Why the automation stopped firing. paused_by_operator is deliberate; every other value names a configuration problem the platform detected while trying to start a run. */ reason: string; /** * Identifier of the resource that could not be resolved, when the reason names one. The console deep-links to it. */ resource_id?: string; /** * Run whose failure caused the pause, when one did. */ run_id?: string; }; /** * Provider-neutral configuration for creating or replacing an automation. */ export type ManagedAgentsAutomationRequest = { /** * Managed agent started for each new matching conversation. */ agent_id: string; /** * Pin runs to a specific agent version. Omit to pin the agent's current version at write time. */ agent_version_id?: string; /** * Conditions that append a delivery to an existing automation conversation. */ continue_filter?: ManagedAgentsWebhookFilterRequest; /** * Ordered values joined into the external conversation identity. */ conversation_key?: Array; /** * Explicit credential grants made available to automation sessions. */ credential_refs?: Array; /** * Human-readable name shown in the automation catalog and session provenance. */ display_name: string; /** * Deprecated status projection; ignored on writes. New automations start active. Use pause and unpause to change lifecycle state. */ enabled?: boolean; /** * Agent Service environment used to execute automation sessions. */ environment_id: string; /** * Initial user message for each new session, followed by the trigger context. Scheduled runs also include run_defaults.payload when configured. */ initial_message: string; /** * The session shape every run produces. */ run_defaults?: ManagedAgentsAutomationRunDefaultsRequest; /** * Conditions that start a new session for a verified webhook delivery. */ start_filter?: ManagedAgentsWebhookFilterRequest; /** * Opaque client-owned template identifier used to select a guided editor; unknown identifiers remain valid custom automations. */ template_id?: string; /** * Reasons this automation starts work: schedule, webhook, or manual. When present, authoritative over the deprecated flat webhook fields. */ triggers?: Array; /** * Vaults available to automation sessions, narrowed by credential_refs when configured. */ vault_ids?: Array; /** * Webhook endpoint that supplies automatic events; omit for a manual-only automation. */ webhook_endpoint_id?: string; }; /** * The trusted side effects one repository automation performed after its result passed validation: the patch it captured and the review it published. A session that completed before output finalization existed reads back zero-valued, meaning neither happened. */ export type ManagedAgentsAutomationResult = { /** * Captured patch metadata. Zero-valued when the run's output policy disabled patch capture. */ patch: ManagedAgentsPatchArtifact; /** * GitHub publication outcome. Zero-valued when the run's output policy disabled publication. */ publication: ManagedAgentsPublication; }; /** * One recorded attempt to start a managed-agent session from an automation schedule. Records session creation, not the session's eventual outcome. */ export type ManagedAgentsAutomationRun = { /** * Automation this run belongs to. */ automation_id: string; /** * Server-assigned RFC 3339 creation timestamp. */ created_at: string; /** * Why no session was created. Present only when status is failed. */ error?: ManagedAgentsAutomationRunError; /** * The scheduled instant this run answers, without jitter. */ occurrence_at?: string; /** * Organization that owns the run, resolved from the authenticated request scope. */ organization_id: string; /** * Server-assigned run identifier. */ run_id: string; /** * Session created by this run. Present only when status is created. */ session_id?: string; /** * The automation's configuration frozen at firing time, so a later edit cannot rewrite this run's history. */ snapshot: ManagedAgentsAutomationRunSnapshot; /** * When the attempt was made. */ started_at: string; /** * Whether the admitted attempt is still resolving, created a session, or failed to create one. Native scheduling skips are reported as trigger counters. */ status: 'pending' | 'created' | 'failed'; /** * Trigger that fired this run. */ trigger_id: string; /** * Schedule trigger that fired the run. Manual and webhook dispatch expose sessions through their existing APIs. */ trigger_type: 'schedule'; }; /** * The session shape every run of an automation produces, copied onto each run rather than shared between them. */ export type ManagedAgentsAutomationRunDefaults = { /** * Targets an evaluation-agent run resolves with the triggering caller's scope: explicit session_ids, or newest sessions selected by statuses and limit. */ evaluation?: ManagedAgentsEvaluationSelector; /** * Accepted and stored, but not yet applied to the sessions a run starts. Use initial_message until it is. */ initial_events?: Array; /** * Accepted and stored, but not yet applied to the sessions a run starts; a run is not capped by it today. Send null to clear. */ max_cost_usd?: number; /** * Memory stores bound to every run. */ memory_stores?: Array; /** * Caller-defined key/value metadata written onto every run's session and filterable when listing sessions. */ metadata?: { [key: string]: string; }; /** * Definition of done graded against a rubric. Absent leaves the agent version's default rubric in force. */ outcome?: ManagedAgentsNewOutcome; /** * Structured input rendered into the opening message for a scheduled run, which has no external event of its own. */ payload?: { [key: string]: unknown; }; /** * Labelbox project each run's work is attributed to. Overrides the agent version's default. */ project_id?: string; /** * Files mounted into every run's sandbox, resolved and frozen when the run starts. */ resources?: Array; }; /** * The session shape every run of an automation produces, copied onto each run rather than shared between them. */ export type ManagedAgentsAutomationRunDefaultsRequest = { /** * Targets an evaluation-agent run resolves with the triggering caller's scope: explicit session_ids, or newest sessions selected by statuses and limit. */ evaluation?: ManagedAgentsEvaluationSelector; /** * Accepted and stored, but not yet applied to the sessions a run starts. Use initial_message until it is. */ initial_events?: Array; /** * Accepted and stored, but not yet applied to the sessions a run starts; a run is not capped by it today. Send null to clear. */ max_cost_usd?: null | number; /** * Memory stores bound to every run. */ memory_stores?: Array; /** * Caller-defined key/value metadata written onto every run's session and filterable when listing sessions. */ metadata?: { [key: string]: string; }; /** * Definition of done graded against a rubric. Absent leaves the agent version's default rubric in force. */ outcome?: ManagedAgentsNewOutcomeRequest; /** * Structured input rendered into the opening message for a scheduled run, which has no external event of its own. */ payload?: { [key: string]: unknown; }; /** * Labelbox project each run's work is attributed to. Overrides the agent version's default. */ project_id?: string; /** * Files mounted into every run's sandbox, resolved and frozen when the run starts. */ resources?: Array; }; /** * Why one automation run did not create a session. */ export type ManagedAgentsAutomationRunError = { /** * Stable machine-readable failure code, for example environment_archived or session_rate_limited. */ code: string; /** * Which piece of the automation's configuration the failure was about, for example agent_version_id or vault_ids. */ field?: string; /** * Human-readable detail, safe to show an operator. */ message: string; /** * Identifier of the resource that could not be resolved, when the code names one. */ resource_id?: string; /** * Whether a later run may succeed without a configuration change. Does not imply this run will retry. A retryable failure does not pause the automation. */ retryable: boolean; }; /** * A page of scheduled automation run records, newest first. */ export type ManagedAgentsAutomationRunListResponse = { /** * Run records, newest first. */ automation_runs: Array | null; /** * Opaque cursor for the next page; absent when this is the last page. */ next_cursor?: string; }; /** * Reference to the asynchronously running managed-agent session created by a manual automation run. */ export type ManagedAgentsAutomationRunResponse = { /** * Managed-agent session created for this automation run. */ session_id: string; /** * Relative API path used to read the session and follow its progress. */ status_path: string; }; /** * The automation's configuration frozen at the instant a run fired. */ export type ManagedAgentsAutomationRunSnapshot = { /** * Agent the run started, as configured when it fired. */ agent_id: string; /** * Concrete agent version the run used, so a later re-pin cannot change what this run did. */ agent_version_id?: string; /** * Explicit credential grants the run's session was given. */ credential_refs?: Array; /** * Cron expression in force at firing time, for a scheduled run. */ cron?: string; /** * Environment the run's session was provisioned in. */ environment_id: string; /** * Digest of the initial message in force at firing time. A digest rather than the text, because messages can be long and the question this answers is only whether it changed. */ initial_message_digest?: string; /** * Configuration revision of the trigger this run fired from. */ schedule_version?: number; /** * Timezone in force at firing time, for a scheduled run. */ timezone?: string; /** * Vaults the run's session was granted. */ vault_ids?: Array; }; /** * Complete canonical schedule configuration. */ export type ManagedAgentsAutomationScheduleConfig = { /** * Maximum age of a missed occurrence eligible for catch-up. Defaults to 900. */ catchupWindowSeconds?: null | number; /** * Five-field POSIX cron expression. */ cron: string; /** * Optional inclusive schedule end. */ endAt?: null | string; /** * Maximum deterministic occurrence jitter in seconds. Defaults to 10; zero disables jitter. */ jitterSeconds?: null | number; /** * Behavior when an earlier occurrence is still running. Defaults to skip. */ overlapPolicy?: 'skip' | 'buffer_one' | 'buffer_all' | 'allow_all' | 'cancel_other'; /** * Optional inclusive schedule start. */ startAt?: null | string; /** * IANA timezone used to interpret the cron expression. */ timezone: string; }; /** * Complete canonical schedule configuration. */ export type ManagedAgentsAutomationScheduleConfigRequest = { /** * Maximum age of a missed occurrence eligible for catch-up. Defaults to 900. */ catchupWindowSeconds?: null | number; /** * Five-field POSIX cron expression. */ cron: string; /** * Optional inclusive schedule end. */ endAt?: null | string; /** * Maximum deterministic occurrence jitter in seconds. Defaults to 10; zero disables jitter. */ jitterSeconds?: null | number; /** * Behavior when an earlier occurrence is still running. Defaults to skip. */ overlapPolicy?: 'skip' | 'buffer_one' | 'buffer_all' | 'allow_all' | 'cancel_other'; /** * Optional inclusive schedule start. */ startAt?: null | string; /** * IANA timezone used to interpret the cron expression. */ timezone: string; }; /** * Fires an automation using a Temporal Schedule. */ export type ManagedAgentsAutomationScheduleTrigger = { /** * Replay missed actions within this many seconds, 10–31622400. Omit for 900. Deliberate pauses are not backfilled. */ catchup_window_seconds?: number; /** * Five-field POSIX cron, at most 256 bytes. Day-of-month and day-of-week use OR when both are restricted. */ cron: string; /** * Inclusive end of the schedule. */ end_at?: string; /** * Maximum per-occurrence jitter in seconds, 0–540. Omit for 10; zero disables jitter. */ jitter_seconds?: number; /** * Most recent Temporal action start. Server-assigned. */ last_run_at?: string; /** * Temporal's count of actions outside the catch-up window. Server-assigned. */ missed_catchup_window?: number; /** * Next planned Temporal action time, including jitter. Server-assigned. */ next_run_at?: string; /** * Temporal overlap policy, covering the session's initial execution. Defaults to skip. */ overlap_policy?: 'skip' | 'buffer_one' | 'buffer_all' | 'allow_all' | 'cancel_other'; /** * Temporal's count of actions skipped for overlap. Server-assigned. */ skipped_overlap?: number; /** * Inclusive beginning of the schedule. */ start_at?: string; /** * Delivery state of the saved schedule configuration. Server-assigned. */ synchronization?: ManagedAgentsScheduleSynchronization; /** * Required IANA timezone for recurring local time. The console supplies the user's browser timezone; API clients supply the intended user's timezone. Nonexistent local times are skipped; repeated local times fire twice. */ timezone: string; /** * Upcoming planned Temporal action times, including jitter. Server-assigned. */ upcoming_runs_at?: Array; }; /** * Fires an automation using a Temporal Schedule. */ export type ManagedAgentsAutomationScheduleTriggerRequest = { /** * Replay missed actions within this many seconds, 10–31622400. Omit for 900. Deliberate pauses are not backfilled. */ catchup_window_seconds?: null | number; /** * Five-field POSIX cron, at most 256 bytes. Day-of-month and day-of-week use OR when both are restricted. */ cron?: string; /** * Inclusive end of the schedule. */ end_at?: null | string; /** * Maximum per-occurrence jitter in seconds, 0–540. Omit for 10; zero disables jitter. */ jitter_seconds?: null | number; /** * Most recent Temporal action start. Server-assigned. */ last_run_at?: null | string; /** * Temporal's count of actions outside the catch-up window. Server-assigned. */ missed_catchup_window?: number; /** * Next planned Temporal action time, including jitter. Server-assigned. */ next_run_at?: null | string; /** * Temporal overlap policy, covering the session's initial execution. Defaults to skip. */ overlap_policy?: 'skip' | 'buffer_one' | 'buffer_all' | 'allow_all' | 'cancel_other'; /** * Temporal's count of actions skipped for overlap. Server-assigned. */ skipped_overlap?: number; /** * Inclusive beginning of the schedule. */ start_at?: null | string; /** * Delivery state of the saved schedule configuration. Server-assigned. */ synchronization?: ManagedAgentsScheduleSynchronizationRequest; /** * Required IANA timezone for recurring local time. The console supplies the user's browser timezone; API clients supply the intended user's timezone. Nonexistent local times are skipped; repeated local times fire twice. */ timezone?: string; /** * Upcoming planned Temporal action times, including jitter. Server-assigned. */ upcoming_runs_at?: Array; }; /** * Trigger-local handling for messages authored by external Slack apps. */ export type ManagedAgentsAutomationSlackBotEvents = { /** * Whether events authored by a provably different Slack app may match. */ mode: 'ignore' | 'allow_external'; }; /** * Optional conditions on the Slack message text and threading. */ export type ManagedAgentsAutomationSlackFilters = { /** * Reject replies inside a thread; only top-level messages match. */ ignoreThreadReplies?: boolean; /** * The message must contain at least one of these phrases, ignoring case. */ textContains?: Array; /** * The message must contain none of these phrases, ignoring case. */ textExcludes?: Array; /** * An RE2 regular expression the message must match, ignoring case. */ textMatches?: string; }; /** * Optional conditions on the Slack message text and threading. */ export type ManagedAgentsAutomationSlackFiltersRequest = { /** * Reject replies inside a thread; only top-level messages match. */ ignoreThreadReplies?: boolean; /** * The message must contain at least one of these phrases, ignoring case. */ textContains?: Array; /** * The message must contain none of these phrases, ignoring case. */ textExcludes?: Array; /** * An RE2 regular expression the message must match, ignoring case. */ textMatches?: string; }; /** * Workspace and channel routing constraints for a Slack trigger. */ export type ManagedAgentsAutomationSlackRouting = { /** * Slack channel ids accepted by this trigger; an empty list accepts every channel. */ channelIds: Array; /** * Slack workspace ids accepted by this trigger; an empty list accepts every workspace received by the source. */ workspaceIds: Array; }; /** * Closed Slack Events API trigger configuration. */ export type ManagedAgentsAutomationSlackTrigger = { /** * Explicitly allow events from Slack Connect channels shared with other organizations. Defaults to false. */ allowSharedChannels?: boolean; /** * Explicit external-bot policy. */ botEvents: ManagedAgentsAutomationSlackBotEvents; /** * Whether this trigger may admit runs while the automation is active. */ enabled: boolean; /** * Compatible Slack Events API source. */ eventSourceId: string; /** * Slack event types that may match this trigger. */ events: Array<'message' | 'app_mention'>; /** * Optional conditions on the message. Omit to match every routed event. */ filters?: ManagedAgentsAutomationSlackFilters; /** * Workspace and channel constraints. */ routing: ManagedAgentsAutomationSlackRouting; /** * Caller-generated stable trigger identifier. */ triggerId: string; /** * Slack trigger discriminant. */ type: 'slack'; }; /** * Closed Slack Events API trigger configuration. */ export type ManagedAgentsAutomationSlackTriggerRequest = { /** * Explicitly allow events from Slack Connect channels shared with other organizations. Defaults to false. */ allowSharedChannels?: boolean; /** * Explicit external-bot policy. */ botEvents: ManagedAgentsAutomationSlackBotEvents; /** * Whether this trigger may admit runs while the automation is active. */ enabled: boolean; /** * Compatible Slack Events API source. */ eventSourceId: string; /** * Slack event types that may match this trigger. */ events: Array<'message' | 'app_mention'>; /** * Optional conditions on the message. Omit to match every routed event. */ filters?: ManagedAgentsAutomationSlackFiltersRequest; /** * Workspace and channel constraints. */ routing: ManagedAgentsAutomationSlackRouting; /** * Caller-generated stable trigger identifier. */ triggerId: string; /** * Slack trigger discriminant. */ type: 'slack'; }; /** * One reason an automation starts work: a schedule, a verified webhook delivery, or a manual request. */ export type ManagedAgentsAutomationTrigger = { /** * Human-readable name shown beside the trigger in the console. */ display_name?: string; /** * Whether this trigger may start work. Independent of the automation's own status, which suspends every trigger at once. Omit to leave it as it is, which for a new trigger means enabled. */ enabled?: boolean; /** * Required when type is schedule; must be absent otherwise. */ schedule?: ManagedAgentsAutomationScheduleTrigger; /** * Server-assigned trigger identifier, stable across configuration updates. Omit when creating. */ trigger_id?: string; /** * Which mechanism fires this trigger. Exactly one matching payload field must be present, and no other. */ type: 'schedule' | 'webhook' | 'manual'; /** * Required when type is webhook; must be absent otherwise. */ webhook?: ManagedAgentsAutomationWebhookTrigger; }; /** * One reason an automation starts work: a schedule, a verified webhook delivery, or a manual request. */ export type ManagedAgentsAutomationTriggerRequest = { /** * Human-readable name shown beside the trigger in the console. */ display_name?: string; /** * Whether this trigger may start work. Independent of the automation's own status, which suspends every trigger at once. Omit to leave it as it is, which for a new trigger means enabled. */ enabled?: null | boolean; /** * Required when type is schedule; must be absent otherwise. */ schedule?: ManagedAgentsAutomationScheduleTriggerRequest; /** * Server-assigned trigger identifier, stable across configuration updates. Omit when creating. */ trigger_id?: string; /** * Which mechanism fires this trigger. Exactly one matching payload field must be present, and no other. */ type?: 'schedule' | 'webhook' | 'manual'; /** * Required when type is webhook; must be absent otherwise. */ webhook?: ManagedAgentsAutomationWebhookTriggerRequest; }; /** * One equality condition on a custom webhook body. */ export type ManagedAgentsAutomationWebhookFieldCondition = { /** * Dot-separated path into the JSON body, such as data.level. Decimal segments index arrays. */ path: string; /** * Expected scalar written as JSON text without quotes: a string as-is, a number, true, false, or null. */ value: string; }; /** * Optional conditions on the custom webhook body. */ export type ManagedAgentsAutomationWebhookFilters = { /** * Conditions that must all hold. */ fieldEquals: Array; }; /** * Optional conditions on the custom webhook body. */ export type ManagedAgentsAutomationWebhookFiltersRequest = { /** * Conditions that must all hold. */ fieldEquals: Array; }; /** * Fires an automation on a verified webhook delivery matching its filters. */ export type ManagedAgentsAutomationWebhookTrigger = { /** * Conditions that append a delivery to the existing conversation selected by conversation_key. */ continue_filter: ManagedAgentsWebhookFilter; /** * Ordered values joined into a stable external conversation identity; omit to start an independent session per matching delivery. */ conversation_key?: Array; /** * Conditions that start a new session for a verified delivery. */ start_filter: ManagedAgentsWebhookFilter; /** * Webhook endpoint whose verified deliveries reach this trigger. */ webhook_endpoint_id: string; }; /** * Fires an automation on a verified webhook delivery matching its filters. */ export type ManagedAgentsAutomationWebhookTriggerRequest = { /** * Conditions that append a delivery to the existing conversation selected by conversation_key. */ continue_filter?: ManagedAgentsWebhookFilterRequest; /** * Ordered values joined into a stable external conversation identity; omit to start an independent session per matching delivery. */ conversation_key?: Array; /** * Conditions that start a new session for a verified delivery. */ start_filter?: ManagedAgentsWebhookFilterRequest; /** * Webhook endpoint whose verified deliveries reach this trigger. */ webhook_endpoint_id?: string; }; /** * Low, typical and high values: the 25th, 50th and 75th percentiles. */ export type ManagedAgentsBand = { /** * 75th percentile. */ high: number; /** * 25th percentile. */ low: number; /** * 50th percentile, the median. */ typical: number; }; /** * A snapshot of one session tree's shared task board: its tasks, posts, and members. Present once the tree has entered team state; an auto-mode tree that has not posted reads as an empty board. */ export type ManagedAgentsBoard = { /** * RFC 3339 server time at which the snapshot was read, so a reader can age claims. */ as_of: string; /** * The sessions that may act on the board. Omitted when the reader did not resolve members. */ members?: Array; /** * Every notice, recommendation, and decision in posting order. */ posts: Array; /** * Every task on the board in posting order, including done and dropped ones. */ tasks: Array; }; /** * One session on the team as the snapshot saw it: the name it is addressed by, whether it leads, and whether it is still live. */ export type ManagedAgentsBoardMember = { /** * True for the root session, which posts the round and decides. */ leader?: boolean; /** * The name members refer to it by: the thread name for a teammate, the agent's name for the leader. */ name: string; /** * The member's session id. Task owners and post authors are recorded by this id. */ session_id: string; /** * The member's thread state when the snapshot was read, as list_agents reports it. Omitted when the reader did not resolve members. */ state?: string; }; /** * Prose attached to a board task by a member or by the harness: review verdicts, blockers, handover details. Notes are appended, never edited, so they read as the task's history. */ export type ManagedAgentsBoardNote = { /** * When the note was added. */ at: string; /** * Session id of the author, or "system" for a note the harness wrote (for example a released claim). */ by: string; /** * The note's text. A reviewer's verdict on a proposal, a blocker, or a handover detail. */ text: string; }; /** * What a done task produced: the owner's summary, its confidence, and the artifact paths a reader or reviewer can open. */ export type ManagedAgentsBoardOutcome = { /** * Sandbox paths of the outputs the task produced, when the owner named them on completion. */ artifacts?: Array; /** * The owner's confidence in the result: low, medium, or high. */ confidence?: string; /** * What the task produced, written by its owner when marking it done. */ summary: string; }; /** * A tree-wide post on the board: a pinned notice, a teammate's recommendation, or the leader's decision that closes an exploratory round. */ export type ManagedAgentsBoardPost = { /** * When the post was made. */ created_at: string; /** * Session id of the member who posted it. */ created_by: string; /** * notice: a fact every member needs, shown to every member. recommendation: a teammate's pick among a round's proposals with its rationale. decision: the leader's call on which proposals carry forward; at most one per board. */ kind: 'notice' | 'decision' | 'recommendation'; /** * Server-assigned id of the post. */ post_id: string; /** * Tasks the post refers to. A decision names the winning proposals; a recommendation names the teammate's pick. */ task_ids?: Array; /** * The post's text: the notice, or the rationale behind a recommendation or decision. */ text: string; }; /** * One row of a team's shared task board: a unit of work a member claims, does, and marks done, with its brief, dependencies, owner, outcome, and notes. */ export type ManagedAgentsBoardTask = { /** * Sandbox paths the task is expected to write, named by the poster so every member sees which paths belong to whom. */ artifacts?: Array; /** * Task ids this task waits on. The task becomes claimable once every one of them is done. */ blocked_on?: Array; /** * The self-contained brief the owner works from: what to produce, where to write it, what a good result contains, and any shared convention the round must follow. */ body: string; /** * Incremented on every claim so a stale owner cannot update a task that was released and re-claimed. */ claim_generation: number; /** * When the task was posted. */ created_at: string; /** * Session id of the member who posted the task. */ created_by: string; /** * task: work with a named output. explore: one angle on an open question, whose proposal a review reads. review: read another member's output or proposal and leave a verdict as a note. */ kind: 'task' | 'explore' | 'review'; /** * Notes attached to the task in the order they were added. */ notes?: Array; /** * What the task produced. Present once the task is done. */ outcome?: ManagedAgentsBoardOutcome; /** * Session id of the member holding the claim. Empty while the task is open or after a claim was released. */ owner_session_id?: string; /** * Tree-local ordinal, assigned in posting order. Members and the console address the task by its label, "T" followed by this number. */ seq: number; /** * open: claimable. claimed: owned and in progress. blocked: waiting on the tasks in blocked_on, or on something the owner named in a note. done: finished, with an outcome. dropped: withdrawn by the leader. */ status: 'open' | 'claimed' | 'blocked' | 'done' | 'dropped'; /** * Server-assigned id of the task, stable across status changes. */ task_id: string; /** * One-line title shown on the board and in the console. */ title: string; /** * When the task last changed status, owner, outcome, or notes. */ updated_at: string; }; /** * One built-in integration an agent may use, named by its organization connection. The connection carries the app and the tools its agents may call; the agent inherits both. */ export type ManagedAgentsBuiltInIntegration = { /** * Organization integration connection (UUID) the agent may use. Must belong to the caller's organization, be a built-in integration connection, and be active. */ connection_id: string; /** * Reserved for per-agent narrowing below the connection's admin allow-list. Must be omitted or empty today; the agent inherits the connection's full allow-list. */ tools?: Array; }; /** * Response body of POST /v1/sessions/{session_id}/cancel. Cancel is terminal for the run but not for the record: the session is stopped and the sandbox torn down, while the session, its events, and its outcomes remain readable. The session row itself is removed from reads only by the separate soft-delete endpoint. */ export type ManagedAgentsCancelledResponse = { /** * Always true. The session was stopped and the sandbox closed; failures are HTTP errors instead, so this field never reports false. It is also true when the session had already reached a terminal state, making cancel safe to retry. */ cancelled: boolean; }; /** * Session metadata, credential grants, files and memory applied to every trigger and manual admission. */ export type ManagedAgentsCanonicalAutomationRunDefaults = { /** * Exact credential selection within vaultIds. Requires explicit vaultIds. Omit to grant all items in the selected vaults. */ credentialRefs?: Array; /** * Additional memory stores attached at session start, alongside the agent memory store. */ memoryStores?: Array; /** * String metadata copied to every admitted session. */ metadata: { [key: string]: string; } | null; /** * Files resolved and mounted when each session starts. */ resources?: Array; /** * Vaults available to each session. Omit to inherit the pinned agent defaults; an empty list grants no vault access. */ vaultIds?: Array; }; /** * Session metadata, credential grants, files and memory applied to every trigger and manual admission. */ export type ManagedAgentsCanonicalAutomationRunDefaultsRequest = { /** * Exact credential selection within vaultIds. Requires explicit vaultIds. Omit to grant all items in the selected vaults. */ credentialRefs?: Array; /** * Additional memory stores attached at session start, alongside the agent memory store. */ memoryStores?: Array; /** * String metadata copied to every admitted session. */ metadata: { [key: string]: string; } | null; /** * Files resolved and mounted when each session starts. */ resources?: Array; /** * Vaults available to each session. Omit to inherit the pinned agent defaults; an empty list grants no vault access. */ vaultIds?: Array; }; /** * One trigger of a canonical automation: a schedule, a Slack event, a GitHub event, or a custom webhook. */ export type ManagedAgentsCanonicalAutomationTrigger = ManagedAgentsHttpapiAutomationScheduleTrigger | ManagedAgentsAutomationSlackTrigger | ManagedAgentsAutomationGitHubTrigger | ManagedAgentsHttpapiAutomationWebhookTrigger; /** * One trigger of a canonical automation: a schedule, a Slack event, a GitHub event, or a custom webhook. */ export type ManagedAgentsCanonicalAutomationTriggerRequest = ManagedAgentsHttpapiAutomationScheduleTriggerRequest | ManagedAgentsAutomationSlackTriggerRequest | ManagedAgentsAutomationGitHubTriggerRequest | ManagedAgentsHttpapiAutomationWebhookTriggerRequest; /** * The catalog of apps available as built-in integrations: each app, its tools with read-only and destructive classification, and whether it can be connected today. Read-only; nothing here is an authorization. */ export type ManagedAgentsCatalog = { /** * Every app in the catalog, sorted by name. Filtered by the search query when one was given. */ connectors: Array | null; /** * When this catalog was last refreshed. The catalog is refreshed about daily. */ refreshed_at: string; }; /** * One app in the built-in integrations catalog, including its authentication methods, current configurability, and classified tool inventory. */ export type ManagedAgentsCatalogConnector = { /** * How the app's account can be authenticated on its sign-in page: OAuth2, Secrets (a pasted token), or both. */ auth_types?: Array; /** * Category labels for the app. Sparse; useful for display, not for filtering. */ categories?: Array; /** * True when the app can be connected from the Integrations page. False means it is listed for reference and cannot be connected there. */ configurable: boolean; /** * One-line description of the app. */ description?: string; /** * App logo URL. */ logo_url?: string; /** * App display name. */ name: string; /** * Stable app slug, e.g. sentry. Identifies the app a built-in integration connection is for. */ slug: string; /** * The app's tools, sorted by name. Empty for an app that is not configurable. */ tools: Array | null; }; /** * One tool an app in the catalog exposes. A read-only, non-destructive classification admits it to the read preset; the write preset admits every catalog tool and stores all others at write level. */ export type ManagedAgentsCatalogTool = { /** * What the tool does. */ description?: string; /** * The tool is classified destructive: it updates or deletes data in the app. */ destructive: boolean; /** * Tool name as the app exposes it, e.g. get_issue. What a connection's tool allow-list names. */ name: string; /** * The tool is classified read-only. Only a tool with this flag and without destructive qualifies for the read permission preset; an unclassified tool does not. */ read_only: boolean; }; /** * Immutable target-agent version or model-change marker aligned with the Overview timeline. */ export type ManagedAgentsChangeMarker = { /** * Immutable target-agent version beginning at this marker. */ agent_version_id: string; /** * UTC timestamp when this immutable agent version was created. */ at: string; /** * Model used by the immediately preceding version for a model-change marker. */ from_model?: string; /** * Whether this marker denotes any version boundary or specifically a model change. */ kind: 'agent_version' | 'model_change'; /** * Selected target agent whose immutable history supplies the marker. */ target_agent_id: string; /** * Model introduced by this version for a model-change marker. */ to_model?: string; /** * Monotonic human-readable version number of the target agent. */ version_number: number; }; /** * Request body completing integration authorization after the provider redirects the user back. Sent from an authenticated session so the provider and organization come from the single-use state record rather than from callback parameters or browser-local storage. */ export type ManagedAgentsCompleteIntegrationInstallRequest = { /** * Provider authorization code, proving which user authorized this connection. Required by OAuth providers (GitHub, Jira, Confluence, Loom), which refuse a completion without one. A built-in integration's sign-in page also returns a single-use code, verified before the connection activates, so a completion without it fails. */ code?: string; /** * Which account the operator chose on the provider's own page, in the opaque form that provider returned. Providers with an account chooser may require it; GitHub returns an installation id. A selector only: the server verifies the choice against the accounts the authorizing user can reach and refuses one they cannot. */ selection?: string; /** * The nonce returned when authorization was started. Single-use and short-lived. */ state: string; }; /** * One host machine shape a sandbox could be placed on, with its CPU, memory, accelerator, current capacity, and approximate price. Host capacity may exceed the sandbox's container limit. Read-only deployment capability, identical for every organization; nothing here provisions or reserves compute. */ export type ManagedAgentsComputeOffering = { /** * Accelerator the offering carries. Absent on CPU-only offerings. */ accelerator?: ManagedAgentsComputeOfferingAccelerator; /** * CPU one pod can request on this offering's node and still schedule, after the kubelet's reservation, in millicores. This is a host ceiling, not the GPU sandbox's service-owned CPU limit. Omitted by runners that predate it. */ allocatable_cpu_milli?: number; /** * Memory one pod can request on this offering's node and still schedule, in MiB. This is a host ceiling, not the GPU sandbox's service-owned memory limit. Omitted by runners that predate it. */ allocatable_memory_mib?: number; /** * Units the provider reports as launchable right now. Present only when capacity_confidence is fresh_count; a present 0 means the provider counted and found none, while an absent value means no count was measured. */ available_count?: number; /** * How much capacity_level can be trusted: fresh_count is a live count of launchable units, advisory is a directional signal with no count, probe_on_launch means capacity is only discoverable by attempting a launch. */ capacity_confidence: string; /** * high, low, none, or unknown. GKE reports unknown because GCP will not say whether a GPU is obtainable until a pool tries to scale. */ capacity_level: string; /** * Kubernetes cluster the offering is a pool of. Omitted by runners that predate multi-cluster placement. */ cluster_id?: string; /** * Provider's own name for the machine shape, shown so an operator can recognise it in that provider's console. */ machine_label: string; /** * Memory the machine delivers, in GiB. Like vcpu, the machine's real size rather than the environment's request. */ memory_gib: number; /** * When the runner last refreshed this offering's capacity and price. */ observed_at?: string; /** * Stable identifier for this shape in this place. Opaque; compare it, do not parse it. */ offering_id: string; /** * Node pool inside the cluster. */ pool?: string; /** * Approximate price per hour in USD for the host machine at your organization's compute rate. Omitted when the deployment has no price configured for this shape; treat an absent price as unknown, never as free. */ price_per_hour_usd?: number; /** * Compute provider that would serve this offering, e.g. gke or nebius. Distinct from an environment's sandbox provider, which stays runs regardless of the cloud underneath. */ provider: string; /** * on_demand or preemptible. Preemptible capacity is cheaper and can be reclaimed by the provider. */ purchase_model: string; /** * Provider region the offering is in. */ region: string; /** * Estimated seconds from pod creation to a ready sandbox on this offering; a pool that must scale from zero is slower. */ startup_latency_seconds?: number; /** * Whether an environment with a network_policy can be placed here. An environment that sets one is restricted to offerings where this is true. */ supports_egress_policy: boolean; /** * Whether a privileged (Docker-in-Docker) sandbox can be placed here. */ supports_privileged?: boolean; /** * vCPUs the machine delivers. This is the machine's real size, not the environment's cpu_milli request, and it is frequently much larger. */ vcpu: number; /** * Capacity domain inside the region (a GCP zone, a Nebius fabric). Two zones in one region routinely disagree about availability. */ zone?: string; }; /** * Accelerator attached to a compute offering, named the same way across every provider so an environment's accelerator request means one thing everywhere. */ export type ManagedAgentsComputeOfferingAccelerator = { /** * Number of accelerators attached to one instance of this offering. */ count: number; /** * Canonical accelerator model, lower-case and provider-neutral, e.g. h100. Matches the accelerator name an environment requests, whichever provider serves it. */ name: string; /** * Per-accelerator memory in vendor-quoted gigabytes (H100 is 80, H200 is 141), not gibibytes. */ vram_gb: number; }; /** * Response body of GET /v1/compute-offerings. Describes this deployment's compute capability rather than the caller's data, so every organization sees the same list. Use CPU offering capacity to size CPU environments. For GPU environments, use the catalog to select an exclusive accelerator and understand host placement; sandbox CPU and memory limits remain service-owned and can be smaller than the host. */ export type ManagedAgentsComputeOfferingListResponse = { /** * Stable deployment-configured accelerator choices, enriched with optional provider evidence. This list is not filtered by live provider availability. */ accelerator_catalog: Array | null; /** * Live machine-shape telemetry, cheapest first within equal capacity. Empty with telemetry_unavailable false means the catalog was read and had nothing placeable; empty with it true means the runner could not be read. Neither removes configured accelerator choices. */ compute_offerings: Array | null; /** * Clusters (cluster_id) whose rows came from a cached snapshot because their last refresh failed, for providers that report per cluster. Finer-grained than stale_providers: one cluster of a provider can be stale while its others are current. */ stale_clusters?: Array; /** * Providers whose rows came from a cached snapshot because their last refresh failed. Their capacity and price are older than the rest of the response; the shapes themselves remain accurate. */ stale_providers?: Array; /** * True when the agent runner could not be read and this response falls back to configured capability: compute_offerings is empty and every accelerator_catalog evidence row is telemetry_stale. A deployment with no configured accelerator catalog answers 503 compute_offerings_unavailable instead. */ telemetry_unavailable: boolean; }; /** * Billed price of the requested compute shape. */ export type ManagedAgentsComputeRate = { /** * Billed price per hour of the requested compute shape, in USD. */ perHourUsd: number; /** * How the price was derived; unpriced_accelerator means the accelerator has no price and is excluded. */ source: 'agent_service_rate_table' | 'unpriced_accelerator'; }; /** * Result of a live health check against one integration connection: its refreshed state at the provider, whether a token could be minted, and what is missing if not. A failed check is reported here rather than as an HTTP error. */ export type ManagedAgentsConnectionProbe = { /** * True when this probe moved a pending connection to active by proving its trust with a successful mint. Omitted (false) on every later probe of the same connection. */ activated?: boolean; /** * Human-readable reason the probe did not succeed, such as a suspended install or a rejected mint. Empty when ok is true. */ failure?: string; /** * Permissions this service requires that the install has not granted at the required level. Reported, not enforced: accept the provider's pending permission request to clear them. */ missing_permissions?: Array; /** * True only when the connection is active at the provider and a scoped token was successfully minted during this probe. False means the connection cannot currently be used; read failure for why. A probe that fails this way is still an HTTP 200. */ ok: boolean; /** * Number of provider resources the connection can authorize, for example selected GitHub repositories. The live probe credential may be narrower when the provider cannot represent the entire connection scope in one token. Zero when no token could be minted. */ resource_count: number; /** * Lifecycle of the connection as of this probe: pending (registered, waiting for the customer to grant trust), active (usable), suspended (paused at the provider), or revoked (uninstalled or deleted). Refreshed here, so it can differ from the previously stored value: a pending connection whose trust proved usable is reported active. */ state: string; /** * Whether a scoped credential could actually be issued during this probe. This is the check that predicts whether a session using the connection will work. */ token_minted: boolean; }; /** * A directly registered integration connection together with the trust the customer still has to grant. The connection starts pending and becomes active when a probe mints through the granted trust. */ export type ManagedAgentsConnectionRegistration = { /** * The connection row. Newly registered rows are pending; a row that already existed for this principal is returned in whatever state it is in, and is never demoted. */ connection: ManagedAgentsIntegrationConnection; /** * True when this call created the row. False when a live connection for the same principal already existed and was returned instead. */ created: boolean; /** * True only when this request confirmed the organization delegate through the isolated provisioner. */ delegate_prepared: boolean; /** * The trust the customer must grant at the provider before the connection can activate. Regenerated on every call, so it can be recovered by registering the same principal again. */ setup: ManagedAgentsConnectionSetup; }; /** * The trust a customer must grant at the provider before a directly registered connection can activate. Regenerated on every registration call, so a lost response is recovered by registering the same identifier again. */ export type ManagedAgentsConnectionSetup = { /** * The platform-side principal the customer grants trust to. For Google Cloud this is the organization's delegate service-account email; it is derived from the authenticated organization and is the only thing the customer is told to trust. */ delegate_principal: string; /** * A ready-to-run provider CLI command that performs the grant described by the other fields. Convenience only; the identifiers are authoritative. */ grant_command: string; /** * The provider role the customer grants the delegate principal on the target, e.g. roles/iam.serviceAccountTokenCreator. */ role: string; /** * The customer-owned principal the connection represents, normalized. Matches the connection's external_id. */ target_principal: string; }; /** * One block of message content: text, image, tool_use, tool_result, thinking, or a provider passthrough. The type field says which fields apply, and provider-native payloads are carried through verbatim. */ export type ManagedAgentsContentBlock = { /** * Decoded image byte size. */ byte_size?: number; /** * Nested blocks carrying a tool_result payload, so a tool can return both text and images. */ content?: Array; /** * A document block's context: what the model should know about the document before reading it, disclosed as its first paragraph. */ context?: string; /** * Base64 image bytes. Omitted from default reads and present only for legacy storage or explicit hydrate=images responses. */ data?: string; /** * Sealed reasoning payload for providers that return reasoning encrypted. Opaque to clients; replay it verbatim. */ encrypted_content?: string; /** * Validated image height in pixels. */ height?: number; /** * Provider-assigned id of a tool_use block. Echo it back as tool_use_id on the matching tool_result. */ id?: string; /** * Tool arguments the model produced for a tool_use block, matching that tool's input schema. */ input?: { [key: string]: unknown; }; /** * True when a tool_result reports that the tool call failed; the nested content then carries the error detail. */ is_error?: boolean; /** * Declared media type; inline computer-use images allow image/jpeg, image/png, and image/webp. */ media_type?: string; /** * Name of the tool the model is invoking, on a tool_use block. */ name?: string; /** * Original byte count reported by a redacted image placeholder. */ omitted_bytes?: number; /** * Provider-native block body, stored verbatim for block types this schema does not model. Passed through unchanged. */ payload?: unknown; /** * Provider that emitted a passthrough block, e.g. anthropic or openai, telling readers how to interpret payload. */ provider?: string; /** * Original provider block exactly as received, kept alongside the normalized fields for lossless replay. */ provider_payload?: unknown; /** * True when the block's content was withheld (redacted thinking, or an image dropped by redaction); the remaining fields describe what was removed. */ redacted?: boolean; /** * Coarse hint about what an unmodeled provider block represents, so a reader can render it without provider-specific logic. */ semantic_hint?: string; /** * Lowercase SHA-256 digest of decoded image bytes. */ sha256?: string; /** * Provider-issued signature over a thinking block, or the thought signature a Gemini tool_use block was issued with, required for the provider to accept that block on a later turn. Opaque; replay it verbatim. */ signature?: string; /** * Where a user-sent image or document block's bytes came from when they were named rather than sent inline: {type: "file", file_id}. Kept on the stored block as provenance after the bytes were copied into the session; an image block then also carries the session's own uri. */ source?: ManagedAgentsContentBlockSource; /** * Readable summary blocks a provider returns alongside sealed or long-form reasoning. */ summary?: Array; /** * Text of a text block, or the reasoning text of a thinking block. */ text?: string; /** * A document block's title, disclosed to the model beside the document. */ title?: string; /** * Id of the tool_use block that this tool_result answers. */ tool_use_id?: string; /** * Block discriminator: text, image, document (a user-sent block naming a file by id, inlined as text when the message is accepted), tool_use, tool_result, thinking, redacted_thinking, or a provider passthrough type. Which of the other fields apply depends on this value. */ type: string; /** * Private typed content reference. Fetch it through getSessionImage; clients cannot read this URI directly. */ uri?: string; /** * Short-lived HTTPS URL for the image bytes. Present only when the read asked for image_urls=signed and the deployment has signing configured. Never stored; fetch a fresh read after url_expires_at. */ url?: string; /** * When url stops working. Absent whenever url is. */ url_expires_at?: string; /** * Validated image width in pixels. */ width?: number; }; /** * One block of message content: text, image, tool_use, tool_result, thinking, or a provider passthrough. The type field says which fields apply, and provider-native payloads are carried through verbatim. */ export type ManagedAgentsContentBlockRequest = { /** * Decoded image byte size. */ byte_size?: number; /** * Nested blocks carrying a tool_result payload, so a tool can return both text and images. */ content?: Array; /** * A document block's context: what the model should know about the document before reading it, disclosed as its first paragraph. */ context?: string; /** * Base64 image bytes. Omitted from default reads and present only for legacy storage or explicit hydrate=images responses. */ data?: string; /** * Sealed reasoning payload for providers that return reasoning encrypted. Opaque to clients; replay it verbatim. */ encrypted_content?: string; /** * Validated image height in pixels. */ height?: number; /** * Provider-assigned id of a tool_use block. Echo it back as tool_use_id on the matching tool_result. */ id?: string; /** * Tool arguments the model produced for a tool_use block, matching that tool's input schema. */ input?: { [key: string]: unknown; }; /** * True when a tool_result reports that the tool call failed; the nested content then carries the error detail. */ is_error?: boolean; /** * Declared media type; inline computer-use images allow image/jpeg, image/png, and image/webp. */ media_type?: string; /** * Name of the tool the model is invoking, on a tool_use block. */ name?: string; /** * Original byte count reported by a redacted image placeholder. */ omitted_bytes?: number; /** * Provider-native block body, stored verbatim for block types this schema does not model. Passed through unchanged. */ payload?: unknown; /** * Provider that emitted a passthrough block, e.g. anthropic or openai, telling readers how to interpret payload. */ provider?: string; /** * Original provider block exactly as received, kept alongside the normalized fields for lossless replay. */ provider_payload?: unknown; /** * True when the block's content was withheld (redacted thinking, or an image dropped by redaction); the remaining fields describe what was removed. */ redacted?: boolean; /** * Coarse hint about what an unmodeled provider block represents, so a reader can render it without provider-specific logic. */ semantic_hint?: string; /** * Lowercase SHA-256 digest of decoded image bytes. */ sha256?: string; /** * Provider-issued signature over a thinking block, or the thought signature a Gemini tool_use block was issued with, required for the provider to accept that block on a later turn. Opaque; replay it verbatim. */ signature?: string; /** * Where a user-sent image or document block's bytes came from when they were named rather than sent inline: {type: "file", file_id}. Kept on the stored block as provenance after the bytes were copied into the session; an image block then also carries the session's own uri. */ source?: ManagedAgentsContentBlockSource; /** * Readable summary blocks a provider returns alongside sealed or long-form reasoning. */ summary?: Array; /** * Text of a text block, or the reasoning text of a thinking block. */ text?: string; /** * A document block's title, disclosed to the model beside the document. */ title?: string; /** * Id of the tool_use block that this tool_result answers. */ tool_use_id?: string; /** * Block discriminator: text, image, document (a user-sent block naming a file by id, inlined as text when the message is accepted), tool_use, tool_result, thinking, redacted_thinking, or a provider passthrough type. Which of the other fields apply depends on this value. */ type?: string; /** * Private typed content reference. Fetch it through getSessionImage; clients cannot read this URI directly. */ uri?: string; /** * Short-lived HTTPS URL for the image bytes. Present only when the read asked for image_urls=signed and the deployment has signing configured. Never stored; fetch a fresh read after url_expires_at. */ url?: string; /** * When url stops working. Absent whenever url is. */ url_expires_at?: null | string; /** * Validated image width in pixels. */ width?: number; }; /** * Where a user-sent image or document block takes its bytes from when the caller names a file instead of carrying them: a file from the organization's catalog, read and copied into the session when the message is accepted, so the block the transcript keeps names both the source and the copy. */ export type ManagedAgentsContentBlockSource = { /** * The file whose bytes the block carries, from the caller's organization, unexpired. */ file_id: string; /** * Always file. */ type: 'file'; }; /** * Billing evidence for one attempt, read from response headers rather than from the provider usage body. For calls whose route reports its own total, that total is the authoritative amount, so it is kept here exactly as sent alongside the fields needed to audit it. */ export type ManagedAgentsCostGatewayEvidence = { /** * Call id reported with the total, which must equal the receipt's provider_request_id. Required before a reported total is treated as authoritative, and withheld from customer callers. */ call_id?: string; /** * Reported discount, as a signed lexical decimal USD string. Audit evidence only. Absent when not sent or dropped as invalid, and withheld from callers that do not read raw cost. */ discount_amount_usd?: string; /** * Reported margin on this call, as a signed lexical decimal USD string. Audit evidence only. Absent when not sent or dropped as invalid, and withheld from callers that do not read raw cost. */ margin_amount_usd?: string; /** * Reported margin as a percentage, as a signed lexical decimal. Audit evidence only. Absent when not sent or dropped as invalid, and withheld from callers that do not read raw cost. */ margin_percent?: string; /** * Reported pre-discount total, as a lexical decimal USD string. Audit evidence only; it never becomes the ledger amount. Absent when not sent or dropped as invalid, and withheld from callers that do not read raw cost. */ original_total_usd?: string; /** * Exact lexical value of the reported cost header, preserved character for character including scientific notation, and reconciled into the charge's provider_reported_model_cost_usd. Replaced with a SHA-256 marker when the header exceeded the 128-byte evidence bound. Absent when total_state is missing. */ reported_total_usd?: string; /** * Serving deployment reported with the total, used to match deployment-specific pricing rules. Withheld from customer callers. */ selected_deployment_id?: string; /** * Model the call was served by, as reported with the total. This is the model the components were priced against, not the alias the request asked for. Withheld from customer callers. */ selected_model_id?: string; /** * Whether the reported cost header can be trusted as this attempt's total: authoritative when an exact total arrived bound to a call id, missing when no header was sent, and invalid when one was sent but could not be parsed, exceeded the evidence size bound, or arrived without a call id. Anything other than authoritative forces the charge to partial. */ total_state: string; }; /** * How a provider receipt was obtained after the original response was lost, so a charge settled out of band is still auditable back to the provider. */ export type ManagedAgentsCostReceiptRecovery = { /** * How the receipt was recovered: provider_lookup means it was fetched from the provider by request id, and idempotent_retry means it came from replaying the call under the attempt's provider idempotency key. */ method: string; /** * RFC 3339 timestamp of when the receipt was recovered. */ recovered_at: string; /** * Identifier the recovery was keyed on: the receipt's provider_request_id for provider_lookup, or the attempt's provider idempotency key for idempotent_retry. */ reference: string; }; /** * Evaluation coverage over the immutable eligible-session cohort, with explicit unavailable history. */ export type ManagedAgentsCoverageTile = { /** * Current coverage minus prior coverage in percentage points, or null when incomparable. */ delta_pp: null | number; /** * Immutable eligible target cohort size, or null when history is unavailable. */ eligible_session_count: null | number; /** * Eligible cohort sessions with at least one evaluation, or null when history is unavailable. */ evaluated_eligible_session_count: null | number; /** * Exact immutable evaluation rows in the current window. */ evaluation_snapshot_count: number; /** * Whether immutable cohort history fully covers both requested windows. */ history_status: 'complete' | 'unavailable'; /** * Coverage rate for the adjacent prior window, or null when unavailable or empty. */ prior_rate: null | number; /** * Evaluated eligible sessions divided by eligible sessions, or null when unavailable or empty. */ rate: null | number; }; /** * Request body for creating an agent: its system prompt, model, tool surface, and default vault grants. Sessions snapshot the agent version at start, so later edits do not change a running session. */ export type ManagedAgentsCreateAgentRequest = { /** * Built-in integrations this agent may use, each naming an active organization connection an admin added on the Integrations page. Sessions receive short-lived access restricted to exactly those apps and each connection's tool allow-list; nothing is granted through a vault. Omit or send [] for none. Carried in full on every version write. */ built_in_integrations?: Array; /** * Individual default items within default_vault_ids. The list is a whitelist across every default vault, not a filter within one, so it must name every item the agent should receive. Omit to select every current item; [] alongside a non-empty default_vault_ids is rejected because it would select none. */ default_credential_refs?: Array; /** * Labelbox project copied into sessions started from this agent when their create request omits project_id. A non-empty session project_id overrides it. */ default_project_id?: null | string; /** * Markdown rubric that sessions started from this agent are graded against when their create request omits an outcome. Must contain at least one gradeable criterion, written as markdown list items. A session that supplies its own outcome ignores this entirely. */ default_rubric?: null | string; /** * Vaults granted by default when a session create request omits vault_ids. default_credential_refs may narrow their items. */ default_vault_ids?: Array; /** * Optional free-text note about what the agent is for. Not sent to the model. */ description?: string; /** * Native integration providers whose MCP tools sessions of this agent do not receive even though the grant is present. The grant still authenticates the provider's sandbox tools where it has any (git and gh for GitHub); the agent's own mcp_servers are never affected. Omission differs by operation: on createAgent it defaults to ["github"] (new agents use gh and git in the sandbox); on createAgentVersion it means none, as for every other field there; send [] to receive every provider's MCP tools. */ disabled_integration_mcp_providers?: Array; /** * Maximum number of this agent's root sessions that may run or wait on compute at once. Omit for unlimited. Sessions beyond the cap are accepted with execution_state=queued and wait until a slot frees. */ max_concurrent_sessions?: null | number; /** * Remote MCP servers whose tools are added to the agent's tool surface. Each entry is an object with name and url, e.g. {"name": "docs", "url": "https://example.com/mcp"}. Credentials come from the vaults granted to the session, and the discovered tool list is snapshotted at session start, so a later edit here does not change a running session. */ mcp_servers?: Array<{ [key: string]: unknown; }>; /** * Free-form caller-owned JSON stored with the agent and returned on reads. Not interpreted by the service and never sent to the model. */ metadata?: { [key: string]: unknown; }; /** * Model id, copied verbatim from the models catalog, GET /v1/models (e.g. anthropic/claude-sonnet-4-5). Reads return the stored form, which adds a provider prefix before that id. An id the catalog does not list is rejected with the list of ids that it does. */ model: string; /** * Default inference config applied to sessions started from this agent. Omit model_config or send {} to use provider defaults; null is invalid. reasoning_effort is normalized and validated for direct providers, and must exactly match the selected catalog model's supportedReasoningEfforts. An unsupported value, including any value for a catalog model that lists no exact options, returns 400; a model catalog that cannot be read to verify it returns 503. */ model_config?: ManagedAgentsInferenceConfigRequest; /** * Multiagent roster: the delegation targets this agent may hand work to, an optional advisor entry, and the interventionist posture. Snapshotted at session start; a child roster may tighten the recursion depth ceiling, never widen it. */ multiagent?: { [key: string]: unknown; }; /** * Human-readable label for the agent. Required. */ name: string; /** * Native connections this agent may use, with provider-enforced permission and resource restrictions. Omit or send [] for none. Stored in full on each agent version; secrets remain on the connection. */ nativeIntegrations?: Array; /** * Skill declarations made available to the agent, passed through as given and snapshotted into the session at start. Capped at the 100 skills a session can carry. */ skills?: Array<{ [key: string]: unknown; }>; /** * System prompt for the agent. */ system: string; /** * Deprecated alias for toolsets; accepts only the bare evaluation marker. * * @deprecated */ tools?: Array<{ /** * The evaluation marker is the only supported toolset type. */ type: 'evaluation'; }>; /** * Only the bare {type: evaluation} marker is supported, for evaluator agents. Omit or send [] for ordinary agents; built-in sandbox tools, MCP servers, and skills do not require a toolset. The tools field is a deprecated alias. */ toolsets?: Array<{ /** * The evaluation marker is the only supported toolset type. */ type: 'evaluation'; }>; /** * Whether sessions started from this agent may use the native web_search tool. Omit to enable it. The setting is snapshotted when a session starts. */ web_search_enabled?: boolean; }; /** * Request body for creating a new immutable agent version. Every field means what it means on createAgent -- full content is always required, there is no partial update -- except disabled_integration_mcp_providers, whose omission means none here rather than the new-agent default. base_agent_version_id must be the agent's current version or the request is rejected with revision_conflict so the caller can re-read and retry. */ export type ManagedAgentsCreateAgentVersionRequest = { /** * The agent's current latest_agent_version_id, as returned by getAgent. Rejected with 409 revision_conflict if the agent has moved past this version. */ base_agent_version_id: string; /** * Built-in integrations this agent may use, each naming an active organization connection an admin added on the Integrations page. Sessions receive short-lived access restricted to exactly those apps and each connection's tool allow-list; nothing is granted through a vault. Omit or send [] for none. Carried in full on every version write. */ built_in_integrations?: Array; /** * Individual default items within default_vault_ids. The list is a whitelist across every default vault, not a filter within one, so it must name every item the agent should receive. Omit to select every current item; [] alongside a non-empty default_vault_ids is rejected because it would select none. */ default_credential_refs?: Array; /** * Labelbox project copied into sessions started from this agent when their create request omits project_id. A non-empty session project_id overrides it. */ default_project_id?: null | string; /** * Markdown rubric that sessions started from this agent are graded against when their create request omits an outcome. Must contain at least one gradeable criterion, written as markdown list items. A session that supplies its own outcome ignores this entirely. */ default_rubric?: null | string; /** * Vaults granted by default when a session create request omits vault_ids. default_credential_refs may narrow their items. */ default_vault_ids?: Array; /** * Optional free-text note about what the agent is for. Not sent to the model. */ description?: string; /** * Native integration providers whose MCP tools sessions of this agent do not receive even though the grant is present. The grant still authenticates the provider's sandbox tools where it has any (git and gh for GitHub); the agent's own mcp_servers are never affected. Omission differs by operation: on createAgent it defaults to ["github"] (new agents use gh and git in the sandbox); on createAgentVersion it means none, as for every other field there; send [] to receive every provider's MCP tools. */ disabled_integration_mcp_providers?: Array; /** * Maximum number of this agent's root sessions that may run or wait on compute at once. Omit for unlimited. Sessions beyond the cap are accepted with execution_state=queued and wait until a slot frees. */ max_concurrent_sessions?: null | number; /** * Remote MCP servers whose tools are added to the agent's tool surface. Each entry is an object with name and url, e.g. {"name": "docs", "url": "https://example.com/mcp"}. Credentials come from the vaults granted to the session, and the discovered tool list is snapshotted at session start, so a later edit here does not change a running session. */ mcp_servers?: Array<{ [key: string]: unknown; }>; /** * Free-form caller-owned JSON stored with the agent and returned on reads. Not interpreted by the service and never sent to the model. */ metadata?: { [key: string]: unknown; }; /** * Model id, copied verbatim from the models catalog, GET /v1/models (e.g. anthropic/claude-sonnet-4-5). Reads return the stored form, which adds a provider prefix before that id. An id the catalog does not list is rejected with the list of ids that it does. */ model: string; /** * Default inference config applied to sessions started from this agent. Omit model_config or send {} to use provider defaults; null is invalid. reasoning_effort is normalized and validated for direct providers, and must exactly match the selected catalog model's supportedReasoningEfforts. An unsupported value, including any value for a catalog model that lists no exact options, returns 400; a model catalog that cannot be read to verify it returns 503. */ model_config?: ManagedAgentsInferenceConfigRequest; /** * Multiagent roster: the delegation targets this agent may hand work to, an optional advisor entry, and the interventionist posture. Snapshotted at session start; a child roster may tighten the recursion depth ceiling, never widen it. */ multiagent?: { [key: string]: unknown; }; /** * Human-readable label for the agent. Required. */ name: string; /** * Native connections this agent may use, with provider-enforced permission and resource restrictions. Omit or send [] for none. Stored in full on each agent version; secrets remain on the connection. */ nativeIntegrations?: Array; /** * Skill declarations made available to the agent, passed through as given and snapshotted into the session at start. Capped at the 100 skills a session can carry. */ skills?: Array<{ [key: string]: unknown; }>; /** * System prompt for the agent. */ system: string; /** * Deprecated alias for toolsets; accepts only the bare evaluation marker. * * @deprecated */ tools?: Array<{ /** * The evaluation marker is the only supported toolset type. */ type: 'evaluation'; }>; /** * Only the bare {type: evaluation} marker is supported, for evaluator agents. Omit or send [] for ordinary agents; built-in sandbox tools, MCP servers, and skills do not require a toolset. The tools field is a deprecated alias. */ toolsets?: Array<{ /** * The evaluation marker is the only supported toolset type. */ type: 'evaluation'; }>; /** * Whether sessions started from this agent may use the native web_search tool. Omit to enable it. The setting is snapshotted when a session starts. */ web_search_enabled?: boolean; }; /** * Request body for creating an environment: the sandbox image, setup, compute sizing, networking, and lifecycle a session's sandbox is provisioned from. Server-managed fields are not accepted. */ export type ManagedAgentsCreateEnvironmentRequest = { /** * Enable the shared interactive browser display. The server sets http_port to 6901; false disables it. */ computer_use?: null | boolean; /** * Provider-specific overflow config. */ config?: { [key: string]: unknown; }; /** * Optional free-text note about what this environment is for. */ description?: string; /** * Environment variables injected into the sandbox. */ env_vars?: { [key: string]: string; }; /** * TCP port inside the sandbox that the provider exposes for HTTP traffic. Omit or send 0 if the workload serves nothing. */ http_port?: null | number; /** * Seconds of inactivity after which the sandbox is stopped. Omit or send 0 to use the provider's lifecycle policy instead of a per-environment one. Computer use requires 0 or at least 600 seconds. */ idle_stop_after_seconds?: number; /** * Container/sandbox image the runtime runs in. */ image?: string; /** * Free-form caller-owned JSON stored with the environment and returned on reads. Not interpreted by the service. */ metadata?: { [key: string]: unknown; }; /** * Files staged into the sandbox workspace on create. */ mounts?: Array; /** * Human-readable label for the environment. Required. */ name: string; /** * Runs egress policy. Omit or send null to derive deny-all. A nonempty policy requires GKE: the runtime selects GKE when placement is omitted, or accepts explicit GKE placement. With explicit non-GKE placement, send {} for unrestricted egress or change placement to GKE. */ network_policy?: { [key: string]: unknown; } | null; /** * Whether the Runs sandbox may use privileged Docker. Defaults to false independently of network_policy. Compute creation fails closed unless Agent Service can enforce the requested combination. */ privileged?: null | boolean; /** * Environment runtime: runs (managed agent runner) or docker (local development). Any other value is rejected, including the retired self_hosted and rma names. */ provider: string; /** * Size in gibibytes of the persistent volume attached to the sandbox workspace. Omit or send 0 to let the sandbox provider choose. */ pvc_size_gi?: number; /** * Compute sizing: cpu_milli and memory_mib for a CPU environment, or one exclusive accelerator for a GPU environment with service-owned limits of 8,000 millicores (8 vCPU) and 32,768 MiB (32 GiB) of memory. */ resources?: ManagedAgentsEnvironmentResources; /** * Visibility of the environment record within the organization. Defaults to organization when omitted. */ scope?: string; /** * Env-var name -> secret-manager reference (never plaintext). */ secrets?: { [key: string]: string; }; /** * Setup script run once on fresh compute after the sandbox is provisioned, before the agent starts. Verify it with createEnvironmentSetupRun (or ?verify=true on this call) before starting sessions. */ setup?: ManagedAgentsEnvironmentSetup; /** * Seconds a stopped sandbox is retained before deletion, after which its workspace is gone. Omit or send 0 to use the provider's lifecycle policy. */ stopped_delete_after_seconds?: number; }; /** * Request body for creating a new immutable skill version. Every field means what it means on createSkill -- full content is always required, there is no partial update. base_skill_version_id must be the skill's current version or the request is rejected with revision_conflict so the caller can re-read and retry. */ export type ManagedAgentsCreateSkillVersionRequest = { /** * The skill's current latest_skill_version_id, as returned by getSkill. Rejected with 409 revision_conflict if the skill has moved past this version. */ base_skill_version_id: string; /** * Human-readable title for listings. Defaults to the frontmatter name. */ display_title?: string; /** * The complete SKILL.md: YAML frontmatter delimited by --- on the very first line, then Markdown instructions. name and description are required in the frontmatter and are read from it. */ document: string; /** * Relative paths of files bundled with the skill, listed to the model when it activates the skill. Paths must stay inside the skill directory. */ manifest?: Array; /** * Caller-owned key/value data stored with the skill and returned unchanged. */ metadata?: { [key: string]: unknown; }; }; /** * Request body for creating one organization-scoped tag definition. The organization always comes from the authenticated principal. */ export type ManagedAgentsCreateTagRequest = { /** * Display color in #RRGGBB form. */ color: string; /** * Optional operator-facing explanation of this classification, up to 280 characters. */ description?: string; /** * Display label. Leading and trailing whitespace is removed; the result must contain 1-32 characters and be unique case-insensitively among live tags in the organization. */ label: string; }; /** * Request body creating a Slack wake rule: the connection and event to match, and the agent, environment, and vaults a match runs with. Every referenced object must belong to the calling organization; GitHub events use provider-neutral automations instead. */ export type ManagedAgentsCreateTriggerBindingRequest = { /** * Agent (UUID) a matching event starts a session for, as returned by listAgents. */ agent_id: string; /** * Scope the binding to one channel; omit to match every channel. */ channel_id?: string; /** * The integration connection whose events this binding routes. */ connection_id: string; /** * Whether the binding may match events. Defaults to false, which stores the rule without arming it. */ enabled?: boolean; /** * Environment (UUID) that session runs in, as returned by listEnvironments. */ environment_id: string; /** * Optional caller-owned stable identity for a binding managed by code, so its owner can recognise the binding after the channel or wake event changes. Omit for a binding made by hand. At most 128 characters of letters, digits, '.', '_', ':', '/', and '-'. Not unique: the owning code refuses ambiguity itself. */ owner_key?: string; /** * Vaults (UUIDs) to grant the woken session. */ vault_ids?: Array; /** * Slack source app ids (A…) whose top-level posts may start a session. Empty means app-authored roots never start work. Legal only on an exact-channel message_root binding. */ wake_app_ids?: Array; /** * Slack selector: app_mention (exact channel or internal-only fallback), message (exact channel required; every post and reply wakes the agent), message_root (exact channel required, internal or Slack Connect; each new top-level post starts an investigation immediately and replies stay mention-only), or app_mention_ext_shared (empty channel required; opt-in shared-only fallback). Exact bindings take precedence; creating an enabled message_root binding is rejected while another enabled exact binding exists on the channel, and vice versa. */ wake_event?: string; }; /** * Request body for adding one credential to a vault. Its shape depends on credential_type. bearer_token and env_var accept exactly one of secret_value or secret_ref; webhook_secret requires secret_value; integration accepts neither. Secret material is encrypted at rest and never returned. */ export type ManagedAgentsCreateVaultCredentialRequest = { /** * Hosts the credential may be sent to under limited networking. Supports wildcards such as *.example.com. */ allowed_hosts?: Array; /** * bearer_token authenticates to an MCP server and requires mcp_server_url. env_var is exposed to the sandbox for CLIs and SDKs. webhook_secret never reaches the sandbox and is used only to verify inbound webhook signatures. integration references a connected provider account and carries no secret of its own. */ credential_type: 'bearer_token' | 'env_var' | 'webhook_secret' | 'integration'; /** * Operator-facing label. */ display_name?: string; /** * Where a bearer or MCP credential attaches to a request. Defaults to headers, which is recommended unless the service reads the secret from the request body. Ignored for env_var, which is injected into the sandbox environment instead, and for integration. */ injection_locations?: Array; /** * The connected account this grant uses. Required for the integration kind. */ integration_connection_id?: string; /** * Provider permission preset applied when minting. See the provider's list; defaults to the least-privileged one. */ integration_permission?: string; /** * Resources within the connection this grant may reach, e.g. GitHub repository names. Empty means every resource the connection reaches, which is broader than most grants should be. */ integration_resources?: Array; /** * Labelbox product-state authorization ceiling: either exact projects or organization-wide access, optionally restricted to one exact Slack audience with an explicit internal or Slack Connect classification. Required when credential_type is bearer_token and mcp_server_url is that service; rejected for any other server. */ labelbox_scope?: ManagedAgentsLabelboxScopeRequest; /** * The MCP server this credential unlocks. Must be http or https and must not embed credentials. Required for the MCP kinds and immutable afterwards, so it is validated here rather than at the first connection. */ mcp_server_url?: string; /** * Free-form caller-owned JSON stored with the credential row and returned on reads. Not interpreted by the service; never put secret material here, since unlike secret_value it is returned verbatim. The key labelbox_scope is reserved for the typed field. */ metadata?: { [key: string]: unknown; }; /** * Where the credential may be sent. Defaults to limited, which restricts it to allowed_hosts. */ network_mode?: 'limited' | 'unrestricted'; /** * Environment variable or header name the secret binds to inside the sandbox. Required for env_var. */ secret_name?: string; /** * Reference to material stored outside this service, carrying a provider prefix. Not supported for webhook_secret, which this service verifies itself. Requests carrying obvious inline secret material are rejected. */ secret_ref?: string; /** * The credential material itself. Encrypted at rest and never returned or logged by this service. Supply this or secret_ref, not both. */ secret_value?: string; }; /** * Request body for creating a vault: the container that credentials are added to and that sessions are granted. Creating a vault stores no secret material of its own. */ export type ManagedAgentsCreateVaultRequest = { /** * Operator-facing label for the vault, shown wherever grants are reviewed. Required. */ display_name: string; /** * Optional retry key scoped to the authenticated organization. Reusing it with different creation details is a conflict. */ idempotency_key?: string; /** * Free-form caller-owned JSON stored with the vault and returned on reads. Not interpreted by the service; never put secret material here. */ metadata?: { [key: string]: unknown; }; }; /** * One aligned criterion-verdict series point in the frozen Overview window. */ export type ManagedAgentsCriterionSeriesPoint = { /** * Exact evaluation time or inclusive UTC start of this aligned interval; legacy responses use window-anchored 24-hour buckets. */ bucket_start: string; /** * Stable rubric key represented by this series point. */ criterion_key: string; /** * Criterion fail verdicts at this exact time or in this interval. */ fail_count: number; /** * Criterion not-applicable verdicts at this exact time or in this interval. */ not_applicable_count: number; /** * Criterion pass verdicts at this exact time or in this interval. */ pass_count: number; /** * Pass divided by pass plus fail, or null at a zero denominator. */ rate: null | number; }; export type ManagedAgentsDefineOutcomeRequest = unknown & { /** * The objective the agent works toward, and the statement of it the grader is given. It opens the session when the start request carries no message. */ description: string; /** * Model reference for the grader. Defaults to the session's model. */ grader_model_ref_id?: string; /** * Ceiling on grader passes before the outcome ends as max_iterations_reached. Omit it, or send 0, to revise until the grader is satisfied, which is the default. Set a number only to cap a rubric you are not sure can be met. */ max_iterations?: number; /** * Markdown the grader scores the work against. Criteria must be independently checkable: 'the CSV has a numeric price column' can be verified, 'the data looks good' cannot. Send this or rubric_ref. */ rubric?: string; /** * The rubric as a file instead of inline markdown: the file's text is read once, when the outcome is defined, and recorded as the rubric. Exactly one of rubric and rubric_ref is required. */ rubric_ref?: ManagedAgentsOutcomeRubricRef; }; /** * Shared response body of every soft-delete endpoint, on agents, environments, tags, vaults, vault credentials, webhook bindings, and sessions. Soft delete is a tombstone, not an erase: the row stops appearing in list and get responses but is retained, and there is no undelete endpoint to bring it back. Irreversible erasure is the separate, confirmation-gated purge path. */ export type ManagedAgentsDeletedResponse = { /** * Always true. The record was soft deleted and is now excluded from reads; a delete that did not happen is an HTTP error instead, so this field never reports false. */ deleted: boolean; }; /** * One attached skill as a turn's prompt will list it, and whether the budget left room for its description. An entry without one still activates, but the model has only the name to decide with. */ export type ManagedAgentsDisclosureEntry = { /** * False when the budget was exhausted before this skill and it is listed by name only. */ description_included: boolean; /** * The skill's name, as the model sees it. */ name: string; }; /** * What a set of skill attachments costs the model's prompt on every turn, and which skills the budget has reduced to a bare name. A skill listed without its description is still activatable but is unlikely to be chosen, because the description is the only signal the model has for choosing it. */ export type ManagedAgentsDisclosurePreview = { /** * Characters of prompt this session's model allows tier-1 skill disclosure to spend each turn. */ budget_chars: number; /** * Every attached skill in disclosure order, and whether the model is told what it is for. */ entries: Array; /** * Characters the rendered catalog actually occupies. Measured from the same pass that produces the prompt, not estimated. */ used_chars: number; /** * What resolving and rendering this set cost: unresolvable references, truncated descriptions, and skills reduced to a name. */ warnings: Array; }; /** * Summary of what removing an integration connection retired. Returned when a connection is disconnected, so a caller can see how many vault grants it invalidated. */ export type ManagedAgentsDisconnectResult = { /** * Connection that was disconnected (UUID). Adding the same GitHub installation later creates a new connection; saved agent references remain on this retired ID. */ connection_id: string; /** * Always true on success: the connection row was soft-deleted and this service will no longer mint tokens for it. The app itself is deliberately left installed at the provider. */ deleted: boolean; /** * Number of vault grants that referenced this connection and have stopped working. They are not restored by reconnecting and must be recreated. */ grants_revoked: number; }; /** * A sandbox environment a session executes in: its provider, resources, mounts, setup steps and idle/delete lifecycle. Created and started independently of any session. */ export type ManagedAgentsEnvironment = { /** * Whether this environment boots the shared interactive Chromium display used by the computer and human-handoff tools. The server projects this to http_port 6901. */ computer_use: boolean; /** * Provider-specific overflow settings this schema does not model. Passed to the provider unchanged. */ config?: { [key: string]: unknown; }; /** * Server-assigned RFC 3339 timestamp of when the environment was created. */ created_at: string; /** * Free-text note about what this environment provides. */ description?: string; /** * Plaintext environment variables exported in the sandbox. They become the whole container environment, including the runner entrypoint's, so PATH is refused (env_vars.PATH): managed images select /workspace/.venv themselves. A Runs session using one-time setup after its runner changes also refuses startup-hook names such as BASH_ENV, HOME, PYTHONPATH, and LD_PRELOAD; re-test to capture a compatible image instead. Never put secrets here; use secrets instead. On update, omit to keep the current variables; send {} to clear them. */ env_vars?: { [key: string]: string; }; /** * Server-assigned id of the environment; pass it when starting a session that should run in this sandbox. */ environment_id: string; /** * Port inside the sandbox to expose over HTTP for services the agent starts; 0 exposes nothing. */ http_port?: number; /** * Seconds of inactivity after which a running sandbox is stopped; 0 uses the provider default. A computer-enabled environment requires 0 or at least 600 seconds so its five-minute handoff heartbeat arrives before idle-stop. */ idle_stop_after_seconds?: number; /** * Container image the sandbox boots. Omit to use the provider's default image. For the Agent runner provider only the deployment's own runner repository or a sibling published beside it (for example rma-runner-recursion) is accepted, and it must be omitted when an accelerator is requested, which always boots the platform's GPU runner. Customize the sandbox itself with setup.script. */ image?: string; /** * Caller-owned key/value data stored with the environment and returned unchanged. */ metadata?: { [key: string]: unknown; }; /** * Files or objects staged into the sandbox workspace when it is created. On update, omit to keep the current mounts; send [] to clear them. */ mounts?: Array; /** * Human-readable label shown wherever environments are listed. */ name: string; /** * Runs egress rules. On update, omission keeps the stored policy. Changing from a non-Runs provider to Runs with an absent or {} stored policy requires an explicit network_policy: {"version":"v1","rules":[]} for deny-all or {} for unrestricted egress. A nonempty policy requires GKE; with explicit non-GKE placement, send {} for unrestricted egress or change placement to GKE. Send {} to clear a policy. Runs responses always include network_policy; {} means unrestricted. */ network_policy?: { [key: string]: unknown; }; /** * Organization that owns the environment. Server-assigned from the caller's credentials; a value sent in a request body is ignored. */ organization_id: string; /** * Whether a Runs sandbox may use privileged Docker. Independent of network_policy; omit on update to retain the saved value, or send false to disable it. New Runs environments and transitions from another provider default to false. Existing Runs environments retain their earlier effective setting until edited. Compute creation fails closed unless Agent Service can enforce the requested combination. */ privileged?: boolean; /** * Sandbox runtime that executes the session, chosen from the sandbox providers catalog. */ provider: string; /** * Size in GiB of the persistent workspace volume; 0 uses the provider default. */ pvc_size_gi?: number; /** * Caller-sized CPU and memory for CPU environments, or one exclusive accelerator with service-owned limits of 8,000 millicores (8 vCPU) and 32,768 MiB (32 GiB) of memory for GPU environments, plus lifetime and placement constraints. */ resources: ManagedAgentsEnvironmentResources; /** * Who may use the environment. Defaults to organization, meaning it is shared across the owning organization. */ scope: string; /** * Environment variable name to secret-manager reference. References only, never plaintext values; the runtime resolves them at start. The one-time Runs setup fallback applies the same startup-hook name restriction to secrets and vault-injected variables. On update, omit to keep the current references; send {} to clear them. */ secrets?: { [key: string]: string; }; /** * Setup script run after the sandbox is provisioned and before the agent starts. */ setup: ManagedAgentsEnvironmentSetup; /** * RFC 3339 timestamp of the last setup script change. Server-assigned. */ setup_updated_at?: string; /** * User who last changed the setup script. Server-assigned. */ setup_updated_by_user_id?: string; /** * Server-owned verdict on the setup script: whether a manual setup run has proven this exact configuration on real compute. Read status and stale before starting sessions; read last_run.hint first when status is failed. Ignored in request bodies. */ setup_verification?: ManagedAgentsEnvironmentSetupVerification; /** * Advisory findings about the setup script (bash -lc wrapping, curl | sh, unpinned installs, ambiguous system Python, PATH replacement, or non-persistent shell activation), plus legacy_setup_discarded when the stored setup predates setup.script and is not run. Never block a save; computed on read. */ setup_warnings?: Array; /** * Seconds a stopped sandbox is retained before it is deleted along with its volume; 0 uses the provider default. */ stopped_delete_after_seconds?: number; /** * Server-assigned RFC 3339 timestamp of the most recent update to the environment. */ updated_at: string; }; /** * An accelerator attached to an environment's sandbox compute. Set it only for GPU workloads; omit it and the sandbox runs CPU-only. A GPU sandbox receives one exclusive accelerator with service-owned limits of 8,000 millicores (8 vCPU) and 32,768 MiB (32 GiB) of memory; its host machine may be larger. */ export type ManagedAgentsEnvironmentAccelerator = { /** * How many accelerators to attach. Defaults to 1; every offering currently carries one. */ count?: number; /** * Accelerator model, lower-case and provider-neutral, e.g. a100. Must name a model in this deployment's configured accelerator_catalog. Live compute offerings enrich that catalog but never remove configured choices. */ name?: string; /** * Accelerator class to attach. Only gpu is accepted. */ type?: string; }; /** * Request-only precondition for changing an environment's access settings. Supply the network policy and effective privileged value from the last environment read; a stale snapshot is rejected. */ export type ManagedAgentsEnvironmentAccessExpectation = { /** * network_policy from the environment read before this PATCH; {} means unrestricted egress. */ network_policy: { [key: string]: unknown; }; /** * Effective privileged value from the environment read before this PATCH. */ privileged: boolean; }; /** * Response body of GET /v1/environments. An environment is the sandbox recipe a session runs inside; pick an environment_id from here when starting a session with POST /v1/sessions. */ export type ManagedAgentsEnvironmentListResponse = { /** * Every environment in the caller's organization, newest first. Null rather than an empty array when the organization has no environments. Soft-deleted environments are omitted. */ environments: Array | null; }; /** * One file or object staged into the sandbox workspace when it is created. Use mounts to give an agent input data it should find already on disk at the first turn. */ export type ManagedAgentsEnvironmentMount = { /** * Absolute path inside the sandbox workspace where the source is placed. */ mount_path?: string; /** * Object or file to stage, as a URI the service can read. */ source?: string; }; /** * Where an environment's sandboxes may run, expressed as constraints rather than a named machine. The runtime selects a provider that can enforce the environment's access settings. */ export type ManagedAgentsEnvironmentPlacement = { /** * Let preemptible capacity compete on price. A reclaimed sandbox is failed and restarted from its last snapshot rather than resumed in place, so this trades an occasional lost turn for markedly cheaper accelerators. */ allow_spot?: boolean; /** * Reject offerings priced above this per hour. Offerings whose price is unknown are never rejected by this, because an unpriced offering is a gap in a provider's catalog rather than an expensive machine. */ max_price_per_hour_usd?: number; /** * Reject offerings whose per-accelerator memory is below this, in vendor-quoted gigabytes. Omit unless a workload genuinely needs the larger variant: an H100 and an H200 run the same image and the same snapshot, so treating them as interchangeable is what makes capacity findable. */ min_accelerator_vram_gb?: number; /** * Restrict placement to these providers, e.g. gke or nebius. Empty permits configured providers compatible with the environment's network policy and privileged access. A nonempty Runs network_policy requires gke. */ providers?: Array; /** * Regions the sandbox may run in, as each provider names them. Empty means anywhere the deployment has configured, which is the usual answer: constraining regions constrains capacity, and capacity is the reason to place across providers at all. */ regions?: Array; }; /** * Compute sizing and lifetime for an environment's sandbox. CPU environments accept caller-selected CPU and memory. GPU environments accept an exclusive accelerator plus optional lifetime and placement constraints, but use service-owned limits of 8,000 millicores (8 vCPU) and 32,768 MiB (32 GiB) of memory. */ export type ManagedAgentsEnvironmentResources = { /** * Exclusive GPU to attach to the sandbox compute. Omit for CPU-only. When set, the service applies limits of 8,000 millicores (8 vCPU) and 32,768 MiB (32 GiB) of memory, and cpu_milli and memory_mib must be omitted. */ accelerator?: ManagedAgentsEnvironmentAccelerator; /** * CPU request in millicores, so 1000 is one vCPU; 0 uses the provider default. CPU-only environments; must be omitted with an accelerator because the GPU sandbox CPU limit is service-owned. */ cpu_milli?: number; /** * Memory request in MiB; 0 uses the provider default. CPU-only environments; must be omitted with an accelerator because the GPU sandbox memory limit is service-owned. */ memory_mib?: number; /** * Optional region, provider, VRAM, spot, and price constraints. Without an egress policy, omission permits any configured provider. A nonempty Runs network_policy requires GKE; when placement is omitted, the runtime selects GKE without saving a placement constraint. */ placement?: ManagedAgentsEnvironmentPlacement; /** * Maximum sandbox lifetime in seconds before the provider tears it down; 0 uses the provider default. */ timeout_seconds?: number; }; /** * Post-provision customization of a sandbox: a bash script run before the agent starts. Set it when the agent needs packages, tools, or state the runner image does not ship; leave it empty to start from the image as is. Verify it with a setup run before sessions use the environment. */ export type ManagedAgentsEnvironmentSetup = { /** * Bash script run after the sandbox is provisioned and before the agent starts. When a Runs session's verified captured image has an older runner base, setup runs once on that session's compute. It does not rerun after a container restart or move; a changed container generation prevents further sandbox work in that session. Re-test the environment to capture a compatible image, then start a new session. Executed as a separate login shell with set -eo pipefail, so the first failing line fails the run and is reported by line number; exports and activation do not persist into agent commands. Managed images automatically select a /workspace/.venv created here: install through its explicit interpreter and preserve the existing PATH. Do not wrap lines in bash -lc; the script already runs under bash. Empty means no setup. At most 64 KiB. */ script?: string; /** * Wall-clock bound in seconds on the whole script; 0 uses the default of 600. Between 10 and 3600 when set. A run that exceeds it fails with exit code 124. */ timeout_seconds?: number; }; /** * An immutable setup image published after a manual setup run passes. Identity includes the environment fingerprint, configured runner, observed base digest, and capture generation. */ export type ManagedAgentsEnvironmentSetupImage = { /** * Immutable base image reference observed by Agent Service. */ baseImageDigest: string; /** * When Agent Service reported the image ready. */ capturedAt: string; /** * Agent Service compute whose filesystem was captured. */ computeId: string; /** * Environment configuration fingerprint this image was produced for. */ fingerprint: string; /** * Capture and boot contract generation. */ generation: number; /** * Immutable digest-pinned image reference. */ image: string; /** * Agent Service image id. */ imageId: string; /** * Exact configured runner reference selected for the captured compute. */ runnerImage: string; /** * Manual setup run that produced this image. */ setupRunId: string; /** * Captured filesystem layer size. */ sizeBytes: number; /** * Registry-free read-time projection for the active verified environment and configured runner. A moving tag may have changed since this projection; session admission resolves its exact digest before choosing the captured image or per-session setup. */ usable?: boolean; /** * Agent Service warmup state: pulling, verifying, ready, failed, or unavailable. */ warmup?: string; /** * Bounded Agent Service explanation of the warmup state. */ warmupMessage?: string; }; /** * Why a verified setup run published no new reusable image. */ export type ManagedAgentsEnvironmentSetupImageCapture = { /** * When the capture failure was recorded. */ at: string; /** * Sanitized bounded explanation. */ message?: string; /** * Stable Agent Service capture failure reason. */ reason?: string; /** * Setup run whose capture failed. */ setupRunId: string; /** * Always failed; successful capture is represented by image. */ status: 'failed'; }; /** * Why a verified setup run published no new reusable image. */ export type ManagedAgentsEnvironmentSetupImageCaptureRequest = { /** * When the capture failure was recorded. */ at?: string; /** * Sanitized bounded explanation. */ message?: string; /** * Stable Agent Service capture failure reason. */ reason?: string; /** * Setup run whose capture failed. */ setupRunId?: string; /** * Always failed; successful capture is represented by image. */ status?: 'failed'; }; /** * An immutable setup image published after a manual setup run passes. Identity includes the environment fingerprint, configured runner, observed base digest, and capture generation. */ export type ManagedAgentsEnvironmentSetupImageRequest = { /** * Immutable base image reference observed by Agent Service. */ baseImageDigest?: string; /** * When Agent Service reported the image ready. */ capturedAt?: string; /** * Agent Service compute whose filesystem was captured. */ computeId?: string; /** * Environment configuration fingerprint this image was produced for. */ fingerprint?: string; /** * Capture and boot contract generation. */ generation?: number; /** * Immutable digest-pinned image reference. */ image?: string; /** * Agent Service image id. */ imageId?: string; /** * Exact configured runner reference selected for the captured compute. */ runnerImage?: string; /** * Manual setup run that produced this image. */ setupRunId?: string; /** * Captured filesystem layer size. */ sizeBytes?: number; /** * Registry-free read-time projection for the active verified environment and configured runner. A moving tag may have changed since this projection; session admission resolves its exact digest before choosing the captured image or per-session setup. */ usable?: boolean; /** * Agent Service warmup state: pulling, verifying, ready, failed, or unavailable. */ warmup?: string; /** * Bounded Agent Service explanation of the warmup state. */ warmupMessage?: string; }; /** * One execution of an environment's setup script on fresh compute: provision, GPU check, script, profile, image capture, cleanup. Read status until terminal, then hint, failed_line, and stderr_tail; the full log is a separate call. */ export type ManagedAgentsEnvironmentSetupRun = { /** * Provider id of the compute the run used. Released when the run ends. */ compute_id?: string; /** * What the compute turned out to be: vCPUs, memory, GPUs, Docker state, image tools. Recorded after setup passed. */ compute_profile?: { [key: string]: unknown; }; /** * When the run was requested. */ created_at: string; /** * Wall-clock duration in milliseconds, provisioning included. */ duration_ms?: number; /** * Environment whose setup ran. */ environment_id: string; /** * Exit code of the setup script when it ran. 124 means the timeout elapsed. */ exit_code?: number; /** * The failing line's command as written, unexpanded. */ failed_command?: string; /** * 1-based line in the setup script whose command exited non-zero. 0 when unknown. */ failed_line?: number; /** * Machine-readable failure class when the run did not succeed: environment_setup_failed, sandbox_capacity_unavailable, sandbox_gpu_not_ready, sandbox_provision_timeout, and so on. Same vocabulary as session failures. */ failure_code?: string; /** * Hash of the environment configuration the run executed. */ fingerprint?: string; /** * When the run reached a terminal status. */ finished_at?: string; /** * GPU readiness report for accelerator environments. */ gpu_readiness?: { [key: string]: unknown; }; /** * Likely fix when the failure cause is recognised. */ hint?: string; /** * Stable identifier of the recognised failure cause. */ hint_code?: string; /** * Runner image the compute booted. */ image?: string; /** * Capture failure recorded without changing the setup script verdict. */ imageCapture?: ManagedAgentsEnvironmentSetupImageCapture; /** * Agent Service image id being captured. */ imageId?: string; /** * manual (requested through the API to verify the environment) or session (performed while provisioning a session). */ kind: string; /** * Bytes of log persisted for the run. */ log_bytes?: number; /** * Lines of log persisted for the run. The last line's seq equals this; pass it as after to tail. */ log_lines?: number; /** * True when the script produced more output than the run keeps (4 MiB); the head and the stderr tail are retained. */ log_truncated?: boolean; /** * One-sentence description of the outcome. */ message?: string; /** * The call that acts on this result: re-run setup after fixing the script, or fetch the log. */ next_action?: ManagedAgentsNextAction; /** * Organization that owns the environment. */ organization_id: string; /** * Current or final phase: provision, gpu_check, setup, profile, commit, cleanup. */ phase?: string; /** * Last Agent Service setup event sequence persisted into this run's log. */ providerEventCursor?: number; /** * Durable Agent Service run id executing the setup script. */ providerRunId?: string; /** * User who requested a manual run. */ requested_by_user_id?: string; /** * Session the run provisioned, for kind session. */ session_id?: string; /** * Server-assigned id of the run. */ setup_run_id: string; /** * Immutable image published by this run when capture succeeded. */ setupImage?: ManagedAgentsEnvironmentSetupImage; /** * When provisioning began. */ started_at?: string; /** * queued, provisioning, running, succeeded, failed, or cancelled. Poll until one of the last three; getEnvironmentSetupRun accepts wait_seconds to do that server-side. */ status: string; /** * Last lines of stderr, redacted and bounded to 2 KiB. */ stderr_tail?: string; }; /** * Recent setup runs for one environment, newest first. The newest manual run is the one the environment's setup_verification describes. */ export type ManagedAgentsEnvironmentSetupRunListResponse = { /** * The environment's setup runs, newest first. Empty array when none has been requested. */ setup_runs: Array; }; /** * One line of a setup run's log with its stream and, when known, the script line that produced it. */ export type ManagedAgentsEnvironmentSetupRunLogChunk = { /** * When the line was captured. */ at: string; /** * 1-based setup script line this output belongs to, when known from the preceding marker. */ line?: number; /** * Monotonic position of the line within the run. Pass the last seen seq as after to continue tailing. */ seq: number; /** * stdout, stderr, marker (a step boundary: the script line about to run), or system (setup phase notes). */ stream: string; /** * The line, redacted, without its trailing newline. */ text: string; }; /** * A page of a setup run's log with the cursor for the next page. stdout, stderr, marker (the script line about to run), and system (setup phase notes) are interleaved in capture order. */ export type ManagedAgentsEnvironmentSetupRunLogResponse = { /** * Log lines after the requested cursor, in order. Empty when the run has produced nothing new within the wait. */ lines: Array; /** * Cursor to pass as after on the next call. Equal to the request's after when no new lines were returned. */ next_after: number; /** * The run's status when the page was read. Stop tailing once it is succeeded, failed, or cancelled and the page is empty. */ status: string; /** * True when the run produced more output than is kept (4 MiB). The head is retained; the stderr tail is on the run. */ truncated?: boolean; }; /** * The outcome of one setup run, reduced to what a caller needs to fix it: exit code, failing line, stderr tail, and a hint when the cause is recognised. */ export type ManagedAgentsEnvironmentSetupRunSummary = { /** * Wall-clock duration of the run in milliseconds, provisioning included. */ duration_ms?: number; /** * Exit code of the setup script when it ran. 124 means the timeout elapsed; absent when the run failed before the script started. */ exit_code?: number; /** * The failing line's command as written in the script, unexpanded, so it never contains a secret's value. */ failed_command?: string; /** * 1-based line in the setup script whose command exited non-zero. 0 when unknown. */ failed_line?: number; /** * Human-readable likely fix for a recognised failure cause. Absent rather than guessed when the cause is not recognised. */ hint?: string; /** * Stable identifier of the recognised failure cause, e.g. command_not_found, pip_not_installed, bash_lc_wrapper, egress_blocked, timeout. Absent when the cause was not recognised. */ hint_code?: string; /** * One-sentence description of the outcome suitable for showing as is. */ message?: string; /** * Phase the run ended in: provision, gpu_check, setup, profile, commit, or cleanup. A failure outside setup is about the platform, not the script. */ phase?: string; /** * Setup run this summary describes. */ setup_run_id: string; /** * succeeded, failed, or cancelled. */ status: string; /** * Last lines of stderr from the script, redacted and bounded to 2 KiB. */ stderr_tail?: string; }; /** * The outcome of one setup run, reduced to what a caller needs to fix it: exit code, failing line, stderr tail, and a hint when the cause is recognised. */ export type ManagedAgentsEnvironmentSetupRunSummaryRequest = { /** * Wall-clock duration of the run in milliseconds, provisioning included. */ duration_ms?: number; /** * Exit code of the setup script when it ran. 124 means the timeout elapsed; absent when the run failed before the script started. */ exit_code?: null | number; /** * The failing line's command as written in the script, unexpanded, so it never contains a secret's value. */ failed_command?: string; /** * 1-based line in the setup script whose command exited non-zero. 0 when unknown. */ failed_line?: number; /** * Human-readable likely fix for a recognised failure cause. Absent rather than guessed when the cause is not recognised. */ hint?: string; /** * Stable identifier of the recognised failure cause, e.g. command_not_found, pip_not_installed, bash_lc_wrapper, egress_blocked, timeout. Absent when the cause was not recognised. */ hint_code?: string; /** * One-sentence description of the outcome suitable for showing as is. */ message?: string; /** * Phase the run ended in: provision, gpu_check, setup, profile, commit, or cleanup. A failure outside setup is about the platform, not the script. */ phase?: string; /** * Setup run this summary describes. */ setup_run_id?: string; /** * succeeded, failed, or cancelled. */ status?: string; /** * Last lines of stderr from the script, redacted and bounded to 2 KiB. */ stderr_tail?: string; }; /** * A starting-point setup script. The same list feeds the console and the API so humans and agents model the same idiom. */ export type ManagedAgentsEnvironmentSetupTemplate = { /** * True when the template assumes a GPU environment. */ accelerator?: boolean; /** * Stable identifier of the template. */ id: string; /** * The setup script. Edit it; it is a starting point, not a preset. */ script: string; /** * What the template sets up and when to choose it. */ summary: string; /** * Short name shown in a picker. */ title: string; }; /** * Starting-point setup scripts the console and agents share. Copy one into setup.script and edit it; none is a preset that has to be used as is. */ export type ManagedAgentsEnvironmentSetupTemplateListResponse = { /** * Starting-point setup scripts. Static per deployment; identical for every organization. */ items: Array; /** * Deprecated compatibility alias for items, retained for older browser clients during rollout. * * @deprecated */ templates?: Array; }; /** * Whether an environment's setup script has been proven to run on real compute. Server-owned: it is written by manual setup runs and never accepted from a request body. */ export type ManagedAgentsEnvironmentSetupVerification = { /** * Manual setup run in flight for this environment, when there is one. Present alongside any status: a verified environment being re-verified stays verified, and sessions keep starting, until this run finishes. Follow it with getEnvironmentSetupRun or getEnvironmentSetupRunLog. Cleared when the run records a verdict or is cancelled. */ active_setup_run_id?: string; /** * RFC 3339 timestamp of when the recorded run finished. */ at?: string; /** * Hash of the environment configuration the run executed. Compared against the current configuration to derive stale; opaque to callers. */ fingerprint?: string; /** * Immutable compute image produced after setup passed. Session admission validates this capture and resolves the current runner before choosing to boot it or run setup on the session's compute. */ image?: ManagedAgentsEnvironmentSetupImage; /** * Most recent image capture failure. Independent from the setup verdict: setup can be verified while capture failed. */ imageCapture?: ManagedAgentsEnvironmentSetupImageCapture; /** * Summary of the recorded run: exit code, failing line and command, stderr tail, and hint. Read hint first when the status is failed; it names the likely fix when the failure is a recognised one. */ last_run?: ManagedAgentsEnvironmentSetupRunSummary; /** * Setup run the status was written from. Read its log with getEnvironmentSetupRunLog when the status is failed. */ setup_run_id?: string; /** * True when the environment's provider, image, compute (resources, workspace disk size, provider config), setup script or timeout, variables, secret references, mounts, network policy, or privileged access changed after the recorded run, so the verdict no longer describes this configuration. Name, description, metadata, and the HTTP port do not count. Re-run setup to clear it. Always false for not_applicable and never. */ stale: boolean; /** * not_applicable (no setup script), never (a script exists but no run has recorded a verdict), running (a manual setup run is in flight and there is no earlier passing verdict to stand on), verified (the latest recorded manual run passed), or failed (the latest recorded manual run failed). Sessions on managed providers require verified and not stale when a script is configured; Runs additionally requires a valid captured image. When the captured base differs from the runner resolved at session start, setup runs on the session's compute instead of booting the captured image. The verdict is monotone: re-verifying a verified environment keeps it verified, with the new run in active_setup_run_id, until that run records its own verdict. */ status: string; /** * User who requested the recorded run. */ verified_by_user_id?: string; }; /** * Whether an environment's setup script has been proven to run on real compute. Server-owned: it is written by manual setup runs and never accepted from a request body. */ export type ManagedAgentsEnvironmentSetupVerificationRequest = { /** * Manual setup run in flight for this environment, when there is one. Present alongside any status: a verified environment being re-verified stays verified, and sessions keep starting, until this run finishes. Follow it with getEnvironmentSetupRun or getEnvironmentSetupRunLog. Cleared when the run records a verdict or is cancelled. */ active_setup_run_id?: string; /** * RFC 3339 timestamp of when the recorded run finished. */ at?: null | string; /** * Hash of the environment configuration the run executed. Compared against the current configuration to derive stale; opaque to callers. */ fingerprint?: string; /** * Immutable compute image produced after setup passed. Session admission validates this capture and resolves the current runner before choosing to boot it or run setup on the session's compute. */ image?: ManagedAgentsEnvironmentSetupImageRequest; /** * Most recent image capture failure. Independent from the setup verdict: setup can be verified while capture failed. */ imageCapture?: ManagedAgentsEnvironmentSetupImageCaptureRequest; /** * Summary of the recorded run: exit code, failing line and command, stderr tail, and hint. Read hint first when the status is failed; it names the likely fix when the failure is a recognised one. */ last_run?: ManagedAgentsEnvironmentSetupRunSummaryRequest; /** * Setup run the status was written from. Read its log with getEnvironmentSetupRunLog when the status is failed. */ setup_run_id?: string; /** * True when the environment's provider, image, compute (resources, workspace disk size, provider config), setup script or timeout, variables, secret references, mounts, network policy, or privileged access changed after the recorded run, so the verdict no longer describes this configuration. Name, description, metadata, and the HTTP port do not count. Re-run setup to clear it. Always false for not_applicable and never. */ stale?: boolean; /** * not_applicable (no setup script), never (a script exists but no run has recorded a verdict), running (a manual setup run is in flight and there is no earlier passing verdict to stand on), verified (the latest recorded manual run passed), or failed (the latest recorded manual run failed). Sessions on managed providers require verified and not stale when a script is configured; Runs additionally requires a valid captured image. When the captured base differs from the runner resolved at session start, setup runs on the session's compute instead of booting the captured image. The verdict is monotone: re-verifying a verified environment keeps it verified, with the new run in active_setup_run_id, until that run records its own verdict. */ status?: string; /** * User who requested the recorded run. */ verified_by_user_id?: string; }; /** * An advisory finding about a setup script line. Warnings never block a save. */ export type ManagedAgentsEnvironmentSetupWarning = { /** * Stable identifier: bash_lc_wrapper, curl_pipe_sh, unpinned_install, rm_rf_root (line findings); verify_not_started (line 0: the save succeeded but the run requested with verify=true could not be started; call createEnvironmentSetupRun); or legacy_setup_discarded (line 0: the stored setup predates setup.script and does not run; re-enter it as a script). */ code: string; /** * 1-based script line the finding is on; 0 when the finding is about the save rather than a line. */ line: number; /** * What was found and the recommended change. */ message: string; }; /** * An advisory finding about a setup script line. Warnings never block a save. */ export type ManagedAgentsEnvironmentSetupWarningRequest = { /** * Stable identifier: bash_lc_wrapper, curl_pipe_sh, unpinned_install, rm_rf_root (line findings); verify_not_started (line 0: the save succeeded but the run requested with verify=true could not be started; call createEnvironmentSetupRun); or legacy_setup_discarded (line 0: the stored setup predates setup.script and does not run; re-enter it as a script). */ code?: string; /** * 1-based script line the finding is on; 0 when the finding is about the save rather than a line. */ line?: number; /** * What was found and the recommended change. */ message?: string; }; /** * One immutable evaluator verdict over a frozen target-session transcript snapshot. */ export type ManagedAgentsEvaluation = { /** * Evaluator-classified shape of the target work. */ archetype: 'artifact' | 'conversation' | 'critique' | 'benchmark' | 'automation' | 'interactive' | 'external'; /** * Evaluation child session that inspected this target snapshot. */ child_session_id: string; /** * UTC timestamp when the immutable evaluation row was recorded. */ created_at: string; /** * Key-sorted immutable criterion verdicts and their evidence. */ criteria: Array; /** * Stable identity of this immutable evaluation snapshot. */ evaluation_id: string; /** * Evaluation agent that produced this verdict. */ evaluator_agent_id: string; /** * Immutable evaluator version containing the frozen rubric. */ evaluator_agent_version_id: string; /** * Stable reason class when the overall result is not a pass. */ failure_class: 'none' | 'target_failed' | 'target_cancelled' | 'multiple_criteria' | 'incomplete' | 'unsupported_claim' | 'unverified' | 'out_of_scope' | 'termination' | 'criterion_failure'; /** * Overall verdict across the frozen rubric criteria. */ result: 'pass' | 'fail' | 'not_applicable'; /** * Root session that ran the evaluation. */ run_session_id: string; /** * Evaluator-classified relative size of the target work. */ size_bucket: 'unknown' | 'small' | 'medium' | 'large'; /** * Canonical UUID transcript boundary; may be a current UUIDv7 or a retained legacy UUIDv4 event id. */ snapshot_event_id: string; /** * Evaluator-authored concise explanation of the overall verdict. */ summary: string; /** * Agent attributed to the target at its first durable event. */ target_agent_id: string; /** * Immutable target-agent version captured for the evaluation. */ target_agent_version_id: string; /** * Root session whose frozen transcript was evaluated. */ target_session_id: string; }; /** * Audit event payload listing targets stopped or left unadmitted when the evaluation tree reached its exact USD cap. */ export type ManagedAgentsEvaluationBudgetReached = { /** * Target sessions stopped or not admitted because the cap was reached. */ affected_target_session_ids: Array; /** * Exact decimal USD tree cap that stopped further admission. */ max_tree_cost_usd: string; }; /** * Audit event payload listing targets stopped or left unadmitted when the evaluation tree reached its exact USD cap. */ export type ManagedAgentsEvaluationBudgetReachedRequest = { /** * Target sessions stopped or not admitted because the cap was reached. */ affected_target_session_ids?: Array; /** * Exact decimal USD tree cap that stopped further admission. */ max_tree_cost_usd?: string; }; /** * Exact evaluation cost totals and per-evaluation comparison without floating-point USD loss. */ export type ManagedAgentsEvaluationCost = { /** * Evaluations whose complete priced cost contributes to the total. */ complete_count: number; /** * Aggregate cost-finality state, or null when the window has no evaluations. */ completeness: 'complete' | 'pending' | 'unpriced' | 'partial' | 'legacy_partial' | 'indeterminate' | null; /** * Exact current minus prior per-evaluation USD, or null when either side is undefined. */ delta_usd: null | string; /** * Immutable evaluations included in the current cost population. */ evaluation_count: number; /** * Exact current-window USD total per cost-complete evaluation, or null when undefined. */ per_evaluation_usd: null | string; /** * Equivalent exact per-evaluation USD for the adjacent prior window, or null when undefined. */ prior_per_evaluation_usd: null | string; /** * Exact decimal USD total, or null when no complete priced total exists. */ total_usd: null | string; }; /** * One immutable rubric-criterion verdict with rationale and transcript evidence references. */ export type ManagedAgentsEvaluationCriterion = { /** * Stable rubric key identifying this criterion. */ criterion_key: string; /** * Ordered target event IDs cited as evidence, all at or before the snapshot. */ evidence_event_ids: Array; /** * Evaluator explanation supporting the criterion verdict. */ rationale: string; /** * Immutable verdict for this rubric criterion. */ verdict: 'pass' | 'fail' | 'not_applicable'; }; /** * One organization-scoped page of immutable evaluation verdicts and an optional continuation. */ export type ManagedAgentsEvaluationListResponse = { /** * Newest-first immutable evaluation verdicts for this page. */ evaluations: Array; /** * Signed one-hour continuation bound to the organization, filters, and effective limit. */ next_page_token?: string; }; /** * A bounded multi-agent, immutable-version evaluation comparison over one selected metric. */ export type ManagedAgentsEvaluationOverviewComparison = { /** * Effective organization-scoped agents and their bounded version options. */ agents: Array; /** * Selected rubric key when metric is criterion; omitted for overall. */ criterion_key?: string; /** * Adaptive position semantics: exact timestamps are trace-local, while interval granularities use shared aligned positions; omitted for the legacy daily response and empty adaptive collections. */ granularity?: 'exact' | 'second' | 'minute' | 'hour' | 'day'; /** * Version and model-change markers for the selected trace versions. */ markers: Array; /** * Whether traces aggregate overall evaluation verdicts or one criterion. */ metric: 'overall' | 'criterion'; /** * Whether the server chose the effective agents or the request named them explicitly. */ selection_source: 'default' | 'explicit'; /** * At most twelve selected agent-version traces in stable agent and version order. */ series: Array; }; /** * One selected target agent and its bounded immutable-version picker options. */ export type ManagedAgentsEvaluationOverviewComparisonAgent = { /** * Newest immutable version before the frozen watermark, selected automatically. */ default_target_agent_version_id: string; /** * Stable human-readable name from the frozen latest catalog version, or Deleted agent when only retained history remains. */ display_name: string; /** * Organization-scoped target agent represented by this comparison group. */ target_agent_id: string; /** * Latest plus a bounded preview of prior versions available for comparison. */ version_options: Array; /** * Whether additional prior versions exist beyond this bounded option preview. */ version_options_truncated: boolean; }; /** * One aligned verdict aggregate for a selected target-agent version. */ export type ManagedAgentsEvaluationOverviewComparisonPoint = { /** * Exact evaluation time or inclusive UTC start of this aligned interval; legacy responses use window-anchored 24-hour buckets. */ bucket_start: string; /** * Fail verdicts for this version at this exact time or in this interval. */ fail_count: number; /** * Not-applicable verdicts for this version at this exact time or in this interval. */ not_applicable_count: number; /** * Pass verdicts for this version at this exact time or in this interval. */ pass_count: number; /** * Pass divided by pass plus fail, or null at a zero denominator. */ rate: null | number; }; /** * One selected immutable target-version trace in an evaluation comparison. */ export type ManagedAgentsEvaluationOverviewComparisonSeries = { /** * Catalog version creation time, omitted for retained-history-only identities. */ created_at?: string; /** * Whether catalog metadata or retained history proves this trace identity. */ identity_status: 'catalog' | 'retained_history'; /** * Whether this was the newest version at the frozen watermark. */ is_latest: boolean; /** * Exact timestamps observed for this trace, or shared aligned interval positions; legacy responses contain one fixed 24-hour point per day. */ points: Array; /** * Target agent owning this comparison trace. */ target_agent_id: string; /** * Immutable target-agent version whose stored evaluations form this trace. */ target_agent_version_id: string; /** * Catalog version number, omitted for retained-history-only identities. */ version_number?: number; }; /** * One bounded immutable target-version option for an evaluation comparison. */ export type ManagedAgentsEvaluationOverviewComparisonVersion = { /** * Catalog creation time, omitted when only retained history proves the identity. */ created_at?: string; /** * Whether the selected evaluator observed this version in the current chart window. */ has_current_observations: boolean; /** * Whether live catalog metadata or retained same-organization history proves this identity. */ identity_status: 'catalog' | 'retained_history'; /** * Whether this was the newest immutable version before the frozen watermark. */ is_latest: boolean; /** * Whether this version contributes a comparison trace in this response. */ selected: boolean; /** * Immutable target-agent version represented by this option. */ target_agent_version_id: string; /** * Catalog version number, omitted when only retained history proves the identity. */ version_number?: number; }; /** * Complete fixed-window evaluation Overview plus an optional signed target-agent continuation. */ export type ManagedAgentsEvaluationOverviewResponse = { /** * Ranked target-agent metric rows for this signed cursor page. */ agent_rows: Array; /** * Durable analytics watermark freezing every query in this response. */ as_of: string; /** * Immutable agent-version and model markers when one target agent is selected. */ change_markers: Array; /** * Whether markers are complete or require selecting one target agent. */ change_markers_status: 'complete' | 'select_target_agent'; /** * Bounded multi-agent and immutable-version traces for one selected metric. */ comparison: ManagedAgentsEvaluationOverviewComparison; /** * Stable key order used to align every agent row's criterion_metrics array. */ criterion_columns: Array; /** * Aligned criterion verdict series for the complete frozen window; legacy responses use a daily grid. */ criterion_series: Array; /** * Adaptive position semantics: exact timestamps are criterion-local, while interval granularities use shared aligned positions; omitted for the legacy daily response and empty adaptive collections. */ criterion_series_granularity?: 'exact' | 'second' | 'minute' | 'hour' | 'day'; /** * Inclusive UTC start of the current Overview window. */ from: string; /** * Signed one-hour continuation for the next ranked target-agent page at the same watermark. */ next_page_token?: string; /** * Inclusive UTC start of the adjacent equal-length prior window. */ prior_from: string; /** * Exclusive UTC end of the prior window, equal to from. */ prior_to: string; /** * Fixed headline coverage, verdict, criterion, and exact-cost metrics. */ tiles: ManagedAgentsEvaluationOverviewTiles; /** * Exclusive UTC end of the current window, equal to as_of. */ to: string; }; /** * The four fixed-cardinality headline tiles for an evaluation Overview window. */ export type ManagedAgentsEvaluationOverviewTiles = { /** * Immutable-cohort coverage for the selected windows. */ coverage: ManagedAgentsCoverageTile; /** * Exact current and prior per-evaluation cost comparison. */ evaluation_cost: ManagedAgentsEvaluationCost; /** * Worst defined criterion metric, or null when none has a pass/fail denominator. */ lowest_criterion: null | ManagedAgentsLowestCriterion; /** * Overall evaluation verdict performance for the current and prior windows. */ overall_pass: ManagedAgentsVerdictMetric; }; /** * One canonical UUID identifying an organization-scoped comparison agent or immutable version. */ export type ManagedAgentsEvaluationOverviewUuid = string; /** * One stable rubric criterion frozen from the evaluator version for the complete run. */ export type ManagedAgentsEvaluationPlanCriterion = { /** * Stable rubric key used to join verdicts across the run. */ criterion_key: string; /** * Frozen rubric instruction evaluated for every target. */ criterion_text: string; }; /** * One stable rubric criterion frozen from the evaluator version for the complete run. */ export type ManagedAgentsEvaluationPlanCriterionRequest = { /** * Stable rubric key used to join verdicts across the run. */ criterion_key?: string; /** * Frozen rubric instruction evaluated for every target. */ criterion_text?: string; }; /** * Audit event payload that freezes the complete target set, rubric, concurrency, and cost cap before child work starts. */ export type ManagedAgentsEvaluationPlanFrozen = { /** * Ordered rubric criteria frozen from the evaluator version. */ criteria: Array; /** * Maximum evaluation children admitted concurrently for this run. */ max_concurrent_threads: number; /** * Optional exact decimal USD cap on billed cost shared by the evaluation tree. */ max_tree_cost_usd?: string; /** * Ordered target sessions and their immutable transcript snapshots. */ targets: Array; }; /** * Audit event payload that freezes the complete target set, rubric, concurrency, and cost cap before child work starts. */ export type ManagedAgentsEvaluationPlanFrozenRequest = { /** * Ordered rubric criteria frozen from the evaluator version. */ criteria?: Array; /** * Maximum evaluation children admitted concurrently for this run. */ max_concurrent_threads?: number; /** * Optional exact decimal USD cap on billed cost shared by the evaluation tree. */ max_tree_cost_usd?: string; /** * Ordered target sessions and their immutable transcript snapshots. */ targets?: Array; }; /** * One root target and the immutable transcript boundary frozen into an evaluation plan. */ export type ManagedAgentsEvaluationPlanTarget = { /** * Canonical event id at or before which the target transcript is frozen. */ snapshot_event_id: string; /** * Root session selected as an immutable evaluation target. */ target_session_id: string; }; /** * One root target and the immutable transcript boundary frozen into an evaluation plan. */ export type ManagedAgentsEvaluationPlanTargetRequest = { /** * Canonical event id at or before which the target transcript is frozen. */ snapshot_event_id?: string; /** * Root session selected as an immutable evaluation target. */ target_session_id?: string; }; /** * One evaluation-run summary with frozen target count and authoritative verdict totals. */ export type ManagedAgentsEvaluationRun = { /** * UTC timestamp when the evaluation run was created. */ created_at: string; /** * Evaluation agent selected for the run. */ evaluator_agent_id: string; /** * Immutable evaluator version and rubric frozen by the run. */ evaluator_agent_version_id: string; /** * Current agent-loop state when available on the run session. */ execution_state?: 'provisioning' | 'queued' | 'running' | 'idle' | 'completed'; /** * Number of immutable overall fail verdicts in the run. */ fail_count: number; /** * Number of immutable not-applicable verdicts in the run. */ not_applicable_count: number; /** * Number of immutable overall pass verdicts in the run. */ pass_count: number; /** * Root session that runs this evaluation. Read or stream it like any session. */ run_session_id: string; /** * Coarse terminal or active session status for the run. */ status: ManagedAgentsSessionStatus; /** * Number of target snapshots frozen into the run plan. */ targets_total: number; /** * UTC timestamp of the latest run-session state change. */ updated_at: string; /** * Total authoritative verdicts, equal to pass plus fail plus not applicable. */ verdicts_total: number; }; /** * Terminal audit payload summarizing planned targets, completed verdict audits, skips, budget stops, and any systemic failure. */ export type ManagedAgentsEvaluationRunFinished = { /** * Stable systemic failure classification for a failed run. */ failure_code?: 'plan_failed' | 'cleanup_failed' | 'accounting_failed' | 'audit_failed' | 'finalization_failed'; /** * Sanitized explanation of the systemic run failure. */ failure_message?: string; /** * Number of targets stopped or not admitted after the cost cap was reached. */ targets_budget_reached: number; /** * Number of targets whose processing ended without a completed verdict audit. */ targets_skipped: number; /** * Number of target snapshots frozen in the plan. */ targets_total: number; /** * Final lifecycle state of the evaluation run. */ terminal_status: 'completed' | 'failed' | 'cancelled'; /** * Number of completed verdict audit events recorded for this run. */ verdicts_recorded: number; }; /** * Terminal audit payload summarizing planned targets, completed verdict audits, skips, budget stops, and any systemic failure. */ export type ManagedAgentsEvaluationRunFinishedRequest = { /** * Stable systemic failure classification for a failed run. */ failure_code?: 'plan_failed' | 'cleanup_failed' | 'accounting_failed' | 'audit_failed' | 'finalization_failed'; /** * Sanitized explanation of the systemic run failure. */ failure_message?: string; /** * Number of targets stopped or not admitted after the cost cap was reached. */ targets_budget_reached?: number; /** * Number of targets whose processing ended without a completed verdict audit. */ targets_skipped?: number; /** * Number of target snapshots frozen in the plan. */ targets_total?: number; /** * Final lifecycle state of the evaluation run. */ terminal_status?: 'completed' | 'failed' | 'cancelled'; /** * Number of completed verdict audit events recorded for this run. */ verdicts_recorded?: number; }; /** * One page of organization-scoped evaluation-run summaries and an optional continuation. */ export type ManagedAgentsEvaluationRunListResponse = { /** * Newest-first platform-internal evaluation-run summaries for this page. */ evaluation_runs: Array; /** * Signed one-hour continuation bound to the organization and effective limit. */ next_page_token?: string; }; /** * A bounded evaluation target selector: explicit session ids, or statuses plus a newest-first limit. */ export type ManagedAgentsEvaluationSelector = { /** * Maximum newest matching sessions selected by statuses. */ limit?: number; /** * Explicit target session ids. Every id must be an eligible session visible to the caller or no run is created. */ session_ids?: Array; /** * Eligible target statuses. Used with limit to choose the newest matching sessions. */ statuses?: Array; }; /** * A bounded evaluation target selector: explicit session ids, or statuses plus a newest-first limit. */ export type ManagedAgentsEvaluationSelectorRequest = { /** * Explicit target session ids. Every id must be an eligible session visible to the caller or no run is created. */ session_ids: Array; } | { /** * Maximum newest matching sessions selected by statuses. */ limit: number; /** * Eligible target statuses. Used with limit to choose the newest matching sessions. */ statuses: Array; }; /** * Audit event payload for a target whose processing ended without a completed verdict audit. */ export type ManagedAgentsEvaluationTargetSkipped = { /** * Evaluation child identity when creation reached that stage. */ child_session_id?: string; /** * Sanitized operator-readable explanation of the skip. */ reason: string; /** * Stable machine-readable classification of the skipped target. */ reason_code: 'child_create_failed' | 'child_run_failed' | 'verdict_invalid' | 'cleanup_or_accounting_failed'; /** * Canonical transcript event boundary frozen for the skipped target. */ snapshot_event_id: string; /** * Root target whose processing ended without a completed verdict audit. */ target_session_id: string; }; /** * Audit event payload for a target whose processing ended without a completed verdict audit. */ export type ManagedAgentsEvaluationTargetSkippedRequest = { /** * Evaluation child identity when creation reached that stage. */ child_session_id?: string; /** * Sanitized operator-readable explanation of the skip. */ reason?: string; /** * Stable machine-readable classification of the skipped target. */ reason_code?: 'child_create_failed' | 'child_run_failed' | 'verdict_invalid' | 'cleanup_or_accounting_failed'; /** * Canonical transcript event boundary frozen for the skipped target. */ snapshot_event_id?: string; /** * Root target whose processing ended without a completed verdict audit. */ target_session_id?: string; }; /** * Audit event payload linking one frozen target to its isolated evaluation child and reserved verdict identity. */ export type ManagedAgentsEvaluationTargetStarted = { /** * Evaluation child session created for this target. */ child_session_id: string; /** * Whether the child received a ready clone or needed no sandbox. */ clone_state: 'ready' | 'sandboxless'; /** * Immutable verdict identity reserved for this target. */ evaluation_id: string; /** * Provider of the isolated clone when the target has a sandbox. */ sandbox_provider?: string; /** * Canonical event id bounding the immutable target transcript snapshot. */ snapshot_event_id: string; /** * Root session whose frozen snapshot is being evaluated. */ target_session_id: string; }; /** * Audit event payload linking one frozen target to its isolated evaluation child and reserved verdict identity. */ export type ManagedAgentsEvaluationTargetStartedRequest = { /** * Evaluation child session created for this target. */ child_session_id?: string; /** * Whether the child received a ready clone or needed no sandbox. */ clone_state?: 'ready' | 'sandboxless'; /** * Immutable verdict identity reserved for this target. */ evaluation_id?: string; /** * Provider of the isolated clone when the target has a sandbox. */ sandbox_provider?: string; /** * Canonical event id bounding the immutable target transcript snapshot. */ snapshot_event_id?: string; /** * Root session whose frozen snapshot is being evaluated. */ target_session_id?: string; }; /** * Audit event payload emitted after the authoritative immutable verdict and clone cost are recorded. */ export type ManagedAgentsEvaluationVerdictRecorded = { /** * Evaluation child session that produced the verdict. */ child_session_id: string; /** * Whether every cost component is final and priced. */ cost_completeness: 'complete' | 'pending' | 'unpriced' | 'partial' | 'legacy_partial' | 'indeterminate'; /** * Exact canonical decimal USD attributed to this evaluation. */ cost_usd: string; /** * Immutable evaluation row that remains authoritative. */ evaluation_id: string; /** * Sorted unique rubric keys whose verdict is fail. */ failed_criterion_keys: Array; /** * Overall verdict derived from the frozen criterion results. */ result: 'pass' | 'fail' | 'not_applicable'; /** * Canonical event id bounding the transcript evidence considered. */ snapshot_event_id: string; /** * Root session evaluated by this immutable verdict. */ target_session_id: string; }; /** * Audit event payload emitted after the authoritative immutable verdict and clone cost are recorded. */ export type ManagedAgentsEvaluationVerdictRecordedRequest = { /** * Evaluation child session that produced the verdict. */ child_session_id?: string; /** * Whether every cost component is final and priced. */ cost_completeness?: 'complete' | 'pending' | 'unpriced' | 'partial' | 'legacy_partial' | 'indeterminate'; /** * Exact canonical decimal USD attributed to this evaluation. */ cost_usd?: string; /** * Immutable evaluation row that remains authoritative. */ evaluation_id?: string; /** * Sorted unique rubric keys whose verdict is fail. */ failed_criterion_keys?: Array; /** * Overall verdict derived from the frozen criterion results. */ result?: 'pass' | 'fail' | 'not_applicable'; /** * Canonical event id bounding the transcript evidence considered. */ snapshot_event_id?: string; /** * Root session evaluated by this immutable verdict. */ target_session_id?: string; }; /** * One durable entry in a session's transcript: a message, a tool call or result, an approval, or a status change, with the provider message body and the token accounting for the call that produced it. Returned when listing or streaming a session's events. */ export type ManagedAgentsEvent = { /** * Who produced this event, as a namespaced identifier: human:… for a person, system:… for the service itself, or an agent identity. */ actor: string; /** * Agent that produced this event (UUID). */ agent_id?: string; /** * Prompt tokens served from the provider's prompt cache, billed at the cached rate. */ cache_read_tokens?: number; /** * Prompt tokens written into the provider's prompt cache. */ cache_write_tokens?: number; /** * Event that caused this one (UUID). Unlike parent_event_id this expresses causality rather than nesting. */ causal_event_id?: string; /** * The event payload as provider-shaped content blocks. Passed through to and from the model provider without reinterpretation. */ content: ManagedAgentsEventContent; /** * Read-time status when external EventContent was hydrated or could not be hydrated. */ content_hydration_status?: 'hydrated' | 'refs_only' | 'missing' | 'corrupt' | 'unavailable' | 'oversized'; /** * Byte size of the canonical external EventContent JSON. */ content_payload_bytes?: number; /** * Private whole-event content reference. Read the content through getSessionEventContent; this reference cannot be fetched directly. */ content_payload_ref?: string; /** * Lowercase SHA-256 digest of the canonical external EventContent JSON. */ content_payload_sha256?: string; /** * Image cleanup prefix or typed multi-image envelope. This is independent of whole-event payload storage. */ content_ref?: string; /** * Accrued cost in micro-USD (1,000,000 = 1 USD). Integer to avoid float rounding across many small charges. */ cost_micros?: number; /** * RFC 3339 timestamp of when this record was created. Server-assigned. */ created_at: string; /** * Sandbox environment the producing session was executing in (UUID). */ environment_id?: string; /** * Identifier for this event (UUID). Server-assigned unless the append supplied one. Chronologically sortable, and the column a transcript is ordered by. */ event_id: string; /** * Outcome marker for events that can fail: pending, completed, warning, or error. Empty when not applicable. */ event_status?: string; /** * What kind of event this is. One of message, tool_invocation, tool_result, approval_request, approval_decision, summary, plan_update, session_status, artifact, advisor_intervention, or outcome_evaluation. */ event_type: string; /** * Why the provider stopped generating, in the provider vocabulary (for example end_turn, max_tokens, tool_use). Passed through verbatim. */ finish_reason?: string; /** * Sampling and tool settings this inference ran with, as resolved at call time. */ inference_config: ManagedAgentsInferenceConfig; /** * Prompt tokens billed for this unit of work. */ input_tokens?: number; /** * Wall-clock duration of the provider call in milliseconds. */ latency_ms?: number; /** * Snapshot of the model reference as it was at call time, so a later model change does not rewrite history. */ model?: ManagedAgentsModelRef; /** * Canonical model reference used for this inference (UUID). Empty on events not produced by a model call. */ model_ref_id?: string; /** * Organization that owns this record. Resolved from the API key; never accepted from the caller. */ organization_id?: string; /** * Completion tokens billed for this unit of work. */ output_tokens?: number; /** * Event this one is nested under in the transcript tree (UUID), for example a tool result under its invocation. */ parent_event_id?: string; /** * Estimated tokens this event contributes when rendered into a future provider request. A memoized estimate for context-budget planning, not billed provider usage. */ prompt_tokens?: number; /** * Provider's own model identifier as sent on the wire, which may differ from the canonical model reference. */ provider_model_id?: string; /** * Provider's request identifier for this inference, for correlating with provider-side logs. */ provider_request_id?: string; /** * Model provider family that served this inference, for example anthropic, openai, or vertex. */ provider_type?: string; /** * Message role in the provider vocabulary: system, user, or assistant. Set on message events; empty on events that are not turns. */ role?: string; /** * Concrete sandbox instance the event was produced on. Provider-assigned, not a UUID. */ sandbox_instance_id?: string; /** * Event schema version this row was written under. Server-assigned; readers should tolerate unknown newer values. */ schema_version: number; /** * Session this event belongs to (UUID). */ session_id: string; /** * Thread within a multi-agent session that produced this event (UUID). Empty on a single-agent session. */ thread_id?: string; /** * Name of the tool being invoked or reporting a result. Set on tool events only. */ tool_name?: string; /** * Provider's tool-call identifier, correlating a tool_invocation with its tool_result. */ tool_use_id?: string; /** * Groups every event produced within one model turn. */ turn_id?: string; }; /** * The body of a session event, shaped like a provider message: content blocks plus the stop reason and token usage the provider returned. Every event in a session transcript carries one. */ export type ManagedAgentsEventContent = { /** * Ordered content blocks of this message, in the provider's content-block form. Empty for events that carry no message body. */ blocks: Array | null; /** * Cost cap and targets stopped or left unadmitted when the run reached it. */ evaluation_budget_reached?: ManagedAgentsEvaluationBudgetReached; /** * Frozen target, rubric, concurrency, and cost plan for an evaluation run. */ evaluation_plan_frozen?: ManagedAgentsEvaluationPlanFrozen; /** * Terminal counts and systemic failure state for the evaluation run. */ evaluation_run_finished?: ManagedAgentsEvaluationRunFinished; /** * Sanitized outcome for a target whose processing ended without a completed verdict audit. */ evaluation_target_skipped?: ManagedAgentsEvaluationTargetSkipped; /** * Identity and clone state for one admitted evaluation target. */ evaluation_target_started?: ManagedAgentsEvaluationTargetStarted; /** * Audit reference to one authoritative immutable evaluation verdict. */ evaluation_verdict_recorded?: ManagedAgentsEvaluationVerdictRecorded; /** * Extra key/value detail about this event that is not part of the message body, such as the ingest subtype or the sandbox working directory. */ metadata?: { [key: string]: unknown; }; /** * Plan items reported by the agent, present on a plan_update event. */ plan?: Array; /** * The provider's own stop_reason for the assistant turn, recorded verbatim, e.g. end_turn, tool_use, or max_tokens. Absent on events that are not a model response. */ stop_reason?: string; /** * Tool definitions that were in scope for the turn, as sent to the provider. Recorded on the session's system message so a transcript shows what the model could call. */ tools?: Array; /** * Token counts the provider reported for the call that produced this message. Absent when the event is not a model response. */ usage?: ManagedAgentsUsage; }; /** * The body of a session event, shaped like a provider message: content blocks plus the stop reason and token usage the provider returned. Every event in a session transcript carries one. */ export type ManagedAgentsEventContentRequest = { /** * Ordered content blocks of this message, in the provider's content-block form. Empty for events that carry no message body. */ blocks?: Array | null; /** * Cost cap and targets stopped or left unadmitted when the run reached it. */ evaluation_budget_reached?: ManagedAgentsEvaluationBudgetReachedRequest; /** * Frozen target, rubric, concurrency, and cost plan for an evaluation run. */ evaluation_plan_frozen?: ManagedAgentsEvaluationPlanFrozenRequest; /** * Terminal counts and systemic failure state for the evaluation run. */ evaluation_run_finished?: ManagedAgentsEvaluationRunFinishedRequest; /** * Sanitized outcome for a target whose processing ended without a completed verdict audit. */ evaluation_target_skipped?: ManagedAgentsEvaluationTargetSkippedRequest; /** * Identity and clone state for one admitted evaluation target. */ evaluation_target_started?: ManagedAgentsEvaluationTargetStartedRequest; /** * Audit reference to one authoritative immutable evaluation verdict. */ evaluation_verdict_recorded?: ManagedAgentsEvaluationVerdictRecordedRequest; /** * Extra key/value detail about this event that is not part of the message body, such as the ingest subtype or the sandbox working directory. */ metadata?: { [key: string]: unknown; }; /** * Plan items reported by the agent, present on a plan_update event. */ plan?: Array; /** * The provider's own stop_reason for the assistant turn, recorded verbatim, e.g. end_turn, tool_use, or max_tokens. Absent on events that are not a model response. */ stop_reason?: string; /** * Tool definitions that were in scope for the turn, as sent to the provider. Recorded on the session's system message so a transcript shows what the model could call. */ tools?: Array; /** * Token counts the provider reported for the call that produced this message. Absent when the event is not a model response. */ usage?: ManagedAgentsUsage; }; /** * Response body of GET /v1/sessions/{session_id}/events: one page of the merged chronological timeline for the whole session tree the path session belongs to, not just that session's own events. The page is bounded twice, by the limit parameter and by an aggregate serialized-byte budget, and the byte budget wins; a single event too large for the budget is returned alone with its content marked oversized and must be fetched in full from the per-event content endpoint. */ export type ManagedAgentsEventPageResponse = { /** * One chronological page of the root timeline, oldest first. Null rather than an empty array when no event follows the requested watermark, which is the normal answer when a caller has already read to the end. */ events: Array | null; /** * Watermark to continue from: pass it back as the after_event_id query parameter to fetch the next page. Its value is the event_id of the last event in this page. Always present, and an empty string means this page reached the end of the timeline as of this read. Because the page can be cut short by a byte budget before the requested limit is reached, a short events array with a non-empty token means more remain, not that the timeline ended. */ next_page_token: string; }; /** * Reference to a managed credential; secret material is never returned. */ export type ManagedAgentsEventSourceCredentialRef = { /** * Credential within the vault that contains the verification secret. */ credentialId: string; /** * Vault containing the secret used to verify inbound deliveries. */ vaultId: string; }; /** * Delivery identity: a customer webhook or an integration connection. */ export type ManagedAgentsEventSourceDelivery = ManagedAgentsWebhookEventSourceDelivery | ManagedAgentsIntegrationEventSourceDelivery; /** * Delivery identity without member-only verification configuration. */ export type ManagedAgentsEventSourceDeliverySummary = ManagedAgentsWebhookEventSourceDeliverySummary | ManagedAgentsIntegrationEventSourceDelivery; /** * Most recent verified delivery observed for the source. */ export type ManagedAgentsEventSourceLastDeliveryResponse = { /** * Whether the most recent verified delivery was admitted for processing. */ disposition: 'admitted' | 'ignored'; /** * Time the most recent verified delivery reached the source. */ receivedAt: string; } | null; /** * Bounded page of event sources owned by the calling workspace. */ export type ManagedAgentsEventSourcePageResponse = { /** * Event sources in newest-first order. */ items: Array; /** * Opaque cursor for the next page, or null when this is the last page. */ nextCursor: null | string; /** * Total event sources visible to the caller. */ total: number; }; /** * Configured inbound event source, including its verification policy and lifecycle state. */ export type ManagedAgentsEventSourceResponse = { /** * Time the event source was created. */ readonly createdAt: string; /** * Webhook configuration or owning integration connection. */ delivery: ManagedAgentsEventSourceDelivery; /** * Human-readable source name shown in the automation catalog. */ displayName: string; /** * Stable identifier for the event source. */ readonly eventSourceId: string; /** * Monotonic revision represented by the response ETag. */ readonly revision: number; /** * Lifecycle state. Custom webhook sources start paused; connection-managed sources start active. */ readonly status: 'paused' | 'active'; /** * Inbound provider protocol interpreted by this source. */ type: 'slack_events_api' | 'github_webhook' | 'custom_webhook'; /** * Time the event source was last changed. */ readonly updatedAt: string; }; /** * One ordered component of the HMAC signature input. */ export type ManagedAgentsEventSourceSignedPart = { /** * Delivery component included in the signature input; currently the exact request body. */ kind: 'body'; }; /** * Operational status for one event source without secret material. */ export type ManagedAgentsEventSourceStatusResponse = { /** * Stable identifier for the event source. */ eventSourceId: string; /** * Current source availability and receipt history. setup_required means the connected installation lacks event permissions; approve the App permission update and probe the connection. healthy means a receipt exists, not proof of current provider reachability. */ health: 'never_received' | 'healthy' | 'paused' | 'connection_unavailable' | 'setup_required'; /** * Most recent verified delivery, or null when none has arrived. */ lastDelivery: ManagedAgentsEventSourceLastDeliveryResponse; /** * Automations currently bound to this event source. */ triggerCount: number; }; /** * Compact event-source representation returned by the collection endpoint. */ export type ManagedAgentsEventSourceSummary = { /** * Time the event source was created. */ createdAt: string; /** * Webhook endpoint or owning integration connection. */ delivery: ManagedAgentsEventSourceDeliverySummary; /** * Human-readable source name. */ displayName: string; /** * Stable identifier for the event source. */ eventSourceId: string; /** * Monotonic revision represented by the member ETag. */ revision: number; /** * Current lifecycle state. */ status: 'paused' | 'active'; /** * Inbound provider protocol interpreted by this source. */ type: 'slack_events_api' | 'github_webhook' | 'custom_webhook'; /** * Time the event source was last changed. */ updatedAt: string; }; /** * Verification policy for a custom webhook event source. */ export type ManagedAgentsEventSourceVerificationResponse = { /** * HTTP header carrying the signature for signed deliveries. */ signatureHeader?: string; /** * Literal prefix removed before comparing a signature. */ signaturePrefix?: string; /** * Ordered delivery components used as the signature input. */ signedParts?: Array; /** * Verification algorithm configured for custom webhook deliveries. */ type: 'none' | 'hmac_sha256'; /** * Credential reference used by signed deliveries; omitted when verification is none. */ verificationCredential?: ManagedAgentsEventSourceCredentialRef; }; /** * Shared response body of POST /v1/sessions/{session_id}/events and POST /v1/sessions/{session_id}/interrupt-and-send. It acknowledges durable acceptance of the turn, never the agent's reply: read the reply by listing events or streaming. Compare events_accepted against what was sent to detect silently dropped entries, and read delivery_state to learn whether an agent is actually going to act on them. events_accepted counts canonical events rather than requests, so interrupt-and-send reports 2 for its single instruction: the stop and the message that follows it. */ export type ManagedAgentsEventsAcceptedResponse = { /** * How the accepted events reached a reader. queued: the agent was mid-turn, so the input is waiting outside the transcript and the next turn boundary will read it; interrupt to bring that forward. signaled: the running session was woken and will act on them. resumed: the session had already finished, so it resumed to act on them. stored: appended to the timeline with nothing running to act on them yet. */ delivery_state: 'stored' | 'signaled' | 'resumed' | 'queued'; /** * How many canonical events were written or queued. This counts the inputs actually derived from the body, not its length: a plain message body yields 1, and a typed event with an unrecognised type or no content is dropped, so this can be lower than the events array sent. */ events_accepted: number; /** * Always true. Every event in the request was durably accepted; any partial or total failure is an HTTP error instead, so this field never reports false. */ ok: boolean; /** * Compatibility bit, superseded by delivery_state: true when the events were signaled to a running session or resumed a finished one. Read delivery_state instead, which tells those two cases apart. */ temporal_signaled: boolean; }; /** * A file object: bytes uploaded once and attachable to any number of sessions as a resource, or bytes a session produced. Attaching a file mounts it read-only into the session's sandbox at a path the session is told about. */ export type ManagedAgentsFile = { /** * Size of the file in bytes. */ byte_size: number; /** * Server-assigned RFC 3339 timestamp of the upload. */ created_at: string; /** * Whether GET /v1/files/{file_id}/content serves the bytes. True for every live file, upload or session output; expiry, not source, is what closes the content route. */ downloadable: boolean; /** * When the file stops being attachable and its content stops being served. Its metadata stays readable and listed, with this in the past, for a grace before the file is reclaimed. Absent means it does not expire. */ expires_at?: string; /** * Server-assigned id, used to attach the file to a session as a resource. */ file_id: string; /** * The name the file was uploaded under, without any directory. This is the name it is mounted under in a sandbox unless a resource says otherwise. */ filename: string; /** * The upload's declared Content-Type. When the part declared none, or declared application/octet-stream, the type is detected from the filename's extension, through a fixed table rather than the host's, and then from the bytes, falling back to application/octet-stream when neither says anything. Informational: the platform does not transcode or validate against it. */ media_type: string; /** * Caller-owned key/value data stored with the file and returned unchanged. */ metadata?: { [key: string]: unknown; }; /** * Organization that owns the file. Server-assigned from the caller's credentials. */ organization_id: string; /** * For a session output, the session that produced it. Absent on an upload, which belongs to the organization rather than to any one session. */ scope_session_id?: string; /** * SHA-256 of the file's contents, for checking a download. */ sha256: string; /** * How the file came to exist: upload for a file you uploaded, session_output for a deliverable a session saved. */ source: 'upload' | 'session_output'; /** * Always file. */ type: 'file'; }; /** * Response body of GET /v1/files. */ export type ManagedAgentsFileListResponse = { /** * Matching files in the caller's organization, newest first. */ files: Array | null; /** * Cursor for the next page, present only when more files follow. Pass it back as page_token with the same filters and limit. */ next_page_token?: string; }; /** * Request body of POST /v1/file-uploads/{uploadId}/complete. */ export type ManagedAgentsFileUploadCompleteRequest = { /** * Size of the whole file in bytes. Completion is refused when the parts hold a different total. */ byteSize: number; /** * How long the file stays attachable and its content served. When omitted, the file does not expire. Set once: a file's expiry cannot be changed. */ expiresInSeconds?: number; /** * The name the file is stored and mounted under. */ filename: string; /** * Recorded media type. When omitted or application/octet-stream, the type is detected from the filename and the leading bytes. */ mediaType?: string; /** * Caller-owned key/value data, at most 32 keys. When omitted, the file carries no metadata. */ metadata?: { [key: string]: unknown; }; /** * How many parts make up the file: parts 0 through partCount-1, each already uploaded. */ partCount: number; }; /** * One stored part of an upload session. */ export type ManagedAgentsFileUploadPartResponse = { /** * Bytes stored for this part. */ readonly byteSize: number; /** * The part's position in the file. */ readonly partNumber: number; /** * The upload session this part belongs to. */ readonly uploadId: string; }; /** * An upload session: where to send a large file's parts. */ export type ManagedAgentsFileUploadResponse = { /** * The declared size of the whole file in bytes. */ byteSize: number; /** * When uploaded parts that were never completed become eligible for removal. */ readonly expiresAt: string; /** * The most bytes one part may carry. Send every part but the last at this size. */ readonly partBytes: number; /** * How many parts the declared byteSize needs at partBytes each: parts 0 through partCount-1. */ readonly partCount: number; /** * Names this upload in the part and completion calls. */ readonly uploadId: string; }; /** * Request body of POST /v1/file-uploads. */ export type ManagedAgentsFileUploadStartRequest = { /** * Size of the whole file in bytes, at most 1 GiB. Checked now against the limit and the organization's file quota, and again at completion. */ byteSize: number; }; /** * One review comment bound to an exact changed line. Every finding must land on a path, side, and line present in the trusted diff manifest, and no two findings may target the same location, so a review cannot comment on code it was not shown. */ export type ManagedAgentsFinding = { /** * Reviewer comment published at this location. Required, and at most 16 KiB. */ body: string; /** * Quoted code or diff excerpt the finding rests on. Required, and at most 8 KiB. */ evidence: string; /** * Line number within the named side of the diff. Must be a line the reviewed diff actually changed. */ line: number; /** * Repository-relative path of the commented file, at most 4096 bytes. Must name a file the reviewed diff changed. */ path: string; /** * How serious the finding is: low, medium, high, or critical. */ severity: string; /** * Which side of the diff the line belongs to: LEFT for a removed line, RIGHT for an added one. */ side: string; }; /** * Multipart body carrying one part of an upload session. */ export type ManagedAgentsFormDataFileUploadPartRequest = { /** * This part's bytes, at most partBytes (16 MiB). */ part?: Blob | File; }; /** * Multipart body for uploading a file. Send the bytes as the file part; the part's filename and Content-Type become the file's name and media type. */ export type ManagedAgentsFormDataFileUploadRequest = { /** * How long the file stays attachable and its content served, from 3600 (an hour) to 7776000 (ninety days); its metadata stays readable, with expires_at in the past, for a grace after that. Omit for a file that does not expire. Set once: a file's expiry cannot be changed. */ expires_in_seconds?: number; /** * The file's bytes. Its part filename is the name the file is stored and mounted under; its part Content-Type is recorded as the media type. Up to 30 MiB; upload a larger file, up to 1 GiB, with startFileUpload. */ file?: Blob | File; /** * Caller-owned key/value data as a JSON object, since a form part cannot carry structure. Rejected rather than dropped when it does not parse. */ metadata?: string; }; /** * Multipart body carrying one image in the file part. */ export type ManagedAgentsFormDataSessionFileUploadRequest = { /** * The image bytes. PNG, JPEG and WebP are accepted; the media type is sniffed from the bytes. */ file?: Blob | File; }; /** * Multipart body carrying a zipped skill directory in the bundle part. The document, name and description still come from the archive's SKILL.md. */ export type ManagedAgentsFormDataSkillBundleUploadRequest = { /** * A zipped skill directory: SKILL.md at its root or one level down, plus optional scripts/, references/ and assets/. Files under scripts/ are mounted executable. */ bundle?: Blob | File; /** * Human-readable title for listings. Defaults to the frontmatter name. */ display_title?: string; /** * Caller-owned key/value data as a JSON object, since a form part cannot carry structure. Rejected rather than dropped when it does not parse. */ metadata?: string; /** * Catalog group to file this skill under. Present and empty removes it from its group; omit the part to leave the group unchanged. */ skill_group_id?: string; }; /** * Multipart body carrying a zipped skill directory in the bundle part, plus the base version it advances from. Replaces every file in the skill: parts left out are cleared, not inherited from the current version. */ export type ManagedAgentsFormDataSkillVersionBundleUploadRequest = { /** * Required. The skill's current latest_skill_version_id, as returned by getSkill. Rejected with 409 revision_conflict if the skill has moved past this version. */ base_skill_version_id: string; /** * A zipped skill directory: SKILL.md at its root or one level down, plus optional scripts/, references/ and assets/. Files under scripts/ are mounted executable. */ bundle?: Blob | File; /** * Human-readable title for listings. Defaults to the frontmatter name. */ display_title?: string; /** * Caller-owned key/value data as a JSON object, since a form part cannot carry structure. Rejected rather than dropped when it does not parse. */ metadata?: string; }; /** * One accelerator's summary for a minute bucket: its driver index, average and peak utilization, peak memory used, and total memory. The per-sample GPU arrays, and the -1 holes for samples the device did not report, live on the bucket itself. */ export type ManagedAgentsGpuDeviceMinute = { /** * Device index as the driver reports it. */ index: number; /** * Device memory capacity in bytes. */ memory_total_bytes: number; /** * Highest sampled device memory in use during the minute, in bytes. */ memory_used_peak_bytes: number; /** * Mean utilization percent across the minute's samples. */ utilization_avg: number; /** * Highest sampled utilization percent in the minute. */ utilization_peak: number; }; /** * One model-catalog entry: the id to select when configuring an agent and the model's capabilities. */ export type ManagedAgentsGatewayModel = { /** * Maximum prompt size in tokens, when known. */ contextWindow?: number; /** * Human-readable model name. */ displayName: string; /** * Provider or model family. */ family: string; /** * Maximum generated output in tokens, when known. */ maxOutputTokens?: number; /** * Provider-qualified model id to use when configuring an agent. */ modelId: string; /** * Exact provider-native reasoning effort values. Omitted means unknown; an empty array means no explicit effort is valid. */ supportedReasoningEfforts?: Array; /** * Whether this model accepts image content. */ supportsImageInput: boolean; }; /** * Response body of GET /v1/models. Unlike the other catalogs this one is not stored per organization: it reflects the models currently available and is cached briefly, so a successful response can be slightly stale, and the operation returns 503 rather than an empty list when the model catalog cannot be read and nothing is cached. */ export type ManagedAgentsGatewayModelListResponse = { /** * Models agents can currently run on. Always an array and never null. */ items: Array; }; /** * One root session as the sessions gestalt projects it: identity, agent, state, and timestamps. The caller's access policy decides which roots appear: ordinary callers receive only unclassified public roots, while callers with elevated classified-data access can receive classified roots. Read the session itself for anything else. */ export type ManagedAgentsGestaltSessionRow = { /** * Agent the session runs (UUID). Absent for imported sessions that have none. */ agent_id?: string; /** * RFC 3339 timestamp the session was created at; the gestalt is ordered by it, newest first. */ created_at: string; /** * True on a change-feed row for a session that was deleted since the previous read. Never set on a snapshot row. */ deleted?: boolean; /** * Where the agent loop is, as on the session resource. Absent for sessions without a loop. */ execution_state?: 'provisioning' | 'queued' | 'running' | 'idle' | 'completed'; /** * True when the session carries a terminal failure; GET /v1/sessions/{session_id} has the details. */ failed?: boolean; /** * RFC 3339 timestamp the agent loop last made progress. Absent for sessions that run no loop. */ last_activity_at?: string; /** * Session id (UUID) of the root session. */ session_id: string; /** * Coarse session state, as on the session resource. */ status: 'active' | 'awaiting_human' | 'completed' | 'failed' | 'cancelled'; /** * RFC 3339 timestamp of the row's last change. */ updated_at: string; }; /** * Closed configuration for a GitHub webhook source. */ export type ManagedAgentsGithubEventSourceRequest = { /** * Customer-configured webhook delivery and verification. */ delivery: ManagedAgentsProviderWebhookDeliveryRequest; /** * Human-readable source name shown in the automation catalog. */ displayName: string; /** * GitHub webhook protocol, verified with GitHub's webhook signature. */ type: 'github_webhook'; }; /** * Response body of POST /v1/sessions/{session_id}/handoff/access. The URL is an ephemeral credential, is never persisted by Managed Agents, and the response is always Cache-Control: no-store. */ export type ManagedAgentsHandoffAccessResponse = { /** * One-time or short-lived URL that establishes access to the session's existing noVNC display. Treat it as a credential. */ redemption_url: string; /** * RFC 3339 time after which this redemption URL can no longer establish a browser session, capped by the handoff deadline. An already redeemed browser session remains usable until hand-back, deadline, or revoke. */ redemption_url_expires_at: string; }; /** * Closed custom-webhook configuration that verifies HMAC-SHA256 signatures. */ export type ManagedAgentsHmacCustomEventSourceRequest = { /** * Customer-configured webhook delivery and verification. */ delivery: ManagedAgentsHmacWebhookDeliveryRequest; /** * Human-readable source name shown in the automation catalog. */ displayName: string; /** * Custom webhook protocol. */ type: 'custom_webhook'; }; /** * HMAC-SHA256 verification policy for a custom webhook. */ export type ManagedAgentsHmacCustomEventSourceVerification = { /** * HTTP header carrying the delivery signature. */ signatureHeader: string; /** * Optional literal prefix removed from the signature header before comparison. */ signaturePrefix?: string; /** * The raw request body used as the HMAC input; v1 requires exactly one body part. */ signedParts: [ ManagedAgentsEventSourceSignedPart ]; /** * Verify a hexadecimal HMAC-SHA256 signature before admitting the delivery. */ type: 'hmac_sha256'; /** * Credential containing the HMAC secret. */ verificationCredential: ManagedAgentsEventSourceCredentialRef; }; /** * Custom webhook delivery authenticated by HMAC-SHA256. */ export type ManagedAgentsHmacWebhookDeliveryRequest = { /** * Customer-configured webhook delivery. */ kind: 'webhook'; /** * HMAC verification rules applied to every delivery. */ verification: ManagedAgentsHmacCustomEventSourceVerification; }; /** * Closed schedule-trigger configuration. */ export type ManagedAgentsHttpapiAutomationScheduleTrigger = { /** * Whether this trigger may admit runs while the automation is active. */ enabled: boolean; /** * Schedule timing and overlap policy. */ schedule: ManagedAgentsAutomationScheduleConfig; /** * Caller-generated stable trigger identifier. */ triggerId: string; /** * Schedule trigger discriminant. */ type: 'schedule'; }; /** * Closed schedule-trigger configuration. */ export type ManagedAgentsHttpapiAutomationScheduleTriggerRequest = { /** * Whether this trigger may admit runs while the automation is active. */ enabled: boolean; /** * Schedule timing and overlap policy. */ schedule: ManagedAgentsAutomationScheduleConfigRequest; /** * Caller-generated stable trigger identifier. */ triggerId: string; /** * Schedule trigger discriminant. */ type: 'schedule'; }; /** * Closed custom-webhook trigger configuration. */ export type ManagedAgentsHttpapiAutomationWebhookTrigger = { /** * Whether this trigger may admit runs while the automation is active. */ enabled: boolean; /** * Compatible custom webhook source. */ eventSourceId: string; /** * Optional body conditions. Omit to match every delivery from the source. */ filters?: ManagedAgentsAutomationWebhookFilters; /** * Caller-generated stable trigger identifier. */ triggerId: string; /** * Custom-webhook trigger discriminant. */ type: 'webhook'; }; /** * Closed custom-webhook trigger configuration. */ export type ManagedAgentsHttpapiAutomationWebhookTriggerRequest = { /** * Whether this trigger may admit runs while the automation is active. */ enabled: boolean; /** * Compatible custom webhook source. */ eventSourceId: string; /** * Optional body conditions. Omit to match every delivery from the source. */ filters?: ManagedAgentsAutomationWebhookFiltersRequest; /** * Caller-generated stable trigger identifier. */ triggerId: string; /** * Custom-webhook trigger discriminant. */ type: 'webhook'; }; /** * Sampling and generation settings for a model call, mirroring the provider's own request parameters. Set it on an agent or a session to govern every turn, and read it back on a model event to see what the call actually used. */ export type ManagedAgentsInferenceConfig = { /** * Upper bound on tokens the model may generate for one assistant turn (the provider's max_tokens). Omit or 0 to use the model reference's default. */ max_tokens?: number; /** * Extra provider request parameters merged into the inference call for options this schema does not model. Keys are provider-specific and are passed through unvalidated. */ provider_params?: { [key: string]: unknown; }; /** * Provider-native reasoning depth value. For a model from the models catalog, use one of its supportedReasoningEfforts; omit it to follow the provider's current default. */ reasoning_effort?: string; /** * Sampling temperature passed through to the provider, typically 0.0-2.0. Lower values are more deterministic. Omit to use the provider default. */ temperature?: number; /** * Nucleus-sampling probability mass (0.0-1.0) passed through to the provider. Prefer setting either this or temperature, not both. Omit to use the provider default. */ top_p?: number; }; /** * Sampling and generation settings for a model call, mirroring the provider's own request parameters. Set it on an agent or a session to govern every turn, and read it back on a model event to see what the call actually used. */ export type ManagedAgentsInferenceConfigRequest = { /** * Upper bound on tokens the model may generate for one assistant turn (the provider's max_tokens). Omit or 0 to use the model reference's default. */ max_tokens?: number; /** * Extra provider request parameters merged into the inference call for options this schema does not model. Keys are provider-specific and are passed through unvalidated. */ provider_params?: { [key: string]: unknown; }; /** * Provider-native reasoning depth value. For a model from the models catalog, use one of its supportedReasoningEfforts; omit it to follow the provider's current default. */ reasoning_effort?: string; /** * Sampling temperature passed through to the provider, typically 0.0-2.0. Lower values are more deterministic. Omit to use the provider default. */ temperature?: null | number; /** * Nucleus-sampling probability mass (0.0-1.0) passed through to the provider. Prefer setting either this or temperature, not both. Omit to use the provider default. */ top_p?: null | number; }; /** * One place a credential is applied to an outbound request. Headers alone is recommended; a secret in a request body is far easier to log by accident. */ export type ManagedAgentsInjectionLocation = 'headers' | 'body'; /** * The completed integration authorization. Connections contains the accounts established by this callback; when the provider needs the operator to choose an account or action first, connections is empty and options contains those provider-defined continuations. */ export type ManagedAgentsInstallComplete = { /** * Connections created by this callback. Empty when the provider needs an option selected first. */ connections: Array; /** * Provider-defined accounts or actions the operator can choose to continue authorization. */ options?: Array; /** * Provider whose authorization is being completed. */ provider: string; }; /** * Where to send a user to authorize an integration, plus the one-time state nonce that ties the provider's callback back to this attempt. Returned when an authorization flow is started. */ export type ManagedAgentsInstallStart = { /** * Single-use CSRF nonce identifying this install attempt, not a lifecycle status. The provider must echo it in the callback; completion consumes the server-held record that binds it to the provider, organization, and user. */ state: string; /** * Absolute provider-hosted authorization page to redirect the user to. Carries the state nonce as a query parameter; send the user here rather than fetching it server-side. */ url: string; }; /** * An organization's link to a third-party account, created by installing an integration such as the GitHub App. It holds no secret itself; grant it to an agent so sessions can mint short-lived provider credentials from it. */ export type ManagedAgentsIntegrationConnection = { /** * Name of the connected third-party account, e.g. the GitHub org or user login. Cached at install time for display, so no provider call is needed to show it. */ account_login?: string; /** * Kind of account that was connected, as the provider reports it, e.g. Organization or User for GitHub and workspace for Slack. */ account_type?: string; /** * User who completed the install, recorded for audit. Empty for connections created by an internal admin route. */ connected_by?: string; /** * Identifier for this connection (UUID). Server-assigned. Cite it when granting an agent access to the integration. */ connection_id: string; /** * RFC 3339 timestamp of when this record was created. Server-assigned. */ created_at: string; /** * The provider's own identifier for the link, which token minting addresses. The installation id for GitHub; the composite {api_app_id}:{team_id} for Slack; the customer service-account email for Google Cloud. */ external_id: string; /** * Organization that owns this record. Resolved from the API key; never accepted from the caller. */ organization_id: string; /** * What the provider granted the install, as permission name to access level (e.g. contents: write). Used to narrow a minted token without a provider round trip and to explain why a permission preset is unavailable. */ permissions?: { [key: string]: string; }; /** * Stable slug of the third-party integration adapter this connection uses. */ provider: string; /** * Whether the install covers all of the account's resources or only chosen ones: all or selected. Informational only; the authoritative list stays at the provider. */ resource_selection?: string; /** * Lifecycle of the connection: pending was registered directly and waits for the customer to grant trust at the provider (a successful probe activates it), active can mint tokens, suspended is restorable at the provider and resolves to no credential, revoked was uninstalled and must be installed again. */ state: string; /** * RFC 3339 timestamp of the last change to this record. Server-assigned. */ updated_at: string; /** * Runtime usage counts, supplied on the connection list. */ usage?: ManagedAgentsIntegrationConnectionUsage; }; /** * The integration connections belonging to the calling organization, as resolved from the API key. Returned when listing connections. */ export type ManagedAgentsIntegrationConnectionListResponse = { /** * The organization's integration connections, including pending (registered, trust not yet proved), suspended, and revoked ones. Disconnected connections are omitted. */ connections: Array; }; /** * Current agent and pinned automation runtime usage of a connection. */ export type ManagedAgentsIntegrationConnectionUsage = { /** * Distinct agents whose current version selects this connection. */ agents: number; /** * Distinct canonical automations, including paused ones, whose pinned agent version selects this connection. */ automations: number; }; /** * Connection-managed delivery; no customer webhook or verification credential is required. */ export type ManagedAgentsIntegrationEventSourceDelivery = { /** * Owning integration connection in the same workspace. */ readonly connectionId: string; /** * Delivery through the platform integration callback. */ kind: 'integration'; }; /** * The integration providers this deployment can connect to. Returned by the provider list a console reads before offering a connect action. */ export type ManagedAgentsIntegrationProviderListResponse = { /** * Every integration provider this build supports, configured or not. Unconfigured entries are included so a caller can distinguish "not set up in this deployment" from "not offered". */ providers: Array; }; /** * Request body for interrupting the active operation and starting a fresh turn with one replacement instruction. */ export type ManagedAgentsInterruptAndSendRequest = { /** * Provider-shaped replacement instruction blocks, passed through verbatim, except that a top-level image or document block may name a file from the organization's catalog with source {type: file, file_id}, resolved exactly as on sendSessionEvents; a refusal names the block as content[j]. Takes precedence over message. */ content?: Array | null; /** * Replacement instruction for the fresh turn. Ignored when content is present. */ message?: string; /** * Prior sessions this session may read from the fresh turn on, by session id, added to any it already has. Authorized and recorded before the interrupt is signaled, so redirecting the agent at an earlier run is one request rather than two. */ referenced_session_ids?: Array; }; /** * Request body for interrupting a running session, optionally injecting a message the agent sees at the interruption point. */ export type ManagedAgentsInterruptRequest = { /** * Optional reason recorded when the running session reaches its cooperative stop checkpoint. */ message?: string; }; /** * Response body of POST /v1/sessions/{session_id}/interrupt. An interrupt is a cooperative control, not a session cancellation: the session stays alive and keeps accepting events. Use POST /v1/sessions/{session_id}/cancel to stop it. */ export type ManagedAgentsInterruptedResponse = { /** * True when the interrupt reached the running session and its active work was told to stop. False means the request was accepted and the stop recorded, but nothing running was confirmed interrupted -- typically a session that had already finished. */ interrupted: boolean; /** * Compatibility alias of interrupted, carrying the same value on every response. It predates interrupted reporting whether anything was actually reached, and is kept so existing callers keep working; read interrupted instead. */ temporal_signaled: boolean; }; /** * Exact Slack trigger binding authorized to use an organization-wide Labelbox product-state credential, with an explicit internal or Slack Connect classification. */ export type ManagedAgentsLabelboxAudienceRequest = { /** * Exact Slack trigger binding id authorized to use the credential. */ binding_id: string; /** * Exact Slack channel id used by the binding. The signed webhook receipt's sharing classification must match kind. */ channel_id: string; /** * Exact Slack integration connection id used by the binding. */ connection_id: string; /** * Optional restriction of organization-wide Labelbox access to one exact binding whose internal or Slack Connect classification is explicit. */ kind: 'internal_slack_binding' | 'slack_connect_binding'; }; /** * Labelbox product-state authorization ceiling. Projects mode permits one exact project set. Organization mode permits organization-wide access, optionally pinned to one exact Slack binding whose internal or Slack Connect classification is explicit. The organization always equals the credential's owner. */ export type ManagedAgentsLabelboxScopeRequest = { /** * Optional in organization mode: pins the credential to one exact Slack binding audience classified as internal or Slack Connect; without it the scope follows the vault wherever the vault is granted. Forbidden in projects mode. */ audience?: ManagedAgentsLabelboxAudienceRequest; /** * Scope mode. Omit for the backward-compatible projects mode. */ mode?: 'projects' | 'organization'; /** * Labelbox organization the projects belong to. Optional: filled in from the organization that owns the credential, and rejected if it names any other. */ organization_id?: string; /** * Projects mode requires exactly 1 to 100 project ids. Forbidden in organization mode. */ project_ids?: Array; }; /** * Exact Slack trigger binding authorized to use an organization-wide Labelbox product-state credential, with an explicit internal or Slack Connect classification. */ export type ManagedAgentsLabelboxToolsAudience = { /** * Exact Slack trigger binding id authorized to use this credential. */ binding_id: string; /** * Exact Slack channel id used by the binding. The signed webhook receipt's sharing classification must match kind. */ channel_id: string; /** * Exact Slack integration connection id used by the binding. */ connection_id: string; /** * Trusted session audience kind. internal_slack_binding requires a non-shared channel; slack_connect_binding is an explicit opt-in to one externally shared channel. */ kind: 'internal_slack_binding' | 'slack_connect_binding'; }; /** * Labelbox product-state authorization ceiling. The organization always equals the credential's owner. Projects mode permits one exact project set; organization mode permits organization-wide reads only from one exact Slack binding whose internal or Slack Connect classification is explicit. */ export type ManagedAgentsLabelboxToolsScope = { /** * Optional organization-mode audience: pins the credential to one exact Slack binding and its internal-or-Slack-Connect classification; without it the scope follows the vault wherever the vault is granted. Forbidden in projects mode. */ audience?: ManagedAgentsLabelboxToolsAudience; /** * Scope mode. Omitted legacy values are canonicalized to projects. */ mode?: 'projects' | 'organization'; /** * Labelbox organization the projects belong to. Must equal the organization that owns the credential; filled in from it when omitted on write. */ organization_id: string; /** * Projects-mode ceiling: exactly 1 to 100 project ids, each up to 128 characters of letters, digits, hyphen, or underscore. Forbidden in organization mode; validated as unique and sorted on write. */ project_ids?: Array; }; /** * Compact newest immutable evaluation projected onto a session-list row. */ export type ManagedAgentsLatestEvaluation = { /** * UTC timestamp when the newest evaluation was recorded. */ created_at: string; /** * Stable identity of the newest immutable evaluation for this session. */ evaluation_id: string; /** * Overall pass, fail, or not-applicable verdict. */ result: 'pass' | 'fail' | 'not_applicable'; }; /** * Model and guidance for automatic learning from an agent's finished sessions. The default model follows the agent's model. */ export type ManagedAgentsLearningConfig = { /** * Read-only standing guidance for every learning run of this agent. Capped at 4096 characters; the learning PATCH does not accept this field. */ readonly instructions?: string; /** * Model used for all memory learning stages. Empty inherits the agent's model; an explicit model reference or model id overrides it. */ memory_model_ref?: string; /** * Read-only analyzer reference used for memory updates. Empty uses the default; the learning PATCH does not accept this field. */ readonly reflector_agent_id?: string; }; /** * A partial update to the memory model; null restores the agent's model. */ export type ManagedAgentsLearningConfigRequest = { /** * Model override for all memory stages. Null restores inheritance from the agent; omit to leave unchanged. */ memory_model_ref?: null | string; }; /** * One row of a memory browse result: a memory, or a prefix standing for everything beneath it. A prefix carries a count so a reader can decide whether to descend without descending. */ export type ManagedAgentsListEntry = { /** * Size of the memory in bytes. Absent for a prefix. */ byte_size?: number; /** * Number of memories beneath a prefix. Absent for a memory. */ count?: number; /** * Path of the memory, or the prefix including its trailing slash. */ path: string; /** * One-line description. Present for a memory, absent for a prefix. */ summary?: string; /** * memory for a document, memory_prefix for a directory standing for the paths beneath it. */ type: 'memory' | 'memory_prefix'; }; /** * One agent's live root sessions: running, waiting for a concurrency slot, and stopped for a person, counted at the same instant as the fleet's totals. */ export type ManagedAgentsLiveFleetAgent = { /** * Agent identifier. */ agent_id: string; /** * Root sessions stopped for a person. */ awaiting_human: number; /** * Operator-facing agent name. */ name: string; /** * Root sessions running now: they hold one of the agent's concurrency slots, or the agent has no cap. */ running: number; /** * Root sessions accepted and waiting for a concurrency slot the agent's cap holds back. */ waiting: number; }; /** * Response body of GET /v1/sessions/live: what an organization's agents are running at one instant, whenever those sessions were created. */ export type ManagedAgentsLiveSessionsResponse = { /** * Every agent with at least one live root session, busiest first. Always an array. */ agents: Array; /** * RFC 3339 timestamp the counts were read at. */ as_of: string; /** * Root sessions stopped for a person across the agents counted. */ awaiting_human: number; /** * Running root sessions across the agents counted. */ running: number; /** * True when the organization has more agents than one read counts, so the totals are of the agents counted rather than of the fleet. */ truncated?: boolean; /** * Waiting root sessions across the agents counted. */ waiting: number; }; /** * Evidence from one bounded Google Cloud Logging read attempted through an integration connection. It reports only the tested project, check time, and outcome; it contains no log entries or provider error body. */ export type ManagedAgentsLogReadEvidence = { /** * Time of this explicit check; not continuous health. */ checked_at: string; /** * entries and empty both prove a successful read; other values do not. */ outcome: 'entries' | 'empty' | 'denied' | 'authentication_failed' | 'read_failed'; /** * The single project explicitly tested. */ project_id: string; }; /** * The rubric criterion with the lowest defined pass rate in the current window. */ export type ManagedAgentsLowestCriterion = { /** * Rubric key with the lowest defined current-window pass rate. */ criterion_key: string; /** * Current and prior verdict metric for the selected criterion. */ metric: ManagedAgentsVerdictMetric; }; /** * Response body of POST /v1/mcp/probe: the result of one live connection attempt to an MCP server, run through the same URL and vault resolution a real session uses. This envelope is a verdict rather than a resource: a server that is down is still HTTP 200 with ok=false, so a caller can distinguish "the server you configured is unreachable" from "this API is unreachable". Nothing is persisted by a probe. */ export type ManagedAgentsMcpProbeResponse = { /** * True when a credential from the named vaults was opened and attached to the request. It reports whether this attempt was authenticated, not whether a credential exists: a credential that matched the server URL but could not be opened reports false and sets credential_unopenable, because nothing was sent. */ credential_matched: boolean; /** * Set when a credential matched this server URL and could not be opened, so the request carried no auth header. external_reference means the material is held outside this service and must be re-entered here; material_missing means the credential row carries no stored value. Empty when none matched or the match was usable. */ credential_unopenable?: 'external_reference' | 'material_missing'; /** * True when a deployment-owned access-token policy authorizes this endpoint for the organization and each request mints a token for the deployment's reader identity. Distinct from credential_matched: no vault credential is involved. For endpoints that answer discovery unauthenticated (Google hosted MCPs), a green tool list proves connectivity and discovery, not provider-side IAM — only a real tool call does. */ deployment_authorized: boolean; /** * Operator-facing diagnostic when the probe failed. Never contains credential material. */ error?: string; /** * True when the server completed the handshake and returned a tool list. */ ok: boolean; /** * The MCP protocol version used. */ protocol_version?: string; /** * True when the handshake succeeded, even if listing tools then failed. */ reachable: boolean; /** * What the server called itself during the handshake, which is how an operator confirms the URL reached the intended service. */ server_name?: string; /** * Tools the server advertised on this attempt. Always an array and never null: empty means the handshake succeeded but the server offered no tools, or listing them failed, which is what ok=false plus reachable=true reports. */ tools: Array; }; /** * One tool advertised by a probed MCP server, reported verbatim from its tools/list response. Appears only inside MCPProbeResponse.tools; the service does not persist or validate these entries, so their presence proves the server answered, not that the tool works. */ export type ManagedAgentsMcpProbeTool = { /** * The tool's own self-description as returned by the server, passed through verbatim. Absent when the server advertised the tool without one. */ description?: string; /** * The tool name as the MCP server reported it, which is the name an agent would call it by. */ name: string; }; /** * One typed event in the events array of a POST /v1/sessions/{session_id}/events body. It is lenient for messages: an unrecognised type, and a user.message carrying neither content nor text, are dropped silently rather than rejected, so compare events_accepted in the response against how many entries were sent. handoff_resolved is a strict control event: it must be the only entry and accepts only type, handoff_id, and note. The request fails with 400 only if every entry was dropped, leaving nothing to accept. */ export type ManagedAgentsManagedEventSendParams = { /** * Who this event is attributed to. Defaults to human:api when omitted. */ actor?: string; /** * Provider-shaped content blocks, passed through verbatim, except that a top-level image or document block may name a file from the organization's catalog with source {type: file, file_id} instead of carrying bytes: the file is read when the message is accepted, an image is copied into the session and the block keeps the source beside the copy's uri, and a text document is inlined as a text block wrapped with its source, name, title, and context. The send route's description carries the limits on such blocks and what they may bring in. Takes precedence over text. */ content?: Array | null; /** * Stable id from session.active_handoff. Required for handoff_resolved and ignored for message events. */ handoff_id?: string; /** * Optional note telling the agent what the user did before handing the browser back. Used only for handoff_resolved. */ note?: string; /** * Convenience shorthand for a single text content block. Ignored when content is set. */ text?: string; /** * Event type. Defaults to user.message when omitted. handoff_resolved is the dedicated control event for handing the shared browser back; it must be the only event in the request. Other unrecognised values are silently ignored. Interrupts use the permission-isolated interrupt endpoints. */ type?: 'user.message' | 'system.message' | 'handoff_resolved'; }; /** * One JSON payload from the managed session event stream. Durable timeline events include their reconnectable id and raw event; synthetic lifecycle and error events carry only the applicable compatibility fields. */ export type ManagedAgentsManagedStreamEvent = { /** * Durable event id this event is anchored to, when supplied by event metadata. */ anchor_event_id?: string; /** * Content blocks projected from the durable source event. */ content?: Array; /** * Public failure details for a failed event or session, or reconnect guidance after a stream read error. */ error?: { [key: string]: unknown; }; /** * Durable source event id used as the SSE id and reconnect cursor. Omitted for synthetic status and error events. */ id?: string; /** * RFC 3339 timestamp when the durable event was created or the synthetic status event was projected. */ processed_at?: string; /** * Unmodified durable event backing this compatibility projection. Omitted for synthetic status and error events. */ raw_event?: ManagedAgentsEvent; /** * Session id associated with the event. */ session_id?: string; /** * Thread id associated with the durable source event. */ session_thread_id?: string; /** * Completion, execution, or session-status reason. Durable events use their string stop reason; synthetic status events use an object with a type field. */ stop_reason?: unknown; /** * Managed event type emitted in both the SSE event field and this JSON payload. */ type: string; /** * Model token usage projected from the durable source event. */ usage?: ManagedAgentsUsage; }; /** * Structured input for explicitly running a canonical automation. */ export type ManagedAgentsManualAutomationDefinitionRunRequest = { /** * Optional deliberately open JSON value supplied to this run and frozen in its event context. */ payload?: unknown; }; /** * One path-addressed document in a memory store. The path hierarchy is the routing structure an agent browses, so it carries the meaning a per-memory prompt description otherwise would. */ export type ManagedAgentsMemory = { /** * Size of the content in bytes. */ byte_size: number; /** * Full text of the memory. Returned when reading one memory, omitted from listings. */ content?: string; /** * SHA-256 of the content. Pass it back as an update precondition to avoid clobbering a concurrent write. */ content_sha256?: string; /** * Server-assigned RFC 3339 timestamp of when the memory was created. */ created_at: string; /** * Set when the memory was deleted. A deleted path may be recreated. */ deleted_at?: string; /** * Version id of the current content. */ head_version_id?: string; /** * Server-assigned id of the memory. */ memory_id: string; /** * Store this memory belongs to. */ memory_store_id: string; /** * Organization that owns this record. Resolved from the API key; never accepted from the caller. */ organization_id: string; /** * Address of the memory within its store, e.g. /conventions/testing.md. The path hierarchy is the routing structure an agent browses, so it carries the meaning a per-memory prompt description otherwise would. */ path: string; /** * Reflection run that wrote this memory. Empty for a memory a human seeded. */ reflection_id?: string; /** * active memories are offered to sessions; retired and superseded memories are kept for history, so later learning runs can see what was already tried. */ status: 'active' | 'retired' | 'superseded'; /** * One-line description, shown in search results and the console. Not disclosed in the system prompt. */ summary?: string; /** * Memory that replaced this one, when a learning run superseded it. */ superseded_by_memory_id?: string; /** * Server-assigned RFC 3339 timestamp of the most recent change. */ updated_at: string; }; /** * An agent's automatic memory activity, including checks with no changes and retrying failures. */ export type ManagedAgentsMemoryActivityPage = { /** * Opaque cursor for the next activity page. */ next_cursor?: string; /** * Automatic memory runs, newest first. */ reflections: Array; }; /** * Fields for creating one memory. Path, content and summary are all required; omitting any of them is a 400. */ export type ManagedAgentsMemoryCreateRequest = { /** * Full text of the memory. Capped at 100 kB; memory works better as many small focused documents. */ content: string; /** * Address within the store, e.g. /conventions/testing.md. */ path: string; /** * One line describing what this memory says, shown in search results and the console. */ summary: string; }; /** * One level of a memory store's namespace: memories and the prefixes standing for the paths beneath them. */ export type ManagedAgentsMemoryListResponse = { /** * Memories and directory prefixes under the requested path, interleaved in path order. */ entries: Array | null; }; /** * Fields for updating one memory. Every field is optional and an omitted one is left unchanged. Supply content_sha256 to apply the write only if the stored content still matches what you read. */ export type ManagedAgentsMemoryRequest = { /** * Full text of the memory. Capped at 100 kB; memory works better as many small focused documents. */ content?: string; /** * Apply only if the stored content hash still matches this value. On mismatch the request is a 409 and the caller should re-read and retry. */ content_sha256?: string; /** * Address within the store, e.g. /conventions/testing.md. On update, supplying a different path renames the memory. */ path?: string; /** * One line describing what this memory says, shown in search results and the console. */ summary?: string; }; /** * A collection of path-addressed documents an agent reads across sessions. Attaching a store adds one note to the system prompt naming what it contains; the agent browses, searches, and reads its contents on demand, so store size does not enter the prompt. */ export type ManagedAgentsMemoryStore = { /** * Agent this store belongs to. Empty for a workspace store any session may attach. */ agent_id?: string; /** * Set when a curated reference store was archived. */ archived_at?: string; /** * Server-assigned RFC 3339 timestamp of when the store was created. */ created_at: string; /** * Identifier of the caller or reflection that created the store. */ created_by?: string; /** * What this store contains. Disclosed to the agent in every session the store is attached to, so it is the routing signal: write it as what the agent would be looking for. */ description?: string; /** * Number of live memories in the store. */ memory_count: number; /** * Server-assigned id of the store, used when attaching it to a session and in the memory routes. */ memory_store_id: string; /** * Human-readable name. Shown to the agent as part of the store's note. */ name: string; /** * Organization that owns the store. Server-assigned from the caller's credentials; a value sent in a request body is ignored. */ organization_id: string; /** * Who wrote this store: curated for material a person added, reflection for an agent's learned memory. A reflection store is not hand-editable. */ origin: 'curated' | 'reflection'; /** * Monotonic revision of the collection, advanced atomically when a learning run changes memories. */ revision: number; /** * Filesystem-safe form of the name, stable across renames. */ slug: string; /** * Active collections are available to sessions; archived curated stores cannot be attached. */ status: 'active' | 'archived'; /** * Total bytes of live memory content in the store. */ total_bytes: number; /** * Server-assigned RFC 3339 timestamp of the most recent change to the store or its memories. */ updated_at: string; }; /** * One memory store bound to a session at creation time, with the access it is granted. */ export type ManagedAgentsMemoryStoreAttachment = { /** * How the session may use the store. Defaults to read_only. */ access?: 'read_only' | 'read_write'; /** * Session-specific guidance on using this store, shown to the agent beside its name and description. Capped at 4096 characters. */ instructions?: string; /** * Store to attach. */ memory_store_id: string; }; /** * One memory store bound to a session at creation time, with the access it is granted. */ export type ManagedAgentsMemoryStoreAttachmentRequest = { /** * How the session may use the store. Defaults to read_only. */ access?: 'read_only' | 'read_write'; /** * Session-specific guidance on using this store, shown to the agent beside its name and description. Capped at 4096 characters. */ instructions?: string; /** * Store to attach. */ memory_store_id?: string; }; /** * The memory stores in the calling organization, newest first. */ export type ManagedAgentsMemoryStoreListResponse = { /** * Memory stores in the organization, newest first. */ memory_stores: Array | null; }; /** * Fields for creating or renaming a curated memory store. An omitted field is left unchanged on update. */ export type ManagedAgentsMemoryStoreRequest = { /** * Scope the store to one agent. Omit for a workspace store any session may attach. */ agent_id?: string; /** * What this store contains. Disclosed to the agent in every session the store is attached to, so write it as what the agent would be looking for. */ description?: string; /** * Human-readable name. Shown to the agent as part of the store's note. */ name?: string; }; /** * One immutable change to a memory. Versions belong to the store rather than the memory, so the audit trail survives the memory being deleted. */ export type ManagedAgentsMemoryVersion = { /** * Who wrote this version. */ author_kind: 'session' | 'api' | 'reflection' | 'admin'; /** * Caller identity that wrote this version, when an API caller did. */ author_principal?: string; /** * Session that wrote this version, when a session did. */ author_session_id?: string; /** * Size of the content at this version in bytes. */ byte_size?: number; /** * Content as it stood at this version. Empty once redacted, and omitted from listings. */ content?: string; /** * SHA-256 of the content at this version. */ content_sha256?: string; /** * Server-assigned RFC 3339 timestamp of when this version was written. */ created_at: string; /** * Sessions supporting this version, scoped to the same agent and organization. */ evidence_session_ids?: Array; /** * Memory this version describes. The memory may since have been deleted. */ memory_id: string; /** * Store this version belongs to. */ memory_store_id: string; /** * Server-assigned id of the version. */ memory_version_id: string; /** * What this version records. */ operation: 'create' | 'update' | 'rename' | 'delete' | 'retire'; /** * Organization that owns this record. */ organization_id: string; /** * Path of the memory as it stood at this version. */ path: string; /** * Why this memory was added, changed, merged, or retired. */ rationale?: string; /** * Set when the content was scrubbed for compliance. Author and timestamp are preserved. */ redacted_at?: string; /** * Caller that redacted this version. */ redacted_by?: string; /** * Learning run that produced this version. */ reflection_id?: string; /** * Memory lifecycle state after this change. */ status?: 'active' | 'retired' | 'superseded'; /** * Summary as it stood at this version. */ summary?: string; /** * Surviving memory when this version records a merge. */ superseded_by_memory_id?: string; }; /** * A page of immutable memory history, including the evidence and reason for each change. */ export type ManagedAgentsMemoryVersionPage = { /** * Changes to the collection's memories, newest first, without full content. */ memory_versions: Array; /** * Opaque cursor for the next page of retained memory history. */ next_cursor?: string; }; /** * Billed model spend per hour while the model is generating. */ export type ManagedAgentsModelActiveRate = { /** * Where the rate comes from: recent sessions of this model, a platform baseline, a similar model scaled by list price, or unknown when neither exists. */ basis: 'observed' | 'prior' | 'scaled_list_price' | 'unknown'; /** * Model the rate was scaled from, when basis is scaled_list_price. */ basisModel?: string; /** * True when the model runs on the organization's own provider account, so its spend is billed there rather than by this platform and perHourUsd is zero. */ billedToProvider: boolean; /** * Billed model spend per hour the model is generating, in USD. */ perHourUsd: ManagedAgentsBand; /** * Ratio applied to the basis model's rate, when basis is scaled_list_price. */ scaleFactor?: number; /** * Recent sessions behind an observed rate; zero otherwise. */ sessions: number; }; /** * A signed correction to one charge, recorded after the charge itself. Adjustments are append-only: original_model_cost_usd keeps the amount as first recorded, and model_cost_usd carries the locally priced total plus every adjustment. */ export type ManagedAgentsModelCostAdjustmentResponse = { /** * Identifier for this adjustment within its charge. The ledger's own reconciliation of a provider-reported total always uses provider-authority. */ adjustment_id: string; /** * RFC 3339 timestamp of when the adjustment was committed. */ created_at: string; /** * Principal that recorded the adjustment. The automatic reconciliation of a provider-reported total is recorded under a system:… principal. */ created_by: string; /** * provider_authority reconciles the locally priced total to the total the provider reported for the same call; correction is an amendment recorded against an existing charge. */ kind: 'provider_authority' | 'correction'; /** * Exact signed canonical decimal USD string. */ model_cost_usd: string; /** * Why the adjustment was recorded, e.g. that the provider-reported total overrides the local price snapshot. */ reason: string; }; /** * One model inference or metered provider-side tool call the ledger is accountable for, billed or not. An attempt is reserved before the request is dispatched, so a call that failed, was never charged, or left billing unknown stays visible in the accounting instead of disappearing from it. */ export type ManagedAgentsModelCostAttemptResponse = { /** * Identifier for this attempt (UUID). Derived deterministically from the work that issued the call, so a retried dispatch reuses it instead of billing twice; a retry after a dispatch that provably never reached billing gets its own derived child id. */ attempt_id: string; /** * Pricing catalog version pinned when the attempt was reserved. A receipt priced against another version is rejected rather than mixed. Empty when the attempt was reserved without a pricing catalog. */ catalog_version?: string; /** * The billed result, present only when state is charged. */ charge?: ManagedAgentsModelCostChargeResponse; /** * Accounting confidence for this attempt: the charge's own completeness when a charge exists, otherwise pending while the outcome is still unknown, complete for a not_charged attempt that cost nothing, and indeterminate when the call may have been billed without a receipt. */ completeness: 'complete' | 'pending' | 'unpriced' | 'partial' | 'legacy_partial' | 'indeterminate'; /** * RFC 3339 timestamp of when the attempt was reserved, before the provider request was sent. Attempts page in this order. */ created_at: string; /** * model for inference or provider_tool for a metered provider-side tool. */ kind: 'model' | 'provider_tool'; /** * Model id the call requested, as sent on the wire. */ model?: string; /** * Model reference in the catalog the model was resolved from (UUID). Empty when the session named a models-catalog id instead of a catalog entry. */ model_ref_id?: string; /** * Parent of the session the call is attributed to (UUID). Empty when that session is the root. */ parent_session_id?: string; /** * Provider the call was dispatched to, e.g. anthropic, openai, or gemini. */ provider: string; /** * Root session of the tree this attempt belongs to (UUID). */ root_session_id: string; /** * Session the call is attributed to (UUID). */ session_id: string; /** * Position of that session within its tree, as a slash-delimited path of session ids. "/" for a root session. */ session_path: string; /** * Ledger lifecycle: prepared once the attempt was reserved, dispatched once the request was sent, charged once a receipt was persisted, not_charged when the call provably never reached billing, and indeterminate when it may have been billed but no usable receipt exists. */ state: 'prepared' | 'dispatched' | 'charged' | 'not_charged' | 'indeterminate'; /** * Thread within a multi-agent session the call belongs to. Empty when the attempt was recorded without thread attribution. */ thread_id?: string; /** * RFC 3339 timestamp of the attempt's last state change. */ updated_at: string; }; /** * The billed result of one attempt: the provider receipt, the components it was priced into, every adjustment since, and the amounts those produce. A charge is written once and never rewritten, so a later correction arrives as an adjustment rather than as an edit. Customers receive every amount as billed to their organization, with price snapshots and provider-reported totals redacted; only trusted internal callers receive raw ledger amounts. */ export type ManagedAgentsModelCostChargeResponse = { /** * Signed corrections applied to this charge, oldest first. Empty when the locally priced total was accepted as recorded. */ adjustments: Array | null; /** * Identifier for this charge (UUID), always the attempt_id it settles: a charged attempt has exactly one charge. */ charge_id: string; /** * Accounting confidence for this charge alone: complete when every component is priced, unpriced when none matched a catalog rule, partial when only some cost is known or a reported total could not be trusted, and legacy_partial for charges recorded before the current reconciliation rules. A persisted charge is never pending or indeterminate; those states belong to an attempt without one. */ completeness: 'complete' | 'pending' | 'unpriced' | 'partial' | 'legacy_partial' | 'indeterminate'; /** * Priced lines of this charge, one per receipt dimension, ordered by component_id. */ components: Array | null; /** * Sum of the components' amounts, i.e. what the pinned price catalog says this call cost. Exact canonical decimal USD string. */ locally_priced_model_cost_usd: string; /** * Current ledger amount for this charge, i.e. the locally priced total plus every adjustment. This is the amount that rolls up into the session summaries. Exact canonical decimal USD string. */ model_cost_usd: string; /** * Ledger amount when this charge was first recorded: the provider-reported total when one was authoritative, otherwise the locally priced total. Exact canonical decimal USD string. */ original_model_cost_usd: string; /** * Total the provider reported for this call, reconciled from its exact lexical value. Absent when none was reported or none could be trusted. When it differs from the locally priced total, a provider_authority adjustment reconciles the two. Exact canonical decimal USD string. */ provider_reported_model_cost_usd?: string; /** * Immutable provider evidence this charge was derived from. */ receipt: ManagedAgentsModelCostReceiptResponse; /** * Lowercase hex SHA-256 over the canonical receipt envelope, which is the provider's raw usage body together with the receipt evidence. Re-hashing the receipt proves it has not changed since the charge was recorded. */ receipt_sha256: string; /** * RFC 3339 commit timestamp of when the charge was written to the ledger. */ recorded_at: string; }; /** * One priced line of a charge: a receipt quantity joined to the rate it was charged at, and the exact amount that produced. Components sum to locally_priced_model_cost_usd, and an unpriced component contributes nothing to it. */ export type ManagedAgentsModelCostComponentResponse = { /** * Prompt-cache disposition: none for uncached tokens, read for a cache hit, and write_5m or write_1h for tokens written into the provider's cache at that time to live. */ cache_state: 'none' | 'read' | 'write_5m' | 'write_1h'; /** * What the quantity was consumed for: model input or output, provider-side tools, or compute runtime. */ category: 'input' | 'output' | 'reasoning' | 'tool_prompt' | 'provider_tool' | 'compute'; /** * Identifier for this component within its charge. Equal to the dimension it prices, and unique per charge. */ component_id: string; /** * Provider usage field this component prices, matching exactly one receipt quantity of the same dimension. */ dimension: string; /** * Content or resource type measured. compute marks sandbox runtime rather than model content. */ modality: 'text' | 'image' | 'audio' | 'video' | 'tool' | 'compute'; /** * Exact canonical decimal USD string. */ model_cost_usd: string; /** * Rate this component was charged at. Absent when no catalog rule matched the dimension, in which case the component costs nothing and the charge cannot be complete, and absent with price_redacted set for callers that do not read raw cost. */ price?: ManagedAgentsModelCostPriceResponse; /** * True when this component was priced but its private price snapshot was omitted. */ price_redacted?: boolean; /** * Exact base-10 integer string. Withheld from customer callers, which see it named in the receipt's redacted_fields. */ quantity?: string; /** * What quantity counts: tokens, requests, or elapsed compute milliseconds. */ unit: 'token' | 'request' | 'millisecond'; }; /** * Price one component was charged at, snapshotted from the pricing catalog when the charge was recorded so the amount stays reproducible after the catalog changes. The rate is numerator_nano_usd per denominator_units of quantity, in nano-USD (1,000,000,000 nano-USD = 1 USD), and a component's amount is quantity * numerator / denominator rounded half to even exactly once. Returned only to trusted internal callers that read raw cost. */ export type ManagedAgentsModelCostPriceResponse = { /** * Pricing catalog version this snapshot was taken from, always the version pinned on the attempt. A receipt priced against a different version is rejected rather than mixed. */ catalog_version: string; /** * Currency of the rate. Always USD; the ledger holds no other currency. */ currency: 'USD'; /** * Exact base-10 integer string. */ denominator_units: string; /** * Model id the rate was applied to: the receipt's resolved model, or the requested model when the provider reported no resolution. Empty only when neither recorded one. */ model?: string; /** * Exact base-10 integer string. */ numerator_nano_usd: string; /** * Provider this rate priced, always the attempt's own provider. */ provider: string; /** * Region the rate was applied at, always equal to the receipt's region. Empty when the provider reported none. */ region?: string; /** * Rule within that catalog version that matched this component. The most specific matching rule wins, and an ambiguous tie is rejected rather than guessed. */ rule_id: string; /** * Service tier the rate was applied at, always equal to the receipt's service_tier. Empty when the provider reported no tier. */ service_tier?: string; }; /** * One billable quantity exactly as the provider reported it, before any pricing. Receipt quantities are the audit trail behind a charge: each priced component reconciles to exactly one quantity of the same dimension, with the same category, modality, cache state, unit, and count. */ export type ManagedAgentsModelCostReceiptQuantityResponse = { /** * Prompt-cache disposition: none for uncached tokens, read for a cache hit, and write_5m or write_1h for tokens written into the provider's cache at that time to live. */ cache_state: 'none' | 'read' | 'write_5m' | 'write_1h'; /** * What the quantity was consumed for: model input or output, provider-side tools, or compute runtime. */ category: 'input' | 'output' | 'reasoning' | 'tool_prompt' | 'provider_tool' | 'compute'; /** * Field path in the provider's usage body this quantity was read from, e.g. input_tokens, cache_creation.ephemeral_5m_input_tokens, or output.reasoning. Unique within a receipt, and the key its priced component joins on. A dimension containing .unsupported is a provider aggregate that cannot be attributed to a rate, and is never priced. */ dimension: string; /** * Content or resource type measured. compute marks sandbox runtime rather than model content. */ modality: 'text' | 'image' | 'audio' | 'video' | 'tool' | 'compute'; /** * Exact base-10 integer string. */ quantity: string; /** * What quantity counts: tokens, requests, or elapsed compute milliseconds. */ unit: 'token' | 'request' | 'millisecond'; }; /** * Immutable provider evidence behind one charge: what the provider says it served, and how much of it. Amounts are never read from here directly; the components carry the priced result, and receipt_sha256 on the charge covers this evidence together with the provider's raw usage body. */ export type ManagedAgentsModelCostReceiptResponse = { /** * Billing evidence read from the call's response headers, recorded apart from the provider usage body. Present only for calls whose route reports its own billing total. */ gateway?: ManagedAgentsCostGatewayEvidence; /** * Provider's own id for the request, which is how the call is found in provider logs. Empty when the provider returned none. Withheld from customer callers, which instead see it named in redacted_fields. */ provider_request_id?: string; /** * Every billable quantity the provider reported, one per dimension. A charge's components reconcile exactly to these. Empty for customer callers, which see quantities named in redacted_fields. */ quantities: Array | null; /** * How this receipt was obtained when it did not arrive on the original provider response. Absent for the ordinary inline case. */ recovery?: ManagedAgentsCostReceiptRecovery; /** * Paths withheld from this receipt, e.g. provider_request_id, resolved_model_id, or components[].price. Also carries invalid_header: markers for billing headers that failed validation and were dropped from evidence rather than trusted. */ redacted_fields?: Array; /** * Provider region or inference geography the call was served from, when reported. Part of the pricing-rule match. */ region?: string; /** * Model id the request asked for, as sent on the wire. */ requested_model_id?: string; /** * Model id the provider reports it actually served, and the id the components were priced against. Empty when the provider returned none, and withheld from customer callers. */ resolved_model_id?: string; /** * Provider service tier the call was served at, when the provider reports one. Part of the pricing-rule match. */ service_tier?: string; /** * Provider that authored this usage body, always the attempt's own provider, e.g. anthropic, openai, or gemini. */ source: string; }; /** * Snapshot of the model that served one inference call, recorded on the event so a transcript stays interpretable after the catalog entry changes. Returned on model events; also accepted when pinning a session to a specific model. */ export type ManagedAgentsModelRef = { /** * Endpoint the request was sent to, for models not served at their provider's default endpoint. Empty means the provider's default endpoint. */ base_url?: string; /** * Declared model capability flags, e.g. tool use, vision, or extended thinking support, as recorded from the catalog entry at call time. */ capabilities?: { [key: string]: unknown; }; /** * Maximum total tokens the model accepts in one request, prompt plus completion, as recorded from the catalog entry at call time. 0 means unknown. */ context_window?: number; /** * Maximum completion tokens the model can emit in one response, as recorded from the catalog entry at call time. 0 means unknown. */ max_output_tokens?: number; /** * Extra key/value data copied from the catalog entry. Some keys are read by the service to shape the request, such as base_url and reasoning_style. */ metadata?: { [key: string]: unknown; }; /** * Provider's own model id as sent on the wire, e.g. claude-sonnet-4-5 or anthropic/claude-sonnet-4-5. */ model: string; /** * Model reference in the catalog this snapshot was resolved from (UUID). Empty when the session named a models-catalog id instead of a catalog entry. */ model_ref_id?: string; /** * Provider-specific version or snapshot pin recorded alongside the model id, when the catalog entry declares one. */ model_version?: string; /** * Provider family that served the call, e.g. anthropic, openai, vertex, or mock. Carries the same value as provider_type and is kept for older readers. */ provider: string; /** * Model provider record whose credentials and base URL were used (UUID). */ provider_id?: string; /** * Provider family that served the call, e.g. anthropic, openai, vertex, or mock. Selects which wire protocol the request used. */ provider_type?: string; /** * Serving stack behind a self-hosted model, e.g. vllm. Empty for models called through a hosted provider API. */ serving_backend?: string; }; /** * Snapshot of the model that served one inference call, recorded on the event so a transcript stays interpretable after the catalog entry changes. Returned on model events; also accepted when pinning a session to a specific model. */ export type ManagedAgentsModelRefRequest = { /** * Endpoint the request was sent to, for models not served at their provider's default endpoint. Empty means the provider's default endpoint. */ base_url?: string; /** * Declared model capability flags, e.g. tool use, vision, or extended thinking support, as recorded from the catalog entry at call time. */ capabilities?: { [key: string]: unknown; }; /** * Maximum total tokens the model accepts in one request, prompt plus completion, as recorded from the catalog entry at call time. 0 means unknown. */ context_window?: number; /** * Maximum completion tokens the model can emit in one response, as recorded from the catalog entry at call time. 0 means unknown. */ max_output_tokens?: number; /** * Extra key/value data copied from the catalog entry. Some keys are read by the service to shape the request, such as base_url and reasoning_style. */ metadata?: { [key: string]: unknown; }; /** * Provider's own model id as sent on the wire, e.g. claude-sonnet-4-5 or anthropic/claude-sonnet-4-5. */ model?: string; /** * Model reference in the catalog this snapshot was resolved from (UUID). Empty when the session named a models-catalog id instead of a catalog entry. */ model_ref_id?: string; /** * Provider-specific version or snapshot pin recorded alongside the model id, when the catalog entry declares one. */ model_version?: string; /** * Provider family that served the call, e.g. anthropic, openai, vertex, or mock. Carries the same value as provider_type and is kept for older readers. */ provider?: string; /** * Model provider record whose credentials and base URL were used (UUID). */ provider_id?: string; /** * Provider family that served the call, e.g. anthropic, openai, vertex, or mock. Selects which wire protocol the request used. */ provider_type?: string; /** * Serving stack behind a self-hosted model, e.g. vllm. Empty for models called through a hosted provider API. */ serving_backend?: string; }; /** * A native connection and its agent-owned runtime permission and resource policy. */ export type ManagedAgentsNativeIntegration = { /** * Active native connection in this organization. */ connectionId: string; /** * Provider permission preset, bounded by the connection's authorization. */ permission: string; /** * Optional resource subset. Omit to inherit all resources available through the connection. An explicit empty list is rejected. */ resources?: Array; }; /** * A transcript entry as a writer supplies it, before the store assigns the fields it owns. Same shape as an event on the way out, minus the server-assigned identity and timestamps, so the same body describes an event being appended and one waiting in a session's input queue. */ export type ManagedAgentsNewEvent = { /** * Who produced this event, as a namespaced identifier: human:… for a person, system:… for the service itself, or an agent identity. */ actor: string; /** * Agent that produced this event (UUID). */ agent_id?: string; /** * Prompt tokens served from the provider's prompt cache, billed at the cached rate. */ cache_read_tokens?: number; /** * Prompt tokens written into the provider's prompt cache. */ cache_write_tokens?: number; /** * Event that caused this one (UUID). Unlike parent_event_id this expresses causality rather than nesting. */ causal_event_id?: string; /** * The event payload as provider-shaped content blocks. Passed through to and from the model provider without reinterpretation. */ content: ManagedAgentsEventContent; /** * Read-time status when external EventContent was hydrated or could not be hydrated. */ content_hydration_status?: 'hydrated' | 'refs_only' | 'missing' | 'corrupt' | 'unavailable' | 'oversized'; /** * Byte size of the canonical external EventContent JSON. */ content_payload_bytes?: number; /** * Private whole-event content reference. Read the content through getSessionEventContent; this reference cannot be fetched directly. */ content_payload_ref?: string; /** * Lowercase SHA-256 digest of the canonical external EventContent JSON. */ content_payload_sha256?: string; /** * Image cleanup prefix or typed multi-image envelope. This is independent of whole-event payload storage. */ content_ref?: string; /** * Accrued cost in micro-USD (1,000,000 = 1 USD). Integer to avoid float rounding across many small charges. */ cost_micros?: number; /** * Sandbox environment the producing session was executing in (UUID). */ environment_id?: string; /** * Optional caller-supplied event id used to make retried appends idempotent. */ event_id?: string; /** * Outcome marker for events that can fail: pending, completed, warning, or error. Empty when not applicable. */ event_status?: string; /** * What kind of event this is. One of message, tool_invocation, tool_result, approval_request, approval_decision, summary, plan_update, session_status, artifact, advisor_intervention, or outcome_evaluation. */ event_type: string; /** * Why the provider stopped generating, in the provider vocabulary (for example end_turn, max_tokens, tool_use). Passed through verbatim. */ finish_reason?: string; /** * Sampling and tool settings this inference ran with, as resolved at call time. */ inference_config: ManagedAgentsInferenceConfig; /** * Prompt tokens billed for this unit of work. */ input_tokens?: number; /** * Wall-clock duration of the provider call in milliseconds. */ latency_ms?: number; /** * Snapshot of the model reference as it was at call time, so a later model change does not rewrite history. */ model?: ManagedAgentsModelRef; /** * Canonical model reference used for this inference (UUID). Empty on events not produced by a model call. */ model_ref_id?: string; /** * Organization that owns this record. Resolved from the API key; never accepted from the caller. */ organization_id?: string; /** * Completion tokens billed for this unit of work. */ output_tokens?: number; /** * Event this one is nested under in the transcript tree (UUID), for example a tool result under its invocation. */ parent_event_id?: string; /** * Estimated tokens this event contributes when rendered into a future provider request. A memoized estimate for context-budget planning, not billed provider usage. */ prompt_tokens?: number; /** * Provider's own model identifier as sent on the wire, which may differ from the canonical model reference. */ provider_model_id?: string; /** * Provider's request identifier for this inference, for correlating with provider-side logs. */ provider_request_id?: string; /** * Model provider family that served this inference, for example anthropic, openai, or vertex. */ provider_type?: string; /** * Message role in the provider vocabulary: system, user, or assistant. Set on message events; empty on events that are not turns. */ role?: string; /** * Concrete sandbox instance the event was produced on. Provider-assigned, not a UUID. */ sandbox_instance_id?: string; /** * Event schema version this row was written under. Server-assigned; readers should tolerate unknown newer values. */ schema_version: number; /** * Thread within a multi-agent session that produced this event (UUID). Empty on a single-agent session. */ thread_id?: string; /** * Name of the tool being invoked or reporting a result. Set on tool events only. */ tool_name?: string; /** * Provider's tool-call identifier, correlating a tool_invocation with its tool_result. */ tool_use_id?: string; /** * Groups every event produced within one model turn. */ turn_id?: string; }; /** * A transcript entry as a writer supplies it, before the store assigns the fields it owns. Same shape as an event on the way out, minus the server-assigned identity and timestamps, so the same body describes an event being appended and one waiting in a session's input queue. */ export type ManagedAgentsNewEventRequest = { /** * Who produced this event, as a namespaced identifier: human:… for a person, system:… for the service itself, or an agent identity. */ actor?: string; /** * Agent that produced this event (UUID). */ agent_id?: string; /** * Prompt tokens served from the provider's prompt cache, billed at the cached rate. */ cache_read_tokens?: number; /** * Prompt tokens written into the provider's prompt cache. */ cache_write_tokens?: number; /** * Event that caused this one (UUID). Unlike parent_event_id this expresses causality rather than nesting. */ causal_event_id?: string; /** * The event payload as provider-shaped content blocks. Passed through to and from the model provider without reinterpretation. */ content?: ManagedAgentsEventContentRequest; /** * Read-time status when external EventContent was hydrated or could not be hydrated. */ content_hydration_status?: 'hydrated' | 'refs_only' | 'missing' | 'corrupt' | 'unavailable' | 'oversized'; /** * Byte size of the canonical external EventContent JSON. */ content_payload_bytes?: number; /** * Private whole-event content reference. Read the content through getSessionEventContent; this reference cannot be fetched directly. */ content_payload_ref?: string; /** * Lowercase SHA-256 digest of the canonical external EventContent JSON. */ content_payload_sha256?: string; /** * Image cleanup prefix or typed multi-image envelope. This is independent of whole-event payload storage. */ content_ref?: string; /** * Accrued cost in micro-USD (1,000,000 = 1 USD). Integer to avoid float rounding across many small charges. */ cost_micros?: number; /** * Sandbox environment the producing session was executing in (UUID). */ environment_id?: string; /** * Optional caller-supplied event id used to make retried appends idempotent. */ event_id?: string; /** * Outcome marker for events that can fail: pending, completed, warning, or error. Empty when not applicable. */ event_status?: string; /** * What kind of event this is. One of message, tool_invocation, tool_result, approval_request, approval_decision, summary, plan_update, session_status, artifact, advisor_intervention, or outcome_evaluation. */ event_type?: string; /** * Why the provider stopped generating, in the provider vocabulary (for example end_turn, max_tokens, tool_use). Passed through verbatim. */ finish_reason?: string; /** * Sampling and tool settings this inference ran with, as resolved at call time. */ inference_config?: ManagedAgentsInferenceConfigRequest; /** * Prompt tokens billed for this unit of work. */ input_tokens?: number; /** * Wall-clock duration of the provider call in milliseconds. */ latency_ms?: number; /** * Snapshot of the model reference as it was at call time, so a later model change does not rewrite history. */ model?: ManagedAgentsModelRefRequest; /** * Canonical model reference used for this inference (UUID). Empty on events not produced by a model call. */ model_ref_id?: string; /** * Organization that owns this record. Resolved from the API key; never accepted from the caller. */ organization_id?: string; /** * Completion tokens billed for this unit of work. */ output_tokens?: number; /** * Event this one is nested under in the transcript tree (UUID), for example a tool result under its invocation. */ parent_event_id?: string; /** * Estimated tokens this event contributes when rendered into a future provider request. A memoized estimate for context-budget planning, not billed provider usage. */ prompt_tokens?: number; /** * Provider's own model identifier as sent on the wire, which may differ from the canonical model reference. */ provider_model_id?: string; /** * Provider's request identifier for this inference, for correlating with provider-side logs. */ provider_request_id?: string; /** * Model provider family that served this inference, for example anthropic, openai, or vertex. */ provider_type?: string; /** * Message role in the provider vocabulary: system, user, or assistant. Set on message events; empty on events that are not turns. */ role?: string; /** * Concrete sandbox instance the event was produced on. Provider-assigned, not a UUID. */ sandbox_instance_id?: string; /** * Event schema version this row was written under. Server-assigned; readers should tolerate unknown newer values. */ schema_version?: number; /** * Thread within a multi-agent session that produced this event (UUID). Empty on a single-agent session. */ thread_id?: string; /** * Name of the tool being invoked or reporting a result. Set on tool events only. */ tool_name?: string; /** * Provider's tool-call identifier, correlating a tool_invocation with its tool_result. */ tool_use_id?: string; /** * Groups every event produced within one model turn. */ turn_id?: string; }; /** * A session's definition of done, graded against a rubric. The description is the objective the grader measures; a message sent alongside it is context the grader never sees. */ export type ManagedAgentsNewOutcome = { /** * The objective the grader measures. Independent of any message sent alongside it, which is context the grader never sees. */ description: string; /** * Model reference the grader runs on. Omit to use the platform's grading model. */ grader_model_ref_id?: string; /** * Maximum grading passes before the outcome ends as max_iterations_reached. Omit or send 0 for unbounded: the loop runs until the grader is satisfied. */ max_iterations?: number; /** * Inline grading rubric. Exactly one of rubric and rubric_file_id is set. */ rubric: string; /** * File whose text is the rubric, resolved when the outcome is defined. Exactly one of rubric and rubric_file_id is set. */ rubric_file_id?: string; }; /** * A session's definition of done, graded against a rubric. The description is the objective the grader measures; a message sent alongside it is context the grader never sees. */ export type ManagedAgentsNewOutcomeRequest = { /** * The objective the grader measures. Independent of any message sent alongside it, which is context the grader never sees. */ description?: string; /** * Model reference the grader runs on. Omit to use the platform's grading model. */ grader_model_ref_id?: string; /** * Maximum grading passes before the outcome ends as max_iterations_reached. Omit or send 0 for unbounded: the loop runs until the grader is satisfied. */ max_iterations?: number; /** * Inline grading rubric. Exactly one of rubric and rubric_file_id is set. */ rubric?: string; /** * File whose text is the rubric, resolved when the outcome is defined. Exactly one of rubric and rubric_file_id is set. */ rubric_file_id?: string; }; /** * One of the newest failing evaluations for a target agent, with deep-link evidence identity. */ export type ManagedAgentsNewestFailure = { /** * UTC timestamp when the failing evaluation was recorded. */ created_at: string; /** * Immutable failing evaluation to open from the Overview. */ evaluation_id: string; /** * Key-sorted rubric criteria that failed in this evaluation. */ failed_criterion_keys: Array; /** * Canonical UUID transcript boundary to select when opening evidence; may be a current UUIDv7 or a retained legacy UUIDv4 event id. */ snapshot_event_id: string; /** * Whether the same-organization target session is still available to open. */ target_session_available: boolean; /** * Target session linked from the failure. */ target_session_id: string; }; /** * The literal next API call to make. Included on errors and results whose resolution is one known call, so a caller need not infer it. */ export type ManagedAgentsNextAction = { /** * HTTP method of that call. */ method: string; /** * OpenAPI operation id of the call to make next, e.g. createEnvironmentSetupRun. */ operation_id: string; /** * Path of that call with path parameters already filled in. */ path: string; }; /** * Optional request body of openSessionAnalyst. An empty body returns the caller's conversation with the tree, if any; question asks (starting the conversation if needed); reset ends the current conversation. */ export type ManagedAgentsOpenSessionAnalystRequest = { /** * A question for the analyst. Starts the caller's conversation with this tree when there is none, as its first turn; otherwise it is delivered to the existing conversation. An analyst is never started without one. */ question?: string; /** * When true, ends the caller's current conversation with this tree: the analyst session is cancelled and stays readable, and the caller has no conversation until the next question. */ reset?: boolean; }; /** * A session's definition of done: the task to achieve plus a rubric a grader scores the work against, tracked through its own grading lifecycle. Defined when the session starts, and read back to see whether the work was accepted. */ export type ManagedAgentsOutcome = { /** * Agent this outcome belongs to (UUID), copied from the session that defined it. */ agent_id?: string; /** * RFC 3339 timestamp of when this record was created. Server-assigned. */ created_at: string; /** * Event in the session's log that defined this outcome (UUID). */ defined_by_event_id?: string; /** * Objective the agent works toward, in prose, and the statement of it quoted to the grader. Opens the session when the start request carries no message. */ description: string; /** * RFC 3339 timestamp of when grading reached a terminal result. Absent while the outcome is still open. */ ended_at?: string; /** * Grader passes in order, newest last. Returned only by reads that ask for evaluations, and empty until a grader has run. */ evaluations?: Array; /** * Model reference the grader runs on (UUID), letting grading use a different model than the agent doing the work. Defaults to the session's model. */ grader_model_ref_id?: string; /** * Ceiling on grader passes before the outcome ends as max_iterations_reached. Zero means unbounded, which is the default: the loop runs until the grader is satisfied. */ max_iterations: number; /** * Organization that owns this record. Resolved from the API key; never accepted from the caller. */ organization_id: string; /** * Identifier for this outcome (UUID). Server-assigned. */ outcome_id: string; /** * Markdown rubric the grader scores the work against. Write independently checkable criteria; vague criteria produce noisy revision loops. */ rubric: string; /** * Where the rubric text came from when it was not sent inline: file: for a rubric read from a file when the outcome was defined. rubric always carries the text; later changes to the file do not move the bar. */ rubric_ref?: string; /** * Lowercase SHA-256 digest of the uploaded file the rubric was read from, for matching it to the file. Not a digest of rubric: the recorded text is the file's minus a byte-order mark and with line endings normalized. */ rubric_sha256?: string; /** * Session this outcome belongs to (UUID). */ session_id: string; /** * Where the outcome is in its grading lifecycle: pending (no grader has looked at it), running (the agent is working toward it), evaluating (a grader pass is in flight), or terminal (grading finished; read terminal_result). */ status: 'pending' | 'running' | 'evaluating' | 'terminal'; /** * Final verdict, set only once status is terminal: satisfied, max_iterations_reached, failed, or interrupted. Empty before then. */ terminal_result?: 'satisfied' | 'max_iterations_reached' | 'failed' | 'interrupted'; /** * RFC 3339 timestamp of the last change to this record. Server-assigned. */ updated_at: string; }; /** * One scored line of a rubric: the criterion, the grader's verdict on it, and the events cited as evidence. Read these to see why an outcome passed or failed rather than only that it did. */ export type ManagedAgentsOutcomeCriterion = { /** * Identifies a criterion as its rubric's digest plus its ordinal, so the same rubric reused across sessions scores comparable criteria. Any edit to the rubric changes every id in it. */ criterion_id: string; /** * The rubric line this verdict scores, as written in the rubric. */ criterion_text: string; /** * Session events (UUIDs) the grader cites as justification, so a reviewer can check the verdict against the transcript instead of trusting it. */ evidence_event_ids?: Array; /** * Grader's reasoning for the verdict on this criterion. */ rationale?: string; /** * Rubric heading this criterion sits under, when the rubric is organized into sections. */ section?: string; /** * Grader's judgment on this criterion, conventionally pass, fail, or not_applicable when the criterion did not apply to this run. Not a closed set: the value is recorded as the grader wrote it. */ verdict: string; /** * Relative importance the rubric gives this criterion when aggregating a score. */ weight: number; }; /** * One grader pass over the work, with its verdict, its per-criterion scoring, and what it cost. A caller sees these in an outcome's evaluations list, one per revision round. */ export type ManagedAgentsOutcomeEvaluation = { /** * Agent version whose work this pass judged (UUID), denormalized onto the criteria so cross-session criterion history is served by an index. */ agent_version_id?: string; /** * Prompt tokens served from the provider's cache for this unit of work. */ cache_read_tokens?: number; /** * Prompt tokens written to the provider's cache for this unit of work. */ cache_write_tokens?: number; /** * Accrued cost in micro-USD (1,000,000 = 1 USD). Integer to avoid float rounding across many small charges. */ cost_micros?: number; /** * Per-criterion verdicts this pass produced, in rubric order. Empty when the grader returned only an overall result. */ criteria?: Array; /** * Event on the graded session's own transcript that recorded this pass's verdict. Locates where the pass landed. */ end_event_id?: string; /** * RFC 3339 timestamp of when this grader pass finished. Absent while the pass is still in flight. */ ended_at?: string; /** * Grader's message to the agent. For needs_revision this is the per-criterion gap list the next turn has to close. */ explanation?: string; /** * Model reference the grader actually ran on for this pass (UUID). */ grader_model_ref_id?: string; /** * Thread the grader ran in (UUID), so its own reasoning can be read back separately from the agent's transcript. */ grader_thread_id?: string; /** * Prompt tokens billed for this unit of work. */ input_tokens?: number; /** * 0-indexed pass number: 0 is the first evaluation, 1 the re-evaluation after the first revision. */ iteration: number; /** * Outcome this evaluation belongs to (UUID). */ outcome_id: string; /** * Completion tokens billed for this unit of work. */ output_tokens?: number; /** * Verdict of this pass. needs_revision is the only non-terminal value and sends the agent back for another turn; the rest end the outcome. */ result: 'satisfied' | 'needs_revision' | 'max_iterations_reached' | 'failed' | 'interrupted'; /** * First event of the grader thread for this pass, which is the packet the harness handed it. Locates where the pass began. */ start_event_id?: string; /** * RFC 3339 timestamp of when this grader pass began. */ started_at?: string; }; /** * Response body of GET /v1/sessions/{session_id}/outcomes. An outcome is the structured verdict a grader or the agent itself writes for a session; a session may accumulate more than one, so this is a list rather than a single object. */ export type ManagedAgentsOutcomeListResponse = { /** * Outcomes recorded against the session named in the path. Null rather than an empty array when none has been recorded, which is the normal state for a session that is still running. */ outcomes: Array | null; }; /** * A file whose text is an outcome's rubric. */ export type ManagedAgentsOutcomeRubricRef = { /** * A file in the caller's organization holding the rubric: text or YAML, at most 256 KiB, uploaded through POST /v1/files. Its text is echoed back as the outcome's rubric. An unknown, expired, or out-of-scope file answers 404; a file that is not text, is oversized, is not UTF-8, or holds no criterion answers 400. */ file_id: string; /** * Always file. */ type: 'file'; }; /** * What one repository automation run is allowed to produce. It is snapshotted onto the session at start, so a later edit to the trigger binding cannot change what an already-running automation does. */ export type ManagedAgentsOutputPolicy = { /** * Whether the run captures the agent's final working-tree patch as a transcript artifact. */ capture_patch: boolean; /** * Whether the run publishes its validated result to the pull request as a GitHub review. */ publish_review: boolean; }; /** * Metadata for the working-tree patch captured from a repository automation. Only the digest and size are recorded on the result; the patch body itself is a transcript artifact event addressed by event_id. */ export type ManagedAgentsPatchArtifact = { /** * Size of the captured patch in bytes. Capture fails above 4 MiB. */ byte_size: number; /** * Whether the patch is non-empty, that is, whether the agent left any working-tree change at all. */ changed: boolean; /** * Transcript event id (UUID) of the artifact event carrying the patch body, readable through listSessionEvents. Absent when no patch was captured. */ event_id?: string; /** * SHA-256 of the captured patch bytes, as lowercase hex. Empty when no patch was captured. */ patch_sha256: string; }; /** * Optional detail recorded alongside a deliberate pause. */ export type ManagedAgentsPauseAutomationRequest = { /** * Optional note recorded with the pause, shown to whoever finds it paused later. At most 1024 UTF-8 bytes. */ reason?: string; }; /** * Response body of GET /v1/sessions/{session_id}/pending-inputs: what the session has durably accepted but not yet read. These inputs are deliberately absent from the transcript until a turn boundary promotes them, so a client can show them as waiting rather than as history the agent has already acted on. */ export type ManagedAgentsPendingInputsResponse = { /** * Inputs accepted for this session that the agent has not read yet, in the order they were accepted. Empty when nothing is waiting. */ pending_inputs: Array | null; }; /** * One user input that has been durably accepted but not yet read by the agent. Queued inputs are not part of the session transcript until the next turn boundary promotes them, which interrupting brings forward. */ export type ManagedAgentsPendingSessionInput = { /** * RFC 3339 timestamp of when the input was accepted. Server-assigned. */ created_at: string; /** * The event this input will become when it is promoted into the transcript. */ event: ManagedAgentsNewEvent; /** * Identifier for this queued input (UUID). Becomes the event id once the input is promoted into the transcript. */ input_id: string; /** * Whether the queued input is a message for the agent or an interrupt control. */ kind: 'message' | 'interrupt'; }; /** * One step of a plan or to-do list an agent reported while working. Appears on an event's content when the agent's harness emits a plan; the service records it without acting on it. */ export type ManagedAgentsPlanItem = { /** * Text of the planned step as the agent wrote it. */ content: string; /** * Identifier for this plan entry, stable across the turns that update it. */ id: string; /** * Progress value the agent reported for this step. Passed through as written and not interpreted by the service. */ status: string; }; /** * One step of a plan or to-do list an agent reported while working. Appears on an event's content when the agent's harness emits a plan; the service records it without acting on it. */ export type ManagedAgentsPlanItemRequest = { /** * Text of the planned step as the agent wrote it. */ content?: string; /** * Identifier for this plan entry, stable across the turns that update it. */ id?: string; /** * Progress value the agent reported for this step. Passed through as written and not interpreted by the service. */ status?: string; }; /** * Request body for a live connection test against an MCP server, running the same credential resolution a session would. An unreachable server is reported in the response body, not as an HTTP error. */ export type ManagedAgentsProbeMcpServerRequest = { /** * The MCP server to connect to. Must be http or https and must not embed credentials. */ server_url: string; /** * Vaults whose credentials may be used, scoped exactly as a session's grant is. Omit to probe unauthenticated. */ vault_ids?: Array; }; /** * One integration provider this build supports, together with whether this deployment is configured for it. Returned by the provider list a console reads before offering a connect action. */ export type ManagedAgentsProviderInfo = { /** * Whether this deployment can start authorization for the provider. Present for clients that also consume provider catalogs containing unavailable entries. */ configured: boolean; /** * Human-readable provider name for the connect UI, for example "GitHub". */ display_name: string; /** * Hostnames a sandbox must be allowed to reach for this provider's in-container tooling. Empty when the provider needs no sandbox egress. */ egress_hosts?: Array; /** * Stable provider slug to pass wherever an integration provider is named, such as starting an install. */ id: string; /** * MCP server URL that sessions granted this provider get bound to. Empty only when the supported provider exposes no MCP surface. */ mcp_endpoint?: string; /** * True when a vault grant for this provider may be narrowed to specific resources within the connection, and the provider enforces that narrowing when it mints. GitHub (repositories) is the only such provider today. False or omitted means integration_resources is rejected, so a grant UI should offer no resource picker. */ narrows_by_resource?: boolean; /** * Named permission presets a vault grant may request for this supported provider, ordered least privileged first. */ permissions?: Array; /** * True when this provider's permission preset is fixed for the life of its OAuth grant and cannot be narrowed later at vault-grant time, unlike the common case (e.g. GitHub). The connect UI should let the operator choose a preset before starting authorization when this is true; false or omitted means the existing post-connect vault-grant preset choice is sufficient. */ preset_fixed_at_authorization?: boolean; }; /** * Verification configuration for a customer-owned Slack or GitHub webhook. */ export type ManagedAgentsProviderWebhookDeliveryRequest = { /** * Customer-configured webhook delivery. */ kind: 'webhook'; /** * Credential containing the provider signing secret. */ verificationCredential: ManagedAgentsEventSourceCredentialRef; }; /** * The GitHub-side outcome of one repository automation. Publication is idempotent: a retry finds the review this session already posted and returns it rather than duplicating comments. */ export type ManagedAgentsPublication = { /** * Whether a GitHub review was posted. False when the run's output policy disabled publication. */ published: boolean; /** * GitHub pull request review id. Present only when published is true. */ review_id?: number; /** * Web URL of the published GitHub review. Present only when published is true. */ url?: string; }; /** * One agent's review of a pull request: a summary, a verdict, and the line-level findings. It is returned only after every claimed location has been rebound to the trusted exact-SHA diff manifest. */ export type ManagedAgentsPullRequestReviewResult = { /** * Line-level comments, at most 100, each bound to a line the reviewed diff changed. */ findings: Array | null; /** * Prose summary of the review. Required, and at most 4 KiB. */ summary: string; /** * no_findings when the review raised nothing, comment when it did. no_findings must carry an empty findings list, and comment requires at least one finding. */ verdict: string; }; /** * The completed review for one pull request review session. Available only after the session completes, and returned only once every claimed finding location has been rebound to the trusted exact-SHA diff manifest. */ export type ManagedAgentsPullRequestReviewResultResponse = { /** * The trusted side effects the run performed: the captured patch and the published GitHub review. */ automation: ManagedAgentsAutomationResult; /** * The validated review: its summary, verdict, and line-level findings. */ result: ManagedAgentsPullRequestReviewResult; /** * The durable review input recorded on the session, including the exact commits the result was validated against. */ source: ManagedAgentsPullRequestReviewSource; }; /** * The durable, non-secret input a pull request review session needs during preparation: the strategy, the connection that stages the checkout, the exact target, why it ran, and what it may publish. Credential material is resolved just in time and never stored here, in the session config, in workflow history, or in the transcript. */ export type ManagedAgentsPullRequestReviewSource = { /** * Organization-scoped integration connection (UUID) whose credentials stage the checkout. Only the id is stored; the token itself is minted just in time. */ connection_id: string; /** * Repository automation strategy this session runs. pull_request_review is the only supported value. */ kind: string; /** * What this run is allowed to publish, snapshotted when the session started. */ outputs: ManagedAgentsOutputPolicy; /** * The exact pull request and commit pair this session is bound to. */ target: ManagedAgentsPullRequestTarget; /** * Why this automation ran: a manual start, or a specific provider webhook delivery. */ trigger: ManagedAgentsTrigger; }; /** * The picker-safe identity and immutable head of one GitHub pull request reachable through an integration connection. */ export type ManagedAgentsPullRequestSummary = { /** * Whether GitHub currently marks this pull request as a draft. */ draft: boolean; /** * Immutable head commit SHA observed when this pull request was listed. */ head_sha: string; /** * GitHub pull request number within the repository. */ number: number; /** * GitHub pull request title to display in a picker. */ title: string; }; /** * The exact, immutable identity of one GitHub pull request under automation: the repository, the number, and the two commits that bound the reviewed diff. */ export type ManagedAgentsPullRequestTarget = { /** * Base commit the pull request targets, as a lowercase 40-character hex SHA. Always differs from head_sha. */ base_sha: string; /** * Head commit under review, as a lowercase 40-character hex SHA. The sandbox stages exactly this tree, so the review cannot drift onto a later push. */ head_sha: string; /** * Pull request number within the repository. */ number: number; /** * GitHub account or organization that owns the repository. Must match the connected App installation account. */ owner: string; /** * GitHub repository name, without the owner prefix. */ repository: string; /** * Immutable GitHub repository id, read from GitHub rather than from the request path so a later rename or transfer cannot make the stored owner and name identify a different repository. */ repository_id: number; }; /** * One page of pull requests in a GitHub repository reachable through an integration connection. Returned to populate a pull request picker. */ export type ManagedAgentsPullRequests = { /** * 1-based page this response covers. Defaults to 1 when the request omits or under-specifies it. */ page: number; /** * Pull requests reachable on this page, up to 100 per page. */ pull_requests: Array; }; /** * One registered push address, without the token itself. The token is an address the caller already holds; it is never returned, so it cannot reach a log or an error body twice. */ export type ManagedAgentsPushDevice = { /** * Application version that registered, for diagnosing a build that stopped receiving pushes. */ app_version?: string; /** * Application bundle identifier the registering app reported. Kept to tell builds apart; the notifier addresses every push to the application it is configured for, never to this value. */ bundle_id: string; /** * RFC 3339 timestamp the device first registered. */ created_at: string; /** * Organization the device is registered under. Server-assigned from the authenticated principal and never accepted from the request body. */ organization_id: string; /** * Which APNs host minted the token. A token minted by one host is rejected by the other. */ push_environment: 'sandbox' | 'production'; /** * Which push address this is: app for the token UIApplication vends, widget for the one a WidgetKit extension vends, live_activity for one running Live Activity card, and push_to_start for the token that may raise one. */ token_kind: 'app' | 'widget' | 'live_activity' | 'push_to_start'; /** * RFC 3339 timestamp of the most recent registration. A device renews its registration while its sign-in lasts, so this is also when it last said it was alive; a registration not renewed for three days is dropped. */ updated_at: string; /** * User who registered the device. Server-assigned from the authenticated principal; only this user may withdraw the registration. */ user_id: string; }; /** * Response body of a device withdrawal. */ export type ManagedAgentsPushDeviceWithdrawnResponse = { /** * Always true. The registration is removed, not soft deleted, and nothing more is sent to the device; a withdrawal that did not happen is an HTTP error instead, so this field never reports false. */ deleted: boolean; }; /** * One learning run: it reads reports from an agent's finished sessions and applies a set of changes to the agent's learned memory in one step. It runs as an ordinary session, so the whole run is readable through driver_session_id. */ export type ManagedAgentsReflection = { /** * Memories added by this run. */ added_count: number; /** * Agent whose memory this run curates. */ agent_id: string; /** * Version of the agent under study when the run started. */ agent_version_id?: string; /** * Collection revision read by this run. */ base_revision: number; /** * Server-assigned RFC 3339 timestamp of when the run was created. */ created_at: string; /** * Number of session reports read. */ digest_count?: number; /** * Session that ran this learning run. Read or stream its events to follow the run. */ driver_session_id?: string; /** * Set when the run reached a terminal status. */ ended_at?: string; /** * Human-readable failure detail. */ error_message?: string; /** * Classification of a failure. */ error_type?: string; /** * Sessions whose reports this run read. */ input_session_ids?: Array; /** * Standing guidance for what this run should learn. Capped at 4096 characters. */ instructions?: string; /** * Stable memory collection updated by this run. */ memory_store_id: string; /** * Memories merged into another memory. */ merged_count: number; /** * Model id that ran this learning run. Empty when model_ref_id names a model reference instead. */ model?: string; /** * Model reference id that ran this learning run. Empty when model names the model instead. */ model_ref_id?: string; /** * Organization that owns this record. */ organization_id: string; /** * Server-assigned id of the run. */ reflection_id: string; /** * Memories retired without a replacement. */ retired_count: number; /** * Where the run is. */ status: 'pending' | 'running' | 'completed' | 'failed' | 'canceled'; /** * Identifier of the occasion that started the run. Unique per agent, so one occasion never starts two runs. */ trigger_window?: string; /** * What started the run: the regular schedule, enough new session reports, or an operator. */ triggered_by: 'schedule' | 'counter' | 'manual'; /** * Server-assigned RFC 3339 timestamp of the most recent change. */ updated_at: string; /** * Existing memories refined by this run. */ updated_count: number; }; /** * Memory learning runs, newest first. */ export type ManagedAgentsReflectionListResponse = { /** * Memory learning runs, newest first. */ reflections: Array | null; }; /** * Request body registering an integration connection directly, by naming a principal the caller owns at the provider. The organization comes from the authenticated caller, never from the body. */ export type ManagedAgentsRegisterIntegrationConnectionRequest = { /** * The customer-owned principal to connect, in the provider's own form. For Google Cloud this is the email of a user-managed service account (name@project.iam.gserviceaccount.com); for a built-in integration it is the app's slug from the catalog, e.g. sentry. */ external_id: string; /** * For a built-in integration: the permission preset the allow-list is held to, read (every selected tool must be classified read-only) or write (any catalog tool; each is stored at its classified level). Omit for read. Refused for providers that select permissions at grant time. */ permission?: string; /** * Integration provider id returned by listIntegrationProviders. The provider must support direct registration; one that connects by install redirect is refused with 422. */ provider: string; /** * For a built-in integration: the app's tools the organization's agents may use, by tool name from the catalog. Required for a built-in integration and refused for every other provider; an empty list is never read as every tool. Stored on the connection as its allow-list; every agent using the app inherits it. */ resources?: Array; }; /** * Request body for registering one device to be notified about the caller's fleet. The organization and the user always come from the authenticated principal. */ export type ManagedAgentsRegisterPushDeviceRequest = { /** * Application version registering, kept only so a build that stopped receiving notifications can be identified. */ app_version?: string; /** * Application bundle identifier the registering app reports. Recorded to tell builds apart; pushes are always addressed to the application the service is configured for. */ bundle_id: string; /** * The device token APNs issued, hex-encoded as the device reported it; stored lowercase. An address, not a credential: it authorises nothing and is useless without the notifier's signing key. */ device_token: string; /** * Which APNs host minted the token. A development build registers sandbox; a build installed from TestFlight or the App Store registers production. */ push_environment: 'sandbox' | 'production'; /** * app for the token the application vends, widget for the one a WidgetKit extension vends, live_activity for one running Live Activity card, and push_to_start for the push-to-start token that may raise one. A phone can register any of these without the others. */ token_kind: 'app' | 'widget' | 'live_activity' | 'push_to_start'; }; /** * Request body for atomically replacing an agent's complete mutable tag classification. */ export type ManagedAgentsReplaceAgentTagsRequest = { /** * Complete replacement set of tag ids, with at most 32 distinct ids. Every id must be a live tag in the caller's organization. Duplicates are collapsed before enforcing the limit; [] removes every tag. */ tag_ids: Array; }; /** * One page of the repositories a GitHub integration connection can reach. Returned to populate a repository picker when scoping a vault grant. */ export type ManagedAgentsRepositories = { /** * 1-based page this response covers. Defaults to 1 when the request omits or under-specifies it. */ page: number; /** * Repositories reachable on this page, up to 100 per page. */ repositories: Array | null; /** * Total repositories the connection can reach across all pages, as reported by GitHub. */ total_count: number; }; /** * One GitHub repository an integration connection's install can reach, as reported by GitHub. Returned when listing a connection's repositories to scope a grant. */ export type ManagedAgentsRepository = { /** * Whether the repository is archived on GitHub and therefore read-only there. */ archived?: boolean; /** * Branch GitHub reports as the repository default, for example "main". Absent when GitHub reports none, as for an empty repository. */ default_branch?: string; /** * Owner-qualified repository name, for example "acme/platform". This is the form a vault grant's repository selection uses. */ full_name: string; /** * Stable numeric GitHub repository id used to bind automation to an immutable repository identity. */ id: number; /** * Repository name without its owner, for example "platform". */ name: string; /** * Whether the repository is private on GitHub. */ private: boolean; }; /** * One sandbox attachment's resource usage for one minute. Per-sample CPU, memory, and disk readings are parallel arrays indexed by offsets_ms; the average and peak columns summarize the minute and are all a summary-resolution read returns. Capacities and limits give each series its denominator. */ export type ManagedAgentsResourceSampleBucket = { /** * RFC 3339 timestamp of the minute's start, on the producer's clock. */ bucket_start: string; /** * True once the producer has moved past this minute. An incomplete bucket is the one being filled and is rewritten by the next drain. */ complete: boolean; /** * CPU the container could use in millicores: its quota when set, otherwise the CPUs its cpuset allows. Divide cpu_millicores by this for utilization percent. */ cpu_capacity_millicores?: number; /** * CPU quota of the container in millicores, when one is set. */ cpu_limit_millicores?: number; /** * Per-sample CPU consumption in millicores; 1000 is one core fully busy. */ cpu_millicores?: Array; /** * Mean CPU millicores over the minute. */ cpu_millicores_avg: number; /** * Highest sampled CPU millicores in the minute. */ cpu_millicores_peak: number; /** * Bytes the workspace volume can hold for an unprivileged writer (size less the root reserve). Divide disk_used by this for utilization percent. */ disk_capacity_bytes?: number; /** * Mean bytes in use on the workspace volume over the minute. Absent without a disk reading. */ disk_used_avg_bytes?: number; /** * Per-sample bytes in use on the volume holding the workspace. -1 marks a sample without a disk reading. Absent when the producer never saw the volume. */ disk_used_bytes?: Array; /** * Highest sampled bytes in use on the workspace volume in the minute. Absent without a disk reading. */ disk_used_peak_bytes?: number; /** * Number of accelerators visible to the container. Absent without accelerators. */ gpu_count?: number; /** * Per-device summary for the minute. Absent without accelerators. */ gpu_devices?: Array; /** * Total accelerator memory in bytes across devices. Absent without accelerators. */ gpu_memory_total_bytes?: number; /** * Per-sample GPU memory in use, summed across devices. Absent without accelerators. */ gpu_memory_used_bytes?: Array; /** * Highest sampled GPU memory in use during the minute, in bytes. Absent without accelerators. */ gpu_memory_used_peak_bytes?: number; /** * Mean GPU utilization percent over the minute. Absent without accelerators. */ gpu_utilization_avg?: number; /** * Highest sampled GPU utilization percent in the minute. Absent without accelerators. */ gpu_utilization_peak?: number; /** * Per-sample GPU utilization percent, mean across devices. Absent without accelerators. */ gpu_utilization_percent?: Array; /** * Producer sampling cadence in milliseconds. */ interval_ms: number; /** * Memory the container could use in bytes: its limit when set, otherwise the machine's total. Divide the working set by this for utilization percent. */ memory_capacity_bytes?: number; /** * Memory limit of the container in bytes, when one is set. */ memory_limit_bytes?: number; /** * Mean memory working set over the minute, in bytes. */ memory_working_set_avg_bytes: number; /** * Per-sample memory working set in bytes (resident less reclaimable file cache). */ memory_working_set_bytes?: Array; /** * Highest sampled memory working set in the minute, in bytes. */ memory_working_set_peak_bytes: number; /** * Sample times as milliseconds after bucket_start, ascending. Indexes the other per-sample arrays. */ offsets_ms?: Array; /** * RFC 3339 commit timestamp of the write that last touched this bucket. */ received_at: string; /** * Number of samples in the minute; twelve at the default five-second cadence. */ sample_count: number; /** * Attachment the bucket belongs to. */ sandbox_id: string; /** * Historical count of sessions that shared the retired environment worker's process boundary, including this one. Absent on samples from active providers. */ shared_slots?: number; }; /** * Structured input for manually starting an automation without a webhook delivery. */ export type ManagedAgentsRunAutomationRequest = { /** * Caller-chosen key that makes retrying the same manual run safe. */ idempotency_key?: string; /** * Structured event or task input supplied to the agent for this manual run. */ payload: unknown; }; /** * One sandbox runtime this deployment can provision compute on. Listed so a caller can pick a sandbox_provider when creating an environment; this is static service capability, not organization data. */ export type ManagedAgentsSandboxProvider = { /** * True on the runtime used when an environment does not name one. At most one provider is the default. */ default?: boolean; /** * Short explanation of what this runtime provides and when to choose it. */ description?: string; /** * Human-readable name for this runtime, for pickers and listings. */ display_name: string; /** * Identifier of the sandbox runtime, used as the sandbox_provider value when creating an environment. */ provider: string; /** * Name of the deployment-level credential this runtime needs before it can provision sandboxes. Empty when the runtime needs none. */ requires_credential?: string; }; /** * Response body of GET /v1/sandbox-providers. The only list here that describes the service's own capabilities rather than the caller's data: it needs no storage read and returns the same answer for every organization. Whether a listed provider is actually usable right now is a separate check, GET /v1/sandbox-providers/{provider}/status. */ export type ManagedAgentsSandboxProviderListResponse = { /** * Every sandbox provider this build supports. Always an array and never null; the compiled-in set does not vary by organization. */ items: Array; /** * Deprecated compatibility alias for items. It retains snake_case provider fields for older browser clients during rollout. * * @deprecated */ sandbox_providers?: Array; }; /** * One sandbox runtime this deployment can provision compute on. */ export type ManagedAgentsSandboxProviderResponse = { /** * Whether this runtime is the default. At most one provider is the default. */ default: boolean; /** * Short explanation of this runtime and when to choose it. */ description: string; /** * Human-readable name for this runtime. */ displayName: string; /** * Identifier of the sandbox runtime, used when creating an environment. */ provider: string; /** * Deployment credential name required by this runtime, or null if none is needed. */ requiresCredential: null | string; }; /** * Result of a live connectivity check against a deployment-owned sandbox compute provider. Returned when probing a provider, and provisions no billable compute. */ export type ManagedAgentsSandboxProviderStatus = { /** * RFC 3339 timestamp (UTC) of when this check ran. Never cached; each request probes live. */ checked_at: string; /** * Operator-facing explanation of the status. Deliberately contains no endpoint or credential material. */ message: string; /** * Sandbox compute provider this status describes, echoed from the request. Connectivity status is only available for the agent runner provider ("runs"). */ provider: string; /** * Outcome of the check: connected (authentication succeeded), misconfigured (no connection configured in this deployment), unauthorized (the configured API key was rejected), or unavailable (the runner could not be reached). */ status: string; }; /** * Delivery status of saved schedule configuration, independent of run outcomes. */ export type ManagedAgentsScheduleSynchronization = { /** * Safe synchronization failure summary; synchronization is retried automatically. */ error?: string; /** * Whether the saved configuration has reached Temporal. */ status: 'pending' | 'synced' | 'error'; }; /** * Delivery status of saved schedule configuration, independent of run outcomes. */ export type ManagedAgentsScheduleSynchronizationRequest = { /** * Safe synchronization failure summary; synchronization is retried automatically. */ error?: string; /** * Whether the saved configuration has reached Temporal. */ status?: 'pending' | 'synced' | 'error'; }; /** * One durable agent run: its lifecycle status (active, awaiting_human, completed, failed, cancelled), the agent version, environment, model, and credentials it was pinned to, and its place in a multi-agent tree. Returned when starting, reading, or listing sessions; imported RL rollouts appear as sessions too and run no agent loop. */ export type ManagedAgentsSession = { /** * Explicit access classification. Omitted/null is the ordinary behavior. admin_only requires elevated classified-data access and the current Admin organization role on public APIs. platform_internal is the service's own session over this organization's data: it is readable in-organization when addressed directly, but list and gestalt views include it only for callers with elevated classified-data access. */ access_policy?: 'admin_only' | 'platform_internal'; /** * Current browser handoff, including its exclusive driver claim and deadline. Absent when no browser handoff is active. Never contains the short-lived access URL. */ active_handoff?: ManagedAgentsActiveHandoff; /** * Agent this session runs (UUID). Empty for imported sessions that were not started from an agent. */ agent_id?: string; /** * The agent version's definition as it stood when the session started, frozen so later edits to the agent cannot change this session's behavior. */ agent_snapshot?: { [key: string]: unknown; }; /** * Agent version this session runs (UUID), pinned at start so a later edit to the agent cannot change a running session. */ agent_version_id?: string; /** * Whether this session has a computer-enabled environment and a display that passed its readiness probe. */ computer_use: boolean; /** * Whether this root session currently occupies the agent's max_concurrent_sessions slot. True while admitted and non-terminal. False exclusively while an active queued root waits to start. Omitted for unlimited agents, child sessions, legacy rows, and terminal or deleted sessions. */ concurrency_slot_held?: boolean; /** * Resolved per-session runtime settings written at start, including the snapshotted MCP servers and tool bindings, multi-agent roster, and delegation depth limits. Read-only to callers. */ config: { [key: string]: unknown; } | null; /** * RFC 3339 timestamp of when this record was created. Server-assigned. */ created_at: string; /** * Explicit allowlist of individual credentials the session may use. Read credential_refs_configured to tell an intentionally empty allowlist from a legacy session granted whole vaults. */ credential_refs: Array | null; /** * True when credential_refs is an explicit allowlist. False on legacy sessions granted every credential in their vaults, which would otherwise be indistinguishable from an empty allowlist. */ credential_refs_configured: boolean; /** * Provider-qualified model string frozen for this session, including any per-session model override. Prefer this over resolving model_ref_id or the current agent version when displaying what actually ran. */ effective_model?: string; /** * Environment whose sandbox definition this session runs in (UUID). */ environment_id?: string; /** * Where the agent loop is. Empty for sessions without a loop, such as imported rollouts. provisioning normally clears in under a minute and is bounded: a sandbox that does not become ready within the deployment's compute-ready timeout (five minutes by default) fails the session with sandbox_provision_timeout, so a session is never stuck here indefinitely. This field, read from the session itself, is the authoritative status -- a session's event stream is written on a separate path and can lag it, so an empty event list does not mean the session is still starting. When a session leaves provisioning by failing, failure carries the reason. */ execution_state?: 'provisioning' | 'queued' | 'running' | 'idle' | 'completed'; /** * Identifier of the session's counterpart in the external_source_type system, so a caller can find the session again from that side. Set together with external_source_type. */ external_source_id?: string; /** * Kind of external system this session is correlated to, e.g. slack_thread. Set together with external_source_id and filterable when listing sessions. */ external_source_type?: string; /** * Structured terminal failure. Omitted for healthy sessions and legacy rows. */ failure?: ManagedAgentsSessionFailure; /** * Event in the parent session (UUID) this session was forked from, so the fork's starting context is identifiable. Set only on forks. */ forked_at_event_id?: string; /** * What produced the session: api_call, chat, rollout (an imported RL rollout), subagent (delegated by another session), benchmark, evaluation (a platform-started evaluation run over other session snapshots), reflection (a platform-started memory consolidation), or session_analyst (a platform-started read-only assistant that answers questions about another session tree). */ kind: 'api_call' | 'chat' | 'rollout' | 'subagent' | 'benchmark' | 'evaluation' | 'reflection' | 'session_analyst'; /** * RFC 3339 timestamp of when the agent loop last made progress. Distinct from updated_at, which any metadata write touches. Absent for sessions that run no loop. */ last_activity_at?: string; /** * Caller-defined string key/value pairs supplied when the session was started, e.g. ids from your own system. Immutable, present on root sessions only, and filterable with metadata=key:value or metadata_key=key on GET /v1/sessions. At most 32 entries; keys use letters, digits, '_', '.', and '-' up to 64 characters; values are 1-512 characters. */ metadata?: { [key: string]: string; }; /** * Model reference the session's turns run on (UUID), resolved at start from the agent version or the start request. */ model_ref_id?: string; /** * The resolved model reference and inference settings as they stood when the session started, frozen for the same reason as agent_snapshot. */ model_snapshot?: { [key: string]: unknown; }; /** * Organization that owns this record. Resolved from the API key; never accepted from the caller. */ organization_id: string; /** * Session that created this one (UUID) — the delegating session for a subagent, or the source session for a fork. Empty on a root session. */ parent_session_id?: string; /** * Identifier of the external project the session's work belongs to, interpreted according to project_source. */ project_id?: string; /** * System that project_id names. Set on imported rollouts to record their provenance. */ project_source?: string; /** * Root session of the multi-agent tree this session belongs to (UUID). Equal to session_id for a root session. */ root_session_id: string; /** * Provider-assigned id of the sandbox instance serving this session. Empty before provisioning finishes; historical self_hosted sessions may also have no instance id. */ sandbox_instance_id?: string; /** * Sandbox runtime that provisioned this session's compute, from the supported sandbox providers list. */ sandbox_provider?: string; /** * Identifier for this session (UUID). Server-assigned. */ session_id: string; /** * Position of this session within its tree, as a slash-delimited path of session ids. "/" for a root session. */ session_path: string; /** * Secondary provenance ids from the originating system beyond the primary external source, e.g. an imported rollout's problem, problem-version, and run ids. */ source_refs?: { [key: string]: unknown; }; /** * Coarse session state shared with RL rollout imports: active, awaiting_human (for a rollout, carries no score), completed, failed, or cancelled. For where a running agent loop is, read execution_state instead. */ status: ManagedAgentsSessionStatus; /** * Why the loop is not running. Set whenever execution_state is idle or completed. sleeping means the agent chose to wait and the session resumes on the next message or at wake_at; awaiting_subagents means a coordinator is waiting on delegated work. */ stop_reason?: string; /** * Data-residency tenant the session's content is stored under, resolved from the request scope. A child session inherits its parent's value. */ tenant_id?: string; /** * RFC 3339 timestamp of the last change to this record. Server-assigned. */ updated_at: string; /** * User the session was started on behalf of, resolved from the request scope. Empty for sessions started by a service credential. */ user_id?: string; /** * Vaults (UUIDs) the session may draw credentials from. Combine with credential_refs to narrow the grant to specific credentials. */ vault_ids?: Array; /** * RFC 3339 timestamp at which a sleeping session wakes itself if nobody messages it first. Absent unless the agent scheduled a timed wait. */ wake_at?: string; }; /** * Response body of openSessionAnalyst: the caller's read-only analyst session over a session tree, if there is one, and whether it was just started. */ export type ManagedAgentsSessionAnalystResponse = { /** * True when this call started the analyst; false when it returned the caller's existing conversation with this tree, or none. */ created: boolean; /** * The analyst session, when the caller has a conversation with this tree. Send questions to it with sendSessionEvents and read answers from its events; its kind is session_analyst and its access policy platform_internal. Absent when nothing has been asked yet, or the conversation was just reset: a question starts one. */ session?: ManagedAgentsSession; }; /** * Response body of POST /v1/sessions, returned with HTTP 202 and a Location header. The 202 is load-bearing: the session is accepted, not started, so no status, sandbox, or event exists yet and nothing here reports success of the run. Poll status_path, or stream events, to observe provisioning and execution. */ export type ManagedAgentsSessionCreatedResponse = { /** * Identifier for this session (UUID). Server-assigned. Derived deterministically from the Idempotency-Key when one was sent, so a retried create returns the same id rather than starting a second session. */ session_id: string; /** * Path to poll for provisioning, execution, and structured failure state. */ status_path: string; }; /** * Current domain-owned Evaluate-now decision and immutable transcript snapshot boundary for one session. */ export type ManagedAgentsSessionEligibility = { /** * Whether this session may be selected for Evaluate now. */ eligible: boolean; /** * Stable reason the session is currently ineligible; omitted when eligible. */ reason?: 'not_root' | 'non_public_access' | 'missing_agent_attribution' | 'unsupported_kind' | 'no_snapshot_event'; /** * Newest durable canonical UUID event boundary frozen if evaluation starts now. */ snapshot_event_id?: string; }; /** * Request body of POST /v1/sessions/{session_id}/events. It has two mutually exclusive forms and events wins: send message for the common case of one plain-text user turn, or send events as ordered typed turns with provider-shaped content. An empty events array always yields exactly one user turn built from message, even when message is empty. The handoff_resolved control form rejects all message and referenced-session fields. The response acknowledges durable acceptance of the turn, not the agent's reply. */ export type ManagedAgentsSessionEventSendRequest = { /** * Who the turn is attributed to. Defaults to human:api when omitted. */ actor?: string; /** * Typed events to append instead of message. When present, message and the top-level actor are ignored. */ events?: Array | null; /** * Plain-text message to append as a single user turn. Used only when events is empty. */ message?: string; /** * Prior sessions this session may read from this turn on, by session id, added to any it already has. Each id is authorized under your own scope and grants read access to the whole tree containing it; one you cannot read refuses the whole request with 404 and delivers no message. The grant is recorded before the message, so the turn it starts is the first one that can use it. */ referenced_session_ids?: Array; }; /** * Structured, sanitized reason a session terminated abnormally. Present on a session only after a terminal failure; healthy and legacy sessions omit it. */ export type ManagedAgentsSessionFailure = { /** * Time the terminal failure was persisted. */ at: string; /** * Who can act on this failure: transient (wait or retry), caller_error (change the request or configuration, retrying as-is will not help), or internal (report it). retryable=false with category=caller_error is a fixable mistake, not an outage. A retryable failure is never caller_error: if the platform will retry, changing the request is not the fix. */ category: 'transient' | 'caller_error' | 'internal'; /** * Stable machine-readable failure code. */ code: string; /** * Sanitized bounded operator-facing message; never contains raw provider response bodies or credentials. */ message: string; /** * Lifecycle phase that failed, such as provisioning, setup, workflow, or model. */ phase: string; /** * Whether the platform will retry, or a retry of the same request may succeed on its own. False does not mean permanently broken -- read category to tell a transient condition from a request the caller must change. */ retryable: boolean; }; /** * One Server-Sent Event of streamSessionGestalt: the root sessions whose rows changed since the previous frame, with the read timestamp to resume from. Ordinary callers receive only unclassified public roots; callers with elevated classified-data access can receive classified updates and deletes. */ export type ManagedAgentsSessionGestaltChange = { /** * Read timestamp of this frame; also sent as the SSE id, so a reconnect with Last-Event-ID resumes here. */ as_of: string; /** * True when more changed than one frame carries. Discard the gestalt and take a fresh snapshot; sessions is empty. */ reset?: boolean; /** * Roots visible to the caller in the window whose row changed since the previous frame, each carrying its whole current state; merge them by session_id. Ordinary callers omit classified updates and deletes. A row with deleted true has been removed. */ sessions: Array; }; /** * Response body of GET /v1/sessions/gestalt: a compact snapshot of every root session the caller may list in a window, read at one instant. Ordinary callers receive only unclassified public roots; callers with elevated classified-data access can receive classified roots. Designed to be drawn whole -- one tile per session -- and kept current by streamSessionGestalt rather than re-read. */ export type ManagedAgentsSessionGestaltResponse = { /** * Read timestamp of this snapshot. Pass it as after to streamSessionGestalt to receive every change since. */ as_of: string; /** * Every live root session visible to the caller that was created at or after since, newest first. Ordinary callers omit roots with any access_policy; callers with elevated classified-data access can receive classified roots. */ sessions: Array; /** * True when the window held more than 5000 root sessions and only the newest 5000 are listed. */ truncated?: boolean; }; /** * What one session hour is likely to cost the calling organization, at its billed rates. */ export type ManagedAgentsSessionHourEstimate = { /** * When the history behind the estimate was last refreshed. */ asOf: string; /** * Compute price for the shape. */ compute: ManagedAgentsComputeRate; /** * Model spend per hour while generating. */ modelActiveRate: ManagedAgentsModelActiveRate; /** * Billed cost of one session hour in USD: compute plus the model's active rate times utilization. */ perSessionHourUsd: ManagedAgentsBand; /** * Unit every amount is quoted in. */ unit: 'session_hour'; /** * Share of the hour the model is generating. */ utilization: ManagedAgentsUtilization; /** * Billed cost per hour while the agent is working the whole hour, in USD. */ whileActivePerHourUsd: number; /** * Days of completed sessions the history covers. */ windowDays: number; }; /** * Public session-list summary extended with current evaluation eligibility and newest verdict. */ export type ManagedAgentsSessionListItem = { /** * Explicit access classification. Omitted/null is the ordinary behavior. admin_only requires elevated classified-data access and the current Admin organization role on public APIs. platform_internal is the service's own session over this organization's data: it is readable in-organization when addressed directly, but list and gestalt views include it only for callers with elevated classified-data access. */ access_policy?: 'admin_only' | 'platform_internal'; /** * Current browser handoff, including its exclusive driver claim and deadline. Absent when no browser handoff is active. Never contains the short-lived access URL. */ active_handoff?: ManagedAgentsActiveHandoff; /** * Agent this session runs (UUID). Empty for imported sessions that were not started from an agent. */ agent_id?: string; /** * The agent version's definition as it stood when the session started, frozen so later edits to the agent cannot change this session's behavior. */ agent_snapshot?: { [key: string]: unknown; }; /** * Agent version this session runs (UUID), pinned at start so a later edit to the agent cannot change a running session. */ agent_version_id?: string; /** * Whether this session has a computer-enabled environment and a display that passed its readiness probe. */ computer_use: boolean; /** * Whether this root session currently occupies the agent's max_concurrent_sessions slot. True while admitted and non-terminal. False exclusively while an active queued root waits to start. Omitted for unlimited agents, child sessions, legacy rows, and terminal or deleted sessions. */ concurrency_slot_held?: boolean; /** * Resolved per-session runtime settings written at start, including the snapshotted MCP servers and tool bindings, multi-agent roster, and delegation depth limits. Read-only to callers. */ config: { [key: string]: unknown; } | null; /** * RFC 3339 timestamp of when this record was created. Server-assigned. */ created_at: string; /** * Explicit allowlist of individual credentials the session may use. Read credential_refs_configured to tell an intentionally empty allowlist from a legacy session granted whole vaults. */ credential_refs: Array | null; /** * True when credential_refs is an explicit allowlist. False on legacy sessions granted every credential in their vaults, which would otherwise be indistinguishable from an empty allowlist. */ credential_refs_configured: boolean; /** * Provider-qualified model string frozen for this session, including any per-session model override. Prefer this over resolving model_ref_id or the current agent version when displaying what actually ran. */ effective_model?: string; /** * Environment whose sandbox definition this session runs in (UUID). */ environment_id?: string; /** * Current server-owned Evaluate-now decision for this session. */ evaluation_eligibility: ManagedAgentsSessionEligibility; /** * Where the agent loop is. Empty for sessions without a loop, such as imported rollouts. provisioning normally clears in under a minute and is bounded: a sandbox that does not become ready within the deployment's compute-ready timeout (five minutes by default) fails the session with sandbox_provision_timeout, so a session is never stuck here indefinitely. This field, read from the session itself, is the authoritative status -- a session's event stream is written on a separate path and can lag it, so an empty event list does not mean the session is still starting. When a session leaves provisioning by failing, failure carries the reason. */ execution_state?: 'provisioning' | 'queued' | 'running' | 'idle' | 'completed'; /** * Identifier of the session's counterpart in the external_source_type system, so a caller can find the session again from that side. Set together with external_source_type. */ external_source_id?: string; /** * Kind of external system this session is correlated to, e.g. slack_thread. Set together with external_source_id and filterable when listing sessions. */ external_source_type?: string; /** * Structured terminal failure. Omitted for healthy sessions and legacy rows. */ failure?: ManagedAgentsSessionFailure; /** * Event in the parent session (UUID) this session was forked from, so the fork's starting context is identifiable. Set only on forks. */ forked_at_event_id?: string; /** * What produced the session: api_call, chat, rollout (an imported RL rollout), subagent (delegated by another session), benchmark, evaluation (a platform-started evaluation run over other session snapshots), reflection (a platform-started memory consolidation), or session_analyst (a platform-started read-only assistant that answers questions about another session tree). */ kind: 'api_call' | 'chat' | 'rollout' | 'subagent' | 'benchmark' | 'evaluation' | 'reflection' | 'session_analyst'; /** * RFC 3339 timestamp of when the agent loop last made progress. Distinct from updated_at, which any metadata write touches. Absent for sessions that run no loop. */ last_activity_at?: string; /** * Newest immutable evaluation summary, or null when the session has none. */ latest_evaluation: null | ManagedAgentsLatestEvaluation; /** * Caller-defined string key/value pairs supplied when the session was started, e.g. ids from your own system. Immutable, present on root sessions only, and filterable with metadata=key:value or metadata_key=key on GET /v1/sessions. At most 32 entries; keys use letters, digits, '_', '.', and '-' up to 64 characters; values are 1-512 characters. */ metadata?: { [key: string]: string; }; /** * Model reference the session's turns run on (UUID), resolved at start from the agent version or the start request. */ model_ref_id?: string; /** * The resolved model reference and inference settings as they stood when the session started, frozen for the same reason as agent_snapshot. */ model_snapshot?: { [key: string]: unknown; }; /** * Organization that owns this record. Resolved from the API key; never accepted from the caller. */ organization_id: string; /** * Session that created this one (UUID) — the delegating session for a subagent, or the source session for a fork. Empty on a root session. */ parent_session_id?: string; /** * Identifier of the external project the session's work belongs to, interpreted according to project_source. */ project_id?: string; /** * System that project_id names. Set on imported rollouts to record their provenance. */ project_source?: string; /** * Root session of the multi-agent tree this session belongs to (UUID). Equal to session_id for a root session. */ root_session_id: string; /** * Provider-assigned id of the sandbox instance serving this session. Empty before provisioning finishes; historical self_hosted sessions may also have no instance id. */ sandbox_instance_id?: string; /** * Sandbox runtime that provisioned this session's compute, from the supported sandbox providers list. */ sandbox_provider?: string; /** * Identifier for this session (UUID). Server-assigned. */ session_id: string; /** * Position of this session within its tree, as a slash-delimited path of session ids. "/" for a root session. */ session_path: string; /** * Secondary provenance ids from the originating system beyond the primary external source, e.g. an imported rollout's problem, problem-version, and run ids. */ source_refs?: { [key: string]: unknown; }; /** * Coarse session state shared with RL rollout imports: active, awaiting_human (for a rollout, carries no score), completed, failed, or cancelled. For where a running agent loop is, read execution_state instead. */ status: ManagedAgentsSessionStatus; /** * Why the loop is not running. Set whenever execution_state is idle or completed. sleeping means the agent chose to wait and the session resumes on the next message or at wake_at; awaiting_subagents means a coordinator is waiting on delegated work. */ stop_reason?: string; /** * Data-residency tenant the session's content is stored under, resolved from the request scope. A child session inherits its parent's value. */ tenant_id?: string; /** * RFC 3339 timestamp of the last change to this record. Server-assigned. */ updated_at: string; /** * User the session was started on behalf of, resolved from the request scope. Empty for sessions started by a service credential. */ user_id?: string; /** * Vaults (UUIDs) the session may draw credentials from. Combine with credential_refs to narrow the grant to specific credentials. */ vault_ids?: Array; /** * RFC 3339 timestamp at which a sleeping session wakes itself if nobody messages it first. Absent unless the agent scheduled a timed wait. */ wake_at?: string; }; /** * Response body of GET /v1/sessions. Keyset-paginated over (updated_at, id): a page is a stable window at the moment it is read, but a session updated between two page reads moves to the front of the list, so a live list may show it twice or skip it once. Ordinary callers receive only unclassified public session trees; callers with elevated classified-data access can receive classified rows allowed by their scope. Each row is a summary without the start-time snapshots; read one session for those. Token and cost totals are not included; fetch them for a batch of ids via GET /v1/sessions/usage and GET /v1/sessions/costs. */ export type ManagedAgentsSessionListResponse = { /** * Present when more sessions match. Pass it as page_token with the same filters and limit to read the next page. Absent on the last page. */ next_page_token?: string; /** * Sessions visible to the caller and matching the query filters, most recently updated first, at most limit (default 100) per page. An empty array means nothing matched. Ordinary callers receive a row only when access_policy is omitted/null on both it and its root; callers with elevated classified-data access can receive classified rows. Each row includes current evaluation eligibility and its newest immutable evaluation, when any. Rows are summaries: agent_snapshot and model_snapshot are omitted and config is an empty object; GET /v1/sessions/{session_id} returns them. */ sessions: Array; }; /** * Response body of GET /v1/sessions/metadata-keys: the distinct caller-defined metadata keys across the sessions the caller may list. */ export type ManagedAgentsSessionMetadataKeysResponse = { /** * Distinct caller-defined metadata keys carried by sessions the caller may list, sorted. Always an array; empty when no listed session carries metadata. */ keys: Array; /** * True when the organization carries more distinct keys than the response holds. The list is sorted, so the missing keys sort after the last one returned. */ truncated?: boolean; }; /** * Response body of GET /v1/sessions/metadata-values: the distinct values one caller-defined metadata key takes across the sessions the caller may list. */ export type ManagedAgentsSessionMetadataValuesResponse = { /** * True when more distinct values match than limit allowed. The list is sorted, so narrow with a longer q prefix rather than paging. */ truncated?: boolean; /** * Distinct values the key takes on sessions the caller may list, sorted, narrowed to the q prefix when one was given. Always an array; empty when nothing matches. */ values: Array; }; /** * One page of model-cost attempts for a session scope, together with the rollups for the same pinned snapshot, so a page and its totals cannot disagree. Continuation pages and companion hierarchy reads stay on that snapshot rather than re-reading a moving ledger. */ export type ManagedAgentsSessionModelCostDetailResponse = { /** * Attempts in scope, oldest first by reservation time, up to the requested limit. */ attempts: Array; /** * Signed organization/session/scope-bound token that pins companion model-cost reads to this exact snapshot. */ model_cost_snapshot_token: string; /** * Continuation for the next page, passed back as page_token. Absent on the last page. It is bound to this organization, session, scope, limit, and snapshot, so it cannot be replayed against a different read. */ next_page_token?: string; /** * RFC 3339 timestamp of the database snapshot every figure on this page was read from. */ read_timestamp: string; /** * How far the read reached from that session: this session alone (self), this session and its descendants (subtree), or every session under the same root (tree). */ scope: 'self' | 'subtree' | 'tree'; /** * Session the read was scoped to (UUID). */ session_id: string; /** * Self, subtree, and tree totals from the same pinned snapshot as this attempt page. */ summaries: ManagedAgentsSessionModelCostSummariesResponse; /** * Rollup for the requested scope, from the same pinned snapshot as this attempt page. */ summary: ManagedAgentsSessionModelCostSummaryResponse; }; /** * Model-cost rollups for a batch of sessions, so a list view can show spend per row without one read per session. */ export type ManagedAgentsSessionModelCostListResponse = { /** * One entry per requested session id, in request order and repeated when an id is asked for more than once. Authorization is all-or-nothing: if any requested id is unknown or outside the caller's organization or access policy, the whole request returns 404 rather than a short array. */ session_model_costs: Array; }; /** * One page of the session hierarchy behind a model-cost read, paginated independently of the attempt detail so a wide tree cannot crowd out attempts. */ export type ManagedAgentsSessionModelCostNodeListResponse = { /** * Signed organization/session/scope-bound token that pins companion model-cost reads to this exact snapshot. */ model_cost_snapshot_token: string; /** * Continuation for the next page, passed back as page_token. Absent on the last page, and bound to this organization, session, scope, limit, and snapshot. */ next_page_token?: string; /** * RFC 3339 timestamp of the database snapshot these rollups were read from. */ read_timestamp: string; /** * How far the hierarchy read reached from that session: this session alone (self), this session and its descendants (subtree), or every session under the same root (tree). */ scope: 'self' | 'subtree' | 'tree'; /** * Session the read was scoped to (UUID). */ session_id: string; /** * Sessions in scope, ordered by session_path then session_id, up to the requested limit. */ session_nodes: Array; }; /** * One session of a tree with its own model-cost rollups, so a tree total can be attributed to the sessions that produced it. */ export type ManagedAgentsSessionModelCostNodeResponse = { /** * This session's own, subtree, and tree rollups. */ model_costs: ManagedAgentsSessionModelCostSummariesResponse; /** * Session that created this one (UUID). Empty on a root session. */ parent_session_id?: string; /** * Root session of the tree this session belongs to (UUID). Equal to session_id for a root session. */ root_session_id: string; /** * Identifier for this session (UUID). */ session_id: string; /** * Position of this session within its tree, as a slash-delimited path of session ids. "/" for a root session. */ session_path: string; }; /** * One session's three scope rollups, read from a single database snapshot so self, subtree, and tree cannot disagree with one another. */ export type ManagedAgentsSessionModelCostSummariesResponse = { /** * Totals for this session's own attempts, excluding every child session. */ self: ManagedAgentsSessionModelCostSummaryResponse; /** * Session these three rollups were requested for (UUID). */ session_id: string; /** * Totals for this session and every session beneath it in the tree. */ subtree: ManagedAgentsSessionModelCostSummaryResponse; /** * Totals for every session sharing the same root session, including this session's ancestors and siblings. */ tree: ManagedAgentsSessionModelCostSummaryResponse; }; /** * Model-cost rollup for one session scope: the exact ledger amount, how complete the accounting behind it is, and the counts it was derived from. attempt_count is every provider call the ledger is accountable for, charge_count only those that produced a receipt, and adjustment_count the signed corrections applied since. Model spend only: sandbox, tool, and storage cost are not included. */ export type ManagedAgentsSessionModelCostSummaryResponse = { /** * Exact base-10 integer string. */ adjustment_count: string; /** * Exact base-10 integer string. */ attempt_count: string; /** * Exact base-10 integer string. */ charge_count: string; /** * Weakest accounting state present in scope, so a rollup never overstates confidence: complete when every attempt is fully priced, pending when no attempt has been recorded yet or an outcome is still unknown, unpriced when no catalog rule matched the provider's quantities, partial when only part of the cost is known or several states are mixed, legacy_partial for charges recorded before the current reconciliation rules, and indeterminate when an attempt may have been billed without a usable receipt. */ completeness: 'complete' | 'pending' | 'unpriced' | 'partial' | 'legacy_partial' | 'indeterminate'; /** * Exact canonical decimal USD string. It is model cost only, not total session spend. Customers receive the amount their organization is billed; only trusted internal callers receive raw ledger cost here. */ model_cost_usd: string; /** * Which sessions contributed: self counts this session's own attempts, subtree adds every session beneath it, and tree covers every session sharing the same root session. */ scope: 'self' | 'subtree' | 'tree'; /** * Session this rollup was requested for (UUID). Scope decides which sessions in its tree contributed to the figures. */ session_id: string; }; /** * A file attached to a session. The file is placed read-only in the session's sandbox under its files directory, and the agent knows it is there, so it can read it with read_file or from a shell without being told where to look. */ export type ManagedAgentsSessionResource = { /** * Size of the file in bytes. */ byte_size: number; /** * When the resource was attached. */ created_at: string; /** * The attached file. */ file_id: string; /** * The file's name at upload. */ filename: string; /** * The file's declared media type. */ media_type: string; /** * The absolute path where the file is readable inside the sandbox. Absent until staging reaches the sandbox; a resource attached mid-session is staged on the next sandbox call. */ mount_path?: string; /** * Where the file lands relative to the session's files directory. Defaults to the filename; set it on attach to rename the file or place it in a subdirectory. */ relative_path: string; /** * Server-assigned id of the attachment, used to detach it. */ resource_id: string; /** * SHA-256 of the bytes the session mounts. Frozen at attach: a later change to the file does not change this session. */ sha256: string; /** * Always file. */ type: 'file'; }; /** * Response body of GET and POST /v1/sessions/{session_id}/resources. A POST returns only the resources it attached. */ export type ManagedAgentsSessionResourceListResponse = { /** * Every file attached to the session, in attachment order, each with its sandbox path once staged. */ resources: Array | null; }; /** * A file an automation mounts into every run's sandbox. */ export type ManagedAgentsSessionResourceRef = { /** * File to mount. */ file_id: string; /** * Absolute path inside the sandbox. Omit for the platform default. */ mount_path?: string; }; /** * A file an automation mounts into every run's sandbox. */ export type ManagedAgentsSessionResourceRefRequest = { /** * File to mount. */ file_id?: string; /** * Absolute path inside the sandbox. Omit for the platform default. */ mount_path?: string; }; /** * One file to attach to a session. */ export type ManagedAgentsSessionResourceRequest = { /** * The file to mount. Must belong to the caller's organization and not have expired. */ file_id: string; /** * The same place named absolutely, with the session's files directory as its root: /data/input.csv lands at data/input.csv, as does the directory's own absolute path copied from a session's resource list, and the /mnt/session/uploads/ prefix is accepted as an alias for the directory. Any other absolute root is likewise a path beneath the directory, never a mount elsewhere. Paths take the same shape rules as relative_path (no . or .. segments, no control characters, at most 255 characters); the filename's reserved-character rule does not apply to paths. Set this or relative_path; both are accepted only when they agree. */ mount_path?: string; /** * Where the file lands relative to the session's files directory, e.g. data/input.csv. Defaults to the file's own name. Must be unique within the session and may not contain . or .. segments. */ relative_path?: string; /** * Always file. */ type: 'file'; }; /** * Sandbox CPU, memory, and accelerator usage for a session tree, as minute buckets per sandbox attachment. Samples are what the sandbox measured of itself, collected on tool calls and on read. */ export type ManagedAgentsSessionResourceSamplesResponse = { /** * RFC 3339 server time at which the page was read. */ as_of: string; /** * One page of minute buckets ordered by (sandbox_id, bucket_start). Each bucket names its attachment; join on sandboxes to place it on a lane. */ buckets: Array; /** * True while a sandbox that can be sampled is still attached to the tree. A client keeps polling while this is true and stops once it turns false; an attached sandbox that cannot measure itself does not keep it true. */ live: boolean; /** * Present when more buckets remain. Pass as page_token with the same query to continue. */ next_page_token?: string; /** * Resolution the buckets were read at. */ resolution: 'minute' | 'raw'; /** * Root of the tree the usage belongs to. */ root_session_id: string; /** * Every sandbox attachment the tree has had, oldest first, including ones that have since been released or closed. Empty when the tree never had a sandbox or sampling is disabled. Complete on every page. */ sandboxes: Array; /** * Session id named in the request. */ session_id: string; }; /** * One continuous residency of a sandbox container in a session tree: when it was bound, when and why it stopped serving, which attachment it continues if the compute was revived from a snapshot, and the state of resource sampling for it. */ export type ManagedAgentsSessionSandbox = { /** * RFC 3339 timestamp at which the container was bound to the tree. */ attached_at: string; /** * Why the attachment ended: released (compute given back, workspace kept), closed (session ended), replaced (a different container took over), or lost (the sandbox binding was found gone). */ detach_reason?: string; /** * RFC 3339 timestamp at which the container stopped serving the tree. Absent while attached. */ detached_at?: string; /** * RFC 3339 timestamp of the last successful drain from the producer. */ last_drained_at?: string; /** * Tree path of the session that attached the container. '/' for the root. */ owner_session_path: string; /** * Attachment this one continues, when the container was restored from the previous attachment's snapshot. */ revived_from_sandbox_id?: string; /** * What the container is to the session. Always primary today. */ role: string; /** * Producer sampling cadence in milliseconds. */ sample_interval_ms?: number; /** * Number of minute buckets stored for this attachment. */ sample_rows: number; /** * Start of the newest minute bucket with samples. Absent until the first drain lands data. */ sample_watermark_at?: string; /** * What the samples describe: cgroup for one container or host for the whole machine. */ sampling_scope?: string; /** * Producer of this attachment's resource samples: rma_worker or agent_service_daemon. Absent until the first drain, and 'unsupported' when the sandbox cannot measure itself. */ sampling_source?: string; /** * Tree-local identifier of this attachment (UUIDv7). A released-and-revived compute is a new attachment; follow revived_from_sandbox_id for its predecessor. */ sandbox_id: string; /** * Provider-assigned identity of the container: a compute id or container id. Historical self_hosted rows may contain a daemon id. */ sandbox_instance_id: string; /** * Sandbox runtime that provided the container: runs or docker. Historical rows may report the retired self_hosted value. */ sandbox_provider: string; }; /** * Coarse session state shared by Managed Agents and imported RL rollouts. */ export type ManagedAgentsSessionStatus = 'active' | 'awaiting_human' | 'completed' | 'failed' | 'cancelled'; /** * One context-isolated execution stream inside a multi-agent session tree, as registered in the thread registry. Returned when listing a session's threads or reading a whole session tree. */ export type ManagedAgentsSessionThread = { /** * Agent this thread runs (UUID). */ agent_id: string; /** * Agent version this thread runs (UUID). Absent when the thread was not pinned to a specific version. */ agent_version_id?: string; /** * RFC 3339 timestamp of when this thread was archived and stopped appearing as an active stream. Absent while the thread is not archived. */ archived_at?: string; /** * RFC 3339 timestamp of when this record was created. Server-assigned. */ created_at: string; /** * Human-readable label for this thread, supplied when it was spawned. Optional and never interpreted by the service. */ name?: string; /** * Session the spawning thread belongs to (UUID). Absent on the tree's top-level thread. */ parent_session_id?: string; /** * Thread that spawned this one (UUID). Absent on the tree's top-level thread. */ parent_thread_id?: string; /** * What the thread exists to do within the tree, for example subagent, grader, or advisor. Not a chat message role. */ role: string; /** * Root session of the multi-agent tree this thread belongs to (UUID). Equal to session_id for a root session. */ root_session_id: string; /** * Session this thread belongs to (UUID). */ session_id: string; /** * Slash-joined ancestry of session ids from the tree root down to the session whose events this thread's events are stored under, for example "/root-id/child-id". */ session_path: string; /** * Thread lifecycle: running (executing now), idle (awaiting more input), or terminated (finished; see stop_reason). */ status: string; /** * Structured reason the thread last stopped, forwarded from the agent loop, for example {"type": "end_turn"} or {"type": "error", "message": ...}. Absent while the thread has not stopped. */ stop_reason?: { [key: string]: unknown; }; /** * Identifier for this thread within its session tree (UUID). Server-assigned. For a subagent thread it is the child session id, so the thread and the session carrying its events resolve each other directly. */ thread_id: string; /** * Slash-joined ancestry of this thread within the tree, used to order threads for display. Defaults to session_path when the thread has no deeper nesting of its own. */ thread_path: string; /** * RFC 3339 timestamp of the last change to this record. Server-assigned. */ updated_at: string; }; /** * Response body of GET /v1/sessions/{session_id}/threads. The path id may name any session in a multi-agent tree; the registry returned is always the whole tree's, resolved through that session's root, so a subagent id and its root id return the same set. */ export type ManagedAgentsSessionThreadListResponse = { /** * Threads belonging to the session tree the path session is part of. May be null or an empty array; both mean the tree has no registered threads. Threads on sessions the caller may not read are dropped. */ threads: Array | null; }; /** * Token and cost totals for one session, summed over that session's own events. Scoped to the session's own timeline and not its subtree, so a delegating session's totals exclude its children. */ export type ManagedAgentsSessionUsage = { /** * Prompt tokens served from the provider's prompt cache, billed at the cached rate. */ cache_read_tokens: number; /** * Prompt tokens written into the provider's prompt cache. */ cache_write_tokens: number; /** * Accrued cost in micro-USD (1,000,000 = 1 USD). Integer to avoid float rounding across many small charges. */ cost_micros: number; /** * How many of the session's own events were summed to produce these totals. */ event_count: number; /** * Prompt tokens billed for this unit of work. */ input_tokens: number; /** * Completion tokens billed for this unit of work. */ output_tokens: number; /** * Session these totals cover (UUID). */ session_id: string; }; /** * Response body of GET /v1/sessions/usage: token and cost totals for an explicit batch of session ids, so a list view can show a cost per row without reading every session's events. session_ids is required and bounded; too many ids is rejected outright rather than truncated, because a silently short answer is indistinguishable from idle sessions. */ export type ManagedAgentsSessionUsageListResponse = { /** * One roll-up row per requested session id that the caller can see. Null rather than an empty array when none of the requested ids resolved. Ids naming nothing visible are omitted, so the result may be shorter than session_ids and the order should not be assumed to match. */ session_usage: Array | null; }; /** * A reusable procedure an agent loads when it judges the procedure relevant. Its name and description are disclosed in every turn; the instructions enter the conversation only when the agent activates it. Updating a skill mints a new immutable SkillVersion. */ export type ManagedAgentsSkill = { /** * Server-assigned RFC 3339 timestamp of when the skill was created. */ created_at: string; /** * When to use this skill. Disclosed to the model in every turn, so it is the whole routing signal: write it as the condition under which the skill applies. */ description: string; /** * Human-readable title shown wherever skills are listed. Defaults to the name. */ display_title?: string; /** * Length in characters of the newest version's instructions, the body disclosed to the model when it activates the skill. Zero for a skill with no version yet. Instructions are truncated at 64000 characters when a session assembles them. */ latest_instruction_chars?: number; /** * Server-maintained id of the newest version of this skill; agents that attach it without pinning a version use this one. */ latest_skill_version_id?: string; /** * How many versions this skill has, which is also the number of the newest one, since versions are numbered from 1 in creation order. Zero for a skill with no version yet. */ latest_version_number?: number; /** * Caller-owned key/value data stored with the skill and returned unchanged. */ metadata?: { [key: string]: unknown; }; /** * The skill's addressable name, lowercase with single hyphens, e.g. cut-release. This is what an agent passes to the activation tool. */ name: string; /** * Organization that owns the skill. Server-assigned from the caller's credentials; a value sent in a request body is ignored. */ organization_id: string; /** * Catalog group this skill is filed under, if any. Grouping is for browsing and for attaching a set of skills to an agent in one entry; it is never disclosed to the model and does not scope the skill's name. */ skill_group_id?: string; /** * Server-assigned id of the skill, used in the skill and skill-version routes. */ skill_id: string; /** * Where the skill came from: platform, organization, or repository. Decides which skill wins a name collision, most specific first. */ source: string; /** * Server-assigned RFC 3339 timestamp of the most recent update to the skill. */ updated_at: string; }; /** * The files bundled with one skill version, stored as a single canonical archive and extracted into the session sandbox so the agent can read references and run scripts. */ export type ManagedAgentsSkillBundle = { /** * Compressed size of the archive in bytes, which is what mounting this skill into a session costs to transfer. */ bytes: number; /** * Every file in the bundle, sorted by path. */ entries?: Array; /** * SHA-256 checksum of the canonical archive; uploads of identical files have the same value. */ sha256: string; }; /** * One file inside a skill version's bundle, listed so a caller can see what a version ships, and what of it the sandbox will be able to run, without downloading the archive. */ export type ManagedAgentsSkillBundleEntry = { /** * Size of the file in bytes. */ bytes: number; /** * Permission bits the file is extracted with: 0755 for files under scripts/, 0644 otherwise. Assigned by this platform from the file's location, never taken from the uploaded archive. */ mode: number; /** * Path of the file relative to the skill's own directory, e.g. scripts/tag.sh. */ path: string; /** * SHA-256 of the file's contents. Stable across repacking, so comparing two versions' entries decides which files were added, removed, or changed without downloading either bundle. */ sha256: string; }; /** * Request body for previewing tier-1 skill disclosure. Read-only: nothing is stored, and the attachments do not have to belong to any agent yet. */ export type ManagedAgentsSkillDisclosurePreviewRequest = { /** * The context window of the model the agent will run on. Omit to be answered against the conservative floor this service uses when a window is unknown. */ context_window_tokens?: number; /** * The attachment list exactly as it would be saved on the agent, including group entries, which are expanded here the same way a session start expands them. Capped at the 100 skills a session can carry. */ skills: Array<{ [key: string]: unknown; }> | null; }; /** * A folder of skills, for browsing a large catalog and for attaching a whole set to an agent in one entry. Attaching a group resolves to its members when a session starts, so adding a skill to the group reaches every agent already attached to it. Groups are never disclosed to the model. */ export type ManagedAgentsSkillGroup = { /** * Server-assigned RFC 3339 timestamp of when the group was created. */ created_at: string; /** * What this group collects, for operators browsing the catalog. Never disclosed to the model. */ description?: string; /** * Human-readable title shown wherever groups are listed. Defaults to the name. */ display_title?: string; /** * Caller-owned key/value data stored with the group and returned unchanged. */ metadata?: { [key: string]: unknown; }; /** * The group's addressable name, lowercase with single hyphens, e.g. document-ops. */ name: string; /** * Organization that owns the group. Server-assigned from the caller's credentials; a value sent in a request body is ignored. */ organization_id: string; /** * How many live skills are currently filed under this group. Derived on read. */ skill_count: number; /** * Server-assigned id of the group, used in the skill-group routes and when attaching a whole group to an agent. */ skill_group_id: string; /** * Server-assigned RFC 3339 timestamp of the most recent update to the group. */ updated_at: string; }; /** * Response body of GET /v1/skill-groups. Paged: read to the end by following next_page_token until it is absent. Each row carries how many live skills are filed under the group, so a catalog listing can show the size of a folder it has not opened. */ export type ManagedAgentsSkillGroupListResponse = { /** * Present when more groups exist. Pass it as page_token with the same limit to read the next page. Absent on the last page. */ next_page_token?: string; /** * One page of the caller's skill groups, newest first. */ skill_groups: Array; }; /** * Request body for updating a skill group. An omitted field is left unchanged. */ export type ManagedAgentsSkillGroupPatchRequest = { /** * What this group collects, for operators browsing the catalog. Omit to leave unchanged. */ description?: string; /** * Human-readable title for listings. Omit to leave unchanged. */ display_title?: string; /** * Caller-owned key/value data stored with the group. Omit to leave unchanged. */ metadata?: { [key: string]: unknown; }; /** * The group's addressable name, lowercase letters, digits, and single hyphens. Omit to leave unchanged. */ name?: string; }; /** * Request body for creating a skill group. */ export type ManagedAgentsSkillGroupRequest = { /** * What this group collects, for operators browsing the catalog. Never disclosed to the model, so it does not need to read as a routing signal the way a skill's description does. */ description?: string; /** * Human-readable title for listings. Defaults to the name. */ display_title?: string; /** * Caller-owned key/value data stored with the group and returned unchanged. */ metadata?: { [key: string]: unknown; }; /** * The group's addressable name, lowercase letters, digits, and single hyphens, e.g. document-ops. Held to the same shape as a skill name so the two never disagree in a listing that shows them together. */ name: string; }; /** * Response body of GET /v1/skills. Paged: read to the end by following next_page_token until it is absent. Each row carries the name and description an agent's prompt discloses, but not the instructions, which are read one version at a time. */ export type ManagedAgentsSkillListResponse = { /** * Present when more skills match. Pass it as page_token with the same filters and limit to read the next page. Absent on the last page. */ next_page_token?: string; /** * One page of matching skills, newest first. Soft-deleted skills are omitted. */ skills: Array; }; /** * Request body for refiling a skill between catalog groups. Filing is not authoring: this leaves the skill's versions untouched and mints nothing. Publish new content with createSkillVersion. */ export type ManagedAgentsSkillPatchRequest = { /** * Catalog group to file this skill under. Send an empty string to remove it from its group. Grouping is for browsing and bulk attachment only and is never disclosed to the model. */ skill_group_id: string; }; /** * Request body for creating or updating a skill. The document is the source of truth: the skill's name and description come from its frontmatter. Publishing a new version of an existing skill goes through createSkillVersion, which mints one rather than editing the last. */ export type ManagedAgentsSkillRequest = { /** * Human-readable title for listings. Defaults to the frontmatter name. */ display_title?: string; /** * The complete SKILL.md: YAML frontmatter delimited by --- on the very first line, then Markdown instructions. name and description are required in the frontmatter and are read from it. */ document: string; /** * Relative paths of files bundled with the skill, listed to the model when it activates the skill. Paths must stay inside the skill directory. */ manifest?: Array; /** * Caller-owned key/value data stored with the skill and returned unchanged. */ metadata?: { [key: string]: unknown; }; /** * Catalog group to file this skill under. Send an empty string to remove it from its group; omit to leave the group unchanged. Grouping is for browsing and bulk attachment only and is never disclosed to the model. */ skill_group_id?: null | string; }; /** * An immutable snapshot of a skill's document and metadata, minted on every update. An agent may pin one, so that what a session runs cannot change under it. */ export type ManagedAgentsSkillVersion = { /** * SHA-256 checksum of the stored document. */ artifact_sha256?: string; /** * The files bundled with this version, and the archive they are mounted from. Absent for a version that carries only a document. */ bundle?: ManagedAgentsSkillBundle; /** * Server-assigned RFC 3339 timestamp of when this version was minted. */ created_at: string; /** * Identifier of the caller that minted this version. */ created_by?: string; /** * The skill's routing description as it stood at this version. */ description: string; /** * Path of the document within the bundle. SKILL.md unless the author moved it. */ entrypoint_path?: string; /** * Relative paths of files bundled with the skill. Listed to the model at activation; read only if it uses them. */ file_manifest?: Array; /** * The parsed SKILL.md frontmatter as authored, including fields this platform does not interpret. */ frontmatter?: { [key: string]: unknown; }; /** * The skill's full Markdown instructions. Returned only when reading a single version, since a listing has no use for it. */ instructions?: string; /** * Caller-owned key/value data stored with this version and returned unchanged. */ metadata?: { [key: string]: unknown; }; /** * The skill's addressable name as it stood at this version. */ name: string; /** * Organization that owns this record. Resolved from the API key; never accepted from the caller. */ organization_id: string; /** * Skill this version belongs to. */ skill_id: string; /** * Identifier for this skill version. Server-assigned. Pass it when attaching a skill that must stay pinned to a specific revision. */ skill_version_id: string; /** * Monotonically increasing version counter within the skill, starting at 1. Server-assigned. */ version_number: number; }; /** * Response body of GET /v1/skills/{skill_id}/versions. Versions are immutable snapshots of the document: pin one on an agent to keep what its sessions run under fixed. Instructions are omitted here and returned when reading a single version. */ export type ManagedAgentsSkillVersionListResponse = { /** * Every published version of the requested skill, newest first. */ skill_versions: Array; }; /** * One channel the Slack connection's bot is a member of: the id a binding stores, the name the workspace shows, and whether it is private or shared with another organization. */ export type ManagedAgentsSlackChannel = { /** * Slack channel id, the value a trigger binding stores as channel_id. */ id: string; /** * Whether the channel is shared with another organization (Slack Connect). A proactive binding here lets external members start investigations. */ isExtShared: boolean; /** * Whether the channel is private in the connected workspace. */ isPrivate: boolean; /** * Channel name as the connected workspace sees it, without the leading #. Slack Connect channels can carry a different name in the other workspace. */ name: string; }; /** * The channels a Slack connection's bot is a member of, read live from Slack with a short cache. Returned to populate the channel picker when creating or editing a Slack trigger binding; the binding itself still stores the channel id. */ export type ManagedAgentsSlackChannels = { /** * Bounded channel-selection catalog, sorted by name. A channel the bot has not been invited to is never listed; invite it in Slack first. Check truncated before treating absence as meaningful. */ channels: Array; /** * When this list was read from Slack (RFC 3339). Lists are cached briefly, so a channel joined a moment ago may not appear yet. */ fetchedAt: string; /** * How long to wait before asking again, when the list is stale because Slack throttled the read. */ retryAfterSeconds?: number; /** * True when Slack could not be asked and an expired cached list was served instead. Check retryAfterSeconds before retrying. */ stale: boolean; /** * True when the listing stopped at a size budget while Slack still had more channels; channels past the budget are absent, so a missing channel does not mean the bot is not a member. */ truncated: boolean; }; /** * Closed configuration for a Slack Events API source. */ export type ManagedAgentsSlackEventSourceRequest = { /** * Customer-configured webhook delivery and verification. */ delivery: ManagedAgentsProviderWebhookDeliveryRequest; /** * Human-readable source name shown in the automation catalog. */ displayName: string; /** * Slack Events API protocol, verified with Slack's request signature. */ type: 'slack_events_api'; }; /** * Optional input for starting or continuing an integration authorization. It may select a provider-defined continuation or an existing connection to re-authorize; organization identity always comes from the authenticated caller. */ export type ManagedAgentsStartIntegrationInstallRequest = { /** * Existing connection to re-authorize in place, keeping its id and therefore the vault grants that reference it. Omit to create a new connection. The connection must belong to the caller's organization and use this provider; it is recorded server-side against the returned state, never read back from the provider callback. */ connection_id?: string; /** * Short opaque provider option: either a continuation value returned by a prior completion, or -- for a provider whose catalog entry reports preset_fixed_at_authorization -- the permission preset to authorize (see ProviderInfo.permissions). Omit for a provider needing neither. */ option?: string; }; /** * Request body for starting a session: which agent to run, the environment to run it in, the vault grants it receives, and the opening message and/or outcome that gives it work. */ export type ManagedAgentsStartSessionRequest = { /** * The agent to run, from POST /v1/agents or GET /v1/agents. Its current version is snapshotted into the session, so later edits to the agent do not affect this run. */ agent_id: string; /** * Optional per-item allowlist inside vault_ids. The list is a whitelist across every granted vault, not a filter within one, so it must name every item the session should receive. Omit with explicit vault_ids to enable all items; [] alongside a non-empty vault_ids is rejected because it would enable none. Omit both fields to use the agent version's defaults. */ credential_refs?: Array; /** * The environment whose sandbox the session runs in, from POST /v1/environments or GET /v1/environments. Required for ordinary agents; evaluation agents omit it because the run has no parent sandbox and each child clones its target workspace. */ environment_id?: string; /** * Target session snapshots for an evaluation agent. Set exactly one of session_ids or statuses plus limit; targets are resolved server-side within the caller's organization and public-session scope before the run is created. */ evaluation?: ManagedAgentsEvaluationSelectorRequest; /** * Stable identity inside the external system, e.g. a Slack thread key or a pull-request key. Set together with external_source_type. */ external_source_id?: string; /** * Kind of external system this session correlates to, e.g. slack or github. Set together with external_source_id; sessions can then be filtered by both on GET /v1/sessions. */ external_source_type?: string; /** * Opening user message for the session, and the context the agent works from. Send it alongside an outcome to supply facts the agent needs without making them part of what the grader measures; the grader never sees it. Kept in the session's system prompt for the whole run, so context compaction cannot summarize it away. */ message?: string; /** * Caller-defined string key/value pairs stored on the session, e.g. ids that map it back to your own system. Write-once: they cannot be changed after start. At most 32 entries; keys use letters, digits, '_', '.', and '-' up to 64 characters; values are 1-512 characters without control characters. Returned as metadata on GET /v1/sessions and filterable with metadata=key:value (repeatable, AND) or metadata_key=key. */ metadata?: { [key: string]: string; }; /** * Optional definition of done, graded against a rubric. Its description is the objective and is quoted to the grader; send a message alongside it for context the grader should not see. With no message the description opens the session. Omit to inherit the agent version's default_rubric when it defines one, graded against this request's message; an outcome sent here is used as given and the agent default is ignored entirely. */ outcome?: ManagedAgentsDefineOutcomeRequest; /** * Labelbox project this session's work is attributed to, which the model gateway bills against. A non-empty value overrides the agent version's default_project_id. Required after defaulting when the chosen model runs on an account restricted to customer projects, such as the Anthropic HDO models. */ project_id?: string; /** * Prior sessions this one may read, by session id. Each grants read access to the whole tree containing it -- transcript, agents, tools, cost, outcome, and output files -- through a set of read-only tools offered to the agent only when at least one reference exists. Each id is authorized under your own scope, so a session you cannot read refuses the whole request with 404 and starts nothing. Sessions from another organization, admin_only sessions, and session analysts are never referenceable. More may be added later with referenced_session_ids on POST /v1/sessions/{session_id}/events. */ referenced_session_ids?: Array; /** * Files to mount read-only into the session's sandbox, under its files directory, before the first turn. Each attaches the file's content as it is now. All-or-nothing: one unknown or out-of-scope file_id refuses the whole request with 404 and creates nothing. Requires an environment with a sandbox. */ resources?: Array; /** * Start ungraded even when the agent version defines a default_rubric. Only needed for an agent that has one, since omitting outcome otherwise inherits it. */ skip_default_outcome?: boolean; /** * How this session's tree may work as a team. Every tree has a shared task board: under mode auto (the default) the agent becomes a team the moment it posts its first task, recruiting copies of itself one per claimable task, which share its sandbox, claim work from the board, and are woken by its transitions; mode on makes it a team from turn one; mode off withholds the board. Overrides the agent's multiagent.team mode for this session; an agent with no roster runs under default limits. Governance (thread and cost caps) is the agent's and cannot be widened here. */ team?: ManagedAgentsTeamRequest; /** * Vault grants for this session. Omit to use the agent version's default_vault_ids; send [] to disable all defaults. */ vault_ids?: Array; }; /** * An organization-scoped classification definition. Applying or removing it changes only catalog membership: it does not update the agent, mint an AgentVersion, or affect running sessions. */ export type ManagedAgentsTag = { /** * Display color in #RRGGBB form. */ color: string; /** * Server-assigned RFC 3339 timestamp of when the tag was created. */ created_at: string; /** * Optional operator-facing explanation of the classification, up to 280 characters. */ description?: string; /** * Display label, trimmed by the service. Unique case-insensitively among live tags in this organization. */ label: string; /** * Organization that owns the tag. Server-assigned from the authenticated principal and never accepted as authority from the request body. */ organization_id: string; /** * Server-assigned tag id (UUID). */ tag_id: string; /** * Server-assigned RFC 3339 timestamp of the most recent definition update. */ updated_at: string; }; /** * A complete set of organization-scoped tag definitions. GET /v1/tags returns the organization catalog; agent tag PUT routes return the agent's resulting exact set. */ export type ManagedAgentsTagListResponse = { /** * The complete live tag set for this response. Always an array; an empty array means no definitions exist or the agent has no classifications. */ tags: Array; }; /** * Per-session override of the agent's team setting: whether the tree may become a team. Omit the mode to keep the agent's setting. The seats a team may fill are the roster's limits.max_concurrent_threads; recruits are sized to the claimable work under that cap, and teammates may always message each other directly. */ export type ManagedAgentsTeamRequest = { /** * auto (default): the board tools are offered and the tree becomes a team when the agent posts its first task. on: a team from turn one, briefed as one before it has posted anything. off: no board; the agent delegates and waits as a plain coordinator. Omit to keep the agent's setting. */ mode?: 'auto' | 'on' | 'off'; }; /** * One startup-validated static agent template; reading it never creates or mutates an agent. */ export type ManagedAgentsTemplate = { /** * Presentation category grouping related agent templates. */ category: string; /** * Complete POST createAgent-compatible definition copied into the explicit create form. */ definition: ManagedAgentsAgentTemplateDefinition; /** * Concise explanation of the work this template is designed to perform. */ purpose: string; /** * Stable catalog key used to select and track this template. */ template_id: string; }; /** * Request for one bounded Google Cloud Logging read through an integration connection. The project and optional filter select this check only; they do not restrict the service account's IAM access. */ export type ManagedAgentsTestLogAccessRequest = { /** * Optional Logging filter, intersected with the last 24 hours. */ filter?: string; /** * Explicit Google Cloud project ID; not a restriction on the service account's IAM access. */ project_id: string; }; /** * One tool as it was offered to the model, in the Anthropic and OpenAI tool-definition vocabulary. Recorded on the event for a model turn so a reader can see exactly what the model could call. */ export type ManagedAgentsToolDefinition = { /** * Natural-language explanation of what the tool does and when to use it, supplied to the model verbatim. */ description: string; /** * JSON Schema for the tool's arguments. Passed to the model provider unchanged. */ input_schema: { [key: string]: unknown; } | null; /** * Tool name the model calls, matching the name on the resulting tool_use content block. */ name: string; }; /** * One tool as it was offered to the model, in the Anthropic and OpenAI tool-definition vocabulary. Recorded on the event for a model turn so a reader can see exactly what the model could call. */ export type ManagedAgentsToolDefinitionRequest = { /** * Natural-language explanation of what the tool does and when to use it, supplied to the model verbatim. */ description?: string; /** * JSON Schema for the tool's arguments. Passed to the model provider unchanged. */ input_schema?: { [key: string]: unknown; } | null; /** * Tool name the model calls, matching the name on the resulting tool_use content block. */ name?: string; }; /** * A whole multi-agent session tree: every session and thread in it, plus a bounded page of the merged chronological event log. Returned when reading the tree containing a given session. */ export type ManagedAgentsTreeResult = { /** * One page of the tree's events merged into a single chronological log across all sessions. Bounded by response size, so the page length is not a fixed count. */ events: Array | null; /** * Cursor to pass as the starting point of the next event page. Present only when more events remain; absent on the last page. */ next_event_id?: string; /** * Root session of the multi-agent tree this result covers (UUID). Equal to session_id for a root session. */ root_session_id: string; /** * Every session in the tree, root and subagents alike. Always complete; only the event log is paged. */ sessions: Array | null; /** * Thread registry rows for the tree's context-isolated execution streams. Imported RL children appear when their import supplied thread names; older imports without names use session-derived fallback rows. */ threads: Array | null; }; /** * Why one repository automation ran. Webhook provenance is recorded without persisting the provider's raw payload; a manual run carries the mode alone and no provenance fields at all. */ export type ManagedAgentsTrigger = { /** * Trigger binding (UUID) that selected this run. Present only on a webhook trigger, where it is required. */ binding_id?: string; /** * Provider delivery id, which ties the GitHub delivery, this session, and the published review to one another. Present only on a webhook trigger, where it is required. */ delivery_id?: string; /** * Provider event that started the run, e.g. pull_request.synchronize. Present only on a webhook trigger, where it is required. */ event?: string; /** * How the automation started: manual for a direct API call, webhook for a verified provider delivery. A run recorded before triggers were tracked reads back as manual. */ mode: string; }; /** * One wake rule: which provider events start a session, and the agent, environment, and vaults that session runs with. New rules are Slack-only; retired GitHub rules remain readable and may be disabled or deleted during migration. */ export type ManagedAgentsTriggerBinding = { /** * Agent (UUID) a matching event starts a session for. */ agent_id: string; /** * Repository automation strategy this binding runs. pull_request_review is the only supported value; empty on a Slack binding. */ automation_kind?: string; /** * Identifier for this binding (UUID). Server-assigned; cite it when updating or deleting the binding. */ binding_id: string; /** * Whether a matching run captures the agent's final working-tree patch as a session artifact. */ capture_patch: boolean; /** * Slack channel scope. app_mention may be exact or an internal-only fallback; message and message_root require an exact channel; app_mention_ext_shared requires empty scope and is a separate shared-only fallback. Always empty on a GitHub binding. */ channel_id?: string; /** * Integration connection (UUID) whose verified events this binding routes. */ connection_id: string; /** * Whether this binding is eligible to match. A disabled binding is retained but never wakes a session. */ enabled: boolean; /** * Environment (UUID) that session runs in. */ environment_id: string; /** * Whether a draft pull request may trigger this binding. Draft events are skipped when false. */ include_drafts: boolean; /** * Organization that owns this binding. Resolved from the API key; never accepted from the caller. */ organization_id: string; /** * Caller-owned stable identity for a binding managed by code, so its owner can recognise the binding after the channel or wake event changes. Absent on a binding made by hand. At most 128 characters of letters, digits, '.', '_', ':', '/', and '-'. Not unique: the owning code refuses ambiguity itself. */ owner_key?: string; /** * Integration provider whose events this binding routed. New bindings support Slack; retired GitHub bindings remain readable for migration. */ provider: string; /** * Whether a matching run publishes its validated result back to the pull request as a GitHub review. */ publish_review: boolean; /** * Provider-normalized GitHub repository name this binding automates. Empty on a Slack binding. */ repository?: string; /** * Immutable GitHub repository id matched against the delivered event, so a repository rename or transfer cannot redirect the automation. Zero on a Slack binding. */ repository_id?: number; /** * Vaults (UUIDs) granted to the woken session. */ vault_ids?: Array; /** * Slack source app ids (A…) whose top-level posts may start a session. Empty means app-authored roots never start work. Legal only on an exact-channel message_root binding. */ wake_app_ids?: Array; /** * Slack selector: app_mention (explicit tags), message (exact channel; every post and reply wakes the agent), message_root (exact channel, internal or Slack Connect; every new top-level post starts an investigation at once and thread replies stay mention-only), or app_mention_ext_shared (explicit shared-only fallback with independent vault grants). Exact bindings take precedence over either fallback; a channel may have only one enabled exact binding while one of them is message_root. Retired GitHub values remain readable. */ wake_event: string; }; /** * Response body of GET /v1/trigger-bindings. Unpaginated, and scoped to the one connection named by the required connection_id query parameter within the calling organization. */ export type ManagedAgentsTriggerBindingListResponse = { /** * The connection's live bindings, ordered by binding_id. Disabled bindings are included; deleted ones are not. */ bindings: Array | null; }; /** * Request body for withdrawing one device registration. A token registered by another user answers 404, the same as one that was never registered. */ export type ManagedAgentsUnregisterPushDeviceRequest = { /** * The hex-encoded device token to stop sending to, in any case. Only the user who registered it may withdraw it. */ device_token: string; }; /** * Closed custom-webhook configuration that explicitly accepts unsigned deliveries. */ export type ManagedAgentsUnsignedCustomEventSourceRequest = { /** * Customer-configured webhook delivery and verification. */ delivery: ManagedAgentsUnsignedWebhookDeliveryRequest; /** * Human-readable source name shown in the automation catalog. */ displayName: string; /** * Custom webhook protocol. */ type: 'custom_webhook'; }; /** * Explicit unsigned-delivery policy for a custom webhook. */ export type ManagedAgentsUnsignedCustomEventSourceVerification = { /** * Accept deliveries without a cryptographic signature. */ type: 'none'; }; /** * Custom webhook delivery without cryptographic verification. */ export type ManagedAgentsUnsignedWebhookDeliveryRequest = { /** * Customer-configured webhook delivery. */ kind: 'webhook'; /** * Explicit unsigned-delivery policy. */ verification: ManagedAgentsUnsignedCustomEventSourceVerification; }; /** * A sandbox environment a session executes in: its provider, resources, mounts, setup steps and idle/delete lifecycle. Created and started independently of any session. */ export type ManagedAgentsUpdateEnvironmentRequest = { /** * Whether this environment boots the shared interactive Chromium display used by the computer and human-handoff tools. The server projects this to http_port 6901. */ computer_use?: boolean; /** * Provider-specific overflow settings this schema does not model. Passed to the provider unchanged. */ config?: { [key: string]: unknown; }; /** * Server-assigned RFC 3339 timestamp of when the environment was created. */ created_at?: string; /** * Free-text note about what this environment provides. */ description?: string; /** * Plaintext environment variables exported in the sandbox. They become the whole container environment, including the runner entrypoint's, so PATH is refused (env_vars.PATH): managed images select /workspace/.venv themselves. A Runs session using one-time setup after its runner changes also refuses startup-hook names such as BASH_ENV, HOME, PYTHONPATH, and LD_PRELOAD; re-test to capture a compatible image instead. Never put secrets here; use secrets instead. On update, omit to keep the current variables; send {} to clear them. */ env_vars?: { [key: string]: string; }; /** * Server-assigned id of the environment; pass it when starting a session that should run in this sandbox. */ environment_id?: string; /** * Required when a Runs PATCH changes a nonempty network policy or enables privileged Docker. Copy network_policy and privileged from the environment read before editing; a stale snapshot is rejected. */ expected_access?: ManagedAgentsEnvironmentAccessExpectation; /** * Port inside the sandbox to expose over HTTP for services the agent starts; 0 exposes nothing. */ http_port?: number; /** * Seconds of inactivity after which a running sandbox is stopped; 0 uses the provider default. A computer-enabled environment requires 0 or at least 600 seconds so its five-minute handoff heartbeat arrives before idle-stop. */ idle_stop_after_seconds?: number; /** * Container image the sandbox boots. Omit to use the provider's default image. For the Agent runner provider only the deployment's own runner repository or a sibling published beside it (for example rma-runner-recursion) is accepted, and it must be omitted when an accelerator is requested, which always boots the platform's GPU runner. Customize the sandbox itself with setup.script. */ image?: string; /** * Caller-owned key/value data stored with the environment and returned unchanged. */ metadata?: { [key: string]: unknown; }; /** * Files or objects staged into the sandbox workspace when it is created. On update, omit to keep the current mounts; send [] to clear them. */ mounts?: Array; /** * Human-readable label shown wherever environments are listed. */ name?: string; /** * Runs egress rules. On update, omission keeps the stored policy. Changing from a non-Runs provider to Runs with an absent or {} stored policy requires an explicit network_policy: {"version":"v1","rules":[]} for deny-all or {} for unrestricted egress. A nonempty policy requires GKE; with explicit non-GKE placement, send {} for unrestricted egress or change placement to GKE. Send {} to clear a policy. Runs responses always include network_policy; {} means unrestricted. */ network_policy?: { [key: string]: unknown; }; /** * Organization that owns the environment. Server-assigned from the caller's credentials; a value sent in a request body is ignored. */ organization_id?: string; /** * Whether a Runs sandbox may use privileged Docker. Independent of network_policy; omit on update to retain the saved value, or send false to disable it. New Runs environments and transitions from another provider default to false. Existing Runs environments retain their earlier effective setting until edited. Compute creation fails closed unless Agent Service can enforce the requested combination. */ privileged?: null | boolean; /** * Sandbox runtime that executes the session, chosen from the sandbox providers catalog. */ provider?: string; /** * Size in GiB of the persistent workspace volume; 0 uses the provider default. */ pvc_size_gi?: number; /** * Caller-sized CPU and memory for CPU environments, or one exclusive accelerator with service-owned limits of 8,000 millicores (8 vCPU) and 32,768 MiB (32 GiB) of memory for GPU environments, plus lifetime and placement constraints. */ resources?: ManagedAgentsEnvironmentResources; /** * Who may use the environment. Defaults to organization, meaning it is shared across the owning organization. */ scope?: string; /** * Environment variable name to secret-manager reference. References only, never plaintext values; the runtime resolves them at start. The one-time Runs setup fallback applies the same startup-hook name restriction to secrets and vault-injected variables. On update, omit to keep the current references; send {} to clear them. */ secrets?: { [key: string]: string; }; /** * Setup script run after the sandbox is provisioned and before the agent starts. */ setup?: ManagedAgentsEnvironmentSetup; /** * RFC 3339 timestamp of the last setup script change. Server-assigned. */ setup_updated_at?: null | string; /** * User who last changed the setup script. Server-assigned. */ setup_updated_by_user_id?: string; /** * Server-owned verdict on the setup script: whether a manual setup run has proven this exact configuration on real compute. Read status and stale before starting sessions; read last_run.hint first when status is failed. Ignored in request bodies. */ setup_verification?: ManagedAgentsEnvironmentSetupVerificationRequest; /** * Advisory findings about the setup script (bash -lc wrapping, curl | sh, unpinned installs, ambiguous system Python, PATH replacement, or non-persistent shell activation), plus legacy_setup_discarded when the stored setup predates setup.script and is not run. Never block a save; computed on read. */ setup_warnings?: Array; /** * Seconds a stopped sandbox is retained before it is deleted along with its volume; 0 uses the provider default. */ stopped_delete_after_seconds?: number; /** * Server-assigned RFC 3339 timestamp of the most recent update to the environment. */ updated_at?: string; }; /** * Request body replacing the tool allow-list of a built-in integration connection. Validated against the catalog exactly as when the app was added; the connection's state is unchanged and sessions pick the new list up at their next credential refresh. */ export type ManagedAgentsUpdateIntegrationConnectionSelectionRequest = { /** * The permission preset the allow-list is held to: read (every tool must be classified read-only) or write (any catalog tool; each is stored at its classified level). Omit for read. */ permission?: string; /** * The app's tools the organization's agents may use, by tool name from the catalog. Replaces the connection's allow-list in full; an empty list is refused. */ resources: Array | null; }; /** * Request body for changing a tag definition. Every field is optional and tag applications remain unchanged. */ export type ManagedAgentsUpdateTagRequest = { /** * Replacement display color in #RRGGBB form. Omit to keep the current color. */ color?: string; /** * Replacement description. Send an empty string to clear it; omit to keep the current description. */ description?: string; /** * Replacement display label. Leading and trailing whitespace is removed. Omit to keep the current label. */ label?: string; }; /** * Partial update of one trigger binding. Only the properties present in the request change; an omitted property keeps its stored value, so an explicit false or empty list is distinguishable from an omission. The merged binding is revalidated as a whole, which is what keeps a single-field edit from bypassing a provider or tenancy invariant. */ export type ManagedAgentsUpdateTriggerBindingRequest = { /** * Replacement agent (UUID) a matching event starts a session for. */ agent_id?: null | string; /** * Replacement Slack channel scope. Empty makes app_mention an internal-only fallback; message and message_root require an exact channel; app_mention_ext_shared requires empty scope and independently opts into shared channels. */ channel_id?: null | string; /** * Replacement integration connection (UUID) whose events the binding routes. */ connection_id?: null | string; /** * Arm or disarm the binding. Sending false on its own is the one update that skips revalidating the binding's references, so a rule pointing at a deleted agent can still be disabled. */ enabled?: null | boolean; /** * Replacement environment (UUID) that session runs in. */ environment_id?: null | string; /** * Replacement caller-owned stable identity for a binding managed by code. An omitted property keeps the stored value; an explicit empty string clears it, returning the binding to hand-managed. At most 128 characters of letters, digits, '.', '_', ':', '/', and '-'. */ owner_key?: null | string; /** * Replacement vault (UUID) list. An empty list clears every grant. */ vault_ids?: null | Array; /** * Replacement Slack source app id list. An empty list restores the default that app-authored roots never start work. Legal only on an exact-channel message_root binding; a PATCH that moves the binding off message_root clears a stored list instead of rejecting the change. */ wake_app_ids?: null | Array; /** * Replacement provider event selector, validated against the binding's provider. Switching an exact app_mention binding to message_root turns on proactive root investigations for that channel with the same agent, environment, and vaults; switching back is the rollback. */ wake_event?: null | string; }; /** * Request body for updating one vault credential. Every field is optional and omitted fields keep their current value; the MCP server URL and an integration connection are deliberately not changeable here. */ export type ManagedAgentsUpdateVaultCredentialRequest = { /** * Replacement host allowlist for limited networking, supporting wildcards such as *.example.com. Sent as a whole list, not merged; omit to keep the current one. */ allowed_hosts?: Array; /** * Replacement operator-facing label. Omit to keep the current one. */ display_name?: string; /** * Replacement list of where the credential is applied. Sent as a whole list, not merged; omit to keep the current one. */ injection_locations?: Array; /** * Replacement permission preset for an integration grant. The connection itself is not repointable: that would change which account the agent acts as. */ integration_permission?: string; /** * Replacement resource allowlist for an integration grant. */ integration_resources?: Array; /** * Replacement Labelbox scope for a credential to the Labelbox product-state service. Sent as a whole object, not merged; omit to keep the current one. It cannot be cleared: delete and recreate the credential instead. */ labelbox_scope?: ManagedAgentsLabelboxScopeRequest; /** * Replacement free-form caller-owned JSON. Sent as a whole object, not merged; omit to keep the current value. The key labelbox_scope is reserved for the typed field. */ metadata?: { [key: string]: unknown; }; /** * Replacement network mode. limited confines the credential to allowed_hosts; unrestricted removes that confinement. Omit to keep the current one. */ network_mode?: 'limited' | 'unrestricted'; /** * Replacement environment variable or header name the secret binds to inside the sandbox. Omit to keep the current one. */ secret_name?: string; /** * New secret-manager reference, for material stored elsewhere. Not supported for webhook_secret. Omit to keep the current secret. */ secret_ref?: string; /** * Replacement credential material. Stored as a new secret version so the previous value stays revocable. Omit to keep the current secret. */ secret_value?: string; }; /** * Request body for updating a vault's label or metadata. Every field is optional; omitted fields keep their current value. */ export type ManagedAgentsUpdateVaultRequest = { /** * Replacement operator-facing label. Omit to keep the current one. */ display_name?: string; /** * Replacement free-form caller-owned JSON. Sent as a whole object, not merged; omit to keep the current value. */ metadata?: { [key: string]: unknown; }; }; /** * The stored image an upload produced. Reference it from a message by putting uri on an image content block. */ export type ManagedAgentsUploadedImage = { /** * Stored image size in bytes. */ byte_size: number; /** * Decoded image height in pixels. */ height: number; /** * Sniffed media type of the stored bytes. */ media_type: string; /** * Lowercase SHA-256 of the stored bytes; also the image's model-facing id prefix. */ sha256: string; /** * Private content reference to place on an image content block in a later sendSessionEvents call. Readable only through this session. */ uri: string; /** * Decoded image width in pixels. */ width: number; }; /** * Token counts and cost for a single unit of work, in the provider's usage vocabulary. Attached to an event's content for the model turn that produced it; see session usage for whole-session totals. */ export type ManagedAgentsUsage = { /** * Prompt tokens served from the provider's prompt cache, billed at the cached rate. */ cache_read_tokens?: number; /** * Prompt tokens written into the provider's prompt cache. */ cache_write_tokens?: number; /** * Accrued cost in USD, derived from cost_micros for display. */ cost_usd?: number; /** * Prompt tokens billed for this unit of work. */ input_tokens?: number; /** * Completion tokens billed for this unit of work. */ output_tokens?: number; }; /** * How much of a session hour the agent spends generating. */ export type ManagedAgentsUtilization = { /** * Whether the share comes from this agent's own completed sessions or from the workload prior. */ basis: 'agent_history' | 'workload_prior'; /** * Session length in hours across the same sessions. */ sessionHours: ManagedAgentsBand; /** * Completed sessions behind agent_history; zero otherwise. */ sessions: number; /** * Fraction of a session hour the model is generating, from 0 to 1. */ share: ManagedAgentsBand; /** * Workload prior used when basis is workload_prior. */ workload?: 'interactive' | 'autonomous'; }; /** * A named group of credentials an agent session may be granted. A session references vaults by id; the credential values inside are resolved at execution time and are never returned over the API. */ export type ManagedAgentsVault = { /** * RFC 3339 timestamp of when this record was created. Server-assigned. */ created_at: string; /** * How many credentials this vault currently holds, so a list view need not fetch each vault's credentials. */ credential_count: number; /** * Operator-facing label for the vault, shown wherever vaults are listed. */ display_name: string; /** * Free-form caller-supplied key/value labels. Stored verbatim and never interpreted by the service. */ metadata?: { [key: string]: unknown; }; /** * Organization that owns this record. Resolved from the API key; never accepted from the caller. */ organization_id: string; /** * RFC 3339 timestamp of the last change to this record. Server-assigned. */ updated_at: string; /** * Identifier for this vault (UUID). Server-assigned. */ vault_id: string; }; /** * One credential in a vault, described without its secret value — no field on this shape can carry secret material, which is what makes it safe to list over the API. Returned when managing a vault's contents; the value itself is opened only inside a running session. */ export type ManagedAgentsVaultCredential = { /** * Hosts the credential may be sent to when network_mode is limited. Ignored under unrestricted. */ allowed_hosts?: Array; /** * RFC 3339 timestamp of when this record was created. Server-assigned. */ created_at: string; /** * Identifier for this credential (UUID). Server-assigned, and unique only within its vault. */ credential_id: string; /** * How the credential is used: bearer_token, env_var, or webhook_secret. Legacy rows may report mcp_oauth or integration, so this remains a string rather than a closed response enum. */ credential_type: string; /** * Operator-facing label for the credential. Optional: a credential is identifiable by its secret_name or MCP server without one. */ display_name?: string; /** * Where the credential is attached to an outbound request: headers, body, or both. Headers alone is recommended; a secret in a request body is far easier to log by accident. Meaningful only for the MCP OAuth and bearer-token kinds: env_var is injected into the sandbox environment, and integration mints its own token per session. */ injection_locations?: Array; /** * Organization integration connection this credential grants a session (UUID). Set only for the integration kind, where it replaces sealed material: the provider mints a short-lived token per session. */ integration_connection_id?: string; /** * Permission preset applied when a token is minted for this grant; see the provider's scope table. An unknown value is rejected on write rather than at mint time. */ integration_permission?: string; /** * Resources within the connection the grant is narrowed to — repositories, for GitHub. Empty means every resource the connection itself can reach, which is broader than most grants should be. */ integration_resources?: Array; /** * Labelbox product-state authorization ceiling: either exact projects or organization-wide access, optionally restricted to one exact Slack audience with an explicit internal or Slack Connect classification. Required for a bearer_token credential whose mcp_server_url is that service; rejected for any other server. Replaced as a whole on update and kept when omitted. */ labelbox_scope?: ManagedAgentsLabelboxToolsScope; /** * MCP server this credential may be sent to. Required for bearer_token and immutable afterwards, so a stored secret cannot be repointed at a different service. */ mcp_server_url?: string; /** * Free-form caller-supplied key/value labels. Stored verbatim and never interpreted by the service. The key labelbox_scope is reserved for the typed field of that name. */ metadata?: { [key: string]: unknown; }; /** * How far the credential may travel: limited confines it to allowed_hosts, unrestricted permits any host. limited is the safe default. */ network_mode?: 'limited' | 'unrestricted'; /** * Organization that owns this record. Resolved from the API key; never accepted from the caller. */ organization_id: string; /** * Deployment-derived identity of the exact platform MCP service this credential targets. Present as slack_tools only when mcp_server_url matches the configured Slack tools endpoint; never caller-controlled or stored. */ platform_mcp_service?: 'slack_tools'; /** * Environment variable or header name the secret binds to inside the sandbox. Required for the env_var kind. */ secret_name?: string; /** * Pointer to material stored in an external secret manager, carrying a provider prefix such as kms: or vault:. Opaque to this service, and empty on the normal path where the value is sealed into the credential itself. */ secret_ref?: string; /** * RFC 3339 timestamp of the last change to this record. Server-assigned. */ updated_at: string; /** * Vault this credential belongs to (UUID). */ vault_id: string; }; /** * Response body of GET /v1/vaults/{vault_id}/credentials. Unlike the other list envelopes this one is deliberately lossy: each row describes a credential and points at its secret-manager reference, and the secret material is never returned by any read endpoint. To learn whether a credential actually works, probe with POST /v1/mcp/probe. */ export type ManagedAgentsVaultCredentialListResponse = { /** * Credentials held by the vault named in the path, newest first. Null rather than an empty array when the vault is empty. Soft-deleted credentials are omitted, and no row carries a secret value. */ vault_credentials: Array | null; }; /** * A pointer to one credential inside one vault. Used to grant a session specific credentials rather than every credential in a vault. */ export type ManagedAgentsVaultCredentialRef = { /** * Credential to select inside vault_id. */ credential_id: string; /** * Vault holding the credential. Required, because credential ids are unique only within a vault. */ vault_id: string; }; /** * Response body of GET /v1/vaults. A vault is the grantable unit of credential access: the vault_ids passed when starting a session decide which credentials that session may use. This lists the containers only; use GET /v1/vaults/{vault_id}/credentials for contents. */ export type ManagedAgentsVaultListResponse = { /** * Every vault in the caller's organization, newest first. Null rather than an empty array when the organization has no vaults. Soft-deleted vaults are omitted. */ vaults: Array | null; }; /** * Pass, fail, not-applicable, rate, and adjacent-window comparison for one verdict population. */ export type ManagedAgentsVerdictMetric = { /** * Current rate minus prior rate in percentage points, or null when either rate is null. */ delta_pp: null | number; /** * Immutable fail verdicts in the current window. */ fail_count: number; /** * Immutable not-applicable verdicts in the current window. */ not_applicable_count: number; /** * Immutable pass verdicts in the current window. */ pass_count: number; /** * Equivalent pass rate for the adjacent prior window, or null at zero denominator. */ prior_rate: null | number; /** * Pass divided by pass plus fail, or null at a zero denominator. */ rate: null | number; }; /** * Configures the immediate HTTP response sent after a webhook delivery is verified and accepted. */ export type ManagedAgentsWebhookAcknowledgement = { /** * Static JSON object returned to the webhook sender after acceptance. */ body?: { [key: string]: unknown; }; /** * Response property populated with the selected challenge value during endpoint verification. */ challenge_response_field?: string; /** * Optional selector for a sender-provided endpoint-verification challenge value. */ challenge_selector?: ManagedAgentsWebhookValueSelector; /** * HTTP status returned after a verified delivery is durably accepted; defaults to 200. */ status_code?: number; }; /** * Configures the immediate HTTP response sent after a webhook delivery is verified and accepted. */ export type ManagedAgentsWebhookAcknowledgementRequest = { /** * Static JSON object returned to the webhook sender after acceptance. */ body?: { [key: string]: unknown; }; /** * Response property populated with the selected challenge value during endpoint verification. */ challenge_response_field?: string; /** * Optional selector for a sender-provided endpoint-verification challenge value. */ challenge_selector?: ManagedAgentsWebhookValueSelectorRequest; /** * HTTP status returned after a verified delivery is durably accepted; defaults to 200. */ status_code?: number; }; /** * One component of a stable automation conversation key, with ordered fallback selectors. */ export type ManagedAgentsWebhookConversationPart = { /** * Fallback selectors checked in order; the first present value contributes this part of the conversation key. */ selectors: Array | null; }; /** * One component of a stable automation conversation key, with ordered fallback selectors. */ export type ManagedAgentsWebhookConversationPartRequest = { /** * Fallback selectors checked in order; the first present value contributes this part of the conversation key. */ selectors?: Array | null; }; /** * Selects a stable provider delivery identity, optionally composed from multiple verified values. */ export type ManagedAgentsWebhookDeliveryKey = { /** * RFC 6901 JSON pointer for a single-value body key. */ body_pointer?: string; /** * Case-insensitive header name for a single-value header key. */ header?: string; /** * Ordered values canonically hashed into a collision-resistant composite delivery key. */ selectors?: Array; /** * Delivery location for a single-value key; omit when selectors is used. */ source?: 'body' | 'header'; }; /** * Selects a stable provider delivery identity, optionally composed from multiple verified values. */ export type ManagedAgentsWebhookDeliveryKeyRequest = { /** * RFC 6901 JSON pointer for a single-value body key. */ body_pointer?: string; /** * Case-insensitive header name for a single-value header key. */ header?: string; /** * Ordered values canonically hashed into a collision-resistant composite delivery key. */ selectors?: Array; /** * Delivery location for a single-value key; omit when selectors is used. */ source?: 'body' | 'header'; }; /** * An organization-owned, provider-neutral webhook ingress endpoint with configurable verification and acknowledgement. */ export type ManagedAgentsWebhookEndpoint = { /** * Immediate HTTP response returned after a verified delivery is accepted. */ acknowledgement: ManagedAgentsWebhookAcknowledgement; /** * Server-assigned RFC 3339 creation timestamp. */ created_at: string; /** * Authenticated principal that created the endpoint. */ created_by?: string; /** * Optional provider delivery identity used to deduplicate retried or overlapping webhook events. */ delivery_key?: ManagedAgentsWebhookDeliveryKey; /** * Human-readable name shown when configuring automations. */ display_name: string; /** * Whether the endpoint currently accepts deliveries. */ enabled: boolean; /** * Server-assigned endpoint identifier used in the public webhook URL. */ endpoint_id: string; /** * Organization that owns the endpoint, resolved from the authenticated request scope. */ organization_id: string; /** * Server-assigned RFC 3339 timestamp of the most recent configuration change. */ updated_at: string; /** * Rules used to authenticate every inbound delivery before storage or dispatch. */ verification: ManagedAgentsWebhookVerification; }; /** * Webhook endpoints available to automations in the calling organization. */ export type ManagedAgentsWebhookEndpointListResponse = { /** * Webhook endpoints owned by the calling organization. */ webhook_endpoints: Array | null; }; /** * Provider-neutral configuration for creating or replacing a webhook endpoint. */ export type ManagedAgentsWebhookEndpointRequest = { /** * Immediate HTTP response returned after a verified delivery is accepted. */ acknowledgement: ManagedAgentsWebhookAcknowledgementRequest; /** * Optional provider delivery identity used to deduplicate retries or overlapping subscriptions. */ delivery_key?: ManagedAgentsWebhookDeliveryKeyRequest; /** * Human-readable endpoint name shown when configuring automations. */ display_name: string; /** * Whether the endpoint accepts inbound webhook deliveries. */ enabled?: boolean; /** * Rules used to authenticate every inbound delivery. */ verification: ManagedAgentsWebhookVerificationRequest; }; /** * Customer-owned webhook endpoint and its non-secret verification configuration. */ export type ManagedAgentsWebhookEventSourceDelivery = { /** * Customer-configured webhook delivery. */ kind: 'webhook'; /** * Verification policy for custom webhook delivery. */ verification?: ManagedAgentsEventSourceVerificationResponse; /** * Signing-secret reference for Slack or GitHub webhook delivery. */ verificationCredential?: ManagedAgentsEventSourceCredentialRef; /** * Relative public endpoint to configure at the event provider. */ readonly webhookUrl: string; }; /** * Customer webhook delivery without verification configuration. */ export type ManagedAgentsWebhookEventSourceDeliverySummary = { /** * Customer-configured webhook delivery. */ kind: 'webhook'; /** * Relative public endpoint to configure at the event provider. */ webhookUrl: string; }; /** * A conjunction of conditions that decides whether a webhook delivery starts or continues an automation conversation. */ export type ManagedAgentsWebhookFilter = { /** * Conditions that must all match; an empty list matches every verified delivery. */ all?: Array; }; /** * A conjunction of conditions that decides whether a webhook delivery starts or continues an automation conversation. */ export type ManagedAgentsWebhookFilterRequest = { /** * Conditions that must all match; an empty list matches every verified delivery. */ all?: Array; }; /** * One provider-neutral condition evaluated against a verified webhook delivery. */ export type ManagedAgentsWebhookMatchCondition = { /** * Comparison applied to the selected value. */ operator: 'equals' | 'one_of' | 'exists' | 'not_exists'; /** * Delivery value evaluated by this condition. */ selector: ManagedAgentsWebhookValueSelector; /** * Expected value for the equals operator. */ value?: string; /** * Accepted values for the one_of operator. */ values?: Array; }; /** * One provider-neutral condition evaluated against a verified webhook delivery. */ export type ManagedAgentsWebhookMatchConditionRequest = { /** * Comparison applied to the selected value. */ operator?: 'equals' | 'one_of' | 'exists' | 'not_exists'; /** * Delivery value evaluated by this condition. */ selector?: ManagedAgentsWebhookValueSelectorRequest; /** * Expected value for the equals operator. */ value?: string; /** * Accepted values for the one_of operator. */ values?: Array; }; /** * One ordered input included in the byte sequence verified by an HMAC webhook signature. */ export type ManagedAgentsWebhookSignedPart = { /** * Input source: the raw body, one header value, or a fixed literal string. */ kind: 'body' | 'header' | 'literal'; /** * Header name for header parts or fixed text for literal parts; omitted for the raw body. */ value?: string; }; /** * One ordered input included in the byte sequence verified by an HMAC webhook signature. */ export type ManagedAgentsWebhookSignedPartRequest = { /** * Input source: the raw body, one header value, or a fixed literal string. */ kind?: 'body' | 'header' | 'literal'; /** * Header name for header parts or fixed text for literal parts; omitted for the raw body. */ value?: string; }; /** * Selects one value from a verified webhook delivery body or headers. */ export type ManagedAgentsWebhookValueSelector = { /** * RFC 6901 JSON pointer evaluated against the delivery body when source is body. */ body_pointer?: string; /** * HTTP header name read case-insensitively when source is header. */ header?: string; /** * Delivery location to read: body for a JSON pointer or header for a case-insensitive header name. */ source: 'body' | 'header'; }; /** * Selects one value from a verified webhook delivery body or headers. */ export type ManagedAgentsWebhookValueSelectorRequest = { /** * RFC 6901 JSON pointer evaluated against the delivery body when source is body. */ body_pointer?: string; /** * HTTP header name read case-insensitively when source is header. */ header?: string; /** * Delivery location to read: body for a JSON pointer or header for a case-insensitive header name. */ source?: 'body' | 'header'; }; /** * Provider-neutral rules for authenticating an inbound webhook before its payload can trigger automations. */ export type ManagedAgentsWebhookVerification = { /** * HTTP status returned for failed verification; defaults to 401. */ invalid_signature_status?: number; /** * Maximum accepted age of the timestamp in seconds; requires timestamp_header. */ maximum_age_seconds?: number; /** * Credential whose secret value verifies the HMAC when type is hmac_sha256. */ secret_credential_id?: string; /** * Vault containing the HMAC secret credential when type is hmac_sha256. */ secret_vault_id?: string; /** * HTTP header carrying the hexadecimal HMAC signature. */ signature_header?: string; /** * Optional prefix removed from the signature header before hexadecimal decoding, for example sha256=. */ signature_prefix?: string; /** * Ordered inputs concatenated before HMAC verification; must include the raw request body. */ signed_parts?: Array; /** * Optional header containing a Unix timestamp used to reject replayed deliveries. */ timestamp_header?: string; /** * Verification algorithm. Use hmac_sha256 for signed webhooks; none accepts unsigned deliveries. */ type: 'hmac_sha256' | 'none'; }; /** * Provider-neutral rules for authenticating an inbound webhook before its payload can trigger automations. */ export type ManagedAgentsWebhookVerificationRequest = { /** * HTTP status returned for failed verification; defaults to 401. */ invalid_signature_status?: number; /** * Maximum accepted age of the timestamp in seconds; requires timestamp_header. */ maximum_age_seconds?: number; /** * Credential whose secret value verifies the HMAC when type is hmac_sha256. */ secret_credential_id?: string; /** * Vault containing the HMAC secret credential when type is hmac_sha256. */ secret_vault_id?: string; /** * HTTP header carrying the hexadecimal HMAC signature. */ signature_header?: string; /** * Optional prefix removed from the signature header before hexadecimal decoding, for example sha256=. */ signature_prefix?: string; /** * Ordered inputs concatenated before HMAC verification; must include the raw request body. */ signed_parts?: Array; /** * Optional header containing a Unix timestamp used to reject replayed deliveries. */ timestamp_header?: string; /** * Verification algorithm. Use hmac_sha256 for signed webhooks; none accepts unsigned deliveries. */ type?: 'hmac_sha256' | 'none'; }; /** * A Docker image published in the marketplace for reuse across environments. */ export type MarketplaceImageDto = { /** * Stable marketplace-image identifier (UUID). */ id: string; /** * Repository path of the image. */ imageRepo: string; /** * Description of the marketplace image. */ description: string; /** * All tag names available for this image. */ dockerTags: Array; /** * Per-tag detail including size and push time. */ dockerTagsDetail: Array<{ /** * Docker image tag name. */ tag: string; /** * Size of this specific tagged image in bytes. */ sizeBytes: number; /** * Timestamp when this tag was last pushed to the registry (ISO-8601, UTC). */ pushedAt: string; }>; /** * Total cumulative size across all tags of this image in bytes. */ imageSizeBytes: number; /** * Timestamp when any tag of this image was most recently pushed (ISO-8601, UTC). Null if no tags have been pushed. */ lastPushedAt: string | null; /** * Container registry host serving the image. */ registry: string; /** * Timestamp when this image was last synced from the upstream registry (ISO-8601, UTC). */ syncedAt: string; /** * Timestamp when the marketplace entry was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the marketplace entry was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Paginated listing of marketplace images. */ export type MarketplaceListResponseDto = { /** * Page of marketplace images matching the query. */ items: Array<{ /** * Stable marketplace-image identifier (UUID). */ id: string; /** * Repository path of the image. */ imageRepo: string; /** * Description of the marketplace image. */ description: string; /** * All tag names available for this image. */ dockerTags: Array; /** * Per-tag detail including size and push time. */ dockerTagsDetail: Array<{ /** * Docker image tag name. */ tag: string; /** * Size of this specific tagged image in bytes. */ sizeBytes: number; /** * Timestamp when this tag was last pushed to the registry (ISO-8601, UTC). */ pushedAt: string; }>; /** * Total cumulative size across all tags of this image in bytes. */ imageSizeBytes: number; /** * Timestamp when any tag of this image was most recently pushed (ISO-8601, UTC). Null if no tags have been pushed. */ lastPushedAt: string | null; /** * Container registry host serving the image. */ registry: string; /** * Timestamp when this image was last synced from the upstream registry (ISO-8601, UTC). */ syncedAt: string; /** * Timestamp when the marketplace entry was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the marketplace entry was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * Total number of marketplace images matching the query across all pages. */ total: number; /** * Maximum number of items returned in this page. */ limit: number; /** * Zero-based offset into the result set used to produce this page. */ offset: number; }; /** * Summary of a marketplace sync run against the upstream container registry. */ export type MarketplaceSyncResponseDto = { /** * Number of marketplace images created or updated during the sync. */ upserted: number; /** * Number of marketplace images removed because they no longer exist upstream. */ deleted: number; /** * Human-readable error messages for any images that failed to sync. */ errors: Array; }; /** * Identity payload for the currently-authenticated caller. */ export type MeIdentityResponseDto = { /** * Stable identifier of the authenticated user. */ id: string; }; /** * Permission entries granted to the authenticated caller, as opaque string keys. */ export type MePermissionsResponseDto = Array; /** * List of model identifiers available for use as solver or grader models. */ export type ModelsResponseDto = { /** * Model identifiers available for routing solver and grader runs. */ models: Array; }; /** * Aggregated platform monitoring metrics across service and database infrastructure over a chosen time range. */ export type MonitoringMetricsDto = { /** * Lookback window for monitoring queries. */ timeRange: '1h' | '6h' | '24h' | '7d'; /** * True if any underlying monitoring query was truncated; samples may be incomplete. */ truncated?: boolean; /** * Service health metrics for the selected window. */ cloudRun: { /** * Service request rate in requests per second, per series. */ requestRate: Array<{ /** * Human-readable label identifying the series. */ label: string; /** * Ordered samples that make up the series, oldest first. */ points: Array<{ /** * Timestamp of the sample (ISO-8601, UTC) at the start of its bucket. */ timestamp: string; /** * Numeric value of the metric at this sample point. */ value: number; }>; }>; /** * Service latency percentiles per series. */ latencyPercentiles: Array<{ /** * Human-readable label identifying the series. */ label: string; /** * Ordered samples that make up the series, oldest first. */ points: Array<{ /** * Timestamp of the sample (ISO-8601, UTC) at the start of its bucket. */ timestamp: string; /** * Numeric value of the metric at this sample point. */ value: number; }>; }>; /** * Number of active service instances per series. */ instanceCount: Array<{ /** * Human-readable label identifying the series. */ label: string; /** * Ordered samples that make up the series, oldest first. */ points: Array<{ /** * Timestamp of the sample (ISO-8601, UTC) at the start of its bucket. */ timestamp: string; /** * Numeric value of the metric at this sample point. */ value: number; }>; }>; /** * Service CPU utilization fraction per series. */ cpuUtilization: Array<{ /** * Human-readable label identifying the series. */ label: string; /** * Ordered samples that make up the series, oldest first. */ points: Array<{ /** * Timestamp of the sample (ISO-8601, UTC) at the start of its bucket. */ timestamp: string; /** * Numeric value of the metric at this sample point. */ value: number; }>; }>; /** * Service memory utilization fraction per series. */ memoryUtilization: Array<{ /** * Human-readable label identifying the series. */ label: string; /** * Ordered samples that make up the series, oldest first. */ points: Array<{ /** * Timestamp of the sample (ISO-8601, UTC) at the start of its bucket. */ timestamp: string; /** * Numeric value of the metric at this sample point. */ value: number; }>; }>; }; /** * Database health metrics for the selected window. */ cloudSql: { /** * Database CPU utilization fraction per series. */ cpuUtilization: Array<{ /** * Human-readable label identifying the series. */ label: string; /** * Ordered samples that make up the series, oldest first. */ points: Array<{ /** * Timestamp of the sample (ISO-8601, UTC) at the start of its bucket. */ timestamp: string; /** * Numeric value of the metric at this sample point. */ value: number; }>; }>; /** * Database disk utilization fraction per series. */ diskUtilization: Array<{ /** * Human-readable label identifying the series. */ label: string; /** * Ordered samples that make up the series, oldest first. */ points: Array<{ /** * Timestamp of the sample (ISO-8601, UTC) at the start of its bucket. */ timestamp: string; /** * Numeric value of the metric at this sample point. */ value: number; }>; }>; /** * Database active connection count per series. */ activeConnections: Array<{ /** * Human-readable label identifying the series. */ label: string; /** * Ordered samples that make up the series, oldest first. */ points: Array<{ /** * Timestamp of the sample (ISO-8601, UTC) at the start of its bucket. */ timestamp: string; /** * Numeric value of the metric at this sample point. */ value: number; }>; }>; }; }; /** * Oracle QA outcome surfaced alongside grading results so the UI can show whether the grader matched the gold standard. */ export type OracleQaResultResponseDto = { /** * Stable QA-job identifier (UUID). */ jobId: string; /** * Lifecycle status of a QA job from queueing through dispatch and execution to a terminal state. */ status: 'pending' | 'submitting' | 'running' | 'completed' | 'failed' | 'cancelled'; /** * Summary score from the oracle QA job; null when not yet produced. */ score: number | null; /** * Summary grade label from the oracle QA job; null when not yet produced. */ grade: string | null; /** * Detailed oracle QA result payload, or null when the job is still in flight. */ result: { /** * Short natural-language summary copied from the QA container result. */ summary: string | null; /** * Issues reported by the QA container; empty when none were reported. */ issues: Array<{ /** * Category label for the issue, defined by the QA image. */ type: string; /** * Severity level: an error blocks acceptance, a warning highlights a concern, and info is purely informational. */ severity: 'error' | 'warning' | 'info'; /** * Human-readable explanation of the issue. */ description: string; }>; /** * Free-form structured detail payload from the QA container. */ details: { [key: string]: unknown; } | null; /** * Artifacts emitted by the QA container; empty when none were emitted. */ artifacts: Array<{ /** * Display name for the artifact as written by the QA container. */ filename: string; /** * HTTP(S) URL where the artifact bytes can be fetched. */ url: string; }>; } | null; }; /** * An organization. Top-level tenant boundary that owns environments, problems, and users. */ export type OrganizationDto = { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ id: string; /** * External organization identifier provided by the caller's source-of-truth system. */ externalId: string; /** * Human-readable display name of the organization. */ name: string; /** * Timestamp when the organization was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the organization was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Batch of org-scoped file metadata rows (filename, size, createdAt), in request order. */ export type OrganizationFileMetadataListDto = Array<{ /** * Stable file identifier (UUID). Files are problem-scoped uploads. */ id: string; /** * Original filename of the upload as provided by the user. */ filename: string; /** * Size of the file in bytes; null when the size has not yet been recorded. */ sizeBytes: number | null; /** * Timestamp when the file was uploaded (ISO-8601, UTC). */ createdAt: string; }>; /** * Response listing the form bundles in an organization catalog. */ export type OrganizationFormListResponseDto = { /** * Form bundles attached to the organization, ordered by most-recently-attached. */ forms: Array<{ /** * The org-attached form bundle. */ form: { /** * Stable form identifier (UUID). Forms are versioned structured-input schemas. */ id: string; /** * Human-readable title for the bundle, surfaced in org catalog and picker UIs. Null when the bundle has not been named yet. */ title: string | null; /** * Timestamp when the form was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the form was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Owning organization. */ organizationId: string; /** * Latest published version number for this bundle, or null when no version is published yet. */ latestPublishedVersionNumber: number | null; /** * Timestamp when this bundle was attached at the organization scope (ISO-8601, UTC). */ attachedAt: string; }>; }; /** * A credential scoped to an organization for outbound requests to a specific upstream. */ export type OrganizationSecretDto = { /** * Stable organization-secret identifier (UUID). */ id: string; /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Human-readable name uniquely identifying the secret within the organization. */ name: string; /** * Upstream host the secret authenticates against. Null on legacy pre-migration bindings. */ upstreamHost: string | null; /** * HTTP header name used to inject the secret value upstream. Null on legacy pre-migration bindings. */ headerName: string | null; /** * Timestamp when the organization secret was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the organization secret was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Array of secrets defined at the organization scope. */ export type OrganizationSecretListDto = Array<{ /** * Stable organization-secret identifier (UUID). */ id: string; /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Human-readable name uniquely identifying the secret within the organization. */ name: string; /** * Upstream host the secret authenticates against. Null on legacy pre-migration bindings. */ upstreamHost: string | null; /** * HTTP header name used to inject the secret value upstream. Null on legacy pre-migration bindings. */ headerName: string | null; /** * Timestamp when the organization secret was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the organization secret was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * Cursor-paginated page of organizations with their problem and environment counts. */ export type OrganizationWithCountsPageDto = { /** * Items in this page, ordered per the requested sort. */ items: Array<{ /** * Stable organization identifier (UUID). Top-level tenant boundary. */ id: string; /** * External organization identifier provided by the caller's source-of-truth system. */ externalId: string; /** * Human-readable display name of the organization. */ name: string; /** * Timestamp when the organization was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the organization was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Number of environments owned by this organization. */ environmentCount: number; /** * Number of problems across all environments owned by this organization. */ problemCount: number; /** * Number of problem runs executed across all problems owned by this organization. */ problemRunCount: number; }>; /** * Cursor for fetching the next page, or null when this is the last page. */ nextCursor: string | null; /** * Total number of items matching the filter across all pages. */ total: number; }; /** * List of computes owned by the caller, scoped by environment or run-config. */ export type OwnedComputeListResponseDto = { /** * Owned computes returned for the caller scope. */ items: Array<{ /** * Stable identifier of the compute (issued by agent-service). */ id: string; /** * Human-readable compute name. */ name: string; /** * Lifecycle status reported by agent-service (e.g. "pending", "running", "stopped"). */ status: string; /** * Error message emitted by the runtime if the compute failed; null otherwise. */ errorMessage: string | null; /** * Timestamp when the compute was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the compute entered the running state (ISO-8601, UTC); null while pending. */ startedAt: string | null; /** * Timestamp when the compute terminated (ISO-8601, UTC); null while still running. */ stoppedAt: string | null; /** * Container image the compute was launched with; null when not yet resolved. */ containerImage: string | null; /** * Size of the attached persistent volume claim in GiB. */ pvcSizeGi: number; /** * Container HTTP port exposed for redemption; null when no port was requested. */ httpPort: number | null; /** * Idle-stop timeout in seconds; maximum 30 days. */ idleStopAfterSeconds: number; /** * Stopped-to-deleted timeout in seconds; maximum 30 days. */ stoppedDeleteAfterSeconds: number; /** * Environment that owns this compute. */ environmentId: string; /** * Run-config version that launched this compute, when one was associated; null otherwise. */ runConfigVersionId: string | null; /** * Run config that owns the launching run-config version; null when no version was associated. */ runConfigId: string | null; /** * Version number of the launching run-config version within its run config; null when no version was associated. */ runConfigVersionNumber: number | null; }>; }; /** * Array of permission overrides configured at the requested scope. */ export type PermissionOverrideListDto = Array<{ /** * Stable permission-override identifier (UUID). */ id: string; /** * Environment this override applies within. */ environmentId: string; /** * Lower-cased email of the user this override targets, or null for an environment-wide override applying to all users. */ userEmail: string | null; /** * Permission string the override applies to (must be one of the whitelisted overridable permissions, e.g. "versions:update"). */ permission: string; /** * Specific field name to target, or null for a whole-permission override; required for jobs:create and constrained by permission for versions:update. */ field: 'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingStrategy' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId' | 'attemptCount' | null; /** * Whether the override grants or revokes the permission/field. */ effect: 'allow' | 'deny'; /** * Timestamp when the override was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the override was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * Response payload for listing environment permission overrides; rows that fail validation are silently dropped to tolerate stale or invalid entries. */ export type PermissionOverridesResponseDto = Array<{ /** * Stable permission-override identifier (UUID). */ id: string; /** * Environment this override applies within. */ environmentId: string; /** * Lower-cased email of the user this override targets, or null for an environment-wide override applying to all users. */ userEmail: string | null; /** * Permission string the override applies to (must be one of the whitelisted overridable permissions, e.g. "versions:update"). */ permission: string; /** * Specific field name to target, or null for a whole-permission override; required for jobs:create and constrained by permission for versions:update. */ field: 'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingStrategy' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId' | 'attemptCount' | null; /** * Whether the override grants or revokes the permission/field. */ effect: 'allow' | 'deny'; /** * Timestamp when the override was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the override was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * Platform-level configuration values exposed to clients. */ export type PlatformConfigResponseDto = { /** * Container image reference used as the base for grader execution environments. */ graderBaseImage: string; }; /** * Per-problem cost-limit status: how close each applicable cap is to being exhausted, and whether any cap has been exceeded. */ export type ProblemCostStatusDto = { /** * Percent of the most restrictive per-problem cap currently used, or null when no per-problem cap is in effect. Always in [0, 100]. */ problemLimitPercentUsed: number | null; /** * True when the most restrictive per-problem cap that applies to this problem has been reached. */ problemLimitExceeded: boolean; /** * Percent of the environment-wide cap currently used, or null when no environment cap is configured. */ environmentLimitPercentUsed: number | null; /** * True when the environment-wide cap has been reached. */ environmentLimitExceeded: boolean; /** * Percent of the problem-specific cap currently used, or null when no problem-specific cap is configured for this problem. */ specificProblemLimitPercentUsed: number | null; /** * True when the problem-specific cap for this problem has been reached. */ specificProblemLimitExceeded: boolean; /** * True when a cost limit is configured specifically for this problem (vs. only an environment-wide cap). */ hasSpecificProblemLimit: boolean; }; /** * An individual evaluation task — the core unit of work in the platform. */ export type ProblemDto = { /** * Stable problem identifier (UUID). */ id: string; /** * Environment this problem belongs to. */ environmentId: string; /** * Caller-provided external identifier for this problem. Null when no external system tracks it. */ externalId: string | null; /** * Human-readable problem title shown in lists and detail views. */ title?: string | null; /** * Free-text description of the problem. Null when unset. */ description?: string | null; /** * Problem domain (e.g. the subject area the task belongs to). Null when unset. */ domain?: string | null; /** * True for environment-scoped seed problems used as templates; false for regular problems. Templates are hidden from public lists and rejected by mutation routes. */ isTemplate: boolean; /** * Timestamp when the problem was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the problem was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Conflict returned when the problem already has a form attached. */ export type ProblemFormAlreadyAttachedErrorDto = { /** * Machine-readable discriminator for a duplicate problem form attachment. */ code: 'problem_form_already_attached'; /** * Human-readable explanation of the duplicate problem form attachment. */ message: string; /** * Optional structured context about the existing problem form attachment. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Map from platform problem IDs to their (possibly null) external IDs. */ export type ProblemIdToExternalIdMapDto = { [key: string]: string | null; }; /** * Array of problems. */ export type ProblemListDto = Array<{ /** * Stable problem identifier (UUID). */ id: string; /** * Environment this problem belongs to. */ environmentId: string; /** * Caller-provided external identifier for this problem. Null when no external system tracks it. */ externalId: string | null; /** * Human-readable problem title shown in lists and detail views. */ title?: string | null; /** * Free-text description of the problem. Null when unset. */ description?: string | null; /** * Problem domain (e.g. the subject area the task belongs to). Null when unset. */ domain?: string | null; /** * True for environment-scoped seed problems used as templates; false for regular problems. Templates are hidden from public lists and rejected by mutation routes. */ isTemplate: boolean; /** * Timestamp when the problem was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the problem was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * Paged response for the environment-overview problem list, with enrichment-filter status metadata. */ export type ProblemListItemsResponseDto = { /** * Page of problem list items in sort order. */ items: Array<{ /** * Stable problem identifier (UUID). */ id: string; /** * Environment this problem belongs to. */ environmentId: string; /** * Caller-provided external identifier for this problem. Null when no external system tracks it. */ externalId: string | null; /** * Human-readable problem title shown in lists and detail views. */ title?: string | null; /** * Free-text description of the problem. Null when unset. */ description?: string | null; /** * Problem domain (e.g. the subject area the task belongs to). Null when unset. */ domain?: string | null; /** * True for environment-scoped seed problems used as templates; false for regular problems. Templates are hidden from public lists and rejected by mutation routes. */ isTemplate: boolean; /** * Timestamp when the problem was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the problem was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Timestamp when the most recent problem version was created (ISO-8601, UTC). Null when the problem has no versions. */ latestVersionCreatedAt: string | null; /** * True when the problem has at least one locked (immutable) version. */ hasLockedVersion: boolean; /** * True when the most recent problem version is unlocked (or the problem has no versions yet), meaning it is still editable. */ isDraft: boolean; /** * Total USD spend across all runs of this problem. Null when no run costs are recorded. */ totalCostUsd: number | null; /** * Total number of problem runs recorded for this problem. */ runsCount: number; /** * Distinct models that have produced at least one run for this problem. */ models: Array; /** * Average / min / max problem-run score for this problem. Null when no graded runs exist. */ avgScore: { /** * Mean grader score across completed graded runs in the latest run group for this problem. May be negative. */ avg: number; /** * Minimum grader score across completed graded runs in the latest run group for this problem. May be negative. */ min: number; /** * Maximum grader score across completed graded runs in the latest run group for this problem. May be negative. */ max: number; } | null; /** * Best problem-run grader score for this problem. Null when no graded runs exist. May be negative. */ bestScore: number | null; /** * Summary of the latest run for this problem. Null when no runs exist. */ latestRun: { /** * Lifecycle status of the latest run for this problem. */ status: 'pending' | 'running' | 'grading' | 'completed' | 'failed' | 'cancelled'; /** * Final grader score for the latest run. Null when the run has not been graded. */ finalScore: number | null; /** * Model that produced the latest run. Null when no model was recorded. */ apiModelName: string | null; /** * Truncated excerpt of the prompt used by the latest run, capped to PROMPT_EXCERPT_MAX_CHARS. */ promptExcerpt: string | null; } | null; /** * Up to RECENT_RUNS_LIMIT most-recent runs for the sparkline, newest first. */ recentRuns: Array<{ /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ id: string; /** * Sequential attempt number for this run within its problem (1-indexed). */ attemptNumber: number; /** * User-supplied display name for the run. Null for unnamed runs such as Taiga imports and interactive single runs. */ runName: string | null; /** * Lifecycle status of the run. */ status: 'pending' | 'running' | 'grading' | 'completed' | 'failed' | 'cancelled'; /** * Final grader score for the run. Null when the run has not been graded. */ score: number | null; }>; /** * Signed URL for the most recent completed run's output file matching the environment's previewFilename, or null when no preview is available. */ previewFileUrl: string | null; }>; /** * Opaque cursor for the next page, or null when no further pages exist. */ nextCursor: string | null; /** * Total number of problems that match the current filter set across all pages. */ total: number; /** * Status of enrichment filtering on the server (applied, degraded, or not requested) for this response. */ enrichmentFilterStatus: { /** * Discriminator selecting the variant. */ state: 'not_requested'; } | { /** * Discriminator selecting the variant. */ state: 'applied'; } | { /** * Discriminator selecting the variant. */ state: 'degraded'; /** * Reason code explaining why enrichment filtering degraded. */ reason: 'auth' | 'unavailable' | 'invalid-response' | 'timeout' | 'too-many-candidates'; }; }; /** * Aggregate statistics for the filtered problem list on the environment-overview page. */ export type ProblemListStatsDto = { /** * Total number of problems that match the current filter set. */ totalProblems: number; /** * Total number of problem runs across the filtered problem set. */ totalRuns: number; /** * Total USD spend across all runs in the filtered set. Null when no run-cost records exist. */ totalCostUsd: number | null; /** * Distinct sorted model names across all active runs in the environment; intentionally unfiltered so the Models dropdown stays stable. */ models: Array; /** * Pre-aggregated chart buckets covering the full filtered set. */ analytics: { /** * One bucket per quartile of average score, aggregated per problem. */ avgScoreBuckets: Array<{ /** * Human-readable bucket label (e.g. '0-25%'). */ label: string; /** * Total number of items (problems or runs) that fall into this bucket. */ count: number; /** * Up to ANALYTICS_BUCKET_SAMPLE_LIMIT representative items as display-ready strings, used to populate the bucket tooltip. */ sampleItems: Array; }>; /** * One bucket per quartile of score, aggregated over every individual run. */ allScoresBuckets: Array<{ /** * Human-readable bucket label (e.g. '0-25%'). */ label: string; /** * Total number of items (problems or runs) that fall into this bucket. */ count: number; /** * Up to ANALYTICS_BUCKET_SAMPLE_LIMIT representative items as display-ready strings, used to populate the bucket tooltip. */ sampleItems: Array; }>; }; /** * Status of enrichment filtering on the server (applied, degraded, or not requested) for this response. */ enrichmentFilterStatus: { /** * Discriminator selecting the variant. */ state: 'not_requested'; } | { /** * Discriminator selecting the variant. */ state: 'applied'; } | { /** * Discriminator selecting the variant. */ state: 'degraded'; /** * Reason code explaining why enrichment filtering degraded. */ reason: 'auth' | 'unavailable' | 'invalid-response' | 'timeout' | 'too-many-candidates'; }; }; /** * Response describing the form override attached at the problem scope, along with its higher-scope owner marker. */ export type ProblemOverrideFormResponseDto = { /** * The attached form bundle, or null when none is attached. */ form: { /** * Stable form identifier (UUID). Forms are versioned structured-input schemas. */ id: string; /** * Human-readable title for the bundle, surfaced in org catalog and picker UIs. Null when the bundle has not been named yet. */ title: string | null; /** * Timestamp when the form was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the form was last updated (ISO-8601, UTC). */ updatedAt: string; } | null; /** * Higher-scope owner of the bundle, or null when none is attached or when it is owned locally. */ ownerScope: 'organization' | null; }; /** * Read-only execution evidence for a solver run and its grader sub-runs. */ export type ProblemRunExecutionEvidenceDto = { /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ problemRunId: string; /** * Solver execution identity and manifest evidence. */ solver: { /** * Lifecycle status of a problem run from queueing through grading to a terminal state. */ status: 'pending' | 'running' | 'grading' | 'completed' | 'failed' | 'cancelled'; /** * Agent-service run ID for the solver, when submitted. */ externalRunId: string | null; /** * Locked run-config version that governed the solver run. Null when no run-config version was recorded. */ runConfigVersionId: string | null; /** * Sanitized evidence extracted from the solver manifest. */ manifest: { /** * Whether the solver manifest could be read and parsed. */ availability: 'available' | 'missing' | 'unreadable' | 'unavailable'; /** * Status recorded by the solver manifest, if present. */ status: string | null; /** * Episode identifier recorded by the manifest. */ episodeId: string | null; /** * Episode artifact reference recorded by the manifest. */ episodeArtifactRef: string | null; }; }; /** * Persisted execution identity and evidence for each grader sub-run. */ graders: Array<{ /** * Stable grading-run identifier (UUID). One grader execution producing rubric scores for a problem run. */ gradingRunId: string; /** * Agent-service run ID for this grader sub-run, when dispatched. */ externalRunId: string | null; /** * Grading strategy used for a sub-run: rubric aggregation, LLM-based grading, a programmatic checker, fixed read-only MCP tool calls compared against an expected value, or a command executed against the solver’s persistent compute. */ strategy: 'rubric' | 'agentic' | 'programmatic' | 'mcp_tool_call' | 'compute_exec'; /** * Lifecycle status of a grading run. */ status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled'; /** * Whether the grader transcript is available to fetch. */ hasTranscript: boolean; /** * Locked run-config version that governed this grader sub-run. Null when no run-config version was recorded. */ graderRunConfigVersionId: string | null; }>; /** * Evidence about the solver-to-grader state handoff. It does not claim live restore verification. */ handoff: { /** * Solver run ID supplied as clone_from_run_id when grading is dispatched; null before solver submission. */ cloneFromRunId: string | null; /** * Whether an execution handoff fact is verified by persisted evidence. */ cloneFromRunIdStatus: 'verified' | 'missing'; /** * Whether an execution handoff fact is verified by persisted evidence. */ episodeArtifactRefStatus: 'verified' | 'missing'; }; }; /** * Array of problem-run output files with signed download URLs. */ export type ProblemRunFileWithDownloadUrlListDto = Array<{ /** * Stable problem-run-file association identifier (UUID). Outputs produced by a single problem run. */ id: string; /** * Problem run this output file was produced by. */ problemRunId: string; /** * Underlying file storing the output bytes. */ fileId: string; /** * Problem-run files carry persisted solver or grader outputs. */ type: 'output'; /** * Timestamp when the output file was recorded (ISO-8601, UTC). */ createdAt: string; /** * Original filename to surface to download clients. */ filename: string; /** * Path of the file relative to the run's output directory (e.g. core/report.md). Null for files recorded before paths were captured. */ path: string | null; /** * Signed download URL for the output file contents. */ downloadUrl: string; }>; /** * A single solver attempt against one problem version, with its grading outcome. */ export type ProblemRunResponseDto = { /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ id: string; /** * Legacy job that launched this run. Null for jobs-v2, interactive, and evaluation runs. */ jobId: string | null; /** * User-supplied display name for the run. Null for unnamed runs such as Taiga imports, interactive single runs, and evaluation-spawned runs. */ runName: string | null; /** * Identifier shared by every run submitted in the same batch. Null for standalone runs such as interactive single runs, single-attempt reruns, and Taiga imports. */ batchId: string | null; /** * jobs_v2 id of the leaf job that produced this run, used to key the cancel action. Null when no v2 job is linked. */ jobV2Id: string | null; /** * jobs_v2 id of the top job of the tree that produced this run. Null when the run has no linked job or its tree predates the pointer. */ topJobId: string | null; /** * Job type of the top job of this run's tree, which decides whether the tree is this submission alone or a larger piece of work. Null whenever the top job is unknown. */ topJobType: string | null; /** * One environment the top job is linked to, used to build an environment-scoped link to it. Null when the top job is unknown or has no environment link. */ topJobEnvironmentId: string | null; /** * Stable problem identifier (UUID). */ problemId: string; /** * Specific problem version exercised by the run. Null for legacy runs that predate versioning. */ problemVersionId: string | null; /** * Current lifecycle status of the run. */ status: 'pending' | 'running' | 'grading' | 'completed' | 'failed' | 'cancelled'; /** * One-based attempt number within the parent job for this problem. */ attemptNumber: number; /** * Position in the pending queue when applicable. Null once the run has started. */ queuePosition: number | null; /** * Final prompt handed to the solver. Null for runs that omit a prompt. */ prompt: string | null; /** * Wall-clock duration of the solver execution in milliseconds. Null until the run completes. */ executionTimeMs: number | null; /** * Aggregated final score after grading. Null until grading completes. */ finalScore: number | null; /** * Error detail if the run failed. Null on success or while still running. */ errorMessage: string | null; /** * Solver model used for this run. Null when no model was bound. */ apiModelName: string | null; /** * Grader model explicitly pinned for this run, or null when the model comes from the resolved grader run config or grading uses no model. */ gradingModelName: string | null; /** * Number of solver turns observed during the run. Null until the run completes. */ turnsCount: number | null; /** * Timestamp when the run row was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when solver execution began (ISO-8601, UTC). Null until the run starts. */ startedAt: string | null; /** * Timestamp when the run reached a terminal status (ISO-8601, UTC). Null while in-flight. */ completedAt: string | null; /** * Inlined solver transcript when small enough to embed. Null when stored separately. */ transcript: string | null; /** * Origin of the run: a queued batch job (job), an evaluation comparison run (evaluation), or a legacy interactive origin (interactive, interactive_local_docker) retained for historical rows. Null for rows that predate source tracking or were imported from Taiga. */ source: 'job' | 'interactive' | 'interactive_local_docker' | 'evaluation' | null; /** * Orchestration source that created the run: 'taiga' for a Taiga import, 'v2' for jobs-v2, or null for native legacy-jobs runs. */ provenance: 'taiga' | 'v2' | null; /** * Whether this run retains an agent-service solver workspace that can be reused for re-grading. Absent responses are treated as unavailable. */ hasRetainedSolverRun?: boolean; /** * Timestamp when grading finished (ISO-8601, UTC). Null until grading completes. */ gradedAt: string | null; /** * Error detail from grading if it failed. Null on success or while still running. */ gradingError: string | null; /** * Aggregated grader justification text. Null until grading completes. */ gradingJustification: string | null; /** * Number of re-grades represented by the run’s live grade-history snapshots. Absent responses are treated as zero. */ regradeCount?: number; /** * Grading configuration used for this run. Null for runs that ran without a grading config. */ gradingConfig: GradingConfig | null; /** * Run-config-version that drove the solver, captured at INSERT time. Null for legacy runs or runs without a binding. */ solverRunConfigVersionId: string | null; /** * Display name of the run-config that drove the solver. Non-null whenever a solver run-config version was captured. */ solverRunConfigName: string | null; /** * Version number (1-based) of the solver run-config-version. Non-null whenever a solver run-config version was captured. */ solverRunConfigVersionNumber: number | null; /** * Representative grader run-config-version captured from grading sub-runs. Null when no qualifying grader audit exists. */ graderRunConfigVersionId: string | null; /** * Display name of the representative grader run-config. Non-null whenever a representative grader run-config version was captured. */ graderRunConfigName: string | null; /** * Version number (1-based) of the representative grader run-config-version. Non-null whenever a representative grader run-config version was captured. */ graderRunConfigVersionNumber: number | null; /** * True when output-file ingestion hit a cap (file count, root file count, per-file bytes, total bytes, depth, or directory count) or lost files to a partial-listing/signing failure, and stored only a subset of the files the run produced. */ outputFilesTruncated: boolean; /** * Number of output files observed before ingestion stopped — a lower bound when truncated. Null for runs recorded before this was tracked. */ outputFilesListedCount: number | null; }; /** * Array of problem runs. */ export type ProblemRunResponseListDto = Array<{ /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ id: string; /** * Legacy job that launched this run. Null for jobs-v2, interactive, and evaluation runs. */ jobId: string | null; /** * User-supplied display name for the run. Null for unnamed runs such as Taiga imports, interactive single runs, and evaluation-spawned runs. */ runName: string | null; /** * Identifier shared by every run submitted in the same batch. Null for standalone runs such as interactive single runs, single-attempt reruns, and Taiga imports. */ batchId: string | null; /** * jobs_v2 id of the leaf job that produced this run, used to key the cancel action. Null when no v2 job is linked. */ jobV2Id: string | null; /** * jobs_v2 id of the top job of the tree that produced this run. Null when the run has no linked job or its tree predates the pointer. */ topJobId: string | null; /** * Job type of the top job of this run's tree, which decides whether the tree is this submission alone or a larger piece of work. Null whenever the top job is unknown. */ topJobType: string | null; /** * One environment the top job is linked to, used to build an environment-scoped link to it. Null when the top job is unknown or has no environment link. */ topJobEnvironmentId: string | null; /** * Stable problem identifier (UUID). */ problemId: string; /** * Specific problem version exercised by the run. Null for legacy runs that predate versioning. */ problemVersionId: string | null; /** * Current lifecycle status of the run. */ status: 'pending' | 'running' | 'grading' | 'completed' | 'failed' | 'cancelled'; /** * One-based attempt number within the parent job for this problem. */ attemptNumber: number; /** * Position in the pending queue when applicable. Null once the run has started. */ queuePosition: number | null; /** * Final prompt handed to the solver. Null for runs that omit a prompt. */ prompt: string | null; /** * Wall-clock duration of the solver execution in milliseconds. Null until the run completes. */ executionTimeMs: number | null; /** * Aggregated final score after grading. Null until grading completes. */ finalScore: number | null; /** * Error detail if the run failed. Null on success or while still running. */ errorMessage: string | null; /** * Solver model used for this run. Null when no model was bound. */ apiModelName: string | null; /** * Grader model explicitly pinned for this run, or null when the model comes from the resolved grader run config or grading uses no model. */ gradingModelName: string | null; /** * Number of solver turns observed during the run. Null until the run completes. */ turnsCount: number | null; /** * Timestamp when the run row was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when solver execution began (ISO-8601, UTC). Null until the run starts. */ startedAt: string | null; /** * Timestamp when the run reached a terminal status (ISO-8601, UTC). Null while in-flight. */ completedAt: string | null; /** * Inlined solver transcript when small enough to embed. Null when stored separately. */ transcript: string | null; /** * Origin of the run: a queued batch job (job), an evaluation comparison run (evaluation), or a legacy interactive origin (interactive, interactive_local_docker) retained for historical rows. Null for rows that predate source tracking or were imported from Taiga. */ source: 'job' | 'interactive' | 'interactive_local_docker' | 'evaluation' | null; /** * Orchestration source that created the run: 'taiga' for a Taiga import, 'v2' for jobs-v2, or null for native legacy-jobs runs. */ provenance: 'taiga' | 'v2' | null; /** * Whether this run retains an agent-service solver workspace that can be reused for re-grading. Absent responses are treated as unavailable. */ hasRetainedSolverRun?: boolean; /** * Timestamp when grading finished (ISO-8601, UTC). Null until grading completes. */ gradedAt: string | null; /** * Error detail from grading if it failed. Null on success or while still running. */ gradingError: string | null; /** * Aggregated grader justification text. Null until grading completes. */ gradingJustification: string | null; /** * Number of re-grades represented by the run’s live grade-history snapshots. Absent responses are treated as zero. */ regradeCount?: number; /** * Grading configuration used for this run. Null for runs that ran without a grading config. */ gradingConfig: GradingConfig | null; /** * Run-config-version that drove the solver, captured at INSERT time. Null for legacy runs or runs without a binding. */ solverRunConfigVersionId: string | null; /** * Display name of the run-config that drove the solver. Non-null whenever a solver run-config version was captured. */ solverRunConfigName: string | null; /** * Version number (1-based) of the solver run-config-version. Non-null whenever a solver run-config version was captured. */ solverRunConfigVersionNumber: number | null; /** * Representative grader run-config-version captured from grading sub-runs. Null when no qualifying grader audit exists. */ graderRunConfigVersionId: string | null; /** * Display name of the representative grader run-config. Non-null whenever a representative grader run-config version was captured. */ graderRunConfigName: string | null; /** * Version number (1-based) of the representative grader run-config-version. Non-null whenever a representative grader run-config version was captured. */ graderRunConfigVersionNumber: number | null; /** * True when output-file ingestion hit a cap (file count, root file count, per-file bytes, total bytes, depth, or directory count) or lost files to a partial-listing/signing failure, and stored only a subset of the files the run produced. */ outputFilesTruncated: boolean; /** * Number of output files observed before ingestion stopped — a lower bound when truncated. Null for runs recorded before this was tracked. */ outputFilesListedCount: number | null; }>; /** * Problem-run list response. Truncated flag signals an over-cap drawer view. */ export type ProblemRunResponseListEnvelopeDto = { /** * Newest-first problem runs for the requested problem. */ items: Array<{ /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ id: string; /** * Legacy job that launched this run. Null for jobs-v2, interactive, and evaluation runs. */ jobId: string | null; /** * User-supplied display name for the run. Null for unnamed runs such as Taiga imports, interactive single runs, and evaluation-spawned runs. */ runName: string | null; /** * Identifier shared by every run submitted in the same batch. Null for standalone runs such as interactive single runs, single-attempt reruns, and Taiga imports. */ batchId: string | null; /** * jobs_v2 id of the leaf job that produced this run, used to key the cancel action. Null when no v2 job is linked. */ jobV2Id: string | null; /** * jobs_v2 id of the top job of the tree that produced this run. Null when the run has no linked job or its tree predates the pointer. */ topJobId: string | null; /** * Job type of the top job of this run's tree, which decides whether the tree is this submission alone or a larger piece of work. Null whenever the top job is unknown. */ topJobType: string | null; /** * One environment the top job is linked to, used to build an environment-scoped link to it. Null when the top job is unknown or has no environment link. */ topJobEnvironmentId: string | null; /** * Stable problem identifier (UUID). */ problemId: string; /** * Specific problem version exercised by the run. Null for legacy runs that predate versioning. */ problemVersionId: string | null; /** * Current lifecycle status of the run. */ status: 'pending' | 'running' | 'grading' | 'completed' | 'failed' | 'cancelled'; /** * One-based attempt number within the parent job for this problem. */ attemptNumber: number; /** * Position in the pending queue when applicable. Null once the run has started. */ queuePosition: number | null; /** * Final prompt handed to the solver. Null for runs that omit a prompt. */ prompt: string | null; /** * Wall-clock duration of the solver execution in milliseconds. Null until the run completes. */ executionTimeMs: number | null; /** * Aggregated final score after grading. Null until grading completes. */ finalScore: number | null; /** * Error detail if the run failed. Null on success or while still running. */ errorMessage: string | null; /** * Solver model used for this run. Null when no model was bound. */ apiModelName: string | null; /** * Grader model explicitly pinned for this run, or null when the model comes from the resolved grader run config or grading uses no model. */ gradingModelName: string | null; /** * Number of solver turns observed during the run. Null until the run completes. */ turnsCount: number | null; /** * Timestamp when the run row was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when solver execution began (ISO-8601, UTC). Null until the run starts. */ startedAt: string | null; /** * Timestamp when the run reached a terminal status (ISO-8601, UTC). Null while in-flight. */ completedAt: string | null; /** * Inlined solver transcript when small enough to embed. Null when stored separately. */ transcript: string | null; /** * Origin of the run: a queued batch job (job), an evaluation comparison run (evaluation), or a legacy interactive origin (interactive, interactive_local_docker) retained for historical rows. Null for rows that predate source tracking or were imported from Taiga. */ source: 'job' | 'interactive' | 'interactive_local_docker' | 'evaluation' | null; /** * Orchestration source that created the run: 'taiga' for a Taiga import, 'v2' for jobs-v2, or null for native legacy-jobs runs. */ provenance: 'taiga' | 'v2' | null; /** * Whether this run retains an agent-service solver workspace that can be reused for re-grading. Absent responses are treated as unavailable. */ hasRetainedSolverRun?: boolean; /** * Timestamp when grading finished (ISO-8601, UTC). Null until grading completes. */ gradedAt: string | null; /** * Error detail from grading if it failed. Null on success or while still running. */ gradingError: string | null; /** * Aggregated grader justification text. Null until grading completes. */ gradingJustification: string | null; /** * Number of re-grades represented by the run’s live grade-history snapshots. Absent responses are treated as zero. */ regradeCount?: number; /** * Grading configuration used for this run. Null for runs that ran without a grading config. */ gradingConfig: GradingConfig | null; /** * Run-config-version that drove the solver, captured at INSERT time. Null for legacy runs or runs without a binding. */ solverRunConfigVersionId: string | null; /** * Display name of the run-config that drove the solver. Non-null whenever a solver run-config version was captured. */ solverRunConfigName: string | null; /** * Version number (1-based) of the solver run-config-version. Non-null whenever a solver run-config version was captured. */ solverRunConfigVersionNumber: number | null; /** * Representative grader run-config-version captured from grading sub-runs. Null when no qualifying grader audit exists. */ graderRunConfigVersionId: string | null; /** * Display name of the representative grader run-config. Non-null whenever a representative grader run-config version was captured. */ graderRunConfigName: string | null; /** * Version number (1-based) of the representative grader run-config-version. Non-null whenever a representative grader run-config version was captured. */ graderRunConfigVersionNumber: number | null; /** * True when output-file ingestion hit a cap (file count, root file count, per-file bytes, total bytes, depth, or directory count) or lost files to a partial-listing/signing failure, and stored only a subset of the files the run produced. */ outputFilesTruncated: boolean; /** * Number of output files observed before ingestion stopped — a lower bound when truncated. Null for runs recorded before this was tracked. */ outputFilesListedCount: number | null; }>; /** * True when the requested problem has more runs than the hard cap returns. */ truncated: boolean; }; /** * Cost and consumed-vs-requested resources for every agent-service run behind a problem run. */ export type ProblemRunUsageResponseDto = { /** * One row per agent-service run attributed to this problem run: the solver first, then graders. */ items: Array<{ /** * Which agent-service run this row bills: 'solver' for the attempt itself, or a grading type such as 'agentic_grading'. */ runType: string; /** * Model the run used, when known. */ modelName: string | null; /** * USD spent on model calls. Null when not reported. */ agentCostUsd: number | null; /** * USD spent on compute. Null when not reported. */ computeCostUsd: number | null; /** * Agent plus compute cost in USD. Null when neither leg was reported. */ totalCostUsd: number | null; /** * Uncached input tokens. Null when not reported. */ inputTokens: number | null; /** * Output tokens. Null when not reported. */ outputTokens: number | null; /** * Input tokens served from prompt cache. Null when not reported. */ cacheReadInputTokens: number | null; /** * Input tokens written to prompt cache. Null when not reported. */ cacheCreationInputTokens: number | null; /** * Resources the run consumed. Null for runs whose runner predates resource sampling or whose container could not be read. */ resourceUsage: { /** * Sampling scope reported by the runner, e.g. 'cgroup' for the run's own container. */ scope: string; /** * Number of samples folded into this summary. */ sampleCount: number; /** * Wall-clock seconds the samples cover — the workload phase, not queueing. */ sampledSeconds: number; /** * CPU consumed against what was requested. */ cpu: { /** * Interval-weighted mean CPU in millicores; 1000 is one core fully busy. */ avgMillicores: number; /** * Highest sampled CPU in millicores. */ peakMillicores: number; /** * CPU the container was granted (its cgroup limit) — the requested amount. Null when the runner could not read a limit. */ capacityMillicores: number | null; /** * Total CPU time consumed: the integral of cores over the sampled interval. */ coreSeconds: number; }; /** * Memory consumed against what was requested. */ memory: { /** * Interval-weighted mean working-set memory in bytes. */ avgWorkingSetBytes: number; /** * Highest sampled working-set memory in bytes. */ peakWorkingSetBytes: number; /** * Memory the container was granted (its cgroup limit) — the requested amount. Null when the runner could not read a limit. */ capacityBytes: number | null; }; /** * GPU utilization and memory. Null when the run had no GPU. */ gpu: { /** * GPUs visible to the container. */ count: number; /** * Interval-weighted mean GPU utilization, 0-100. */ avgUtilizationPercent: number; /** * Highest sampled GPU utilization, 0-100. */ peakUtilizationPercent: number; /** * Highest sampled GPU memory in use. */ peakMemoryUsedBytes: number; /** * Total GPU memory across the visible devices. */ memoryTotalBytes: number; } | null; /** * Workspace disk usage. Null when the runner could not read the filesystem. */ disk: { /** * Highest sampled workspace disk usage in bytes. */ peakUsedBytes: number; /** * Workspace disk capacity in bytes. */ capacityBytes: number; } | null; } | null; }>; /** * Sum of every row that reported a cost. Null when no row has cost data yet. */ totalCostUsd: number | null; }; /** * A credential scoped to a single problem for outbound requests to a specific upstream. */ export type ProblemSecretDto = { /** * Stable problem-secret identifier (UUID). */ id: string; /** * Stable problem identifier (UUID). */ problemId: string; /** * Human-readable name uniquely identifying the secret within the problem. */ name: string; /** * Upstream host the secret authenticates against. Null on legacy pre-migration bindings. */ upstreamHost: string | null; /** * HTTP header name used to inject the secret value upstream. Null on legacy pre-migration bindings. */ headerName: string | null; /** * Timestamp when the problem secret was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the problem secret was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Array of secrets scoped to a single problem. */ export type ProblemSecretListDto = Array<{ /** * Stable problem-secret identifier (UUID). */ id: string; /** * Stable problem identifier (UUID). */ problemId: string; /** * Human-readable name uniquely identifying the secret within the problem. */ name: string; /** * Upstream host the secret authenticates against. Null on legacy pre-migration bindings. */ upstreamHost: string | null; /** * HTTP header name used to inject the secret value upstream. Null on legacy pre-migration bindings. */ headerName: string | null; /** * Timestamp when the problem secret was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the problem secret was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * Response payload for the picker-summary endpoint listing problems in an environment. */ export type ProblemSummariesResponseDto = { /** * Problem summaries for the current page, bounded by the requested limit. */ items: Array<{ /** * Stable problem identifier (UUID). */ id: string; /** * Caller-provided external identifier for this problem. Null when no external system tracks it. */ externalId: string | null; /** * Human-readable problem title shown in picker rows. */ title: string | null; /** * True when the problem has at least one locked (immutable) version. */ hasLockedVersion: boolean; }>; /** * True when more problems match the request than the requested limit returned (limit < total); the client should surface a truncation banner or paginate. */ truncated: boolean; /** * Total problems matching the request filters, independent of the requested limit. */ total: number; }; /** * A versioned snapshot of a problem (prompt, harness, grader, files). Versions move through draft (editable) and locked (immutable) lifecycle states. */ export type ProblemVersionDto = { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ id: string; /** * Problem this version belongs to. */ problemId: string; /** * Environment the parent problem belongs to. Denormalized for scope checks. */ environmentId: string; /** * Sequential version label assigned at creation (e.g. "v1", "v2"). */ version: string; /** * Task prompt shown to the agent at run start. */ prompt: string; /** * Container image reference for the agent runtime (e.g. "python:3.12"). Null falls back to the platform default. */ containerImage: string | null; /** * CPU/memory tier for the run container. Null falls back to the platform default. */ containerSize: 'small' | 'medium' | 'large' | 'xlarge' | 'xlarge-highmem' | 'xxlarge' | null; /** * Optional GPU type attached to the run. Null means no GPU is attached. */ gpuType: 'T4' | 'L4' | 'A10G' | 'A100' | 'H100' | null; /** * Wall-clock timeout for the agent run, in seconds. Null falls back to the platform default. */ timeoutSeconds: number | null; /** * Sparse map of tool name to seconds. Only tools with explicit overrides are present. Null means all defaults apply. */ toolTimeouts: { [key: string]: number; } | null; /** * Maximum agent turns allowed for the run. Null means unlimited, subject to the wall-clock timeout. */ maxTurns: number | null; /** * Grading strategy and grader-specific configuration applied to runs of this problem version. */ gradingConfig: GradingConfig; /** * When true, a single agentic judge scores all rubric criteria together. When false, each criterion is judged independently. */ singleAgentRubric: boolean; /** * Run the container privileged (root on the host node). Only takes effect on the GKE launcher; requires unrestricted outbound networking because privileged containers bypass egress enforcement. */ privileged: boolean; /** * Markdown template that overrides the environment-wide global-issue template for issues filed against this version. Null inherits the environment template. */ issueTemplate: string | null; /** * Locked run-config version bound for solver invocations on this problem version. Null falls back to the environment-level binding. */ solverRunConfigVersionId: string | null; /** * Locked run-config version bound for grader invocations on this problem version. Null falls back to the environment-level binding. */ graderRunConfigVersionId: string | null; /** * Locked run-config version bound for QA invocations on this problem version. Null falls back to the environment-level binding. */ qaRunConfigVersionId: string | null; /** * Locked run-config version bound for synthesizer invocations on this problem version. Null falls back to the environment-level binding. */ synthesizerRunConfigVersionId: string | null; /** * Raw worldsim authoring payload persisted at lock. Each run materializes the per-version solver run config from it; also used for export/import and re-authoring. Null when the version has no worldsim config. */ worldsimConfig: { /** * ISO-8601 simulated wall-clock time for the run (WORLDSIM_SIMULATED_TIME). Null uses real time. */ simulatedTime: string | null; /** * Selected MCP service keys. Unless inheritSolverMcpTools is true, their tools form the mcp-tools.yaml allowlist, and an empty selection allows no tools. */ mcpServers: Array; /** * When true, each run keeps the resolved solver's own MCP tool allowlist (the tools file its WORLDSIM_MCP_TOOLS_FILE names, set on the run config or baked into the runner image, or every tool when it has none) and mcpServers is ignored. */ inheritSolverMcpTools?: boolean; /** * Ordered list of startup MCP tool calls, as an opaque JSON string (a StartupCall[]). Duplicate tools are allowed (e.g. create five users). The calls run through the run's MCP tool allowlist, so unless inheritSolverMcpTools is true each call's tool must come from a server in mcpServers. */ worldEffects: string; /** * Runtime environment type (mcp or computer). Maps to CUA_ENVIRONMENT_TYPE. */ envType?: 'mcp' | 'computer'; /** * Computer-use desktop flavor (chrome or full_desktop). Only meaningful when envType is "computer". Maps to CUA_DESKTOP_TYPE. */ desktopType?: 'chrome' | 'full_desktop'; /** * Whether the run may call the API. Maps to CUA_API_ALLOWED. */ apiAllowed?: boolean; /** * Whether the run may use the browser API. Maps to CUA_ALLOW_BROWSER_API. */ allowBrowserApi?: boolean; /** * Free-text system instructions for the Worldsim harness in MCP or Computer environments. Maps to CUA_SYSTEM_INSTRUCTIONS. Supersedes cuaSystemInstructions. */ systemInstructions?: string; /** * Deprecated: use systemInstructions. Retained for locked-version compatibility. Maps to CUA_SYSTEM_INSTRUCTIONS. * * @deprecated */ cuaSystemInstructions?: string; } | null; /** * Timestamp when this version was locked and made immutable (ISO-8601, UTC). Null while the version is still a draft. */ lockedAt: string | null; /** * Timestamp when the problem version was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the problem version was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Tool allowlist for the agent. Omitted means all known tools are allowed; an empty list means no tools are allowed. */ tools?: Array<'Bash' | 'Read' | 'Write' | 'Edit' | 'Glob' | 'Grep' | 'NotebookEdit' | 'WebFetch' | 'WebSearch' | 'TodoWrite' | 'Task' | 'TaskOutput' | 'TaskStop' | 'EnterPlanMode' | 'ExitPlanMode' | 'AskUserQuestion' | 'Skill' | 'ToolSearch'>; /** * Outbound network allowlist. Omitted uses the platform default, the unrestricted sentinel allows everything, and a non-empty list restricts access to those domains. */ allowedDomains?: [ '*' ] | Array; /** * Package managers pre-installed in the container. An empty list means none are provisioned. */ installedPackageManagers: Array<'pip' | 'uv' | 'npm' | 'cargo' | 'apt'>; }; /** * An attachment of an environment-scoped file to a specific problem version, with its role and tags. */ export type ProblemVersionFileDto = { /** * Stable problem-version-file association identifier (UUID). */ id: string; /** * Problem version this file is attached to. */ problemVersionId: string; /** * Underlying file that this attachment points at. */ fileId: string; /** * Role of the attached file: solver-visible input, reference material, or grader-only assets such as expected outputs. */ type: 'problem' | 'supporting' | 'grader_support'; /** * Timestamp when the file was attached to the problem version (ISO-8601, UTC). */ createdAt: string; /** * Materialized file record, included so consumers do not need a second fetch. */ file: { /** * Stable file identifier (UUID). Files are problem-scoped uploads. */ id: string; /** * Signed download URL for the file contents. */ url: string; /** * Original filename of the upload as provided by the user. */ filename: string; /** * Size of the file in bytes; null when the size has not yet been recorded. */ sizeBytes: number | null; /** * Timestamp when the file was uploaded (ISO-8601, UTC). */ createdAt: string; /** * User who uploaded the file; null for system-uploaded or pre-attribution files. */ createdById: string | null; }; /** * When true, the file is mounted inside the grader container at the configured mount path as a gold-standard reference. */ isGoldStandard: boolean; /** * Container mount path for the gold-standard reference. Null when the file is not gold-standard. */ goldStandardMountPath: string | null; /** * User-defined tags that drive format-specific placement in exports. */ tags: Array; }; /** * Array of files attached to a problem version. */ export type ProblemVersionFileListDto = Array<{ /** * Stable problem-version-file association identifier (UUID). */ id: string; /** * Problem version this file is attached to. */ problemVersionId: string; /** * Underlying file that this attachment points at. */ fileId: string; /** * Role of the attached file: solver-visible input, reference material, or grader-only assets such as expected outputs. */ type: 'problem' | 'supporting' | 'grader_support'; /** * Timestamp when the file was attached to the problem version (ISO-8601, UTC). */ createdAt: string; /** * Materialized file record, included so consumers do not need a second fetch. */ file: { /** * Stable file identifier (UUID). Files are problem-scoped uploads. */ id: string; /** * Signed download URL for the file contents. */ url: string; /** * Original filename of the upload as provided by the user. */ filename: string; /** * Size of the file in bytes; null when the size has not yet been recorded. */ sizeBytes: number | null; /** * Timestamp when the file was uploaded (ISO-8601, UTC). */ createdAt: string; /** * User who uploaded the file; null for system-uploaded or pre-attribution files. */ createdById: string | null; }; /** * When true, the file is mounted inside the grader container at the configured mount path as a gold-standard reference. */ isGoldStandard: boolean; /** * Container mount path for the gold-standard reference. Null when the file is not gold-standard. */ goldStandardMountPath: string | null; /** * User-defined tags that drive format-specific placement in exports. */ tags: Array; }>; /** * Array of problem versions. */ export type ProblemVersionListDto = Array<{ /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ id: string; /** * Problem this version belongs to. */ problemId: string; /** * Environment the parent problem belongs to. Denormalized for scope checks. */ environmentId: string; /** * Sequential version label assigned at creation (e.g. "v1", "v2"). */ version: string; /** * Task prompt shown to the agent at run start. */ prompt: string; /** * Container image reference for the agent runtime (e.g. "python:3.12"). Null falls back to the platform default. */ containerImage: string | null; /** * CPU/memory tier for the run container. Null falls back to the platform default. */ containerSize: 'small' | 'medium' | 'large' | 'xlarge' | 'xlarge-highmem' | 'xxlarge' | null; /** * Optional GPU type attached to the run. Null means no GPU is attached. */ gpuType: 'T4' | 'L4' | 'A10G' | 'A100' | 'H100' | null; /** * Wall-clock timeout for the agent run, in seconds. Null falls back to the platform default. */ timeoutSeconds: number | null; /** * Sparse map of tool name to seconds. Only tools with explicit overrides are present. Null means all defaults apply. */ toolTimeouts: { [key: string]: number; } | null; /** * Maximum agent turns allowed for the run. Null means unlimited, subject to the wall-clock timeout. */ maxTurns: number | null; /** * Grading strategy and grader-specific configuration applied to runs of this problem version. */ gradingConfig: GradingConfig; /** * When true, a single agentic judge scores all rubric criteria together. When false, each criterion is judged independently. */ singleAgentRubric: boolean; /** * Run the container privileged (root on the host node). Only takes effect on the GKE launcher; requires unrestricted outbound networking because privileged containers bypass egress enforcement. */ privileged: boolean; /** * Markdown template that overrides the environment-wide global-issue template for issues filed against this version. Null inherits the environment template. */ issueTemplate: string | null; /** * Locked run-config version bound for solver invocations on this problem version. Null falls back to the environment-level binding. */ solverRunConfigVersionId: string | null; /** * Locked run-config version bound for grader invocations on this problem version. Null falls back to the environment-level binding. */ graderRunConfigVersionId: string | null; /** * Locked run-config version bound for QA invocations on this problem version. Null falls back to the environment-level binding. */ qaRunConfigVersionId: string | null; /** * Locked run-config version bound for synthesizer invocations on this problem version. Null falls back to the environment-level binding. */ synthesizerRunConfigVersionId: string | null; /** * Raw worldsim authoring payload persisted at lock. Each run materializes the per-version solver run config from it; also used for export/import and re-authoring. Null when the version has no worldsim config. */ worldsimConfig: { /** * ISO-8601 simulated wall-clock time for the run (WORLDSIM_SIMULATED_TIME). Null uses real time. */ simulatedTime: string | null; /** * Selected MCP service keys. Unless inheritSolverMcpTools is true, their tools form the mcp-tools.yaml allowlist, and an empty selection allows no tools. */ mcpServers: Array; /** * When true, each run keeps the resolved solver's own MCP tool allowlist (the tools file its WORLDSIM_MCP_TOOLS_FILE names, set on the run config or baked into the runner image, or every tool when it has none) and mcpServers is ignored. */ inheritSolverMcpTools?: boolean; /** * Ordered list of startup MCP tool calls, as an opaque JSON string (a StartupCall[]). Duplicate tools are allowed (e.g. create five users). The calls run through the run's MCP tool allowlist, so unless inheritSolverMcpTools is true each call's tool must come from a server in mcpServers. */ worldEffects: string; /** * Runtime environment type (mcp or computer). Maps to CUA_ENVIRONMENT_TYPE. */ envType?: 'mcp' | 'computer'; /** * Computer-use desktop flavor (chrome or full_desktop). Only meaningful when envType is "computer". Maps to CUA_DESKTOP_TYPE. */ desktopType?: 'chrome' | 'full_desktop'; /** * Whether the run may call the API. Maps to CUA_API_ALLOWED. */ apiAllowed?: boolean; /** * Whether the run may use the browser API. Maps to CUA_ALLOW_BROWSER_API. */ allowBrowserApi?: boolean; /** * Free-text system instructions for the Worldsim harness in MCP or Computer environments. Maps to CUA_SYSTEM_INSTRUCTIONS. Supersedes cuaSystemInstructions. */ systemInstructions?: string; /** * Deprecated: use systemInstructions. Retained for locked-version compatibility. Maps to CUA_SYSTEM_INSTRUCTIONS. * * @deprecated */ cuaSystemInstructions?: string; } | null; /** * Timestamp when this version was locked and made immutable (ISO-8601, UTC). Null while the version is still a draft. */ lockedAt: string | null; /** * Timestamp when the problem version was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the problem version was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Tool allowlist for the agent. Omitted means all known tools are allowed; an empty list means no tools are allowed. */ tools?: Array<'Bash' | 'Read' | 'Write' | 'Edit' | 'Glob' | 'Grep' | 'NotebookEdit' | 'WebFetch' | 'WebSearch' | 'TodoWrite' | 'Task' | 'TaskOutput' | 'TaskStop' | 'EnterPlanMode' | 'ExitPlanMode' | 'AskUserQuestion' | 'Skill' | 'ToolSearch'>; /** * Outbound network allowlist. Omitted uses the platform default, the unrestricted sentinel allows everything, and a non-empty list restricts access to those domains. */ allowedDomains?: [ '*' ] | Array; /** * Package managers pre-installed in the container. An empty list means none are provisioned. */ installedPackageManagers: Array<'pip' | 'uv' | 'npm' | 'cargo' | 'apt'>; }>; /** * A credential scoped to a single problem version for outbound requests to a specific upstream. */ export type ProblemVersionSecretDto = { /** * Stable problem-version-secret identifier (UUID). */ id: string; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Human-readable name uniquely identifying the secret within the problem version. */ name: string; /** * Upstream host the secret authenticates against. Null on legacy pre-migration bindings. */ upstreamHost: string | null; /** * HTTP header name used to inject the secret value upstream. Null on legacy pre-migration bindings. */ headerName: string | null; /** * Timestamp when the problem-version secret was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the problem-version secret was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Array of secrets scoped to a single problem version. */ export type ProblemVersionSecretListDto = Array<{ /** * Stable problem-version-secret identifier (UUID). */ id: string; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Human-readable name uniquely identifying the secret within the problem version. */ name: string; /** * Upstream host the secret authenticates against. Null on legacy pre-migration bindings. */ upstreamHost: string | null; /** * HTTP header name used to inject the secret value upstream. Null on legacy pre-migration bindings. */ headerName: string | null; /** * Timestamp when the problem-version secret was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the problem-version secret was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * Applied tags grouped by problem version, one entry per version of the problem. */ export type ProblemVersionTagsListDto = Array<{ /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Tags currently applied to this problem version. */ tags: Array<{ /** * Stable tag identifier (UUID). A tag is a reusable, environment-scoped (or platform-default) label. */ id: string; /** * Environment that owns this tag, or null for a platform-default tag available to every environment. */ environmentId: string | null; /** * Human-readable tag label (e.g. "FINAL"). Trimmed; unique within its scope. */ label: string; /** * Badge color as a 6-digit hex string (e.g. "#22c55e"). */ color: string; /** * Optional human-readable description of what the tag signifies. */ description: string | null; /** * User who created the tag; null for seeded platform-default tags. */ createdByUserId: string | null; /** * Timestamp when the tag was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the tag was last updated (ISO-8601, UTC). */ updatedAt: string; }>; }>; /** * A public-catalog entry with full audit-timestamp metadata. */ export type PublicEnvironmentDto = { /** * Stable public-environment identifier (UUID). */ id: string; /** * Underlying environment this public listing surfaces. */ environmentId: string; /** * Display name of the environment shown in the public catalog. */ environmentName: string; /** * Marketing-friendly description shown in the public catalog. */ description: string; /** * Cover image URL displayed alongside the public listing. */ imageUrl: string; /** * True when this environment is currently featured on the public landing page. */ isFeatured: boolean; /** * Timestamp when the environment was most recently featured (ISO-8601, UTC). Null if never featured. */ featuredAt: string | null; /** * Timestamp when the public-environment record was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the public-environment record was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Output filename resolved as a thumbnail on each problem card, or null when preview is not configured. */ previewFilename: string | null; }; /** * Array of public environment marketplace cards. */ export type PublicEnvironmentListItemListDto = Array<{ /** * Stable public-environment identifier (UUID). */ id: string; /** * Underlying environment this public listing surfaces. */ environmentId: string; /** * Display name of the environment shown in the public catalog. */ environmentName: string; /** * Marketing-friendly description shown in the public catalog. */ description: string; /** * Cover image URL displayed alongside the public listing. */ imageUrl: string; /** * True when this environment is currently featured on the public landing page. */ isFeatured: boolean; }>; /** * Cursor-paginated page of public environment marketplace cards. */ export type PublicEnvironmentListItemPageDto = { /** * Items in this page, ordered per the requested sort. */ items: Array<{ /** * Stable public-environment identifier (UUID). */ id: string; /** * Underlying environment this public listing surfaces. */ environmentId: string; /** * Display name of the environment shown in the public catalog. */ environmentName: string; /** * Marketing-friendly description shown in the public catalog. */ description: string; /** * Cover image URL displayed alongside the public listing. */ imageUrl: string; /** * True when this environment is currently featured on the public landing page. */ isFeatured: boolean; }>; /** * Cursor for fetching the next page, or null when this is the last page. */ nextCursor: string | null; /** * Total number of items matching the filter across all pages. */ total: number; }; /** * Read-only problem detail exposed to unauthenticated public-catalogue visitors. */ export type PublicProblemDetailDto = { /** * The problem, confirmed to belong to the public environment. */ problem: { /** * Stable problem identifier (UUID). */ id: string; /** * Environment this problem belongs to. */ environmentId: string; /** * Caller-provided external identifier for this problem. Null when no external system tracks it. */ externalId: string | null; /** * Human-readable problem title shown in lists and detail views. */ title?: string | null; /** * Free-text description of the problem. Null when unset. */ description?: string | null; /** * Problem domain (e.g. the subject area the task belongs to). Null when unset. */ domain?: string | null; /** * True for environment-scoped seed problems used as templates; false for regular problems. Templates are hidden from public lists and rejected by mutation routes. */ isTemplate: boolean; /** * Timestamp when the problem was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the problem was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Locked versions of the problem, ordered oldest-first by version number. Draft (unlocked) versions are excluded. */ versions: Array<{ /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ id: string; /** * Sequential version label assigned at creation (e.g. "v1", "v2"). */ version: string; /** * Task prompt shown to the agent at run start. */ prompt: string; /** * Timestamp when the version was locked (ISO-8601, UTC). Always set — only locked versions are exposed publicly. */ lockedAt: string; }>; /** * Rubric criteria for each returned version, keyed by problem-version id. */ rubricsByVersionId: { [key: string]: Array<{ /** * Stable rubric identifier (UUID). Rubrics are versioned grading specifications attached to a problem version. */ id: string; /** * Human-readable description of what this rubric measures. */ criterion: string; /** * Relative weight when aggregating rubric scores. */ weight: number; /** * True when the rubric should be evaluated by the LLM grader. */ useGraderSupport: boolean; /** * Markdown template that overrides the env-wide rubric issue template. Null inherits the env template. */ issueTemplate: string | null; }>; }; /** * Execution summaries for the returned locked versions. */ runs: { /** * Newest-first runs associated with the locked versions returned in this problem detail. */ items: Array<{ /** * Identifier of this public run summary. */ id: string; /** * User-supplied run name. Null when the run was not named. */ runName: string | null; /** * Locked problem version exercised by this public run. */ problemVersionId: string; /** * Current lifecycle status of the run. */ status: 'pending' | 'running' | 'grading' | 'completed' | 'failed' | 'cancelled'; /** * Attempt number recorded for the run. Historical imports preserve their source value. */ attemptNumber: number; /** * Recorded solver execution time in milliseconds. Null when unavailable; historical imports preserve their source value. */ executionTimeMs: number | null; /** * Aggregated grader score. Null until grading completes; some grading schemes may produce negative values. */ finalScore: number | null; /** * Solver model used for this run. Null when no model was recorded. */ apiModelName: string | null; /** * Recorded solver turn count. Null when unavailable; historical imports preserve their source value. */ turnsCount: number | null; /** * Timestamp when the run was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when solver execution began (ISO-8601, UTC). Null until started. */ startedAt: string | null; /** * Timestamp when the run completed (ISO-8601, UTC). Null while in flight. */ completedAt: string | null; }>; /** * True when older runs were omitted because the problem exceeded the history cap. */ truncated: boolean; }; }; /** * Request body for publishing an environment to the public marketplace. */ export type PublishBodyDto = { /** * Marketing-facing description shown on the public environment listing. */ description: string; /** * Public URL of the cover image displayed on the marketplace card. */ imageUrl: string; }; /** * File attached to a QA config and mounted into the QA container at run time. */ export type QaConfigFileResponseDto = { /** * Stable identifier of the QA-config file attachment. */ id: string; /** * Stable file identifier (UUID). Files are problem-scoped uploads. */ fileId: string; /** * Original filename of the attached file. */ filename: string; /** * Absolute path inside the QA container where this file is mounted. */ mountPath: string; /** * Size of the file in bytes, or null if the size is unknown. */ sizeBytes: number | null; /** * Timestamp when the file was attached to the QA config (ISO-8601, UTC). */ createdAt: string; }; /** * Array of QA configurations. */ export type QaConfigResponseArrayDto = Array<{ /** * Stable QA-config identifier (UUID). */ id: string; /** * Stable environment identifier (UUID). */ environmentId: string; /** * Display name of the QA config. */ name: string; /** * Free-form description of the QA config. */ description: string | null; /** * Container image reference used by this QA config; null when an image identifier resolves the image instead. */ containerImage: string | null; /** * Image registry identifier of the QA container; null when a container image reference is set instead. */ imageId: string | null; /** * CPU allocation in milli-CPUs. */ cpuMilli: number | null; /** * Memory allocation in MiB. */ memoryMib: number | null; /** * Hard timeout in seconds for the QA job. */ timeoutSeconds: number | null; /** * Accelerator configuration, or null when no accelerator is attached. */ accelerator: { /** * Hardware accelerator family: graphics processor or tensor processor. */ type: 'gpu' | 'tpu'; /** * Accelerator model name as recognized by the launcher. */ name: string; /** * Number of accelerators to attach to the job container; defaults to 1 when unset. */ count?: number; } | null; /** * Environment variables injected into the QA container. */ envVars: { [key: string]: string; } | null; /** * Command-line arguments passed to the QA container entrypoint; empty when none are configured. */ args: Array; /** * Free-form parameters serialized to a parameters JSON file for the container. */ parameters: { [key: string]: unknown; } | null; /** * Launcher backend used to execute this QA config. */ launcherType: string | null; /** * Maximum number of automatic retries on failure. Applies to single-container QA kinds (standard, grading-oracle, metrics-validator), where a failed or unusable attempt is re-dispatched until the budget is spent. Ignored by the composite kinds (gtGradingOracle, standard-composite), which always run a single attempt. */ maxRetries: number; /** * Reference to a built-in QA template, or null for user-defined configs. */ builtInKey: string | null; /** * Locked run-config-version bound to this QA config, or null when no binding exists. */ runConfigVersionId: string | null; /** * Files attached to this QA config and mounted into the container at run time. */ files: Array<{ /** * Stable identifier of the QA-config file attachment. */ id: string; /** * Stable file identifier (UUID). Files are problem-scoped uploads. */ fileId: string; /** * Original filename of the attached file. */ filename: string; /** * Absolute path inside the QA container where this file is mounted. */ mountPath: string; /** * Size of the file in bytes, or null if the size is unknown. */ sizeBytes: number | null; /** * Timestamp when the file was attached to the QA config (ISO-8601, UTC). */ createdAt: string; }>; /** * Timestamp when the QA config was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the QA config was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * Persistent QA config describing how to run a QA evaluation container for an environment. */ export type QaConfigResponseDto = { /** * Stable QA-config identifier (UUID). */ id: string; /** * Stable environment identifier (UUID). */ environmentId: string; /** * Display name of the QA config. */ name: string; /** * Free-form description of the QA config. */ description: string | null; /** * Container image reference used by this QA config; null when an image identifier resolves the image instead. */ containerImage: string | null; /** * Image registry identifier of the QA container; null when a container image reference is set instead. */ imageId: string | null; /** * CPU allocation in milli-CPUs. */ cpuMilli: number | null; /** * Memory allocation in MiB. */ memoryMib: number | null; /** * Hard timeout in seconds for the QA job. */ timeoutSeconds: number | null; /** * Accelerator configuration, or null when no accelerator is attached. */ accelerator: { /** * Hardware accelerator family: graphics processor or tensor processor. */ type: 'gpu' | 'tpu'; /** * Accelerator model name as recognized by the launcher. */ name: string; /** * Number of accelerators to attach to the job container; defaults to 1 when unset. */ count?: number; } | null; /** * Environment variables injected into the QA container. */ envVars: { [key: string]: string; } | null; /** * Command-line arguments passed to the QA container entrypoint; empty when none are configured. */ args: Array; /** * Free-form parameters serialized to a parameters JSON file for the container. */ parameters: { [key: string]: unknown; } | null; /** * Launcher backend used to execute this QA config. */ launcherType: string | null; /** * Maximum number of automatic retries on failure. Applies to single-container QA kinds (standard, grading-oracle, metrics-validator), where a failed or unusable attempt is re-dispatched until the budget is spent. Ignored by the composite kinds (gtGradingOracle, standard-composite), which always run a single attempt. */ maxRetries: number; /** * Reference to a built-in QA template, or null for user-defined configs. */ builtInKey: string | null; /** * Locked run-config-version bound to this QA config, or null when no binding exists. */ runConfigVersionId: string | null; /** * Files attached to this QA config and mounted into the container at run time. */ files: Array<{ /** * Stable identifier of the QA-config file attachment. */ id: string; /** * Stable file identifier (UUID). Files are problem-scoped uploads. */ fileId: string; /** * Original filename of the attached file. */ filename: string; /** * Absolute path inside the QA container where this file is mounted. */ mountPath: string; /** * Size of the file in bytes, or null if the size is unknown. */ sizeBytes: number | null; /** * Timestamp when the file was attached to the QA config (ISO-8601, UTC). */ createdAt: string; }>; /** * Timestamp when the QA config was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the QA config was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Array of QA gates. */ export type QaGateResponseArrayDto = Array<{ /** * Stable QA-gate identifier (UUID). Gates require a passing QA verdict before a problem can advance. */ id: string; /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable QA-config identifier (UUID). */ qaConfigId: string; /** * Display name of the QA config bound to the gate. */ qaConfigName: string; /** * Workflow stage this gate blocks until QA passes. */ blockedStage: 'locking' | 'running' | 'submitting'; /** * Minimum normalized QA score required for the gate to pass. Null when not configured. */ minScore: number | null; /** * Categorical QA grades that satisfy the gate; empty when not configured. */ acceptedGrades: Array; /** * Timestamp when the gate was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the gate was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * A QA gate that blocks a workflow stage on an environment until its QA config passes. */ export type QaGateResponseDto = { /** * Stable QA-gate identifier (UUID). Gates require a passing QA verdict before a problem can advance. */ id: string; /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable QA-config identifier (UUID). */ qaConfigId: string; /** * Display name of the QA config bound to the gate. */ qaConfigName: string; /** * Workflow stage this gate blocks until QA passes. */ blockedStage: 'locking' | 'running' | 'submitting'; /** * Minimum normalized QA score required for the gate to pass. Null when not configured. */ minScore: number | null; /** * Categorical QA grades that satisfy the gate; empty when not configured. */ acceptedGrades: Array; /** * Timestamp when the gate was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the gate was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Combined QA gate status for a specific problem version across all gates and stages. */ export type QaGateStatusResponseDto = { /** * Per-gate pass/fail status for the version. */ gates: Array<{ /** * Gate this status row reports on. */ gateId: string; /** * QA config bound to the gate. */ qaConfigId: string; /** * Display name of the QA config bound to the gate. */ qaConfigName: string; /** * Workflow stage blocked by the gate. */ blockedStage: 'locking' | 'running' | 'submitting'; /** * True if the latest QA result for this gate satisfies the pass criteria. */ passed: boolean; /** * Most recent normalized QA score for the gate. Null if no job has produced a score. */ latestScore: number | null; /** * Most recent categorical QA grade for the gate. Null if no job has produced a grade. */ latestGrade: string | null; /** * QA job whose result is reflected by this status. Null if no job has run for the gate. */ latestJobId: string | null; /** * Lifecycle status of the most recent QA job. Null when no job has run. */ latestJobStatus: 'pending' | 'submitting' | 'running' | 'completed' | 'failed' | 'cancelled' | null; }>; /** * True if every QA gate passes for the version. */ allPassed: boolean; /** * Aggregated pass status broken down by stage. */ allPassedByStage: { /** * True if all gates guarding version locking pass. */ locking: boolean; /** * True if all gates guarding new problem runs pass. */ running: boolean; /** * True if all gates guarding final submission pass. */ submitting: boolean; }; }; /** * Response returned when triggering a QA-job batch, identifying the batch and its constituent jobs. */ export type QaJobBatchResponseDto = { /** * Stable QA-batch identifier (UUID). Groups QA jobs that should be evaluated together. */ batchId: string; /** * Identifiers of every QA job created as part of this batch (individual and aggregate). */ jobIds: Array; }; /** * Cursor-paginated page of QA jobs. */ export type QaJobPageResponseDto = { /** * Items in this page, ordered per the requested sort. */ items: Array<{ /** * Stable QA-job identifier (UUID). */ id: string; /** * QA configuration executed by this job; null when the job was created without a persisted QA config. */ qaConfigId: string | null; /** * Display name of the QA config bound to this job, denormalized via JOIN; null when no config is bound. */ qaConfigName: string | null; /** * QA batch that scheduled this job; null when the job was triggered individually. */ batchId: string | null; /** * Stable environment identifier (UUID). */ environmentId: string; /** * Problem evaluated by this job; null for aggregate jobs that span multiple problems. */ problemId: string | null; /** * Specific problem version evaluated by this job; null when the job is not version-scoped. */ problemVersionId: string | null; /** * Kind of QA job: a single-problem evaluation, or an aggregate evaluation across a set of problems. */ kind: 'individual' | 'aggregate'; /** * Lifecycle status of a QA job from queueing through dispatch and execution to a terminal state. */ status: 'pending' | 'submitting' | 'running' | 'completed' | 'failed' | 'cancelled'; /** * Container image actually executed for this QA job. */ containerImage: string | null; /** * Launcher-assigned external run identifier, or null before submission. */ externalRunId: string | null; /** * Error message captured when the QA job failed; null otherwise. */ errorMessage: string | null; /** * Wall-clock execution time of the QA job in milliseconds; null if not yet recorded. */ executionTimeMs: number | null; /** * Total cost of the QA job in USD as a decimal string; null when cost is unknown. */ totalCostUsd: string | null; /** * Number of attempts executed so far for this QA job. */ attemptCount: number; /** * Maximum number of automatic retries allowed for this QA job. Applies to single-container QA kinds (standard, grading-oracle, metrics-validator), where a failed or unusable attempt is re-dispatched until the budget is spent. Ignored by the composite kinds (gtGradingOracle, standard-composite), which always run a single attempt. */ maxRetries: number; /** * Timestamp when the QA job started running (ISO-8601, UTC); null before start. */ startedAt: string | null; /** * Timestamp when the QA job reached a terminal status (ISO-8601, UTC); null while in-flight. */ completedAt: string | null; /** * Timestamp when the QA job was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the QA job was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Summary score from the QA result; populated in both list and detail responses. */ score: number | null; /** * Summary grade label from the QA result; populated in both list and detail responses. */ grade: string | null; /** * Problem title denormalized for convenience; populated in both list and detail responses. */ problemTitle: string | null; /** * Detailed QA result payload; only populated on the single-job detail endpoint and null in list responses. */ result: { /** * Short natural-language summary copied from the QA container result. */ summary: string | null; /** * Issues reported by the QA container; empty when none were reported. */ issues: Array<{ /** * Category label for the issue, defined by the QA image. */ type: string; /** * Severity level: an error blocks acceptance, a warning highlights a concern, and info is purely informational. */ severity: 'error' | 'warning' | 'info'; /** * Human-readable explanation of the issue. */ description: string; }>; /** * Free-form structured detail payload from the QA container. */ details: { [key: string]: unknown; } | null; /** * Artifacts emitted by the QA container; empty when none were emitted. */ artifacts: Array<{ /** * Display name for the artifact as written by the QA container. */ filename: string; /** * HTTP(S) URL where the artifact bytes can be fetched. */ url: string; }>; } | null; /** * Run-config-version that drove the QA pipeline for this job, captured at job-insert time for audit fidelity. */ qaRunConfigVersionId: string | null; /** * Display name of the QA run-config bound to this job, denormalized via JOIN. */ qaRunConfigName: string | null; /** * Version number of the QA run-config-version, denormalized via JOIN. */ qaRunConfigVersionNumber: number | null; /** * Per-leaf child runs of a composite QA job; populated on the detail endpoint for composite jobs only. */ childRuns?: Array<{ /** * Stable QA-job-run identifier (UUID). One per-leaf child container execution of a composite QA job. */ id: string; /** * Parent QA job this child run belongs to. */ qaJobId: string; /** * Strategy executed by this child run. */ strategy: 'rubric' | 'agentic' | 'programmatic' | 'mcp_tool_call' | 'run_config'; /** * Weight of this child run when aggregating the composite QA job score. */ weight: number; /** * Position of this child run within the grading-config tree (dot-delimited). Nullable in storage, but always set by the service that creates child runs. */ nodePath: string | null; /** * Current lifecycle status of the child run. */ status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled'; /** * Normalized score between zero and one produced by this child run; null until completion. */ score: number | null; /** * Error message if the child run failed; null on success or while still running. */ error: string | null; /** * Grader-authored justification for the score; null for rubric child runs or before completion. */ justification: string | null; /** * Launcher-assigned external run identifier for this child, or null before dispatch. */ externalRunId: string | null; /** * Number of attempts executed so far for this child run. */ attemptCount: number; /** * Timestamp when the child run was created (ISO-8601, UTC). */ createdAt: string; /** * Display name of the run config whose locked version this child run executed (resolved from the run-config-version FK); null when no run config is bound. */ runConfigName: string | null; /** * Version number of the bound run-config version this child run executed; null when no run config is bound. */ versionNumber: number | null; /** * Per-criterion rubric scores for a rubric child run; populated on the detail endpoint for rubric leaves when the caller may read rubric scores, omitted otherwise. */ rubricScores?: Array<{ /** * Stable rubric-score identifier (UUID). Points at one rubric's score for one problem run. */ id: string; /** * Rubric criterion this score was produced for. */ rubricId: string; /** * Human-readable text of the rubric criterion being scored. */ criterion: string; /** * Relative weight of this criterion when aggregating the rubric leaf score. */ weight: number; /** * Display order of this criterion within its rubric leaf. */ sortOrder: number; /** * Normalized score between zero and one the grader assigned this criterion; null until completion. For a penalty (negative-weight) criterion, 1 means the penalized behavior occurred and 0 means it did not. */ achievedScore: number | null; /** * Grader-authored justification for this criterion score. */ justification: string; /** * Current lifecycle status of this criterion score. */ status: 'pending' | 'running' | 'completed' | 'failed'; }>; }>; }>; /** * Cursor for fetching the next page, or null when this is the last page. */ nextCursor: string | null; /** * Total number of items matching the filter across all pages. */ total: number; }; /** * QA job row exposed by the platform API, with denormalized result summary and run-config metadata. */ export type QaJobResponseDto = { /** * Stable QA-job identifier (UUID). */ id: string; /** * QA configuration executed by this job; null when the job was created without a persisted QA config. */ qaConfigId: string | null; /** * Display name of the QA config bound to this job, denormalized via JOIN; null when no config is bound. */ qaConfigName: string | null; /** * QA batch that scheduled this job; null when the job was triggered individually. */ batchId: string | null; /** * Stable environment identifier (UUID). */ environmentId: string; /** * Problem evaluated by this job; null for aggregate jobs that span multiple problems. */ problemId: string | null; /** * Specific problem version evaluated by this job; null when the job is not version-scoped. */ problemVersionId: string | null; /** * Kind of QA job: a single-problem evaluation, or an aggregate evaluation across a set of problems. */ kind: 'individual' | 'aggregate'; /** * Lifecycle status of a QA job from queueing through dispatch and execution to a terminal state. */ status: 'pending' | 'submitting' | 'running' | 'completed' | 'failed' | 'cancelled'; /** * Container image actually executed for this QA job. */ containerImage: string | null; /** * Launcher-assigned external run identifier, or null before submission. */ externalRunId: string | null; /** * Error message captured when the QA job failed; null otherwise. */ errorMessage: string | null; /** * Wall-clock execution time of the QA job in milliseconds; null if not yet recorded. */ executionTimeMs: number | null; /** * Total cost of the QA job in USD as a decimal string; null when cost is unknown. */ totalCostUsd: string | null; /** * Number of attempts executed so far for this QA job. */ attemptCount: number; /** * Maximum number of automatic retries allowed for this QA job. Applies to single-container QA kinds (standard, grading-oracle, metrics-validator), where a failed or unusable attempt is re-dispatched until the budget is spent. Ignored by the composite kinds (gtGradingOracle, standard-composite), which always run a single attempt. */ maxRetries: number; /** * Timestamp when the QA job started running (ISO-8601, UTC); null before start. */ startedAt: string | null; /** * Timestamp when the QA job reached a terminal status (ISO-8601, UTC); null while in-flight. */ completedAt: string | null; /** * Timestamp when the QA job was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the QA job was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Summary score from the QA result; populated in both list and detail responses. */ score: number | null; /** * Summary grade label from the QA result; populated in both list and detail responses. */ grade: string | null; /** * Problem title denormalized for convenience; populated in both list and detail responses. */ problemTitle: string | null; /** * Detailed QA result payload; only populated on the single-job detail endpoint and null in list responses. */ result: { /** * Short natural-language summary copied from the QA container result. */ summary: string | null; /** * Issues reported by the QA container; empty when none were reported. */ issues: Array<{ /** * Category label for the issue, defined by the QA image. */ type: string; /** * Severity level: an error blocks acceptance, a warning highlights a concern, and info is purely informational. */ severity: 'error' | 'warning' | 'info'; /** * Human-readable explanation of the issue. */ description: string; }>; /** * Free-form structured detail payload from the QA container. */ details: { [key: string]: unknown; } | null; /** * Artifacts emitted by the QA container; empty when none were emitted. */ artifacts: Array<{ /** * Display name for the artifact as written by the QA container. */ filename: string; /** * HTTP(S) URL where the artifact bytes can be fetched. */ url: string; }>; } | null; /** * Run-config-version that drove the QA pipeline for this job, captured at job-insert time for audit fidelity. */ qaRunConfigVersionId: string | null; /** * Display name of the QA run-config bound to this job, denormalized via JOIN. */ qaRunConfigName: string | null; /** * Version number of the QA run-config-version, denormalized via JOIN. */ qaRunConfigVersionNumber: number | null; /** * Per-leaf child runs of a composite QA job; populated on the detail endpoint for composite jobs only. */ childRuns?: Array<{ /** * Stable QA-job-run identifier (UUID). One per-leaf child container execution of a composite QA job. */ id: string; /** * Parent QA job this child run belongs to. */ qaJobId: string; /** * Strategy executed by this child run. */ strategy: 'rubric' | 'agentic' | 'programmatic' | 'mcp_tool_call' | 'run_config'; /** * Weight of this child run when aggregating the composite QA job score. */ weight: number; /** * Position of this child run within the grading-config tree (dot-delimited). Nullable in storage, but always set by the service that creates child runs. */ nodePath: string | null; /** * Current lifecycle status of the child run. */ status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled'; /** * Normalized score between zero and one produced by this child run; null until completion. */ score: number | null; /** * Error message if the child run failed; null on success or while still running. */ error: string | null; /** * Grader-authored justification for the score; null for rubric child runs or before completion. */ justification: string | null; /** * Launcher-assigned external run identifier for this child, or null before dispatch. */ externalRunId: string | null; /** * Number of attempts executed so far for this child run. */ attemptCount: number; /** * Timestamp when the child run was created (ISO-8601, UTC). */ createdAt: string; /** * Display name of the run config whose locked version this child run executed (resolved from the run-config-version FK); null when no run config is bound. */ runConfigName: string | null; /** * Version number of the bound run-config version this child run executed; null when no run config is bound. */ versionNumber: number | null; /** * Per-criterion rubric scores for a rubric child run; populated on the detail endpoint for rubric leaves when the caller may read rubric scores, omitted otherwise. */ rubricScores?: Array<{ /** * Stable rubric-score identifier (UUID). Points at one rubric's score for one problem run. */ id: string; /** * Rubric criterion this score was produced for. */ rubricId: string; /** * Human-readable text of the rubric criterion being scored. */ criterion: string; /** * Relative weight of this criterion when aggregating the rubric leaf score. */ weight: number; /** * Display order of this criterion within its rubric leaf. */ sortOrder: number; /** * Normalized score between zero and one the grader assigned this criterion; null until completion. For a penalty (negative-weight) criterion, 1 means the penalized behavior occurred and 0 means it did not. */ achievedScore: number | null; /** * Grader-authored justification for this criterion score. */ justification: string; /** * Current lifecycle status of this criterion score. */ status: 'pending' | 'running' | 'completed' | 'failed'; }>; }>; }; /** * Array of QA triggers. */ export type QaTriggerResponseArrayDto = Array<{ /** * Stable QA-trigger identifier (UUID). A trigger fires a QA job when a platform event occurs. */ id: string; /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable QA-config identifier (UUID). */ qaConfigId: string; /** * Display name of the QA config bound to the trigger. */ qaConfigName: string; /** * Platform event that fires this trigger. */ event: 'solver_completed' | 'problem_locked'; /** * Timestamp when the trigger was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the trigger was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * A QA trigger that fires a QA job on an environment when a platform event occurs. */ export type QaTriggerResponseDto = { /** * Stable QA-trigger identifier (UUID). A trigger fires a QA job when a platform event occurs. */ id: string; /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable QA-config identifier (UUID). */ qaConfigId: string; /** * Display name of the QA config bound to the trigger. */ qaConfigName: string; /** * Platform event that fires this trigger. */ event: 'solver_completed' | 'problem_locked'; /** * Timestamp when the trigger was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the trigger was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * A single page of soft-deleted run configs at a scope, ordered newest-deleted first. */ export type ReapedRunConfigPageDto = { /** * Items in this page, ordered per the requested sort. */ items: Array<{ /** * Stable run-config identifier (UUID). Versioned reusable solver / grader / QA / synthesizer config. */ id: string; /** * Scope at which this run config lives. Determines which environments / problems can see and bind it. */ scope: { /** * Discriminator: scope is platform-wide. */ level: 'system'; /** * Always null for system scope (no owning resource). */ id: null; } | { /** * Discriminator: scope is an organization. */ level: 'org'; /** * Organization that owns this scope. */ id: string; } | { /** * Discriminator: scope is an environment. */ level: 'env'; /** * Environment that owns this scope. */ id: string; } | { /** * Discriminator: scope is a problem. */ level: 'problem'; /** * Problem that owns this scope. */ id: string; }; /** * Identity-level discriminator. Selects payload schema, submit pipeline, and editor form for every version. */ type: 'agent-harness' | 'snapshot'; /** * Human-readable display name shown in pickers and the catalog. */ name: string; /** * Free-form description of what this run config is for. Null when not provided. */ description: string | null; /** * Always null for a reaped config — the scope default pin is cleared on soft-delete. */ defaultRunConfigVersionId: null; /** * Free-form tags for list filtering, matched with OR (any-of) semantics by tag-filtered list endpoints. Empty when the run config is untagged. */ tags: Array; /** * User who created this run config. */ createdByUserId: string; /** * User who last updated this run config. Null when never updated since creation. */ updatedByUserId: string | null; /** * Timestamp when the run config was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the run config was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Timestamp when the run config was soft-deleted (ISO-8601, UTC). */ deletedAt: string; /** * Reason the reaper removed this run config, or null when a user deleted it manually. */ deletedReason: 'stale_draft' | 'unused_unbound' | null; /** * User who manually deleted this run config, or null when the system reaper removed it. */ deletedBy: string | null; }>; /** * Cursor for fetching the next page, or null when this is the last page. */ nextCursor: string | null; /** * Total number of items matching the filter across all pages. */ total: number; }; /** * Re-grade every failed-grader run in a single run (batch). Runs whose solver failed are excluded. */ export type RegradeFailedGradersRequestDto = { /** * The run to re-grade, identified by the batch root job id returned by bulk-create. When omitted, the caller's most recent problem-run batch in scope is targeted. */ jobV2Id?: string; /** * Optional locked grader run-config version applied to every re-graded run in the batch. Must be on the batch environment's grader menu. When omitted, each run's existing grader binding is re-resolved live at dispatch. */ graderRunConfigVersionId?: string; }; /** * Result of re-grading every failed-grader run in a single run (batch). */ export type RegradeFailedGradersResponseDto = { /** * The run (batch root job id) that was targeted, whether supplied or resolved as the most recent batch. */ jobV2Id: string; /** * The grader run-config version applied to every re-grade, or null when each run re-resolved its existing grader binding. */ appliedGraderRunConfigVersionId: string | null; /** * The runs for which a re-grade was enqueued, one entry each. */ regrades: Array<{ /** * The problem run whose grader is being re-run. */ problemRunId: string; /** * The regrade orchestration root minted for this run. Poll it (or the run) for the new grade. */ regradeJobV2Id: string; }>; /** * Runs that qualified for re-grade but were not enqueued, with a reason each. */ skipped: Array<{ /** * The problem run that was skipped. */ problemRunId: string; /** * Why the run was skipped rather than re-graded. */ reason: string; }>; }; /** * Result of enqueueing a re-grade of an existing problem run. */ export type RegradeProblemRunResponseDto = { /** * New jobs-v2 root job id, a regrade orchestration root. Use the jobs-v2 surface to poll status or cancel; the problem run is re-graded in place. */ jobV2Id: string; }; /** * Request body for bulk-deleting problems in an environment by external ID. */ export type RemoveExternalIdsDto = { /** * External identifiers of the problems to soft-delete. */ externalIds: Array; }; /** * Response from re-executing a terminal jobs_v2 row as a fresh run. */ export type RerunJobV2ResponseDto = { /** * Id of the new root job created by the rerun. */ jobV2Id: string; }; /** * Response payload for the problem-reset endpoint, summarising kept versions, deletions, and whether the problem was soft-deleted. */ export type ResetProblemResponseDto = { /** * Problem-version IDs retained after the reset (typically the imported baseline versions). */ keptVersionIds: Array; /** * Number of versions removed by the reset. */ deletedCount: number; /** * True when the reset removed every version and the problem itself was soft-deleted as a result. */ problemSoftDeleted: boolean; }; /** * Resolved per-field permission state for the current user in a given environment, after merging environment-level and user-level overrides on top of base permissions. */ export type ResolvedFieldPermissionsDto = { /** * Per-field editability map for problem-version fields (true = editable, false = locked). */ versionFields: { [key: string]: boolean; }; /** * Per-field editability map for run-modal fields (true = editable, false = locked to the env template default). */ jobFields: { [key: string]: boolean; }; /** * Resource:action permissions explicitly denied by overrides for this user/environment. */ deniedPermissions: Array; }; /** * Response wrapping the form that applies to the current scope after inheritance resolution. */ export type ResolvedFormResponseDto = { /** * The form resolved for the requested scope, or null when no form applies. */ resolved: { /** * The form record that won the scope resolution cascade. */ form: { /** * Stable form identifier (UUID). Forms are versioned structured-input schemas. */ id: string; /** * Human-readable title for the bundle, surfaced in org catalog and picker UIs. Null when the bundle has not been named yet. */ title: string | null; /** * Timestamp when the form was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the form was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * The specific version of the form to use. */ formVersion: { /** * Stable form-version identifier (UUID). */ id: string; /** * Parent form this version belongs to. */ formId: string; /** * Monotonically increasing version number, starting at 1 for the first version. */ versionNumber: number; /** * Field schema and UI hints captured by this version. */ schema: { /** * JSON Schema describing the form fields. */ data: { [key: string]: unknown; }; /** * UI schema controlling presentation of the form fields. */ ui: { [key: string]: unknown; }; }; /** * Timestamp when this version was published (ISO-8601, UTC). Null for drafts. */ publishedAt: string | null; /** * User who published this version; null for drafts that have not yet been published. */ publishedByUserId: string | null; /** * User who last edited this version. */ updatedByUserId: string; /** * Timestamp when this version was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when this version was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Which scope level won the resolver cascade for this problem. */ scope: 'environment' | 'problem'; /** * Higher-scope owner of the resolved bundle, or null when it is owned locally at its attached scope. */ ownerScope: 'organization' | null; } | null; }; /** * The curated, reachability-filtered menu for one slot — the picker pre-selects the starred set per selectionMode. */ export type ResolvedMenuDto = { /** * An environment + role binding point for a curated run-config menu. */ slot: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * The role a run config plays at a binding slot: solver, grader, qa, or synthesizer. */ role: 'solver' | 'grader' | 'qa' | 'synthesizer'; }; /** * Reachable entries for the slot, sorted by sortOrder then creation. */ entries: Array<{ /** * Stable run-config menu-entry identifier (UUID). One curated choice (a run-config version) on a slot menu. */ entryId: string; /** * Stable run-config identifier (UUID). Versioned reusable solver / grader / QA / synthesizer config. */ runConfigId: string; /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ runConfigVersionId: string; /** * Display name of the run config this entry points at. */ name: string; /** * Version number of the offered version. */ versionNumber: number; /** * Identity-level discriminator for a run config. The agent-harness type follows the standard draft, verified, locked lifecycle where a passing probe is recommended but not required before locking; the snapshot type is lockable without a probe and bindable to roles once locked. */ type: 'agent-harness' | 'snapshot'; /** * Whether this entry is included by default (starred). Multiple entries may be starred; in the Run dialog the starred set is pre-selected (flexible) or the mandatory set (locked). */ isDefault: boolean; /** * Display order within the slot menu; lower values appear first. */ sortOrder: number; /** * Whether this version is currently reachable for the slot. Omitted or true for picker menus; false when an admin list includes a stale entry. */ reachable?: boolean; }>; /** * The first starred entry to pre-select, or the first reachable entry as a fallback when all starred entries are unreachable, or null when the slot has no reachable entries. */ defaultEntryId: string | null; /** * How the starred set governs a run: flexible pre-checks the starred set but lets a labeler pick a subset or other offered entries; locked forces exactly the starred set with no deviation. */ selectionMode: 'flexible' | 'locked'; /** * Identity that would resolve at launch when no explicit menu version is submitted. */ effectiveSelection?: { /** * A locked run-config version resolves at launch. */ kind: 'versioned'; /** * Stable run-config identifier (UUID). Versioned reusable solver / grader / QA / synthesizer config. */ runConfigId: string; /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ runConfigVersionId: string; /** * Display name of the run config. */ name: string; /** * Version number of the effective run-config version. */ versionNumber: number; } | { /** * The platform harness and model defaults resolve at launch. */ kind: 'platform-default'; }; }; /** * Selected run-config version payload before consumer-specific defaults or inherited problem policy are applied, including provenance for the UI. */ export type ResolvedRunConfigDto = { /** * Run-config version that produced the selected pre-consumer payload. */ runConfigVersionId: string; /** * Owning run-config identity. */ runConfigId: string; /** * Type discriminator copied from the owning identity. Submit-site dispatch switches on this so future types force every pipeline to add a case. */ type: 'agent-harness' | 'snapshot'; /** * Which run-config / version this resolved to, for "this run came from …" displays. */ provenance: { /** * Owning run-config identity. */ runConfigId: string; /** * Specific version that produced the selected pre-consumer payload. */ runConfigVersionId: string; /** * Display name of the resolved run-config identity. */ runConfigName: string; /** * Scope the resolved run-config lives at. */ scope: { /** * Discriminator: scope is platform-wide. */ level: 'system'; /** * Always null for system scope (no owning resource). */ id: null; } | { /** * Discriminator: scope is an organization. */ level: 'org'; /** * Organization that owns this scope. */ id: string; } | { /** * Discriminator: scope is an environment. */ level: 'env'; /** * Environment that owns this scope. */ id: string; } | { /** * Discriminator: scope is a problem. */ level: 'problem'; /** * Problem that owns this scope. */ id: string; }; /** * Version number of the resolved version. */ versionNumber: number; }; /** * Selected version payload before consumer-specific defaults or inherited problem policy are applied. Shape is keyed by the run-config type. */ config: { /** * Fully qualified container image URL for the harness. Omit to inherit the platform default. */ harnessImageUrl?: string; /** * Fully qualified grader image URL paired with this harness. When set, new programmatic and mcp_tool_call grading configs pre-fill their grader image from it (the solver's companion grader image). Omit to use the platform default grader image. */ graderImageUrl?: string; /** * Container resource preset (CPU + memory). Omit to inherit the platform default. */ containerSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'xlarge-highmem' | 'xxlarge'; /** * GPU type attached to the container. Omit to run without GPU acceleration. */ gpuType?: 'T4' | 'L4' | 'A10G' | 'A100' | 'H100'; /** * When true, the container runs with elevated privileges. Required by harnesses that need Docker-in-Docker or raw block-device access. */ privileged?: boolean; /** * When true, requests KVM-backed nested virtualization. Requires privileged=true and a GKE launcher. */ nestedVirt?: boolean; /** * Explicit GKE node machine type (e.g. "e2-standard-16"), overriding the platform default. Not validated against a fixed set here — an invalid value is rejected by agent-service/GKE at submission. Takes priority over the machine type implied by nestedVirt when both are set. */ machineType?: string; /** * HTTP port the container exposes (snapshot/compute-only). Ignored by job submission and absent from the effective invocation. */ port?: number; /** * Package managers preinstalled in the harness image, used to drive setup snippets in the editor. */ installedPackageManagers?: Array<'pip' | 'uv' | 'npm' | 'cargo' | 'apt'>; /** * Extra CLI arguments appended to the harness command. Tokenized by whitespace split at submission time; quoted strings are not supported. */ args?: string; /** * Env vars injected into the container. Null values permitted for backward compatibility; the editor strips them on save. */ envVars?: { [key: string]: string | null; }; /** * External file mounts referencing previously uploaded objects. Valid only on snapshot-type configs; agent-harness configs attach files via the run_config_files join table instead and the server rejects this field on save. */ mounts?: Array<{ /** * Platform file ID referencing an object already uploaded to GCS. */ source: string; /** * Absolute container path where the referenced file is mounted at compute creation time. Must be absolute and must not contain parent-directory segments. */ mountPath: string; }>; /** * Env-var names this config expects the runner to inject. Resolved against the version's attached customer secrets at submit time. */ customerSecrets?: Array<{ /** * Env-var name (uppercase + digits + underscore, leading letter) the harness expects to receive at runtime; resolved against attached customer secrets at job-submit time. */ envVarName: string; }>; /** * Egress allowlist for the container. An empty list denies general outbound traffic; hosts independently authorized by attached proxy credentials remain reachable. Any list containing the exact '*' entry permits everything, and a nonempty list without '*' restricts general egress to those domains. Null explicitly selects no run-config egress policy and overrides an inherited problem-version allowlist; omission defers to the consuming context. */ allowedDomains?: Array | null; /** * Wall-clock timeout for the harness invocation (seconds). */ timeoutSeconds?: number; /** * MCP tools the harness exposes, as returned by the MCP service list_tools(). Metadata only — persisted for future grader-UI use and not consumed at submit time. */ mcpTools?: Array<{ /** * Tool name as exposed by the MCP service. The newer catalogue format encodes the service as a dotted prefix (e.g. "gitea.create_user"); use mcpToolServiceKey to extract it. */ name: string; /** * Human-readable description of what the tool does. */ description: string; /** * MCP service the tool belongs to. Omitted when encoded as the name prefix. */ service?: string; /** * Grouping category for the tool in UIs. */ category?: string; /** * Display ordering hint within a category. */ sortOrder?: number; /** * Whether the tool only reads state (no side effects). Omitted when unknown. */ readOnly?: boolean; /** * Tool invocation timeout in seconds. */ timeout?: number; /** * Tool input JSON Schema, stored as an opaque JSON string (see comment). */ inputSchema: string; /** * Optional human-friendly label for the service (MCP wire key _service_label). */ serviceLabel?: string; }>; /** * The WORLDSIM_BAKE_REF the mcpTools catalogue was discovered against. Server-owned: set during MCP tool discovery. On other writes a client-supplied value is ignored, and the stored tag is carried forward while mcpTools is unchanged (a changed WORLDSIM_BAKE_REF keeps it, so worldsim validation detects the mismatch) and cleared when mcpTools changes. Used when submitting problem versions to reject an MCP allowlist that would be materialized from a catalogue stale relative to the dispatch-time parent bake. */ mcpToolsBakeRef?: string; /** * Seeded-entity overrides for the worldsim MCP functional tool checks, as an opaque JSON-object string with the runner's snake_case keys (e.g. {"erpnext_company":"Northline","keycloak_realm":"northline"}). Emitted as the probe_context block of the mounted mcp-tools.yaml when a run forks the worldsim solver child from this config. Ignored when the problem version inherits the solver's MCP tools: the runner then reads the probe_context block of the file this config names in WORLDSIM_MCP_TOOLS_FILE. Only read by runs that set WORLDSIM_RUN_MCP_TOOL_CHECKS=true. */ mcpToolsProbeContext?: string; /** * Declared execution environment for a snapshot run config's persistent compute (container ref, shared/grade dirs, and image-supplied solver verbs). Omit to inherit the platform defaults. */ computeEnv?: { /** * Child-container name the platform runs the solver/grade verbs in (via docker exec). Omit to inherit the platform default. */ containerRef?: string; /** * Directory bind-mounted from the pod into the container where grade mounts land and are read. Omit to inherit the platform default. */ sharedMountDir?: string; /** * Directory a compute_exec grade writes $GRADE_OUTPUT into (on a path the exec side both writes and reads). Omit to inherit the platform default. */ gradeOutputDir?: string; /** * Image-supplied solver-lifecycle verb scripts. Omit to use the platform default verbs. */ runVerbs?: { /** * Optional child-container readiness probe; prints a verdict token before launch. */ readiness?: string; /** * Terminate any in-flight agent and clear prior-run state (idempotent). */ reset: string; /** * Launch the agent on $PROMPT, detached; the platform polls status afterward. */ submit: string; /** * Print exactly one ComputeRunPhase token to stdout. */ status: string; /** * Print the successful run result to stdout (read on completed). */ result: string; /** * Print failure diagnostics to stdout (read on failed). */ error: string; }; }; /** * Infra-retry policy override for runs launched from this run-config. Omit to use the platform default; an eval-level override (EvaluationMetadataSchema.retryPolicy) takes precedence over this when both are set. */ retryPolicy?: { /** * Additional attempts allowed after a failure classified as infra (container eviction, image pull error, queue orphan) before the run terminates as failed. Omit to use the platform default (2). */ maxInfraRetries?: number; }; }; }; /** * A background job tracked by the jobs_v2 framework. Scope ids are denormalized from the link tables for read convenience. */ export type RolloutBatchResponseDto = { /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ id: string; /** * Parent jobs_v2 id when this row was spawned as a child via a waiting_children result. Null for root jobs. */ parentJobId: string | null; /** * The user that created this job. Not a scope handle. */ userId: string; /** * Discriminator mapping to a registered strategy bundle (e.g. taiga_send, taiga_run_problem_version). */ type: string; /** * Optional human-readable label shown in lists. */ name: string | null; /** * Lifecycle state of a jobs_v2 row. Claimable: pending, waiting_external (gated by poll_after), aggregating. Parked: executing, waiting_children, cancelling. Terminal: completed, failed, cancelled. */ status: 'pending' | 'executing' | 'waiting_external' | 'waiting_children' | 'aggregating' | 'cancelling' | 'completed' | 'failed' | 'cancelled'; /** * Strategy-typed input. Validated against the per-type Zod schema at insert and dispatch. */ payload: unknown; /** * Live state across waiting_external poll cycles. Null for sync strategies and before the first poll. */ externalState: unknown | null; /** * Terminal output payload set when status transitions to completed. */ output: unknown | null; /** * Terminal error message set when status transitions to failed. */ errorMessage: string | null; /** * Budget units consumed by this row. Bumped by claimPending on each run claim, and by scheduleRetryInTrx on each poll/aggregate retry (i.e. when the strategy returns { kind: "retry" } from poll or onChildrenComplete). Normal poll/aggregate reclaims that did not return retry are not counted. */ attempts: number; /** * Retry budget. The row becomes terminally failed once attempts reaches this value. Default 1 (single attempt, no retry); raised per-type via registerJobType or per-row via the spawn spec. */ maxAttempts: number; /** * Earliest time this row is eligible to be claimed from status=pending. */ scheduledAt: string; /** * While status=waiting_external, earliest time the poll loop will invoke PollStrategy.poll. */ pollAfter: string | null; /** * Wall-clock timestamp the row first transitioned out of pending. Null until claimed. */ startedAt: string | null; /** * Wall-clock timestamp the row entered a terminal status. Null until terminal. */ completedAt: string | null; /** * Row creation timestamp. */ createdAt: string; /** * Row last-modified timestamp. */ updatedAt: string; /** * Environments this job is linked to (denormalized from environment_jobs). */ environmentIds?: Array; /** * Organizations this job is linked to (denormalized from organization_jobs). */ organizationIds?: Array; /** * Display names for the ids in organizationIds, keyed by organization id. Present only on platform-admin cross-organization reads. */ organizationNames?: { [key: string]: string; }; /** * Problems this job is linked to (denormalized from problem_jobs). */ problemIds?: Array; }; /** * Raw per-rollout results for a rollout_batch: tallies plus one page of child jobs, unshaped. */ export type RolloutBatchResultsResponseDto = { /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ batchId: string; /** * Lifecycle state of a jobs_v2 row. Claimable: pending, waiting_external (gated by poll_after), aggregating. Parked: executing, waiting_children, cancelling. Terminal: completed, failed, cancelled. */ status: 'pending' | 'executing' | 'waiting_external' | 'waiting_children' | 'aggregating' | 'cancelling' | 'completed' | 'failed' | 'cancelled'; /** * Present once the batch itself is terminal-completed; null otherwise. */ output: { /** * Total M x N rollouts in the batch. */ totalRollouts: number; /** * Rollouts that completed successfully. */ completedRollouts: number; /** * Rollouts that did not complete successfully. */ failedRollouts: number; /** * completed: every rollout succeeded. partial: some succeeded. failed: none succeeded. */ verdict: 'completed' | 'partial' | 'failed'; /** * Sum of every rollout that reported a cost; null if none did. */ totalCost: number | null; } | null; /** * The current page of run_config_run children spawned so far, raw and unshaped. */ rollouts: Array<{ /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ id: string; /** * Parent jobs_v2 id when this row was spawned as a child via a waiting_children result. Null for root jobs. */ parentJobId: string | null; /** * The user that created this job. Not a scope handle. */ userId: string; /** * Discriminator mapping to a registered strategy bundle (e.g. taiga_send, taiga_run_problem_version). */ type: string; /** * Optional human-readable label shown in lists. */ name: string | null; /** * Lifecycle state of a jobs_v2 row. Claimable: pending, waiting_external (gated by poll_after), aggregating. Parked: executing, waiting_children, cancelling. Terminal: completed, failed, cancelled. */ status: 'pending' | 'executing' | 'waiting_external' | 'waiting_children' | 'aggregating' | 'cancelling' | 'completed' | 'failed' | 'cancelled'; /** * Strategy-typed input. Validated against the per-type Zod schema at insert and dispatch. */ payload: unknown; /** * Live state across waiting_external poll cycles. Null for sync strategies and before the first poll. */ externalState: unknown | null; /** * Terminal output payload set when status transitions to completed. */ output: unknown | null; /** * Terminal error message set when status transitions to failed. */ errorMessage: string | null; /** * Budget units consumed by this row. Bumped by claimPending on each run claim, and by scheduleRetryInTrx on each poll/aggregate retry (i.e. when the strategy returns { kind: "retry" } from poll or onChildrenComplete). Normal poll/aggregate reclaims that did not return retry are not counted. */ attempts: number; /** * Retry budget. The row becomes terminally failed once attempts reaches this value. Default 1 (single attempt, no retry); raised per-type via registerJobType or per-row via the spawn spec. */ maxAttempts: number; /** * Earliest time this row is eligible to be claimed from status=pending. */ scheduledAt: string; /** * While status=waiting_external, earliest time the poll loop will invoke PollStrategy.poll. */ pollAfter: string | null; /** * Wall-clock timestamp the row first transitioned out of pending. Null until claimed. */ startedAt: string | null; /** * Wall-clock timestamp the row entered a terminal status. Null until terminal. */ completedAt: string | null; /** * Row creation timestamp. */ createdAt: string; /** * Row last-modified timestamp. */ updatedAt: string; /** * Environments this job is linked to (denormalized from environment_jobs). */ environmentIds?: Array; /** * Organizations this job is linked to (denormalized from organization_jobs). */ organizationIds?: Array; /** * Display names for the ids in organizationIds, keyed by organization id. Present only on platform-admin cross-organization reads. */ organizationNames?: { [key: string]: string; }; /** * Problems this job is linked to (denormalized from problem_jobs). */ problemIds?: Array; }>; /** * Opaque cursor for fetching the next page of rollouts. Null on the last page. */ nextCursor: string | null; }; /** * Array of a rollout run output files with signed download URLs. */ export type RolloutOutputFileListDto = Array<{ /** * Workspace-relative path of the output file (e.g. "output/trace.json"). */ path: string; /** * Signed download URL for the output file contents. */ download_url: string; }>; /** * A single rollout's trace events, proxied from agent-service after verifying the rollout belongs to the requested job. */ export type RolloutTraceResponseDto = { /** * The rollout run's agent-service event stream, oldest first. */ events: Array<{ /** * Monotonically increasing sequence number assigned by the agent-service. */ sequence: number; /** * Category of the event: lifecycle markers (started, launched, done, error), stdio (stdout, stderr), structured event payloads (event), agent observations (observation), and setup/snapshot phases. */ event_type: 'started' | 'stdout' | 'stderr' | 'event' | 'observation' | 'process_exited' | 'snapshotting' | 'launched' | 'setup_started' | 'setup_completed' | 'input_delivered' | 'done' | 'error'; /** * Payload of the event; shape varies by event_type. */ data: { [key: string]: unknown; }; /** * Timestamp when the agent-service emitted the event (ISO-8601, UTC). */ created_at: string; }>; /** * True when the event stream was trimmed to the most recent window. */ truncated: boolean; /** * Opaque token identifying the run the events came from. It changes when the run is resubmitted and sequences restart, so a client holding an after cursor should discard what it holds and re-read; null while the job has no run yet. */ generation?: string | null; }; /** * Array of rubrics. */ export type RubricArrayDto = Array<{ /** * Stable rubric identifier (UUID). Rubrics are versioned grading specifications attached to a problem version. */ id: string; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Human-readable description of what this rubric measures. */ criterion: string; /** * Relative weight when aggregating rubric scores. Positive weights reward; negative weights penalize. */ weight: number; /** * True when the rubric should be evaluated by the LLM grader; false when human-only. */ useGraderSupport: boolean; /** * Display order of the rubric within its problem version. */ sortOrder: number; /** * Markdown template that overrides the env-wide rubric issue template for issues attached to this rubric. Null inherits the env template. */ issueTemplate: string | null; /** * Timestamp when the rubric was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the rubric was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * A weighted grading criterion attached to a problem version. */ export type RubricDto = { /** * Stable rubric identifier (UUID). Rubrics are versioned grading specifications attached to a problem version. */ id: string; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Human-readable description of what this rubric measures. */ criterion: string; /** * Relative weight when aggregating rubric scores. Positive weights reward; negative weights penalize. */ weight: number; /** * True when the rubric should be evaluated by the LLM grader; false when human-only. */ useGraderSupport: boolean; /** * Display order of the rubric within its problem version. */ sortOrder: number; /** * Markdown template that overrides the env-wide rubric issue template for issues attached to this rubric. Null inherits the env template. */ issueTemplate: string | null; /** * Timestamp when the rubric was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the rubric was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Array of rubric scores, each bundled with the rubric it was scored against. */ export type RubricScoreWithRubricArrayDto = Array<{ /** * Stable rubric-score identifier (UUID). Points at one rubric's score for one problem run. */ id: string; /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ problemRunId: string; /** * Grading run that produced this score. Null for legacy rows or scores produced outside a grading run. */ gradingRunId: string | null; /** * Stable rubric identifier (UUID). Rubrics are versioned grading specifications attached to a problem version. */ rubricId: string; /** * Upstream grader-service run identifier, if the score came from an external grader. */ externalRunId: string | null; /** * Normalized score in [0, 1] achieved for this rubric. For a penalty (negative-weight) rubric, 1 means the penalized behavior occurred and 0 means it did not. Null until grading completes. */ achievedScore: number | null; /** * Grader-authored explanation for the achieved score. */ justification: string; /** * Current lifecycle status of the rubric score. */ status: 'pending' | 'running' | 'completed' | 'failed'; /** * Timestamp when the rubric score row was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the rubric score row was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Human-readable criterion text from the associated rubric. */ criterion: string; /** * Weight of the associated rubric used when aggregating the final score. */ weight: number; /** * Display order of the rubric within its problem version. */ sortOrder: number; }>; /** * Attachment of a customer secret to a specific run-config version. Each draft version owns its own attachment set; new drafts inherit from the parent locked version. */ export type RunConfigCustomerSecretAttachmentDto = { /** * Run-config version that owns this attachment. */ runConfigVersionId: string; /** * Customer secret attached to the run-config version. */ customerSecretId: string; /** * Environment-variable name of the attached secret, denormalized so consumers do not need a second fetch. */ name: string; /** * Injection mode of this attachment (proxy = egress-proxy swap, direct = plain env injection). Matches the secret's mode, except for attachments made before the secret gained an upstream host and header or before the mode was enforced. */ injectionMode: 'proxy' | 'direct'; /** * Upstream hostname of the attached secret, denormalized for display; null for direct-only secrets. */ upstreamHost: string | null; /** * HTTP header of the attached secret, denormalized for display; null for direct-only secrets. */ headerName: string | null; /** * Scope of the attached secret, denormalized for display. */ scope: { /** * System-wide secret available to every organization. */ level: 'system'; /** * Always null at system scope. */ id: null; } | { /** * Org-scoped secret available within one organization. */ level: 'org'; /** * Organization that owns the secret. */ id: string; } | { /** * Environment-scoped secret available within one environment. */ level: 'env'; /** * Environment that owns the secret. */ id: string; } | { /** * Problem-scoped secret available within one problem. */ level: 'problem'; /** * Problem that owns the secret. */ id: string; } | { /** * Problem-version-scoped secret pinned to one specific problem version. */ level: 'problem-version'; /** * Problem version that owns the secret. */ id: string; }; /** * Timestamp when the attachment was created (ISO-8601, UTC). */ createdAt: string; }; /** * Array of customer-secret attachments declared on a run-config version. */ export type RunConfigCustomerSecretAttachmentListDto = Array<{ /** * Run-config version that owns this attachment. */ runConfigVersionId: string; /** * Customer secret attached to the run-config version. */ customerSecretId: string; /** * Environment-variable name of the attached secret, denormalized so consumers do not need a second fetch. */ name: string; /** * Injection mode of this attachment (proxy = egress-proxy swap, direct = plain env injection). Matches the secret's mode, except for attachments made before the secret gained an upstream host and header or before the mode was enforced. */ injectionMode: 'proxy' | 'direct'; /** * Upstream hostname of the attached secret, denormalized for display; null for direct-only secrets. */ upstreamHost: string | null; /** * HTTP header of the attached secret, denormalized for display; null for direct-only secrets. */ headerName: string | null; /** * Scope of the attached secret, denormalized for display. */ scope: { /** * System-wide secret available to every organization. */ level: 'system'; /** * Always null at system scope. */ id: null; } | { /** * Org-scoped secret available within one organization. */ level: 'org'; /** * Organization that owns the secret. */ id: string; } | { /** * Environment-scoped secret available within one environment. */ level: 'env'; /** * Environment that owns the secret. */ id: string; } | { /** * Problem-scoped secret available within one problem. */ level: 'problem'; /** * Problem that owns the secret. */ id: string; } | { /** * Problem-version-scoped secret pinned to one specific problem version. */ level: 'problem-version'; /** * Problem version that owns the secret. */ id: string; }; /** * Timestamp when the attachment was created (ISO-8601, UTC). */ createdAt: string; }>; /** * A versioned reusable configuration with roles (solver / grader / QA / synthesizer). The identity row carries scope, type, and a role-agnostic default pointer; the actual payload lives on versions. */ export type RunConfigDto = { /** * Stable run-config identifier (UUID). Versioned reusable solver / grader / QA / synthesizer config. */ id: string; /** * Scope at which this run config lives. Determines which environments / problems can see and bind it. */ scope: { /** * Discriminator: scope is platform-wide. */ level: 'system'; /** * Always null for system scope (no owning resource). */ id: null; } | { /** * Discriminator: scope is an organization. */ level: 'org'; /** * Organization that owns this scope. */ id: string; } | { /** * Discriminator: scope is an environment. */ level: 'env'; /** * Environment that owns this scope. */ id: string; } | { /** * Discriminator: scope is a problem. */ level: 'problem'; /** * Problem that owns this scope. */ id: string; }; /** * Identity-level discriminator. Selects payload schema, submit pipeline, and editor form for every version. */ type: 'agent-harness' | 'snapshot'; /** * Human-readable display name shown in pickers and the catalog. */ name: string; /** * Free-form description of what this run config is for. Null when not provided. */ description: string | null; /** * Locked version pinned as the role-agnostic default at this scope. Resolved after explicit problem-version / environment bindings miss, walking problem → env → org → system. Null when no default is set. */ defaultRunConfigVersionId?: string | null; /** * Free-form tags for list filtering, matched with OR (any-of) semantics by tag-filtered list endpoints. Empty when the run config is untagged. */ tags: Array; /** * User who created this run config. */ createdByUserId: string; /** * User who last updated this run config. Null when never updated since creation. */ updatedByUserId: string | null; /** * Timestamp when the run config was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the run config was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Invalid request, including a run-config file mount path that collides with a problem file. */ export type RunConfigFileClashBadRequestDto = ({ code: 'invalid_request'; } & RunConfigFileClashInvalidRequestErrorDto) | ({ code: 'run_config_file_clash'; } & RunConfigFileClashErrorDto); /** * Error returned when run-config file mount paths collide with problem file paths. */ export type RunConfigFileClashErrorDto = { /** * Discriminator marking this as a run-config file mount-path clash error. */ code: 'run_config_file_clash'; /** * Human-readable summary of the clash. */ message: string; /** * Container mount paths shared by the run-config files and problem files. */ details: { /** * Container paths where a run-config file collides with a problem file. */ collidingPaths: Array; }; }; /** * Error returned when the submitted run request is invalid. */ export type RunConfigFileClashInvalidRequestErrorDto = { /** * Machine-readable discriminator for a request that failed boundary validation. */ code: 'invalid_request'; /** * Human-readable explanation of the invalid run request. */ message: string; /** * Optional structured boundary-validation failures for the invalid run request. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * A file attached to a run-config version and mounted into the container workspace at run time. */ export type RunConfigFileDto = { /** * Identifier of the underlying uploaded file object. */ fileId: string; /** * Original filename of the uploaded file; appended to the mount directory. */ filename: string; /** * Size of the file in bytes, or null when unknown. */ sizeBytes: number | null; /** * Directory inside the container workspace where the file mounts. */ mountDir: string; /** * Resolved absolute container path the file mounts at (mountDir + / + filename). */ mountPath: string; /** * Mount mode — read-only or read-write. */ mode: 'ro' | 'rw'; /** * Timestamp when the file was attached to the version (ISO-8601, UTC). */ createdAt: string; }; /** * Array of files attached to a run-config version. */ export type RunConfigFileListDto = Array<{ /** * Identifier of the underlying uploaded file object. */ fileId: string; /** * Original filename of the uploaded file; appended to the mount directory. */ filename: string; /** * Size of the file in bytes, or null when unknown. */ sizeBytes: number | null; /** * Directory inside the container workspace where the file mounts. */ mountDir: string; /** * Resolved absolute container path the file mounts at (mountDir + / + filename). */ mountPath: string; /** * Mount mode — read-only or read-write. */ mode: 'ro' | 'rw'; /** * Timestamp when the file was attached to the version (ISO-8601, UTC). */ createdAt: string; }>; /** * Array of run configs, each augmented with the images used across its versions. */ export type RunConfigListItemListDto = Array<{ /** * Stable run-config identifier (UUID). Versioned reusable solver / grader / QA / synthesizer config. */ id: string; /** * Scope at which this run config lives. Determines which environments / problems can see and bind it. */ scope: { /** * Discriminator: scope is platform-wide. */ level: 'system'; /** * Always null for system scope (no owning resource). */ id: null; } | { /** * Discriminator: scope is an organization. */ level: 'org'; /** * Organization that owns this scope. */ id: string; } | { /** * Discriminator: scope is an environment. */ level: 'env'; /** * Environment that owns this scope. */ id: string; } | { /** * Discriminator: scope is a problem. */ level: 'problem'; /** * Problem that owns this scope. */ id: string; }; /** * Identity-level discriminator. Selects payload schema, submit pipeline, and editor form for every version. */ type: 'agent-harness' | 'snapshot'; /** * Human-readable display name shown in pickers and the catalog. */ name: string; /** * Free-form description of what this run config is for. Null when not provided. */ description: string | null; /** * Locked version pinned as the role-agnostic default at this scope. Resolved after explicit problem-version / environment bindings miss, walking problem → env → org → system. Null when no default is set. */ defaultRunConfigVersionId?: string | null; /** * Free-form tags for list filtering, matched with OR (any-of) semantics by tag-filtered list endpoints. Empty when the run config is untagged. */ tags: Array; /** * User who created this run config. */ createdByUserId: string; /** * User who last updated this run config. Null when never updated since creation. */ updatedByUserId: string | null; /** * Timestamp when the run config was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the run config was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Distinct harness image URLs across all non-deleted versions of this run config, in no guaranteed order. Empty for snapshot-type configs and for agent-harness configs whose versions set no image. A config matches an image facet when any entry here is selected. */ images: Array; }>; /** * An agent-service file uploaded for use as a run-config mount source. */ export type RunConfigMountFileDto = { /** * Agent-service file id; use directly as a mount source on a run-config payload. */ id: string; /** * Sanitized filename as stored by the agent service. */ filename: string; /** * Uploaded file size in bytes. */ sizeBytes: number; }; /** * Conflict returned when the run-config version already has a pending or running probe. */ export type RunConfigProbeAlreadyInFlightErrorDto = { /** * Machine-readable discriminator for a duplicate in-flight probe request. */ code: 'run_config_probe_already_in_flight'; /** * Human-readable explanation that the existing probe should be resumed. */ message: string; /** * Reference to the in-flight probe-run that already owns this attempt. */ details: { /** * Identifier of the in-flight probe-run the caller should resume polling. */ existingProbeRunId: string; }; }; /** * One attempt at running the probe against a draft run-config version. Async lifecycle: submit returns 202 with the probe-run id, then the parallel poller writes the terminal result back. */ export type RunConfigProbeRunDto = { /** * Stable probe-run identifier (UUID). Probe runs validate a run-config version before locking. */ id: string; /** * Draft version this probe run is validating. */ runConfigVersionId: string; /** * Agent-service run id. Null while still pending and on terminal rows for failures that never reached agent-service (build failure, submit-call rejection). */ externalRunId: string | null; /** * Lifecycle status of this probe-run. */ status: 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled'; /** * User who submitted this probe run. */ submittedByUserId: string; /** * Timestamp when the probe run was submitted (ISO-8601, UTC). */ submittedAt: string; /** * Timestamp when the probe run reached a terminal status (ISO-8601, UTC). Null while non-terminal. */ completedAt: string | null; /** * Probe outcome plus completion timestamp. Populated only on terminal rows (succeeded / failed / cancelled). */ result: { /** * True when the harness exited cleanly and the LLM judge ruled the transcript satisfies the quality check. */ passed: boolean; /** * Harness exit code. Null when the harness never reached the exit step (build failure, submit-call rejection). */ exitCode: number | null; /** * JSON-encoded array of agent-service events captured during the probe run. The frontend re-parses it for the transcript viewer. */ transcript: string; /** * Human-readable reason the probe failed. For exit-code failures: the upstream error. For judge failures: the judge's one-line explanation. Null on passing runs. */ failureReason: string | null; /** * Timestamp when this probe run reached its terminal state (ISO-8601, UTC). Lets the UI render "last probed N minutes ago" without a second source of truth. */ runAt: string; } | null; /** * Timestamp when the probe-run row was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the probe-run row was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Array of run-config probe executions. */ export type RunConfigProbeRunListDto = Array<{ /** * Stable probe-run identifier (UUID). Probe runs validate a run-config version before locking. */ id: string; /** * Draft version this probe run is validating. */ runConfigVersionId: string; /** * Agent-service run id. Null while still pending and on terminal rows for failures that never reached agent-service (build failure, submit-call rejection). */ externalRunId: string | null; /** * Lifecycle status of this probe-run. */ status: 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled'; /** * User who submitted this probe run. */ submittedByUserId: string; /** * Timestamp when the probe run was submitted (ISO-8601, UTC). */ submittedAt: string; /** * Timestamp when the probe run reached a terminal status (ISO-8601, UTC). Null while non-terminal. */ completedAt: string | null; /** * Probe outcome plus completion timestamp. Populated only on terminal rows (succeeded / failed / cancelled). */ result: { /** * True when the harness exited cleanly and the LLM judge ruled the transcript satisfies the quality check. */ passed: boolean; /** * Harness exit code. Null when the harness never reached the exit step (build failure, submit-call rejection). */ exitCode: number | null; /** * JSON-encoded array of agent-service events captured during the probe run. The frontend re-parses it for the transcript viewer. */ transcript: string; /** * Human-readable reason the probe failed. For exit-code failures: the upstream error. For judge failures: the judge's one-line explanation. Null on passing runs. */ failureReason: string | null; /** * Timestamp when this probe run reached its terminal state (ISO-8601, UTC). Lets the UI render "last probed N minutes ago" without a second source of truth. */ runAt: string; } | null; /** * Timestamp when the probe-run row was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the probe-run row was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * Readiness of an environment's solver run-config menu for public execution. Existing seeded menus count as configured. */ export type RunConfigReadinessDto = { /** * Whether the environment solver menu has at least one reachable, locked run-config version that can authorize public execution. */ solverMenuReady: boolean; /** * Actionable reason the solver menu is not ready, or null when solverMenuReady is true. */ solverMenuIssue: 'missing' | 'stale' | null; }; /** * A background job tracked by the jobs_v2 framework. Scope ids are denormalized from the link tables for read convenience. */ export type RunConfigRunResponseDto = { /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ id: string; /** * Parent jobs_v2 id when this row was spawned as a child via a waiting_children result. Null for root jobs. */ parentJobId: string | null; /** * The user that created this job. Not a scope handle. */ userId: string; /** * Discriminator mapping to a registered strategy bundle (e.g. taiga_send, taiga_run_problem_version). */ type: string; /** * Optional human-readable label shown in lists. */ name: string | null; /** * Lifecycle state of a jobs_v2 row. Claimable: pending, waiting_external (gated by poll_after), aggregating. Parked: executing, waiting_children, cancelling. Terminal: completed, failed, cancelled. */ status: 'pending' | 'executing' | 'waiting_external' | 'waiting_children' | 'aggregating' | 'cancelling' | 'completed' | 'failed' | 'cancelled'; /** * Strategy-typed input. Validated against the per-type Zod schema at insert and dispatch. */ payload: unknown; /** * Live state across waiting_external poll cycles. Null for sync strategies and before the first poll. */ externalState: unknown | null; /** * Terminal output payload set when status transitions to completed. */ output: unknown | null; /** * Terminal error message set when status transitions to failed. */ errorMessage: string | null; /** * Budget units consumed by this row. Bumped by claimPending on each run claim, and by scheduleRetryInTrx on each poll/aggregate retry (i.e. when the strategy returns { kind: "retry" } from poll or onChildrenComplete). Normal poll/aggregate reclaims that did not return retry are not counted. */ attempts: number; /** * Retry budget. The row becomes terminally failed once attempts reaches this value. Default 1 (single attempt, no retry); raised per-type via registerJobType or per-row via the spawn spec. */ maxAttempts: number; /** * Earliest time this row is eligible to be claimed from status=pending. */ scheduledAt: string; /** * While status=waiting_external, earliest time the poll loop will invoke PollStrategy.poll. */ pollAfter: string | null; /** * Wall-clock timestamp the row first transitioned out of pending. Null until claimed. */ startedAt: string | null; /** * Wall-clock timestamp the row entered a terminal status. Null until terminal. */ completedAt: string | null; /** * Row creation timestamp. */ createdAt: string; /** * Row last-modified timestamp. */ updatedAt: string; /** * Environments this job is linked to (denormalized from environment_jobs). */ environmentIds?: Array; /** * Organizations this job is linked to (denormalized from organization_jobs). */ organizationIds?: Array; /** * Display names for the ids in organizationIds, keyed by organization id. Present only on platform-admin cross-organization reads. */ organizationNames?: { [key: string]: string; }; /** * Problems this job is linked to (denormalized from problem_jobs). */ problemIds?: Array; }; /** * One version of a run config. Versions move through the draft → (optionally verified by probe) → locked lifecycle; only locked versions are bindable to a role. */ export type RunConfigVersionDto = { /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ id: string; /** * Owning run-config identity. */ runConfigId: string; /** * Type discriminator copied from the parent run-config identity for client-side dispatch without a second request. */ type: 'agent-harness' | 'snapshot'; /** * Monotonically increasing version number within the owning run config. */ versionNumber: number; /** * Full payload for this version. Shape is keyed by the parent identity type. */ config: { /** * Fully qualified container image URL for the harness. Omit to inherit the platform default. */ harnessImageUrl?: string; /** * Fully qualified grader image URL paired with this harness. When set, new programmatic and mcp_tool_call grading configs pre-fill their grader image from it (the solver's companion grader image). Omit to use the platform default grader image. */ graderImageUrl?: string; /** * Container resource preset (CPU + memory). Omit to inherit the platform default. */ containerSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'xlarge-highmem' | 'xxlarge'; /** * GPU type attached to the container. Omit to run without GPU acceleration. */ gpuType?: 'T4' | 'L4' | 'A10G' | 'A100' | 'H100'; /** * When true, the container runs with elevated privileges. Required by harnesses that need Docker-in-Docker or raw block-device access. */ privileged?: boolean; /** * When true, requests KVM-backed nested virtualization. Requires privileged=true and a GKE launcher. */ nestedVirt?: boolean; /** * Explicit GKE node machine type (e.g. "e2-standard-16"), overriding the platform default. Not validated against a fixed set here — an invalid value is rejected by agent-service/GKE at submission. Takes priority over the machine type implied by nestedVirt when both are set. */ machineType?: string; /** * HTTP port the container exposes (snapshot/compute-only). Ignored by job submission and absent from the effective invocation. */ port?: number; /** * Package managers preinstalled in the harness image, used to drive setup snippets in the editor. */ installedPackageManagers?: Array<'pip' | 'uv' | 'npm' | 'cargo' | 'apt'>; /** * Extra CLI arguments appended to the harness command. Tokenized by whitespace split at submission time; quoted strings are not supported. */ args?: string; /** * Env vars injected into the container. Null values permitted for backward compatibility; the editor strips them on save. */ envVars?: { [key: string]: string | null; }; /** * External file mounts referencing previously uploaded objects. Valid only on snapshot-type configs; agent-harness configs attach files via the run_config_files join table instead and the server rejects this field on save. */ mounts?: Array<{ /** * Platform file ID referencing an object already uploaded to GCS. */ source: string; /** * Absolute container path where the referenced file is mounted at compute creation time. Must be absolute and must not contain parent-directory segments. */ mountPath: string; }>; /** * Env-var names this config expects the runner to inject. Resolved against the version's attached customer secrets at submit time. */ customerSecrets?: Array<{ /** * Env-var name (uppercase + digits + underscore, leading letter) the harness expects to receive at runtime; resolved against attached customer secrets at job-submit time. */ envVarName: string; }>; /** * Egress allowlist for the container. An empty list denies general outbound traffic; hosts independently authorized by attached proxy credentials remain reachable. Any list containing the exact '*' entry permits everything, and a nonempty list without '*' restricts general egress to those domains. Null explicitly selects no run-config egress policy and overrides an inherited problem-version allowlist; omission defers to the consuming context. */ allowedDomains?: Array | null; /** * Wall-clock timeout for the harness invocation (seconds). */ timeoutSeconds?: number; /** * MCP tools the harness exposes, as returned by the MCP service list_tools(). Metadata only — persisted for future grader-UI use and not consumed at submit time. */ mcpTools?: Array<{ /** * Tool name as exposed by the MCP service. The newer catalogue format encodes the service as a dotted prefix (e.g. "gitea.create_user"); use mcpToolServiceKey to extract it. */ name: string; /** * Human-readable description of what the tool does. */ description: string; /** * MCP service the tool belongs to. Omitted when encoded as the name prefix. */ service?: string; /** * Grouping category for the tool in UIs. */ category?: string; /** * Display ordering hint within a category. */ sortOrder?: number; /** * Whether the tool only reads state (no side effects). Omitted when unknown. */ readOnly?: boolean; /** * Tool invocation timeout in seconds. */ timeout?: number; /** * Tool input JSON Schema, stored as an opaque JSON string (see comment). */ inputSchema: string; /** * Optional human-friendly label for the service (MCP wire key _service_label). */ serviceLabel?: string; }>; /** * The WORLDSIM_BAKE_REF the mcpTools catalogue was discovered against. Server-owned: set during MCP tool discovery. On other writes a client-supplied value is ignored, and the stored tag is carried forward while mcpTools is unchanged (a changed WORLDSIM_BAKE_REF keeps it, so worldsim validation detects the mismatch) and cleared when mcpTools changes. Used when submitting problem versions to reject an MCP allowlist that would be materialized from a catalogue stale relative to the dispatch-time parent bake. */ mcpToolsBakeRef?: string; /** * Seeded-entity overrides for the worldsim MCP functional tool checks, as an opaque JSON-object string with the runner's snake_case keys (e.g. {"erpnext_company":"Northline","keycloak_realm":"northline"}). Emitted as the probe_context block of the mounted mcp-tools.yaml when a run forks the worldsim solver child from this config. Ignored when the problem version inherits the solver's MCP tools: the runner then reads the probe_context block of the file this config names in WORLDSIM_MCP_TOOLS_FILE. Only read by runs that set WORLDSIM_RUN_MCP_TOOL_CHECKS=true. */ mcpToolsProbeContext?: string; /** * Declared execution environment for a snapshot run config's persistent compute (container ref, shared/grade dirs, and image-supplied solver verbs). Omit to inherit the platform defaults. */ computeEnv?: { /** * Child-container name the platform runs the solver/grade verbs in (via docker exec). Omit to inherit the platform default. */ containerRef?: string; /** * Directory bind-mounted from the pod into the container where grade mounts land and are read. Omit to inherit the platform default. */ sharedMountDir?: string; /** * Directory a compute_exec grade writes $GRADE_OUTPUT into (on a path the exec side both writes and reads). Omit to inherit the platform default. */ gradeOutputDir?: string; /** * Image-supplied solver-lifecycle verb scripts. Omit to use the platform default verbs. */ runVerbs?: { /** * Optional child-container readiness probe; prints a verdict token before launch. */ readiness?: string; /** * Terminate any in-flight agent and clear prior-run state (idempotent). */ reset: string; /** * Launch the agent on $PROMPT, detached; the platform polls status afterward. */ submit: string; /** * Print exactly one ComputeRunPhase token to stdout. */ status: string; /** * Print the successful run result to stdout (read on completed). */ result: string; /** * Print failure diagnostics to stdout (read on failed). */ error: string; }; }; /** * Infra-retry policy override for runs launched from this run-config. Omit to use the platform default; an eval-level override (EvaluationMetadataSchema.retryPolicy) takes precedence over this when both are set. */ retryPolicy?: { /** * Additional attempts allowed after a failure classified as infra (container eviction, image pull error, queue orphan) before the run terminates as failed. Omit to use the platform default (2). */ maxInfraRetries?: number; }; }; /** * Container-authored default config values (placeholder values, not {}) for this version, generic across any run-config type. Read-only guidance the tuning create-form seeds from. Null/omitted when the container provides none. */ configTemplate?: { [key: string]: unknown; } | null; /** * Container-authored JSON Schema describing this version's config contract, generic across any run-config type. Validated against at tuning-run create when present; null/omitted skips validation. */ configSchema?: { [key: string]: unknown; } | null; /** * Probe spec used to verify this version before locking. Edits to this field clear the verification timestamp and the most-recent probe pointer. */ probe: { /** * Deterministic stdin handed to the agent when the probe runs. The verifier judges the resulting transcript against the quality check. */ prompt: string; /** * Optional additional input files staged alongside the prompt, used for harness-specific fixtures. */ files: Array<{ /** * GCS object path the agent-service FilesService reads when staging the probe. */ objectPath: string; /** * Absolute container path where the probe file is mounted at probe-run time. */ mountPath: string; }>; /** * Plain-English description of what a passing transcript looks like, fed to the LLM judge. Falls back to "Agent responded with the correct answer" when omitted. */ qualityCheck?: string; }; /** * Timestamp when the version was locked (ISO-8601, UTC). Null while still a draft. Locked versions are immutable and bindable to roles. */ lockedAt: string | null; /** * User who locked this version. Null while still a draft. */ lockedByUserId: string | null; /** * Timestamp when the most recent probe verified this draft (ISO-8601, UTC). Cleared when config / probe / attachments change. A passing probe before locking is recommended but not required. */ verifiedAt: string | null; /** * Pointer to the most recent probe-run for this draft. Cleared when config / probe / attachments change. The pointed-to row carries the transcript and judge result. */ lastProbeRunId: string | null; /** * Locked version this draft was forked from. Null when the draft was created from scratch (v1). */ parentRunConfigVersionId: string | null; /** * Free-form notes attached to this version. Null when not provided. */ notes: string | null; /** * User who created this version. */ createdByUserId: string; /** * User who last updated this version. Null when never updated since creation. */ updatedByUserId: string | null; /** * Timestamp when the version was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the version was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Array of run-config versions. */ export type RunConfigVersionListDto = Array<{ /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ id: string; /** * Owning run-config identity. */ runConfigId: string; /** * Type discriminator copied from the parent run-config identity for client-side dispatch without a second request. */ type: 'agent-harness' | 'snapshot'; /** * Monotonically increasing version number within the owning run config. */ versionNumber: number; /** * Full payload for this version. Shape is keyed by the parent identity type. */ config: { /** * Fully qualified container image URL for the harness. Omit to inherit the platform default. */ harnessImageUrl?: string; /** * Fully qualified grader image URL paired with this harness. When set, new programmatic and mcp_tool_call grading configs pre-fill their grader image from it (the solver's companion grader image). Omit to use the platform default grader image. */ graderImageUrl?: string; /** * Container resource preset (CPU + memory). Omit to inherit the platform default. */ containerSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'xlarge-highmem' | 'xxlarge'; /** * GPU type attached to the container. Omit to run without GPU acceleration. */ gpuType?: 'T4' | 'L4' | 'A10G' | 'A100' | 'H100'; /** * When true, the container runs with elevated privileges. Required by harnesses that need Docker-in-Docker or raw block-device access. */ privileged?: boolean; /** * When true, requests KVM-backed nested virtualization. Requires privileged=true and a GKE launcher. */ nestedVirt?: boolean; /** * Explicit GKE node machine type (e.g. "e2-standard-16"), overriding the platform default. Not validated against a fixed set here — an invalid value is rejected by agent-service/GKE at submission. Takes priority over the machine type implied by nestedVirt when both are set. */ machineType?: string; /** * HTTP port the container exposes (snapshot/compute-only). Ignored by job submission and absent from the effective invocation. */ port?: number; /** * Package managers preinstalled in the harness image, used to drive setup snippets in the editor. */ installedPackageManagers?: Array<'pip' | 'uv' | 'npm' | 'cargo' | 'apt'>; /** * Extra CLI arguments appended to the harness command. Tokenized by whitespace split at submission time; quoted strings are not supported. */ args?: string; /** * Env vars injected into the container. Null values permitted for backward compatibility; the editor strips them on save. */ envVars?: { [key: string]: string | null; }; /** * External file mounts referencing previously uploaded objects. Valid only on snapshot-type configs; agent-harness configs attach files via the run_config_files join table instead and the server rejects this field on save. */ mounts?: Array<{ /** * Platform file ID referencing an object already uploaded to GCS. */ source: string; /** * Absolute container path where the referenced file is mounted at compute creation time. Must be absolute and must not contain parent-directory segments. */ mountPath: string; }>; /** * Env-var names this config expects the runner to inject. Resolved against the version's attached customer secrets at submit time. */ customerSecrets?: Array<{ /** * Env-var name (uppercase + digits + underscore, leading letter) the harness expects to receive at runtime; resolved against attached customer secrets at job-submit time. */ envVarName: string; }>; /** * Egress allowlist for the container. An empty list denies general outbound traffic; hosts independently authorized by attached proxy credentials remain reachable. Any list containing the exact '*' entry permits everything, and a nonempty list without '*' restricts general egress to those domains. Null explicitly selects no run-config egress policy and overrides an inherited problem-version allowlist; omission defers to the consuming context. */ allowedDomains?: Array | null; /** * Wall-clock timeout for the harness invocation (seconds). */ timeoutSeconds?: number; /** * MCP tools the harness exposes, as returned by the MCP service list_tools(). Metadata only — persisted for future grader-UI use and not consumed at submit time. */ mcpTools?: Array<{ /** * Tool name as exposed by the MCP service. The newer catalogue format encodes the service as a dotted prefix (e.g. "gitea.create_user"); use mcpToolServiceKey to extract it. */ name: string; /** * Human-readable description of what the tool does. */ description: string; /** * MCP service the tool belongs to. Omitted when encoded as the name prefix. */ service?: string; /** * Grouping category for the tool in UIs. */ category?: string; /** * Display ordering hint within a category. */ sortOrder?: number; /** * Whether the tool only reads state (no side effects). Omitted when unknown. */ readOnly?: boolean; /** * Tool invocation timeout in seconds. */ timeout?: number; /** * Tool input JSON Schema, stored as an opaque JSON string (see comment). */ inputSchema: string; /** * Optional human-friendly label for the service (MCP wire key _service_label). */ serviceLabel?: string; }>; /** * The WORLDSIM_BAKE_REF the mcpTools catalogue was discovered against. Server-owned: set during MCP tool discovery. On other writes a client-supplied value is ignored, and the stored tag is carried forward while mcpTools is unchanged (a changed WORLDSIM_BAKE_REF keeps it, so worldsim validation detects the mismatch) and cleared when mcpTools changes. Used when submitting problem versions to reject an MCP allowlist that would be materialized from a catalogue stale relative to the dispatch-time parent bake. */ mcpToolsBakeRef?: string; /** * Seeded-entity overrides for the worldsim MCP functional tool checks, as an opaque JSON-object string with the runner's snake_case keys (e.g. {"erpnext_company":"Northline","keycloak_realm":"northline"}). Emitted as the probe_context block of the mounted mcp-tools.yaml when a run forks the worldsim solver child from this config. Ignored when the problem version inherits the solver's MCP tools: the runner then reads the probe_context block of the file this config names in WORLDSIM_MCP_TOOLS_FILE. Only read by runs that set WORLDSIM_RUN_MCP_TOOL_CHECKS=true. */ mcpToolsProbeContext?: string; /** * Declared execution environment for a snapshot run config's persistent compute (container ref, shared/grade dirs, and image-supplied solver verbs). Omit to inherit the platform defaults. */ computeEnv?: { /** * Child-container name the platform runs the solver/grade verbs in (via docker exec). Omit to inherit the platform default. */ containerRef?: string; /** * Directory bind-mounted from the pod into the container where grade mounts land and are read. Omit to inherit the platform default. */ sharedMountDir?: string; /** * Directory a compute_exec grade writes $GRADE_OUTPUT into (on a path the exec side both writes and reads). Omit to inherit the platform default. */ gradeOutputDir?: string; /** * Image-supplied solver-lifecycle verb scripts. Omit to use the platform default verbs. */ runVerbs?: { /** * Optional child-container readiness probe; prints a verdict token before launch. */ readiness?: string; /** * Terminate any in-flight agent and clear prior-run state (idempotent). */ reset: string; /** * Launch the agent on $PROMPT, detached; the platform polls status afterward. */ submit: string; /** * Print exactly one ComputeRunPhase token to stdout. */ status: string; /** * Print the successful run result to stdout (read on completed). */ result: string; /** * Print failure diagnostics to stdout (read on failed). */ error: string; }; }; /** * Infra-retry policy override for runs launched from this run-config. Omit to use the platform default; an eval-level override (EvaluationMetadataSchema.retryPolicy) takes precedence over this when both are set. */ retryPolicy?: { /** * Additional attempts allowed after a failure classified as infra (container eviction, image pull error, queue orphan) before the run terminates as failed. Omit to use the platform default (2). */ maxInfraRetries?: number; }; }; /** * Container-authored default config values (placeholder values, not {}) for this version, generic across any run-config type. Read-only guidance the tuning create-form seeds from. Null/omitted when the container provides none. */ configTemplate?: { [key: string]: unknown; } | null; /** * Container-authored JSON Schema describing this version's config contract, generic across any run-config type. Validated against at tuning-run create when present; null/omitted skips validation. */ configSchema?: { [key: string]: unknown; } | null; /** * Probe spec used to verify this version before locking. Edits to this field clear the verification timestamp and the most-recent probe pointer. */ probe: { /** * Deterministic stdin handed to the agent when the probe runs. The verifier judges the resulting transcript against the quality check. */ prompt: string; /** * Optional additional input files staged alongside the prompt, used for harness-specific fixtures. */ files: Array<{ /** * GCS object path the agent-service FilesService reads when staging the probe. */ objectPath: string; /** * Absolute container path where the probe file is mounted at probe-run time. */ mountPath: string; }>; /** * Plain-English description of what a passing transcript looks like, fed to the LLM judge. Falls back to "Agent responded with the correct answer" when omitted. */ qualityCheck?: string; }; /** * Timestamp when the version was locked (ISO-8601, UTC). Null while still a draft. Locked versions are immutable and bindable to roles. */ lockedAt: string | null; /** * User who locked this version. Null while still a draft. */ lockedByUserId: string | null; /** * Timestamp when the most recent probe verified this draft (ISO-8601, UTC). Cleared when config / probe / attachments change. A passing probe before locking is recommended but not required. */ verifiedAt: string | null; /** * Pointer to the most recent probe-run for this draft. Cleared when config / probe / attachments change. The pointed-to row carries the transcript and judge result. */ lastProbeRunId: string | null; /** * Locked version this draft was forked from. Null when the draft was created from scratch (v1). */ parentRunConfigVersionId: string | null; /** * Free-form notes attached to this version. Null when not provided. */ notes: string | null; /** * User who created this version. */ createdByUserId: string; /** * User who last updated this version. Null when never updated since creation. */ updatedByUserId: string | null; /** * Timestamp when the version was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the version was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * Array of run configs each bundled with the version most relevant to the requested scope. */ export type RunConfigWithVersionListDto = Array<{ /** * Stable run-config identifier (UUID). Versioned reusable solver / grader / QA / synthesizer config. */ id: string; /** * Scope at which this run config lives. Determines which environments / problems can see and bind it. */ scope: { /** * Discriminator: scope is platform-wide. */ level: 'system'; /** * Always null for system scope (no owning resource). */ id: null; } | { /** * Discriminator: scope is an organization. */ level: 'org'; /** * Organization that owns this scope. */ id: string; } | { /** * Discriminator: scope is an environment. */ level: 'env'; /** * Environment that owns this scope. */ id: string; } | { /** * Discriminator: scope is a problem. */ level: 'problem'; /** * Problem that owns this scope. */ id: string; }; /** * Identity-level discriminator. Selects payload schema, submit pipeline, and editor form for every version. */ type: 'agent-harness' | 'snapshot'; /** * Human-readable display name shown in pickers and the catalog. */ name: string; /** * Free-form description of what this run config is for. Null when not provided. */ description: string | null; /** * Locked version pinned as the role-agnostic default at this scope. Resolved after explicit problem-version / environment bindings miss, walking problem → env → org → system. Null when no default is set. */ defaultRunConfigVersionId?: string | null; /** * Free-form tags for list filtering, matched with OR (any-of) semantics by tag-filtered list endpoints. Empty when the run config is untagged. */ tags: Array; /** * User who created this run config. */ createdByUserId: string; /** * User who last updated this run config. Null when never updated since creation. */ updatedByUserId: string | null; /** * Timestamp when the run config was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the run config was last updated (ISO-8601, UTC). */ updatedAt: string; /** * The inlined single version (used by snapshot list responses to display version data without N+1 fetches). */ version: { /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ id: string; /** * Owning run-config identity. */ runConfigId: string; /** * Type discriminator copied from the parent run-config identity for client-side dispatch without a second request. */ type: 'agent-harness' | 'snapshot'; /** * Monotonically increasing version number within the owning run config. */ versionNumber: number; /** * Full payload for this version. Shape is keyed by the parent identity type. */ config: { /** * Fully qualified container image URL for the harness. Omit to inherit the platform default. */ harnessImageUrl?: string; /** * Fully qualified grader image URL paired with this harness. When set, new programmatic and mcp_tool_call grading configs pre-fill their grader image from it (the solver's companion grader image). Omit to use the platform default grader image. */ graderImageUrl?: string; /** * Container resource preset (CPU + memory). Omit to inherit the platform default. */ containerSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'xlarge-highmem' | 'xxlarge'; /** * GPU type attached to the container. Omit to run without GPU acceleration. */ gpuType?: 'T4' | 'L4' | 'A10G' | 'A100' | 'H100'; /** * When true, the container runs with elevated privileges. Required by harnesses that need Docker-in-Docker or raw block-device access. */ privileged?: boolean; /** * When true, requests KVM-backed nested virtualization. Requires privileged=true and a GKE launcher. */ nestedVirt?: boolean; /** * Explicit GKE node machine type (e.g. "e2-standard-16"), overriding the platform default. Not validated against a fixed set here — an invalid value is rejected by agent-service/GKE at submission. Takes priority over the machine type implied by nestedVirt when both are set. */ machineType?: string; /** * HTTP port the container exposes (snapshot/compute-only). Ignored by job submission and absent from the effective invocation. */ port?: number; /** * Package managers preinstalled in the harness image, used to drive setup snippets in the editor. */ installedPackageManagers?: Array<'pip' | 'uv' | 'npm' | 'cargo' | 'apt'>; /** * Extra CLI arguments appended to the harness command. Tokenized by whitespace split at submission time; quoted strings are not supported. */ args?: string; /** * Env vars injected into the container. Null values permitted for backward compatibility; the editor strips them on save. */ envVars?: { [key: string]: string | null; }; /** * External file mounts referencing previously uploaded objects. Valid only on snapshot-type configs; agent-harness configs attach files via the run_config_files join table instead and the server rejects this field on save. */ mounts?: Array<{ /** * Platform file ID referencing an object already uploaded to GCS. */ source: string; /** * Absolute container path where the referenced file is mounted at compute creation time. Must be absolute and must not contain parent-directory segments. */ mountPath: string; }>; /** * Env-var names this config expects the runner to inject. Resolved against the version's attached customer secrets at submit time. */ customerSecrets?: Array<{ /** * Env-var name (uppercase + digits + underscore, leading letter) the harness expects to receive at runtime; resolved against attached customer secrets at job-submit time. */ envVarName: string; }>; /** * Egress allowlist for the container. An empty list denies general outbound traffic; hosts independently authorized by attached proxy credentials remain reachable. Any list containing the exact '*' entry permits everything, and a nonempty list without '*' restricts general egress to those domains. Null explicitly selects no run-config egress policy and overrides an inherited problem-version allowlist; omission defers to the consuming context. */ allowedDomains?: Array | null; /** * Wall-clock timeout for the harness invocation (seconds). */ timeoutSeconds?: number; /** * MCP tools the harness exposes, as returned by the MCP service list_tools(). Metadata only — persisted for future grader-UI use and not consumed at submit time. */ mcpTools?: Array<{ /** * Tool name as exposed by the MCP service. The newer catalogue format encodes the service as a dotted prefix (e.g. "gitea.create_user"); use mcpToolServiceKey to extract it. */ name: string; /** * Human-readable description of what the tool does. */ description: string; /** * MCP service the tool belongs to. Omitted when encoded as the name prefix. */ service?: string; /** * Grouping category for the tool in UIs. */ category?: string; /** * Display ordering hint within a category. */ sortOrder?: number; /** * Whether the tool only reads state (no side effects). Omitted when unknown. */ readOnly?: boolean; /** * Tool invocation timeout in seconds. */ timeout?: number; /** * Tool input JSON Schema, stored as an opaque JSON string (see comment). */ inputSchema: string; /** * Optional human-friendly label for the service (MCP wire key _service_label). */ serviceLabel?: string; }>; /** * The WORLDSIM_BAKE_REF the mcpTools catalogue was discovered against. Server-owned: set during MCP tool discovery. On other writes a client-supplied value is ignored, and the stored tag is carried forward while mcpTools is unchanged (a changed WORLDSIM_BAKE_REF keeps it, so worldsim validation detects the mismatch) and cleared when mcpTools changes. Used when submitting problem versions to reject an MCP allowlist that would be materialized from a catalogue stale relative to the dispatch-time parent bake. */ mcpToolsBakeRef?: string; /** * Seeded-entity overrides for the worldsim MCP functional tool checks, as an opaque JSON-object string with the runner's snake_case keys (e.g. {"erpnext_company":"Northline","keycloak_realm":"northline"}). Emitted as the probe_context block of the mounted mcp-tools.yaml when a run forks the worldsim solver child from this config. Ignored when the problem version inherits the solver's MCP tools: the runner then reads the probe_context block of the file this config names in WORLDSIM_MCP_TOOLS_FILE. Only read by runs that set WORLDSIM_RUN_MCP_TOOL_CHECKS=true. */ mcpToolsProbeContext?: string; /** * Declared execution environment for a snapshot run config's persistent compute (container ref, shared/grade dirs, and image-supplied solver verbs). Omit to inherit the platform defaults. */ computeEnv?: { /** * Child-container name the platform runs the solver/grade verbs in (via docker exec). Omit to inherit the platform default. */ containerRef?: string; /** * Directory bind-mounted from the pod into the container where grade mounts land and are read. Omit to inherit the platform default. */ sharedMountDir?: string; /** * Directory a compute_exec grade writes $GRADE_OUTPUT into (on a path the exec side both writes and reads). Omit to inherit the platform default. */ gradeOutputDir?: string; /** * Image-supplied solver-lifecycle verb scripts. Omit to use the platform default verbs. */ runVerbs?: { /** * Optional child-container readiness probe; prints a verdict token before launch. */ readiness?: string; /** * Terminate any in-flight agent and clear prior-run state (idempotent). */ reset: string; /** * Launch the agent on $PROMPT, detached; the platform polls status afterward. */ submit: string; /** * Print exactly one ComputeRunPhase token to stdout. */ status: string; /** * Print the successful run result to stdout (read on completed). */ result: string; /** * Print failure diagnostics to stdout (read on failed). */ error: string; }; }; /** * Infra-retry policy override for runs launched from this run-config. Omit to use the platform default; an eval-level override (EvaluationMetadataSchema.retryPolicy) takes precedence over this when both are set. */ retryPolicy?: { /** * Additional attempts allowed after a failure classified as infra (container eviction, image pull error, queue orphan) before the run terminates as failed. Omit to use the platform default (2). */ maxInfraRetries?: number; }; }; /** * Container-authored default config values (placeholder values, not {}) for this version, generic across any run-config type. Read-only guidance the tuning create-form seeds from. Null/omitted when the container provides none. */ configTemplate?: { [key: string]: unknown; } | null; /** * Container-authored JSON Schema describing this version's config contract, generic across any run-config type. Validated against at tuning-run create when present; null/omitted skips validation. */ configSchema?: { [key: string]: unknown; } | null; /** * Probe spec used to verify this version before locking. Edits to this field clear the verification timestamp and the most-recent probe pointer. */ probe: { /** * Deterministic stdin handed to the agent when the probe runs. The verifier judges the resulting transcript against the quality check. */ prompt: string; /** * Optional additional input files staged alongside the prompt, used for harness-specific fixtures. */ files: Array<{ /** * GCS object path the agent-service FilesService reads when staging the probe. */ objectPath: string; /** * Absolute container path where the probe file is mounted at probe-run time. */ mountPath: string; }>; /** * Plain-English description of what a passing transcript looks like, fed to the LLM judge. Falls back to "Agent responded with the correct answer" when omitted. */ qualityCheck?: string; }; /** * Timestamp when the version was locked (ISO-8601, UTC). Null while still a draft. Locked versions are immutable and bindable to roles. */ lockedAt: string | null; /** * User who locked this version. Null while still a draft. */ lockedByUserId: string | null; /** * Timestamp when the most recent probe verified this draft (ISO-8601, UTC). Cleared when config / probe / attachments change. A passing probe before locking is recommended but not required. */ verifiedAt: string | null; /** * Pointer to the most recent probe-run for this draft. Cleared when config / probe / attachments change. The pointed-to row carries the transcript and judge result. */ lastProbeRunId: string | null; /** * Locked version this draft was forked from. Null when the draft was created from scratch (v1). */ parentRunConfigVersionId: string | null; /** * Free-form notes attached to this version. Null when not provided. */ notes: string | null; /** * User who created this version. */ createdByUserId: string; /** * User who last updated this version. Null when never updated since creation. */ updatedByUserId: string | null; /** * Timestamp when the version was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the version was last updated (ISO-8601, UTC). */ updatedAt: string; }; }>; /** * A read snapshot of a job's live training telemetry, projected from run_events. Render precomputed blocks only — no stats math in the consumer. */ export type RunEventsSnapshotDto = { /** * Most recently ingested status envelope for this job, or null if none has arrived yet. */ status: { /** * Contract schema version of this status envelope. */ schema_version: 1; /** * Kind of job emitting this status (eval/train/harvest). */ job_type: 'eval' | 'train' | 'harvest'; /** * Trainer-authored run name for this job. */ name: string; /** * Authoritative run state (the single source of truth for status). */ state: 'running' | 'completed' | 'failed' | 'stalled' | 'idle'; /** * Model identifier the job is training or evaluating. */ model?: string | null; /** * Epoch seconds when the job started, if known. */ started_at?: number | null; /** * Epoch seconds when this status envelope was emitted. */ updated_at: number; /** * Seconds elapsed since the job started. */ elapsed_s?: number | null; /** * Estimated seconds remaining, when the job reports one. */ eta_s?: number | null; /** * Count-based (done/expected) OR step-based (step/total_steps); a job fills whichever axis it has. */ progress?: { /** * Units completed so far on the count-based axis. */ done?: number | null; /** * Total units expected on the count-based axis. */ expected?: number | null; /** * Units currently in flight on the count-based axis. */ in_flight?: number | null; /** * Units not yet started on the count-based axis. */ pending?: number | null; /** * Current step index on the step-based axis. */ step?: number | null; /** * Total planned steps on the step-based axis. */ total_steps?: number | null; /** * Fraction complete in [0, 1], when the job reports one. */ pct?: number | null; }; /** * Rollout throughput snapshot at status-report time. */ throughput?: { /** * Rollouts running concurrently at report time. */ concurrency?: number | null; /** * Configured ceiling on concurrent rollouts. */ max_concurrency?: number | null; /** * Token generation rate across active rollouts. */ tokens_per_s?: number | null; /** * Completed-units rate (rollouts or steps per second). */ units_per_s?: number | null; }; /** * Opaque artifact references the job has produced so far. */ artifacts?: Array; /** * Reference to a tail of the job log stream. */ log_tail_ref?: string | null; /** * Free-form, plugin-owned metrics block (deliberately untyped beyond object). Rendered as raw text only -- never charted. For anything that must appear on a dashboard panel, emit a blocks document (BlocksDocumentSchema) instead. */ metrics?: { [key: string]: unknown; }; /** * Free-form, plugin-owned headline block (deliberately untyped beyond object). Rendered as raw text only -- never charted. For anything that must appear on a dashboard panel, emit a blocks document (BlocksDocumentSchema) instead. */ headline?: { [key: string]: unknown; }; /** * Bounded live rollout telemetry; absent or null when the trainer does not report live rollout progress. */ live?: { /** * Rollouts currently in flight. */ in_flight: number; /** * Total rollouts tracked in this live window. */ total: number; /** * Rollouts actively running right now. */ running: number; /** * Rollouts that have finished successfully. */ completed: number; /** * Rollouts that have failed. */ failed: number; /** * Rollouts that were cancelled. */ cancelled: number; /** * Seconds since the most recent live heartbeat across all rollouts. */ last_heartbeat_age_s?: number | null; /** * Bounded per-rollout progress sample (a subset when many are in flight). */ per_rollout?: Array<{ /** * Opaque agent-service run id for this in-flight rollout. */ run_id: string; /** * Sequence index of the rollout within its step. */ seq?: number | null; /** * Current agent turn number within the rollout. */ turn?: number | null; /** * Tokens generated so far in this rollout. */ tokens?: number | null; /** * Seconds since this rollout last made observable progress. */ last_progress_age_s?: number | null; /** * This rollout's current in-flight phase: 'generating' the trajectory, or 'grading' the completed trajectory. Absent when the trainer does not report a phase (treated as 'generating'). */ phase?: 'generating' | 'grading' | null; }>; /** * Count of in-flight rollouts omitted from the per_rollout sample. */ per_rollout_dropped: number; } | null; } | null; /** * Blocks documents ingested for this job, ordered oldest to newest by step, capped to a bounded recent window. */ blocks: Array<{ /** * Contract schema version of this blocks document. */ schema_version: 1; /** * Trainer step this blocks document belongs to. */ step: number; /** * True when the step is final and its blocks are safe to cache indefinitely. */ frozen: boolean; /** * Typed telemetry blocks with read-side container normalization applied. */ blocks: Array<{ /** * Trainer-authored title shown above the rendered block. */ title: string; /** * Optional trainer-authored subtitle for the block. */ subtitle?: string | null; /** * Block-type discriminant. */ type: 'scalar-tiles'; /** * Scalar-tiles payload: the row of headline tiles. */ data: { /** * Ordered tiles rendered left to right. */ tiles: Array<{ /** * Tile caption shown beside the value. */ label: string; /** * Opaque tile value (numeric or preformatted string). */ value: number | string; /** * Optional unit suffix rendered after the value. */ unit?: string | null; /** * Optional change-from-previous value for the tile. */ delta?: number | null; /** * Optional color-tone hint for the delta (positive/negative/neutral). */ tone?: 'pos' | 'neg' | 'neutral' | null; }>; }; } | { /** * Trainer-authored title shown above the rendered block. */ title: string; /** * Optional trainer-authored subtitle for the block. */ subtitle?: string | null; /** * Block-type discriminant. */ type: 'series'; /** * Series payload: this step incremental line data plus axis hints. */ data: { /** * Whether the x-axis is step index or wall-clock time. 'step': the platform concatenates this step's incremental points onto every prior step's for the same line key into one continuous cross-step trend chart -- each document must carry only THIS step's own new points, never replay history. 'time': the line stays scoped to this one step's own within-step curve and is never concatenated across steps (e.g. throughput sampled during the step). */ axis: 'step' | 'time'; /** * Named lines composing this chart. */ lines: Array<{ /** * Stable series key used to match the line across steps. */ key: string; /** * Human-readable line label shown in the legend. */ label: string; /** * Optional group id for stacking or shared styling. */ group?: string | null; /** * This step's incremental points for the line. */ points: Array<{ /** * X coordinate (step index or timestamp, per the block axis). */ x: number; /** * Y value at this x, or null where the trainer has none. */ y: number | null; }>; }>; /** * Whether this step contributed any points (vs a placeholder frame). */ present: boolean; /** * Per-series axis/mark hints, or an empty array when none were emitted. */ axes: Array<{ /** * Series key this axis hint applies to. */ key: string; /** * Which vertical axis the series is drawn against. */ side: 'left' | 'right'; /** * Optional mark style override for the series. */ kind?: 'line' | 'scatter' | 'area' | null; }>; }; } | { /** * Trainer-authored title shown above the rendered block. */ title: string; /** * Optional trainer-authored subtitle for the block. */ subtitle?: string | null; /** * Block-type discriminant. */ type: 'histogram'; /** * Histogram payload: the precomputed bins. */ data: { /** * Contiguous histogram bins, low to high. */ bins: Array<{ /** * Inclusive lower edge of the bin range. */ lo: number; /** * Exclusive upper edge of the bin range. */ hi: number; /** * Number of samples falling in this bin. */ count: number; }>; }; } | { /** * Trainer-authored title shown above the rendered block. */ title: string; /** * Optional trainer-authored subtitle for the block. */ subtitle?: string | null; /** * Block-type discriminant. */ type: 'boxplot'; /** * Boxplot payload: the boxes, accompanying stats, and raw group stds. */ data: { /** * Precomputed Tukey boxes rendered side by side. */ boxes: Array<{ /** * Category label for this box. */ label: string; /** * Minimum observed value in the box category. */ lo: number; /** * First quartile (25th percentile). */ q1: number; /** * Median (50th percentile). */ median: number; /** * Third quartile (75th percentile). */ q3: number; /** * Maximum observed value in the box category. */ hi: number; /** * Lower Tukey-fence whisker endpoint. */ whisker_lo: number; /** * Upper Tukey-fence whisker endpoint. */ whisker_hi: number; /** * Values beyond the whiskers. */ outliers: Array; }>; /** * Labeled scalars shown alongside the boxes. */ stats: Array<{ /** * Caption for the accompanying scalar. */ label: string; /** * Scalar value shown alongside the boxes. */ value: number; }>; /** * Raw per-group standard deviations, retained for server-side pooling. */ group_stds: Array; }; } | { /** * Trainer-authored title shown above the rendered block. */ title: string; /** * Optional trainer-authored subtitle for the block. */ subtitle?: string | null; /** * Block-type discriminant. */ type: 'pills'; /** * Pills payload: the summary header and per-group rollout pips. */ data: { /** * Summary counts shown above a pills block, e.g. groups complete / target. */ header: { /** * Groups that have reached their target rollout count. */ groups_complete: number; /** * Total groups targeted for this step. */ groups_target: number; /** * Total rollouts collected across all groups. */ rollouts: number; /** * Groups whose rollouts all share one constant reward. */ constant_groups: number; /** * Rollouts carried over from a prior step, when any. */ carryover?: number | null; }; /** * Per-task groups rendered as rollout pips. */ groups: Array<{ /** * Task identifier this group of rollouts belongs to. */ task_id: string; /** * Per-rollout slots for the group. */ slots: Array<{ /** * Whether this slot has a completed rollout. */ filled: boolean; /** * Reward for the slot rollout, when available. */ reward?: number | null; /** * Final agent turn count of the slot rollout, when available. */ turn?: number | null; /** * Total tokens generated by the slot rollout, when available. */ tokens?: number | null; /** * Slot render state: complete, constant-reward group, or still accumulating. */ tone: 'complete' | 'constant' | 'accumulating'; /** * Opaque agent-service run id for this rollout, when one exists. Never parsed by the platform -- carried only so the UI can link out to the run. */ rollout_run_id?: string; }>; /** * Rollouts collected for the group so far. */ n: number; /** * Target rollout count for the group. */ target: number; /** * Mean reward across the group rollouts. */ mean?: number | null; /** * Standard deviation of reward across the group. */ std?: number | null; /** * Minimum reward observed in the group. */ min?: number | null; /** * Maximum reward observed in the group. */ max?: number | null; }>; }; } | { /** * Trainer-authored title shown above the rendered block. */ title: string; /** * Optional trainer-authored subtitle for the block. */ subtitle?: string | null; /** * Block-type discriminant. */ type: 'grading-counts'; /** * Grading-counts payload: overall totals plus a per-step breakdown. */ data: { /** * Grading-progress totals: in-flight/complete/failed grader-row counts. */ totals: { /** * Grader rows currently being graded. */ in_flight: number; /** * Grader rows that finished grading. */ complete: number; /** * Grader rows that failed grading. */ failed: number; }; /** * Grading counts broken down per step. */ by_step: Array<{ /** * Step these counts belong to, or null for the not-yet-stepped bucket. */ step: number | null; /** * Grader rows in flight for the step. */ in_flight: number; /** * Grader rows completed for the step. */ complete: number; /** * Grader rows failed for the step. */ failed: number; }>; }; } | { /** * Trainer-authored title shown above the rendered block. */ title: string; /** * Optional trainer-authored subtitle for the block. */ subtitle?: string | null; /** * Block-type discriminant. */ type: 'table-page'; /** * Table-page payload: metadata describing where rows are fetched lazily from. */ data: { /** * Whether the table holds train or eval rows. */ kind: 'train' | 'eval'; /** * Ordered column keys for the paginated rows. */ columns?: Array; /** * Total row count available across all pages. */ total: number; /** * Mean reward across the rows, when computable. */ mean_reward: number | null; /** * Rows per page used by the lazy row fetch. */ page_size: number; /** * Opaque identifier of the row source to paginate against. */ source: string; }; } | { /** * Trainer-authored title shown above the rendered block. */ title: string; /** * Optional trainer-authored subtitle for the block. */ subtitle?: string | null; /** * Block-type discriminant. */ type: 'inflight-list'; /** * Inflight-list payload: the in-progress rollouts and their live progress. */ data: { /** * Total in-flight rollouts represented. */ total: number; /** * Per-rollout progress entries for the in-flight list. */ per_rollout: Array<{ /** * Opaque agent-service run id for this in-flight rollout. */ run_id: string; /** * Sequence index of the rollout within its step. */ seq?: number | null; /** * Current agent turn number within the rollout. */ turn?: number | null; /** * Tokens generated so far in this rollout. */ tokens?: number | null; /** * Seconds since this rollout last made observable progress. */ last_progress_age_s?: number | null; /** * This rollout's current in-flight phase: 'generating' the trajectory, or 'grading' the completed trajectory. Absent when the trainer does not report a phase (treated as 'generating'). */ phase?: 'generating' | 'grading' | null; }>; }; }>; }>; /** * Terminal record for this job, once it has finished. */ terminal: { /** * Contract schema version of this terminal record. */ schema_version: 1; /** * Terminal outcome of the training run. */ status: 'completed' | 'failed'; /** * Opaque reference to the final checkpoint produced by the training run; null when the run produced no checkpoint. */ final_checkpoint_ref: string | null; /** * Identifier of the produced output model, when one was published. */ output_model_id: string | null; /** * Trainer-side job id for this run. */ trainer_job_id: string | null; /** * Human-readable final checkpoint label (distinct from the opaque ref). */ final_checkpoint: string | null; /** * Total optimizer steps completed by the run. */ steps: number | null; /** * Reference to the run metrics.jsonl artifact. */ metrics_ref: string; /** * Reference to the final job_status.json artifact. */ job_status_ref: string; /** * Generic human-readable terminal failure reason, when the trainer reports one (relayed verbatim, never parsed). */ error_message?: string | null; } | { /** * Contract schema version of this terminal record. */ schema_version: 1; /** * Discriminant marking the eval sub-mode terminal shape. */ mode: 'eval'; /** * Terminal outcome of the eval pass. */ status: 'completed' | 'failed'; /** * Opaque reference to the checkpoint evaluated by this pass; null when no checkpoint was available. */ final_checkpoint_ref: string | null; /** * Identifier of the evaluated output model, when one applies. */ output_model_id: string | null; /** * Trainer step this evaluation pass was run at. */ eval_step: number; /** * Free-form eval result payload, or null when none was produced. */ eval: { [key: string]: unknown; } | null; /** * Reference to the eval result artifact. */ eval_ref: string; /** * Reference to the final job_status.json artifact. */ job_status_ref: string; } | null; /** * Pooled five-number summaries for every boxplot-block title present in blocks, computed once server-side across the full fetched window — see PooledBoxplotSchema. */ pooledBoxplots: Array<{ /** * Boxplot-block title this pooled summary was computed for. */ title: string; /** * Boxplot-block subtitle, when the source block carried one. */ subtitle: string | null; /** * Box-plot five-number summary (min/q1/median/q3/max) plus Tukey-fence outliers. */ summary: { /** * Smallest observed value in the sample. */ min: number; /** * First quartile (25th percentile), type-7 interpolation. */ q1: number; /** * Median (50th percentile), type-7 interpolation. */ median: number; /** * Third quartile (75th percentile), type-7 interpolation. */ q3: number; /** * Largest observed value in the sample. */ max: number; /** * Values outside [q1 - 1.5*IQR, q3 + 1.5*IQR] (Tukey fences). */ outliers: Array; }; /** * Mean of the pooled group_stds, or null when empty. */ mean: number | null; /** * Count of raw group_stds values pooled across all fetched steps. */ n: number; }>; }; /** * An environment-scoped secret binding. The secret value itself lives in Secret Manager; this record carries only metadata and policy. */ export type SecretDto = { /** * Stable environment-secret identifier (UUID). */ id: string; /** * Environment that owns this secret binding. */ environmentId: string; /** * Environment-variable name the egress proxy injects the credential under. */ name: string; /** * Upstream host the secret is allowed to be sent to. Null on legacy bindings predating the swap-credential runtime path. */ upstreamHost: string | null; /** * HTTP header the secret value is written into on outbound requests. Null on legacy bindings predating the swap-credential runtime path. */ headerName: string | null; /** * Timestamp when the secret was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the secret was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Array of secrets visible at the requested scope. */ export type SecretListDto = Array<{ /** * Stable environment-secret identifier (UUID). */ id: string; /** * Environment that owns this secret binding. */ environmentId: string; /** * Environment-variable name the egress proxy injects the credential under. */ name: string; /** * Upstream host the secret is allowed to be sent to. Null on legacy bindings predating the swap-credential runtime path. */ upstreamHost: string | null; /** * HTTP header the secret value is written into on outbound requests. Null on legacy bindings predating the swap-credential runtime path. */ headerName: string | null; /** * Timestamp when the secret was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the secret was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * Health and reachability status for each downstream agent-service dependency. */ export type ServicesStatusListDto = Array<{ /** * Provider-specific status payload (HTTP code, latency, error message, etc.). */ details: { [key: string]: string | number | boolean | Array | { [key: string]: unknown; } | null; }; /** * Stable identifier for the service used as a dictionary key in admin UIs. */ key: string; /** * ISO timestamp of the most recent health probe, or null if the service has never been checked. */ last_checked: string | null; /** * Human-readable service name. */ name: string; /** * Origin of the status reading (e.g. an internal probe or a third-party service.) */ source: string; /** * Operational state: operational, degraded, down, or unknown. */ status: 'operational' | 'degraded' | 'down' | 'unknown'; }>; /** * Request body to toggle the marketplace "featured" flag on a public environment. */ export type SetFeaturedBodyDto = { /** * Whether the public environment should be featured on the marketplace homepage. */ featured: boolean; }; /** * Response payload returned after toggling the featured status of a public environment. */ export type SetFeaturedResponseDto = { /** * Updated public-environment record after the featured flag was toggled. */ publicEnvironment: { /** * Stable public-environment identifier (UUID). */ id: string; /** * Underlying environment this public listing surfaces. */ environmentId: string; /** * Display name of the environment shown in the public catalog. */ environmentName: string; /** * Marketing-friendly description shown in the public catalog. */ description: string; /** * Cover image URL displayed alongside the public listing. */ imageUrl: string; /** * True when this environment is currently featured on the public landing page. */ isFeatured: boolean; /** * Timestamp when the environment was most recently featured (ISO-8601, UTC). Null if never featured. */ featuredAt: string | null; /** * Timestamp when the public-environment record was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the public-environment record was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Output filename resolved as a thumbnail on each problem card, or null when preview is not configured. */ previewFilename: string | null; }; /** * Total number of environments currently featured after the update. */ featuredCount: number; }; /** * Request body for toggling a slot menu entry inclusion. */ export type SetMenuInclusionBodyDto = { /** * Whether the entry is included by default (starred) for the slot. */ included: boolean; }; /** * Request body for setting a slot menu lock. */ export type SetSlotLockBodyDto = { /** * Whether the slot is locked to exactly its included (starred) set. */ isLocked: boolean; }; /** * Request body for sharing an environment with another organization. Idempotent: re-sharing returns the existing share row. */ export type ShareEnvironmentDto = { /** * External identifier of the organization the environment is being shared with. */ organizationExternalId: string; }; /** * A single grant of read-visibility for one environment to one recipient organization. */ export type SharedEnvironmentDto = { /** * Internal UUID of the share row. */ id: string; /** * Environment being shared. */ environmentId: string; /** * Recipient organization the environment is shared with. */ organizationId: string; /** * When the share was created. */ createdAt: string; }; /** * Request body for minting one or more signed upload URLs that target object storage directly, bypassing the API server. */ export type SignedUploadUrlRequestDto = { /** * Files the client intends to upload in this batch. */ files: Array<{ /** * Filename to record on the resulting upload. */ filename: string; /** * MIME type the client will send with the PUT. */ contentType: string; }>; }; /** * Response carrying signed upload URLs and target object paths for a batch upload request. */ export type SignedUploadUrlResponseDto = { /** * Signed upload slots, in the same order as the requested files. */ files: Array<{ /** * Signed PUT URL the client should upload bytes to. */ uploadUrl: string; /** * Object-storage path that the upload writes to; pass back to finalize. */ objectPath: string; /** * Filename echoed back so clients can correlate slots. */ filename: string; }>; }; /** * Every installable Claude skill, with a one-line summary. */ export type SkillListResponseDto = Array<{ /** * Skill name (filename stem) — pass it to the install command, e.g. "recursion". */ name: string; /** * One-line summary taken from the skill's frontmatter (may be empty). */ description: string; }>; /** * A Claude skill's markdown content plus its content-hash version. */ export type SkillResponseDto = { /** * Skill name (filename stem), e.g. "recursion". */ name: string; /** * Content hash (sha256 hex) of the authored skill markdown. Staleness is a plain string compare against this value. */ version: string; /** * The full skill markdown, with a `skill-version:` line injected into its frontmatter so the downloaded file is self-describing. */ content: string; }; /** * Request body for clearing a QA-gated workflow stage, either via passing gates or via explicit override. */ export type StageClearanceRequestBodyDto = { /** * Workflow stage to clear via passing QA results. */ stage: 'locking' | 'running' | 'submitting'; /** * Must be omitted or false in the passthrough variant. */ override?: false; } | { /** * Workflow stage to clear despite failing QA gates. */ stage: 'locking' | 'running' | 'submitting'; /** * Must be true to engage the override variant. */ override: true; /** * Human-readable justification recorded with the override. */ overrideReason: string; }; /** * Outcome of a stage clearance request, including any issue created to record an override. */ export type StageClearanceResponseDto = { /** * True if the stage was successfully cleared. */ cleared: boolean; /** * Issue created to record an override. Null when the stage was cleared without override. */ overrideIssueId: string | null; }; /** * Request body for storing a transcript payload against the current scope. */ export type StoreTranscriptBodyDto = { /** * Raw transcript content to persist; must be non-empty. */ content: string; }; /** * Response body after a new probe-run is submitted. */ export type SubmitProbeResponseDto = { /** * New probe-run row the client should poll for terminal status. */ probeRunId: string; /** * Current status of the newly submitted probe-run — typically pending or running. */ status: 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled'; /** * Timestamp when the probe run was submitted (ISO-8601, UTC). */ submittedAt: string; }; /** * User-defined synthesizer job persisted at the environment level. */ export type SynthesizerJobDto = { /** * Discriminator marking this synthesizer as a user-defined job (vs. a built-in). */ kind: 'user'; /** * Stable synthesizer-job identifier (UUID). */ id: string; /** * Stable environment identifier (UUID). */ environmentId: string; /** * Display name of the synthesizer. */ name: string; /** * Free-form description of the synthesizer. */ description: string | null; /** * System prompt sent to the agent that drives the synthesis pipeline. */ systemPrompt: string; /** * Run-config version pinned for this synthesizer, supplying harness and model. Null when no binding is set. */ runConfigVersionId: string | null; /** * Display name of the synthesizer run-config bound to this job, denormalized via JOIN. */ runConfigName: string | null; /** * Version number of the synthesizer run-config-version, denormalized via JOIN. */ runConfigVersionNumber: number | null; /** * Declares which problem-version artifacts are bundled into the input tarball for the agent. */ contextInputs: { /** * File buckets to include in the synthesizer input tarball. */ files: { /** * Include the problem primary files in the input tarball. */ problem: boolean; /** * Include supporting (read-only) files in the input tarball. */ supporting: boolean; /** * Include grader-support files (non-gold) in the input tarball. */ graderSupport: boolean; /** * Include gold-standard files in the input tarball. */ goldStandard: boolean; }; /** * When true, include the problem version current rubrics in the input tarball. */ rubrics: boolean; /** * Existing problem-version field values to copy into the manifest so the synthesizer can condition on them. */ currentFieldValues: Array<'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId'>; /** * When true, include the active form schema and current answers in the manifest. Defaults to false for backward compatibility. */ forms: boolean; }; /** * Allowed write targets for this synthesizer. */ targetFields: Array<'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId' | 'rubrics' | 'formAnswers' | 'problemFiles' | 'supportingFiles' | 'graderSupportFiles'>; /** * Files attached to this synthesizer and mounted into the agent container. */ files: Array<{ /** * Stable identifier of the synthesizer-job file attachment. */ id: string; /** * Stable file identifier (UUID). Files are problem-scoped uploads. */ fileId: string; /** * Original filename of the attached file. */ filename: string; /** * Absolute path inside the synthesizer container where this file is mounted. */ mountPath: string; /** * Size of the file in bytes; null when unknown. */ sizeBytes: number | null; /** * Timestamp when the file was attached to the synthesizer job (ISO-8601, UTC). */ createdAt: string; }>; /** * Always true for user-defined synthesizers; mirrored from built-ins so consumers can filter the unified list without branching. */ enabled: true; /** * Timestamp when the synthesizer was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the synthesizer was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * File attached to a user-defined synthesizer job and mounted into the agent container at run time. */ export type SynthesizerJobFileResponseDto = { /** * Stable identifier of the synthesizer-job file attachment. */ id: string; /** * Stable file identifier (UUID). Files are problem-scoped uploads. */ fileId: string; /** * Original filename of the attached file. */ filename: string; /** * Absolute path inside the synthesizer container where this file is mounted. */ mountPath: string; /** * Size of the file in bytes; null when unknown. */ sizeBytes: number | null; /** * Timestamp when the file was attached to the synthesizer job (ISO-8601, UTC). */ createdAt: string; }; /** * Discriminated union of synthesizers exposed by the platform: either a user-defined job or a hardcoded built-in. */ export type SynthesizerListDto = Array<{ /** * Discriminator marking this synthesizer as a user-defined job (vs. a built-in). */ kind: 'user'; /** * Stable synthesizer-job identifier (UUID). */ id: string; /** * Stable environment identifier (UUID). */ environmentId: string; /** * Display name of the synthesizer. */ name: string; /** * Free-form description of the synthesizer. */ description: string | null; /** * System prompt sent to the agent that drives the synthesis pipeline. */ systemPrompt: string; /** * Run-config version pinned for this synthesizer, supplying harness and model. Null when no binding is set. */ runConfigVersionId: string | null; /** * Display name of the synthesizer run-config bound to this job, denormalized via JOIN. */ runConfigName: string | null; /** * Version number of the synthesizer run-config-version, denormalized via JOIN. */ runConfigVersionNumber: number | null; /** * Declares which problem-version artifacts are bundled into the input tarball for the agent. */ contextInputs: { /** * File buckets to include in the synthesizer input tarball. */ files: { /** * Include the problem primary files in the input tarball. */ problem: boolean; /** * Include supporting (read-only) files in the input tarball. */ supporting: boolean; /** * Include grader-support files (non-gold) in the input tarball. */ graderSupport: boolean; /** * Include gold-standard files in the input tarball. */ goldStandard: boolean; }; /** * When true, include the problem version current rubrics in the input tarball. */ rubrics: boolean; /** * Existing problem-version field values to copy into the manifest so the synthesizer can condition on them. */ currentFieldValues: Array<'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId'>; /** * When true, include the active form schema and current answers in the manifest. Defaults to false for backward compatibility. */ forms: boolean; }; /** * Allowed write targets for this synthesizer. */ targetFields: Array<'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId' | 'rubrics' | 'formAnswers' | 'problemFiles' | 'supportingFiles' | 'graderSupportFiles'>; /** * Files attached to this synthesizer and mounted into the agent container. */ files: Array<{ /** * Stable identifier of the synthesizer-job file attachment. */ id: string; /** * Stable file identifier (UUID). Files are problem-scoped uploads. */ fileId: string; /** * Original filename of the attached file. */ filename: string; /** * Absolute path inside the synthesizer container where this file is mounted. */ mountPath: string; /** * Size of the file in bytes; null when unknown. */ sizeBytes: number | null; /** * Timestamp when the file was attached to the synthesizer job (ISO-8601, UTC). */ createdAt: string; }>; /** * Always true for user-defined synthesizers; mirrored from built-ins so consumers can filter the unified list without branching. */ enabled: true; /** * Timestamp when the synthesizer was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the synthesizer was last updated (ISO-8601, UTC). */ updatedAt: string; } | { /** * Discriminator marking this synthesizer as a built-in shipped with the platform. */ kind: 'built-in'; /** * Stable string key identifying a hardcoded built-in synthesizer. */ key: 'improve-prompt' | 'generate-tools' | 'generate-rubrics'; /** * Display name of the built-in synthesizer. */ name: string; /** * Description of what this built-in synthesizer does. */ description: string; /** * Hardcoded system prompt the built-in sends to the agent. */ systemPrompt: string; /** * Inputs the built-in bundles into the synthesizer input tarball. */ contextInputs: { /** * File buckets to include in the synthesizer input tarball. */ files: { /** * Include the problem primary files in the input tarball. */ problem: boolean; /** * Include supporting (read-only) files in the input tarball. */ supporting: boolean; /** * Include grader-support files (non-gold) in the input tarball. */ graderSupport: boolean; /** * Include gold-standard files in the input tarball. */ goldStandard: boolean; }; /** * When true, include the problem version current rubrics in the input tarball. */ rubrics: boolean; /** * Existing problem-version field values to copy into the manifest so the synthesizer can condition on them. */ currentFieldValues: Array<'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId'>; /** * When true, include the active form schema and current answers in the manifest. Defaults to false for backward compatibility. */ forms: boolean; }; /** * Targets the built-in is allowed to write to. */ targetFields: Array<'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId' | 'rubrics' | 'formAnswers' | 'problemFiles' | 'supportingFiles' | 'graderSupportFiles'>; /** * Reflects the environment-level disable toggle; disabled built-ins are still listed for re-enabling but cannot be triggered. */ enabled: boolean; }>; /** * Single execution of a synthesizer against a problem version, capturing the produced diff and audit metadata. */ export type SynthesizerRunDto = { /** * Stable synthesizer-run identifier (UUID). One execution of a synthesizer job. */ id: string; /** * User-defined synthesizer job that triggered this run; mutually exclusive with the built-in key. */ synthesizerJobId: string | null; /** * Built-in synthesizer key that triggered this run; mutually exclusive with the synthesizer job id. */ builtInKey: 'improve-prompt' | 'generate-tools' | 'generate-rubrics' | null; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * User who triggered the run. Null for system-initiated runs. */ triggeredByUserId: string | null; /** * Lifecycle status of a synthesizer run. */ status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled'; /** * A single entry inside a synthesizer diff payload — either a form-answers row, a standard row, or a file-bucket diff. */ diffPayload: Array<{ /** * Diff-entry target marker for the form-answers row. */ target: 'formAnswers'; /** * Diff-entry kind marker for row-shaped (non-file) diffs. */ kind: 'row'; /** * Current form-answers value on the problem version. */ current: unknown; /** * Proposed form-answers value produced by the synthesizer. */ proposed: unknown; /** * Whether the caller is permitted to apply this diff entry against the active form version. */ canWrite: boolean; /** * Stable form-version identifier (UUID). */ formVersionId: string; } | { /** * Row target this diff entry applies to, excluding form-answers. */ target: 'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId' | 'rubrics'; /** * Diff-entry kind marker for row-shaped (non-file) diffs. */ kind: 'row'; /** * Current field value on the problem version. */ current: unknown; /** * Proposed field value produced by the synthesizer. */ proposed: unknown; /** * Whether the caller is permitted to apply this diff entry given environment permissions. */ canWrite: boolean; } | { /** * File bucket this diff entry applies to. */ target: 'problemFiles' | 'supportingFiles' | 'graderSupportFiles'; /** * Diff-entry kind marker for file-bucket diffs. */ kind: 'file'; /** * Current file list in this bucket on the problem version. */ current: Array<{ /** * Relative filename of the synthesized file. */ filename: string; /** * File contents — UTF-8 text for non-binary entries, base64-encoded bytes for binary entries. Null only on legacy rows that predate binary-apply support. */ contents: string | null; /** * True when the file bytes are not safely UTF-8 decodable. */ isBinary: boolean; /** * Mount path inside the grader container; only set for grader-support files. */ mountPath?: string | null; }>; /** * Proposed file list in this bucket produced by the synthesizer. */ proposed: Array<{ /** * Relative filename of the synthesized file. */ filename: string; /** * File contents — UTF-8 text for non-binary entries, base64-encoded bytes for binary entries. Null only on legacy rows that predate binary-apply support. */ contents: string | null; /** * True when the file bytes are not safely UTF-8 decodable. */ isBinary: boolean; /** * Mount path inside the grader container; only set for grader-support files. */ mountPath?: string | null; }>; /** * Whether the caller is permitted to apply this file-bucket diff. */ canWrite: boolean; }>; /** * Targets from the most recent successful apply. Empty when no targets have been applied; appliedAt and appliedByUserId identify the latest successful apply. */ appliedTargets: Array<'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId' | 'rubrics' | 'formAnswers' | 'problemFiles' | 'supportingFiles' | 'graderSupportFiles'>; /** * Timestamp of the most recent successful apply (ISO-8601, UTC). Null if never applied. */ appliedAt: string | null; /** * User who performed the most recent successful apply. Null if never applied. */ appliedByUserId: string | null; /** * Error message captured when the run failed. Null otherwise. */ errorMessage: string | null; /** * Timestamp when the run started executing (ISO-8601, UTC). Null before start. */ startedAt: string | null; /** * Timestamp when the run reached a terminal status (ISO-8601, UTC). Null while in-flight. */ completedAt: string | null; /** * Timestamp when the run was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the run was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Run-config-version that drove this synthesizer run, captured at run-insert time for audit fidelity. */ synthesizerRunConfigVersionId: string | null; /** * Display name of the synthesizer run-config bound to this run, denormalized via JOIN. */ synthesizerRunConfigName: string | null; /** * Version number of the synthesizer run-config-version, denormalized via JOIN. */ synthesizerRunConfigVersionNumber: number | null; }; /** * Cursor-paginated page of synthesizer runs. */ export type SynthesizerRunPageDto = { /** * Items in this page, ordered per the requested sort. */ items: Array<{ /** * Stable synthesizer-run identifier (UUID). One execution of a synthesizer job. */ id: string; /** * User-defined synthesizer job that triggered this run; mutually exclusive with the built-in key. */ synthesizerJobId: string | null; /** * Built-in synthesizer key that triggered this run; mutually exclusive with the synthesizer job id. */ builtInKey: 'improve-prompt' | 'generate-tools' | 'generate-rubrics' | null; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * User who triggered the run. Null for system-initiated runs. */ triggeredByUserId: string | null; /** * Lifecycle status of a synthesizer run. */ status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled'; /** * A single entry inside a synthesizer diff payload — either a form-answers row, a standard row, or a file-bucket diff. */ diffPayload: Array<{ /** * Diff-entry target marker for the form-answers row. */ target: 'formAnswers'; /** * Diff-entry kind marker for row-shaped (non-file) diffs. */ kind: 'row'; /** * Current form-answers value on the problem version. */ current: unknown; /** * Proposed form-answers value produced by the synthesizer. */ proposed: unknown; /** * Whether the caller is permitted to apply this diff entry against the active form version. */ canWrite: boolean; /** * Stable form-version identifier (UUID). */ formVersionId: string; } | { /** * Row target this diff entry applies to, excluding form-answers. */ target: 'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId' | 'rubrics'; /** * Diff-entry kind marker for row-shaped (non-file) diffs. */ kind: 'row'; /** * Current field value on the problem version. */ current: unknown; /** * Proposed field value produced by the synthesizer. */ proposed: unknown; /** * Whether the caller is permitted to apply this diff entry given environment permissions. */ canWrite: boolean; } | { /** * File bucket this diff entry applies to. */ target: 'problemFiles' | 'supportingFiles' | 'graderSupportFiles'; /** * Diff-entry kind marker for file-bucket diffs. */ kind: 'file'; /** * Current file list in this bucket on the problem version. */ current: Array<{ /** * Relative filename of the synthesized file. */ filename: string; /** * File contents — UTF-8 text for non-binary entries, base64-encoded bytes for binary entries. Null only on legacy rows that predate binary-apply support. */ contents: string | null; /** * True when the file bytes are not safely UTF-8 decodable. */ isBinary: boolean; /** * Mount path inside the grader container; only set for grader-support files. */ mountPath?: string | null; }>; /** * Proposed file list in this bucket produced by the synthesizer. */ proposed: Array<{ /** * Relative filename of the synthesized file. */ filename: string; /** * File contents — UTF-8 text for non-binary entries, base64-encoded bytes for binary entries. Null only on legacy rows that predate binary-apply support. */ contents: string | null; /** * True when the file bytes are not safely UTF-8 decodable. */ isBinary: boolean; /** * Mount path inside the grader container; only set for grader-support files. */ mountPath?: string | null; }>; /** * Whether the caller is permitted to apply this file-bucket diff. */ canWrite: boolean; }>; /** * Targets from the most recent successful apply. Empty when no targets have been applied; appliedAt and appliedByUserId identify the latest successful apply. */ appliedTargets: Array<'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId' | 'rubrics' | 'formAnswers' | 'problemFiles' | 'supportingFiles' | 'graderSupportFiles'>; /** * Timestamp of the most recent successful apply (ISO-8601, UTC). Null if never applied. */ appliedAt: string | null; /** * User who performed the most recent successful apply. Null if never applied. */ appliedByUserId: string | null; /** * Error message captured when the run failed. Null otherwise. */ errorMessage: string | null; /** * Timestamp when the run started executing (ISO-8601, UTC). Null before start. */ startedAt: string | null; /** * Timestamp when the run reached a terminal status (ISO-8601, UTC). Null while in-flight. */ completedAt: string | null; /** * Timestamp when the run was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the run was last updated (ISO-8601, UTC). */ updatedAt: string; /** * Run-config-version that drove this synthesizer run, captured at run-insert time for audit fidelity. */ synthesizerRunConfigVersionId: string | null; /** * Display name of the synthesizer run-config bound to this run, denormalized via JOIN. */ synthesizerRunConfigName: string | null; /** * Version number of the synthesizer run-config-version, denormalized via JOIN. */ synthesizerRunConfigVersionNumber: number | null; }>; /** * Cursor for fetching the next page, or null when this is the last page. */ nextCursor: string | null; /** * Total number of items matching the filter across all pages. */ total: number; }; /** * Array of tags available in the environment. */ export type TagListDto = Array<{ /** * Stable tag identifier (UUID). A tag is a reusable, environment-scoped (or platform-default) label. */ id: string; /** * Environment that owns this tag, or null for a platform-default tag available to every environment. */ environmentId: string | null; /** * Human-readable tag label (e.g. "FINAL"). Trimmed; unique within its scope. */ label: string; /** * Badge color as a 6-digit hex string (e.g. "#22c55e"). */ color: string; /** * Optional human-readable description of what the tag signifies. */ description: string | null; /** * User who created the tag; null for seeded platform-default tags. */ createdByUserId: string | null; /** * Timestamp when the tag was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the tag was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * A reusable label. Platform-default tags (environmentId null) are seeded and shared; custom tags belong to one environment. */ export type TagResponseDto = { /** * Stable tag identifier (UUID). A tag is a reusable, environment-scoped (or platform-default) label. */ id: string; /** * Environment that owns this tag, or null for a platform-default tag available to every environment. */ environmentId: string | null; /** * Human-readable tag label (e.g. "FINAL"). Trimmed; unique within its scope. */ label: string; /** * Badge color as a 6-digit hex string (e.g. "#22c55e"). */ color: string; /** * Optional human-readable description of what the tag signifies. */ description: string | null; /** * User who created the tag; null for seeded platform-default tags. */ createdByUserId: string | null; /** * Timestamp when the tag was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the tag was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * One row in the org-scoped Taiga image catalog. */ export type TaigaImageDto = { /** * Stable identifier (UUID) for a row in the org-scoped Taiga image catalog. */ id: string; /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * User-facing label for a catalog entry. Unique within an org so the env integration picker is unambiguous. */ name: string; /** * Optional human notes about the image — what was built, when, with which deps. */ description: string | null; /** * Free-form Dockerfile lines authored by the user. Inserted between the platform-managed head + tail templates at build time. Typically 'RUN pip install …' or 'RUN apt-get install …' — see the dialog's preview for the full assembled file. Empty means 'platform base, no extras'. */ userDockerfile: string; /** * Build lifecycle of a Taiga image catalog row. */ buildStatus: 'pending' | 'building' | 'ready' | 'failed'; /** * Google Cloud Build operation id. Set when the build is submitted; null while in 'pending'. */ cloudBuildId: string | null; /** * Cloud Build console URL — exposed in the admin UI as "View logs". */ buildLogUrl: string | null; /** * Failure message from the build worker — set only when buildStatus = 'failed'. */ buildError: string | null; /** * Resolved registry URI (with digest) once the build succeeds. Null until buildStatus = 'ready'. */ builtImageUrl: string | null; /** * ISO-8601 UTC timestamp of the successful POST /api/docker-images/register on Taiga. Null until the taiga_image_source_upload JobsV2 child completes. Populated independently from buildStatus — a row can be 'ready' for a short window before source upload finishes. */ taigaSourceUploadedAt: string | null; /** * Taiga-side docker-image uuid returned by POST /api/docker-images/register. Stored for cross-reference; not a foreign key (Taiga owns the lifetime of that row). */ taigaSourceId: string | null; /** * Taiga-side source-tarball path returned by POST /api/docker-images/register — the location where Taiga claims the uploaded tarball was stored. Nullable: per a 2026-06-17 audit of taiga.ant.dev, legacy direct-POST uploads leave this null; only the new presigned-PUT flow populates it. Surface as a post-mortem "where did it go" pointer; the bytes can be re-fetched via Taiga's docker-image download endpoint. */ taigaSourcePath: string | null; /** * User who created this catalog entry; null for legacy or system-created entries. */ createdById: string | null; /** * ISO-8601 UTC timestamp when the catalog entry was created. */ createdAt: string; /** * ISO-8601 UTC timestamp when the catalog entry was last updated. */ updatedAt: string; }; /** * Response for GET /v1/organizations/:organizationId/taiga-images. Returned unpaginated because the catalog is bounded by manual admin actions and is expected to remain small per organization. */ export type TaigaImageListDto = { /** * Active (non-soft-deleted) catalog entries for the organization, ordered by creation time. */ items: Array<{ /** * Stable identifier (UUID) for a row in the org-scoped Taiga image catalog. */ id: string; /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * User-facing label for a catalog entry. Unique within an org so the env integration picker is unambiguous. */ name: string; /** * Optional human notes about the image — what was built, when, with which deps. */ description: string | null; /** * Free-form Dockerfile lines authored by the user. Inserted between the platform-managed head + tail templates at build time. Typically 'RUN pip install …' or 'RUN apt-get install …' — see the dialog's preview for the full assembled file. Empty means 'platform base, no extras'. */ userDockerfile: string; /** * Build lifecycle of a Taiga image catalog row. */ buildStatus: 'pending' | 'building' | 'ready' | 'failed'; /** * Google Cloud Build operation id. Set when the build is submitted; null while in 'pending'. */ cloudBuildId: string | null; /** * Cloud Build console URL — exposed in the admin UI as "View logs". */ buildLogUrl: string | null; /** * Failure message from the build worker — set only when buildStatus = 'failed'. */ buildError: string | null; /** * Resolved registry URI (with digest) once the build succeeds. Null until buildStatus = 'ready'. */ builtImageUrl: string | null; /** * ISO-8601 UTC timestamp of the successful POST /api/docker-images/register on Taiga. Null until the taiga_image_source_upload JobsV2 child completes. Populated independently from buildStatus — a row can be 'ready' for a short window before source upload finishes. */ taigaSourceUploadedAt: string | null; /** * Taiga-side docker-image uuid returned by POST /api/docker-images/register. Stored for cross-reference; not a foreign key (Taiga owns the lifetime of that row). */ taigaSourceId: string | null; /** * Taiga-side source-tarball path returned by POST /api/docker-images/register — the location where Taiga claims the uploaded tarball was stored. Nullable: per a 2026-06-17 audit of taiga.ant.dev, legacy direct-POST uploads leave this null; only the new presigned-PUT flow populates it. Surface as a post-mortem "where did it go" pointer; the bytes can be re-fetched via Taiga's docker-image download endpoint. */ taigaSourcePath: string | null; /** * User who created this catalog entry; null for legacy or system-created entries. */ createdById: string | null; /** * ISO-8601 UTC timestamp when the catalog entry was created. */ createdAt: string; /** * ISO-8601 UTC timestamp when the catalog entry was last updated. */ updatedAt: string; }>; }; /** * A background job tracked by the jobs_v2 framework. Scope ids are denormalized from the link tables for read convenience. */ export type TaigaSubmissionResponseDto = { /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ id: string; /** * Parent jobs_v2 id when this row was spawned as a child via a waiting_children result. Null for root jobs. */ parentJobId: string | null; /** * The user that created this job. Not a scope handle. */ userId: string; /** * Discriminator mapping to a registered strategy bundle (e.g. taiga_send, taiga_run_problem_version). */ type: string; /** * Optional human-readable label shown in lists. */ name: string | null; /** * Lifecycle state of a jobs_v2 row. Claimable: pending, waiting_external (gated by poll_after), aggregating. Parked: executing, waiting_children, cancelling. Terminal: completed, failed, cancelled. */ status: 'pending' | 'executing' | 'waiting_external' | 'waiting_children' | 'aggregating' | 'cancelling' | 'completed' | 'failed' | 'cancelled'; /** * Strategy-typed input. Validated against the per-type Zod schema at insert and dispatch. */ payload: unknown; /** * Live state across waiting_external poll cycles. Null for sync strategies and before the first poll. */ externalState: unknown | null; /** * Terminal output payload set when status transitions to completed. */ output: unknown | null; /** * Terminal error message set when status transitions to failed. */ errorMessage: string | null; /** * Budget units consumed by this row. Bumped by claimPending on each run claim, and by scheduleRetryInTrx on each poll/aggregate retry (i.e. when the strategy returns { kind: "retry" } from poll or onChildrenComplete). Normal poll/aggregate reclaims that did not return retry are not counted. */ attempts: number; /** * Retry budget. The row becomes terminally failed once attempts reaches this value. Default 1 (single attempt, no retry); raised per-type via registerJobType or per-row via the spawn spec. */ maxAttempts: number; /** * Earliest time this row is eligible to be claimed from status=pending. */ scheduledAt: string; /** * While status=waiting_external, earliest time the poll loop will invoke PollStrategy.poll. */ pollAfter: string | null; /** * Wall-clock timestamp the row first transitioned out of pending. Null until claimed. */ startedAt: string | null; /** * Wall-clock timestamp the row entered a terminal status. Null until terminal. */ completedAt: string | null; /** * Row creation timestamp. */ createdAt: string; /** * Row last-modified timestamp. */ updatedAt: string; /** * Environments this job is linked to (denormalized from environment_jobs). */ environmentIds?: Array; /** * Organizations this job is linked to (denormalized from organization_jobs). */ organizationIds?: Array; /** * Display names for the ids in organizationIds, keyed by organization id. Present only on platform-admin cross-organization reads. */ organizationNames?: { [key: string]: string; }; /** * Problems this job is linked to (denormalized from problem_jobs). */ problemIds?: Array; }; /** * Standard flat error response body emitted by the platform exception filter. `code` is the stable machine-readable discriminant. */ export type TargetApiErrorAuthHeaderMissing = { /** * Stable machine-readable error code. */ code: 'auth_header_missing'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Standard flat error response body emitted by the platform exception filter. `code` is the stable machine-readable discriminant. */ export type TargetApiErrorForbidden = { /** * Stable machine-readable error code. */ code: 'forbidden'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Standard flat error response body emitted by the platform exception filter. `code` is the stable machine-readable discriminant. */ export type TargetApiErrorIdempotencyConflict = { /** * Stable machine-readable error code. */ code: 'idempotency_conflict'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Standard flat error response body emitted by the platform exception filter. `code` is the stable machine-readable discriminant. */ export type TargetApiErrorIdempotencyInProgress = { /** * Stable machine-readable error code. */ code: 'idempotency_in_progress'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Standard flat error response body emitted by the platform exception filter. `code` is the stable machine-readable discriminant. */ export type TargetApiErrorInternalError = { /** * Stable machine-readable error code. */ code: 'internal_error'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Standard flat error response body emitted by the platform exception filter. `code` is the stable machine-readable discriminant. */ export type TargetApiErrorInvalidRequest = { /** * Stable machine-readable error code. */ code: 'invalid_request'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Standard flat error response body emitted by the platform exception filter. `code` is the stable machine-readable discriminant. */ export type TargetApiErrorInvariantViolation = { /** * Stable machine-readable error code. */ code: 'invariant_violation'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Standard flat error response body emitted by the platform exception filter. `code` is the stable machine-readable discriminant. */ export type TargetApiErrorNotFound = { /** * Stable machine-readable error code. */ code: 'not_found'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Standard flat error response body emitted by the platform exception filter. `code` is the stable machine-readable discriminant. */ export type TargetApiErrorOrgHeaderMissing = { /** * Stable machine-readable error code. */ code: 'org_header_missing'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Standard flat error response body emitted by the platform exception filter. `code` is the stable machine-readable discriminant. */ export type TargetApiErrorRateLimitExceeded = { /** * Stable machine-readable error code. */ code: 'rate_limit_exceeded'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Standard flat error response body emitted by the platform exception filter. `code` is the stable machine-readable discriminant. */ export type TargetApiErrorUnauthorized = { /** * Stable machine-readable error code. */ code: 'unauthorized'; /** * Human-readable error message. */ message: string; /** * Optional structured details. Validation failures expose their field-level issues under `details.issues`. */ details?: { /** * Boundary-validation failures as path-prefixed human-readable messages. */ issues?: Array; [key: string]: unknown; }; }; /** * Identifies the template problem and its current version for an environment. */ export type TemplateResponseDto = { /** * Stable problem identifier (UUID). */ problemId: string; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ versionId: string; /** * True when the template was created by this request, false when an existing template was returned. Omitted on endpoints that do not distinguish. */ created?: boolean; }; /** * The platform's generated training-contract JSON Schemas, keyed by filename (e.g. "blocks-telemetry.schema.json"), plus a non-schema "training-contract-guide.json" entry carrying the narrative version/drift/panel-mapping story as { content: string }. Served verbatim from the committed generated artifacts -- never re-derived at request time. */ export type TrainingContractResponseDto = { [key: string]: { [key: string]: unknown; }; }; /** * Stored request/response log produced by a single source run (solver, grader, or synthesizer). */ export type TranscriptDto = { /** * Stable transcript identifier (UUID). Captures the request / response log of a problem run. */ id: string; /** * Origin run type that produced the transcript content. */ sourceType: 'problem_run' | 'grading_run' | 'rubric_score' | 'synthesizer_run' | 'qa_job' | 'agent_turn'; /** * UUID of the source run (problem_run, grading_run, rubric_score, or synthesizer_run). */ sourceId: string; /** * Raw serialized transcript content (typically newline-delimited JSON events). */ content: string; /** * Timestamp when the transcript was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the transcript was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * One async transcript-reformat run: enqueue returns 202 with the run id, then a background poller writes the terminal result back for the UI to poll. */ export type TranscriptReformatRunDto = { /** * Stable transcript-reformat-run identifier (UUID). One async re-segmentation attempt at one problem run’s transcript, executed off the request path by a background poller. */ id: string; /** * Problem run whose transcript this run re-segments. */ problemRunId: string; /** * Lifecycle status of this reformat run. */ status: 'pending' | 'running' | 'succeeded' | 'failed'; /** * Re-segmentation outcome. Populated only on a terminal succeeded run; null otherwise. */ result: { /** * Discriminant marking that the transcript was re-segmented into turns. */ status: 'reformatted'; /** * Re-segmented turns reconstructed from the original transcript. */ turns: Array<{ /** * Short label summarizing this turn, or null when no concise label fits. */ heading: string | null; /** * Ordered thinking / assistant blocks that make up this turn. */ blocks: Array<{ /** * Kind of re-segmented block: internal reasoning (thinking) or the model’s visible response (assistant). */ type: 'thinking' | 'assistant'; /** * Markdown content of this block, extracted from the original transcript. */ content: string; }>; }>; /** * True when the source transcript was too long to send in full, so its middle was dropped before re-segmentation — the reformatted turns are therefore incomplete. Set server-side, not by the model. */ truncated: boolean; } | { /** * Discriminant marking that the transcript needed no re-segmentation. */ status: 'already_formatted'; /** * Human-readable explanation that the transcript is already well formatted. */ message: string; /** * True when the source transcript was too long to send in full, so the already-formatted verdict is based only on its start and end rather than the whole transcript. Set server-side, not by the model. Defaults to false so a rolling rollback to a backend revision predating this field never fails validation for the common already-formatted case. */ truncated: boolean; } | null; /** * User-facing failure reason. Populated only on a terminal failed run; null otherwise. */ errorMessage: string | null; /** * Timestamp when the reformat run was enqueued (ISO-8601, UTC). */ submittedAt: string; /** * Timestamp when the reformat run reached a terminal status (ISO-8601, UTC). Null while non-terminal. */ completedAt: string | null; }; /** * Handle to an enqueued transcript-reformat run, returned by the async enqueue endpoint. */ export type TranscriptReformatRunRefDto = { /** * Identifier of the enqueued (or already in-flight) reformat run to poll. */ reformatRunId: string; /** * Status of the reformat run at enqueue time. */ status: 'pending' | 'running' | 'succeeded' | 'failed'; }; /** * Payload for triggering a QA-job batch across multiple problems with optional aggregate roll-up. */ export type TriggerQaJobBatchBodyDto = { /** * Stable QA-config identifier (UUID). */ qaConfigId: string; /** * Problems to evaluate; each receives an individual QA job in the batch. */ problemIds: Array; /** * When true, an additional aggregate-kind QA job is queued to roll up the batch results. */ includeAggregate?: boolean; /** * Per-job timeout override in seconds applied to every job. */ timeoutSeconds?: number; /** * Per-job CPU allocation in milli-CPUs. */ cpuMilli?: number; /** * Per-job memory allocation in MiB. */ memoryMib?: number; /** * Per-job retry budget applied to every job. Applies to single-container QA kinds (standard, grading-oracle, metrics-validator), where a failed or unusable attempt is re-dispatched until the budget is spent. Ignored by the composite kinds (gtGradingOracle, standard-composite), which always run a single attempt. */ maxRetries?: number; /** * Optional HTTPS webhook URL invoked when each job in the batch finishes. */ callbackUrl?: string; /** * Bearer token sent in the bearer authorization header of each callback request. */ callbackToken?: string; }; /** * Payload for triggering a single QA job against one problem (optionally pinned to a specific version). */ export type TriggerQaJobBodyDto = { /** * Stable QA-config identifier (UUID). */ qaConfigId: string; /** * Stable problem identifier (UUID). */ problemId: string; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId?: string; /** * Optional gold reference transcript for gt-grading-oracle QA jobs; when omitted the backend synthesizes one from the gold outputs + problem prompt. Ignored by non-oracle QA jobs. */ goldReferenceTranscript?: { /** * Discriminator: inline gold reference transcript text. */ kind: 'text'; /** * Inline gold reference transcript content. */ content: string; } | { /** * Discriminator: gold reference transcript by file id. */ kind: 'file'; /** * Identifier of the uploaded gold reference transcript file. */ fileId: string; } | null; /** * Per-job timeout override in seconds. */ timeoutSeconds?: number; /** * Per-job CPU allocation override in milli-CPUs. */ cpuMilli?: number; /** * Per-job memory allocation override in MiB. */ memoryMib?: number; /** * Per-job retry budget override. Applies to single-container QA kinds (standard, grading-oracle, metrics-validator), where a failed or unusable attempt is re-dispatched until the budget is spent. Ignored by the composite kinds (gtGradingOracle, standard-composite), which always run a single attempt. */ maxRetries?: number; /** * Optional HTTPS webhook URL invoked when the QA job finishes. */ callbackUrl?: string; /** * Bearer token sent in the bearer authorization header of the callback request. */ callbackToken?: string; }; /** * Payload for triggering a synthesizer run. Must set exactly one of the synthesizer job id (user-defined) or built-in key (built-in). */ export type TriggerSynthesizerRunBodyDto = { /** * Stable synthesizer-job identifier (UUID). */ synthesizerJobId?: string; /** * Stable string key identifying a hardcoded built-in synthesizer. */ builtInKey?: 'improve-prompt' | 'generate-tools' | 'generate-rubrics'; }; /** * A background job tracked by the jobs_v2 framework. Scope ids are denormalized from the link tables for read convenience. */ export type TuningRunResponseDto = { /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ id: string; /** * Parent jobs_v2 id when this row was spawned as a child via a waiting_children result. Null for root jobs. */ parentJobId: string | null; /** * The user that created this job. Not a scope handle. */ userId: string; /** * Discriminator mapping to a registered strategy bundle (e.g. taiga_send, taiga_run_problem_version). */ type: string; /** * Optional human-readable label shown in lists. */ name: string | null; /** * Lifecycle state of a jobs_v2 row. Claimable: pending, waiting_external (gated by poll_after), aggregating. Parked: executing, waiting_children, cancelling. Terminal: completed, failed, cancelled. */ status: 'pending' | 'executing' | 'waiting_external' | 'waiting_children' | 'aggregating' | 'cancelling' | 'completed' | 'failed' | 'cancelled'; /** * Strategy-typed input. Validated against the per-type Zod schema at insert and dispatch. */ payload: unknown; /** * Live state across waiting_external poll cycles. Null for sync strategies and before the first poll. */ externalState: unknown | null; /** * Terminal output payload set when status transitions to completed. */ output: unknown | null; /** * Terminal error message set when status transitions to failed. */ errorMessage: string | null; /** * Budget units consumed by this row. Bumped by claimPending on each run claim, and by scheduleRetryInTrx on each poll/aggregate retry (i.e. when the strategy returns { kind: "retry" } from poll or onChildrenComplete). Normal poll/aggregate reclaims that did not return retry are not counted. */ attempts: number; /** * Retry budget. The row becomes terminally failed once attempts reaches this value. Default 1 (single attempt, no retry); raised per-type via registerJobType or per-row via the spawn spec. */ maxAttempts: number; /** * Earliest time this row is eligible to be claimed from status=pending. */ scheduledAt: string; /** * While status=waiting_external, earliest time the poll loop will invoke PollStrategy.poll. */ pollAfter: string | null; /** * Wall-clock timestamp the row first transitioned out of pending. Null until claimed. */ startedAt: string | null; /** * Wall-clock timestamp the row entered a terminal status. Null until terminal. */ completedAt: string | null; /** * Row creation timestamp. */ createdAt: string; /** * Row last-modified timestamp. */ updatedAt: string; /** * Environments this job is linked to (denormalized from environment_jobs). */ environmentIds?: Array; /** * Organizations this job is linked to (denormalized from organization_jobs). */ organizationIds?: Array; /** * Display names for the ids in organizationIds, keyed by organization id. Present only on platform-admin cross-organization reads. */ organizationNames?: { [key: string]: string; }; /** * Problems this job is linked to (denormalized from problem_jobs). */ problemIds?: Array; }; /** * Request body to partially update a skill. Slug is immutable. */ export type UpdateAgentSkillDto = { /** * Updated human-readable skill name. */ name?: string; /** * Updated short description for the harness skills index. */ description?: string; /** * Replacement SKILL.md bundle file id. Mutable by design — editing affects every referencing agent on its next turn. */ fileId?: string; }; /** * Request body for updating a customer secret. Supports metadata edits and optional credential rotation. */ export type UpdateCustomerSecretDto = { /** * New upstream hostname; omit to leave unchanged. */ upstreamHost?: string; /** * New HTTP header the egress proxy injects the credential into; omit to leave unchanged. */ headerName?: string; /** * Optional credential rotation; when provided, replaces the stored secret with this value and bumps the version. */ value?: string; }; /** * Patch body for /environments/:environmentId/integrations. Each integration is independently optional and patch-shaped. */ export type UpdateEnvironmentIntegrationsDto = { /** * Patch-style update for the Taiga integration. Omitting a field leaves the existing value untouched. */ taiga?: { /** * When true, the Send-to-Taiga button is visible in the env-overview toolbar. */ enabled?: boolean; /** * Default Taiga env id pre-filled in the Send-to-Taiga dialog. Null leaves the field empty. */ defaultEnvId?: string | null; /** * Default solver model forwarded to Taiga at submission time. Null falls back to the platform default at dialog render time. */ defaultApiModelName?: string | null; /** * Default attempts-per-problem forwarded to Taiga at submission time. Null falls back to the platform default. */ defaultNAttemptsPerProblem?: number | null; /** * When true, the problem editor disables grading shapes that Send-to-Taiga can't honor (max composition) and the backend rejects locking a draft whose grading_config contains any of them. A per-leaf programmatic graderImage is not gated — it is ignored on Taiga (the grade runs in the env image). */ strictCompatibility?: boolean; /** * When true, locking a problem version eagerly pushes it to Taiga (creates/updates the corresponding Taiga problem + problem-version). When false, the push happens lazily on the next Send-to-Taiga. */ syncOnLock?: boolean; /** * Per-env image URL used as the Taiga problem container. Required when sync-on-lock is enabled (lock validation rejects an empty value in that case) and on every Send-to-Taiga submission (the per-submission dialog can pick a different image, but one or the other must resolve). The gate does NOT fire merely because the integration is enabled. Picked from the org's Taiga image catalog via the integration UI — selection copies the built image URI here, snapshot-style. Stored as plain text with no FK to the catalog, so catalog deletions do not invalidate existing integrations. */ taigaImageUrl?: string | null; /** * When true (default), Send-to-Taiga imports each Taiga problem-run back into Recursion as a problem_run row. When false, the export runs on Taiga but no Recursion problem_runs are created. */ importProblemRunResults?: boolean; }; }; /** * Patch-style update body for environment settings. Omitting a field leaves the existing value untouched; null explicitly clears the override where allowed. */ export type UpdateEnvironmentSettingsDto = { /** * Per-file size cap (bytes) for imported problem files. Null clears the override (use platform default); omit to leave unchanged. */ maxImportFileSizeBytes?: number | null; /** * Per-file size cap (bytes) for direct uploads. Null clears the override (use platform default); omit to leave unchanged. */ maxUploadFileSizeBytes?: number | null; /** * Aggregate size cap (bytes) across all files attached to one problem version. Null clears the override (use platform default); omit to leave unchanged. */ maxVersionAggregateFileSizeBytes?: number | null; /** * Full replacement of the attempt-count default for the Run problem modal. Omit to leave unchanged. */ runFieldConfig?: { /** * Per-field config for the attempt-count input on the Run problem modal. */ attemptCount: { /** * Default number of attempts pre-filled in the Run problem modal. Null leaves the field empty. */ default: number | null; }; }; /** * When true, users must lock the current version before creating a new one. Omit to leave unchanged. */ requireLockBeforeNewVersion?: boolean; /** * Markdown guidance surfaced to problem editors within the environment. Send null to clear, or omit to leave unchanged. */ problemEditorInstructions?: string | null; /** * Markdown template for new rubric issues. Send null to clear; omit to leave unchanged. */ rubricIssueTemplate?: string | null; /** * Markdown template for new global (non-rubric-attached) issues. Send null to clear; omit to leave unchanged. */ globalIssueTemplate?: string | null; /** * QA-gate stages on which a user may override the gate verdict. Send the full set (not a delta); omit to leave unchanged. */ qaGateOverrideAllowedStages?: Array<'locking' | 'running' | 'submitting'>; /** * Built-in synthesizer keys to disable for this environment. Send the full set (not a delta); omit to leave unchanged. */ disabledBuiltInSynthesizerKeys?: Array<'improve-prompt' | 'generate-tools' | 'generate-rubrics'>; /** * Authored guided-tour flow. Send null to clear (panel hides); omit to leave unchanged. */ guidedTour?: { /** * Ordered list of tour steps; each step id must be unique within the tour. */ steps: Array<{ /** * Stable identifier of the step (must be unique within a tour). */ id: string; /** * Short title rendered as the step heading. */ title: string; /** * Markdown-capable body text explaining what the user should do for this step. */ body: string; /** * When true, the step can be skipped without blocking tour completion. */ optional?: boolean; /** * Actions to fire when the step becomes active. */ actions?: Array<{ /** * Verb to perform on the target element when the step becomes active. */ kind: 'highlight' | 'focus' | 'click'; /** * Identifier of the element the action runs against. */ target: string; }>; }>; } | null; /** * Filename of the preview asset shown on problem cards. Send null to clear; omit to leave unchanged. */ previewFilename?: string | null; /** * Locked run-config version to bind as the env-level solver default. Send null to clear the binding; omit to leave unchanged. Must reference a locked version reachable from this environment. */ solverRunConfigVersionId?: string | null; /** * Locked run-config version to bind as the env-level grader default. Send null to clear the binding; omit to leave unchanged. Must reference a locked version reachable from this environment. */ graderRunConfigVersionId?: string | null; /** * Locked run-config version that drives all programmatic grading in this environment, overriding the platform-wide programmatic grader default. Send null to clear (falls back to the platform default); omit to leave unchanged. Must reference a locked version reachable from this environment. */ programmaticGraderRunConfigVersionId?: string | null; /** * Locked run-config version to bind as the env-level QA default. Send null to clear the binding; omit to leave unchanged. Must reference a locked version reachable from this environment. */ qaRunConfigVersionId?: string | null; /** * Locked run-config version to bind as the env-level synthesizer default. Send null to clear the binding; omit to leave unchanged. Must reference a locked version reachable from this environment. */ synthesizerRunConfigVersionId?: string | null; }; /** * Request body for replacing the tags on a problem version file. */ export type UpdateFileTagsDto = { /** * Full set of tags to apply to the file; lowercased and limited to alphanumeric, hyphens, and underscores. */ tags: Array; }; /** * Request body for updating bundle-level metadata (currently just the title). Fields are individually optional so callers PATCH only the metadata they want to change. */ export type UpdateFormBodyDto = { /** * New title for the bundle. Pass null (or an empty string, which the server coerces to null) to clear the bundle's title. Omit the field to leave the title unchanged. */ title?: string | null; }; /** * Request body for replacing the schema content of a draft form version. */ export type UpdateFormVersionBodyDto = { /** * New schema content to overwrite the existing draft. */ schema: { /** * JSON Schema describing the form fields. */ data: { [key: string]: unknown; }; /** * UI schema controlling presentation of the form fields. */ ui: { [key: string]: unknown; }; }; }; /** * Request body for toggling gold-standard status on a problem version file; setting it true requires a valid mount path. */ export type UpdateGoldStandardDto = { /** * Marks the file as gold-standard; requires a mount path. */ isGoldStandard: true; /** * Container path the gold-standard file is mounted at. Must live under the workspace root and avoid reserved grader-support paths. */ goldStandardMountPath: string; } | { /** * Clears gold-standard status; the file remains attached but is no longer mounted. */ isGoldStandard: false; }; /** * Request body for partially updating an existing issue. */ export type UpdateIssueBodyDto = { /** * New markdown body for the issue. */ description?: string; /** * New lifecycle status for the issue. */ status?: 'open' | 'closed'; }; /** * Request body for editing an existing issue comment. */ export type UpdateIssueCommentBodyDto = { /** * Replacement comment body. */ content: string; }; /** * Request body for updating editable fields on a marketplace image. */ export type UpdateMarketplaceImageBodyDto = { /** * New description for the marketplace image. */ description: string; }; /** * Request body for rotating an existing secret’s value. Policy fields are immutable. */ export type UpdateOrganizationSecretDto = { /** * Ready-to-send header value, including any auth scheme prefix. Leading and trailing whitespace is trimmed; the result is written verbatim into the outbound request header. */ value: string; }; /** * Partial-update body for a problem. Every field is optional; omitted fields are unchanged. */ export type UpdateProblemDto = { /** * New human-readable title for the problem. */ title?: string; /** * New free-text description. Send null to clear; omit to leave unchanged. */ description?: string | null; /** * New problem domain. Send null to clear; omit to leave unchanged. */ domain?: string | null; }; /** * Request body for rotating an existing secret’s value. Policy fields are immutable. */ export type UpdateProblemSecretDto = { /** * Ready-to-send header value, including any auth scheme prefix. Leading and trailing whitespace is trimmed; the result is written verbatim into the outbound request header. */ value: string; }; /** * Partial-update payload for a draft problem version, with cross-field validation that privileged containers require unrestricted network access. */ export type UpdateProblemVersionDto = { /** * Task prompt shown to the agent at run start. */ prompt?: string; /** * Tool allowlist. Null means all known tools allowed; an empty list means no tools allowed. */ tools?: Array<'Bash' | 'Read' | 'Write' | 'Edit' | 'Glob' | 'Grep' | 'NotebookEdit' | 'WebFetch' | 'WebSearch' | 'TodoWrite' | 'Task' | 'TaskOutput' | 'TaskStop' | 'EnterPlanMode' | 'ExitPlanMode' | 'AskUserQuestion' | 'Skill' | 'ToolSearch'> | null; /** * Outbound network allowlist. Null uses the legacy platform default, the unrestricted sentinel allows everything, and a non-empty list restricts access to those domains. */ allowedDomains?: [ '*' ] | Array | null; /** * Package managers pre-installed in the container. Null means none. */ installedPackageManagers?: Array<'pip' | 'uv' | 'npm' | 'cargo' | 'apt'> | null; /** * Container image reference for the agent runtime (e.g. "python:3.12"). Null falls back to the platform default. */ containerImage?: string | null; /** * CPU/memory tier. Null falls back to the platform default. */ containerSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'xlarge-highmem' | 'xxlarge' | null; /** * Optional GPU type. Null means no GPU. */ gpuType?: 'T4' | 'L4' | 'A10G' | 'A100' | 'H100' | null; /** * Wall-clock timeout for the agent run. Null falls back to the platform default. */ timeoutSeconds?: number | null; /** * Sparse map of tool name to seconds. Include only tools whose timeout differs from the default. Null or omitted means all defaults apply. */ toolTimeouts?: { [key: string]: number; } | null; /** * Maximum agent turns. Null means unlimited, subject to the wall-clock timeout. */ maxTurns?: number | null; /** * Grading strategy. Leaf variants describe a single grader; composition variants recursively combine children. Tree depth must be ≤ 3. */ gradingConfig?: GradingConfigInput; /** * When true, a single agentic judge scores all rubric criteria together. When false, each criterion is judged independently. */ singleAgentRubric?: boolean; /** * Run the container privileged (Docker-in-Docker or kernel capabilities). Requires unrestricted outbound networking because privileged containers bypass egress enforcement. */ privileged?: boolean; /** * Markdown template used to pre-populate the body of new global issues filed against this version. Overrides the environment-wide template when set; send null to clear. */ issueTemplate?: string | null; /** * Locked run-config version bound for solver invocations on this problem version. Null clears the binding so the environment-level fallback applies. */ solverRunConfigVersionId?: string | null; /** * Locked run-config version bound for grader invocations on this problem version. Null clears the binding so the environment-level fallback applies. */ graderRunConfigVersionId?: string | null; /** * Locked run-config version bound for QA invocations on this problem version. Null clears the binding so the environment-level fallback applies. */ qaRunConfigVersionId?: string | null; /** * Locked run-config version bound for synthesizer invocations on this problem version. Null clears the binding so the environment-level fallback applies. */ synthesizerRunConfigVersionId?: string | null; }; /** * Request body for rotating an existing secret’s value. Policy fields are immutable. */ export type UpdateProblemVersionSecretDto = { /** * Ready-to-send header value, including any auth scheme prefix. Leading and trailing whitespace is trimmed; the result is written verbatim into the outbound request header. */ value: string; }; /** * Patch body for updating the marketplace listing of a published environment (at least one field required). */ export type UpdatePublicEnvironmentBodyDto = { /** * Updated marketing description; omit to keep the current value. */ description?: string; /** * Updated cover image URL; omit to keep the current value. */ imageUrl?: string; }; /** * Partial update payload for an existing QA config. */ export type UpdateQaConfigBodyDto = { /** * Updated display name of the QA config. */ name?: string; /** * Updated description; pass null to clear. */ description?: string | null; /** * Updated CPU allocation in milli-CPUs; null clears. */ cpuMilli?: number | null; /** * Updated memory allocation in MiB; null clears. */ memoryMib?: number | null; /** * Updated job timeout in seconds; null clears. */ timeoutSeconds?: number | null; /** * Updated accelerator configuration; pass null to clear. */ accelerator?: { /** * Hardware accelerator family: graphics processor or tensor processor. */ type: 'gpu' | 'tpu'; /** * Accelerator model name as recognized by the launcher. */ name: string; /** * Number of accelerators to attach to the job container; defaults to 1 when unset. */ count?: number; } | null; /** * Updated environment-variable map for the container; null clears. */ envVars?: { [key: string]: string; } | null; /** * Updated argument list for the container entrypoint; null clears. */ args?: Array | null; /** * Updated free-form parameter payload; null clears. */ parameters?: { [key: string]: unknown; } | null; /** * Updated launcher backend override; null falls back to the environment default. */ launcherType?: 'modal' | 'cloud_batch' | 'gke' | null; /** * Updated retry budget on failure; null clears. Applies to single-container QA kinds (standard, grading-oracle, metrics-validator), where a failed or unusable attempt is re-dispatched until the budget is spent. Ignored by the composite kinds (gtGradingOracle, standard-composite), which always run a single attempt. */ maxRetries?: number | null; /** * Patch the bound run-config-version. Pass null to clear the binding. When set, the QA submit path resolves the container image, environment variables, and arguments from this version instead of the legacy image fields. */ runConfigVersionId?: string | null; }; /** * Request body for partially updating an existing rubric. */ export type UpdateRubricBodyDto = { /** * New criterion text. */ criterion?: string; /** * New non-zero weight for the rubric. */ weight?: number; /** * Toggle whether the LLM grader evaluates this rubric. */ useGraderSupport?: boolean; /** * New per-rubric issue template override. Send null (not an empty string) to clear the override and inherit the environment-wide template. */ issueTemplate?: string | null; }; /** * Patch-style update body for run-config identity-level metadata. Omitted fields are left unchanged. */ export type UpdateRunConfigDto = { /** * New display name. Omit to leave unchanged. */ name?: string; /** * New description. Send null to clear; omit to leave unchanged. */ description?: string | null; /** * New full tag list (replaces the existing tags). Omit to leave unchanged. */ tags?: Array; }; /** * Patch-style update for a run-config file attachment (mount directory and/or mode). */ export type UpdateRunConfigFileDto = { /** * New mount directory. Omit to leave unchanged. */ mountDir?: string; /** * New mount mode. Omit to leave unchanged. */ mode?: 'ro' | 'rw'; }; /** * Patch-style update body for a run-config version. Only draft versions are mutable; locked versions reject all updates. */ export type UpdateRunConfigVersionDto = { /** * New payload. Editing this on a draft clears the verification timestamp and the most-recent probe pointer. Omit to leave unchanged. */ config?: { /** * Fully qualified container image URL for the harness. Omit to inherit the platform default. */ harnessImageUrl?: string; /** * Fully qualified grader image URL paired with this harness. When set, new programmatic and mcp_tool_call grading configs pre-fill their grader image from it (the solver's companion grader image). Omit to use the platform default grader image. */ graderImageUrl?: string; /** * Container resource preset (CPU + memory). Omit to inherit the platform default. */ containerSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'xlarge-highmem' | 'xxlarge'; /** * GPU type attached to the container. Omit to run without GPU acceleration. */ gpuType?: 'T4' | 'L4' | 'A10G' | 'A100' | 'H100'; /** * When true, the container runs with elevated privileges. Required by harnesses that need Docker-in-Docker or raw block-device access. */ privileged?: boolean; /** * When true, requests KVM-backed nested virtualization. Requires privileged=true and a GKE launcher. */ nestedVirt?: boolean; /** * Explicit GKE node machine type (e.g. "e2-standard-16"), overriding the platform default. Not validated against a fixed set here — an invalid value is rejected by agent-service/GKE at submission. Takes priority over the machine type implied by nestedVirt when both are set. */ machineType?: string; /** * HTTP port the container exposes (snapshot/compute-only). Ignored by job submission and absent from the effective invocation. */ port?: number; /** * Package managers preinstalled in the harness image, used to drive setup snippets in the editor. */ installedPackageManagers?: Array<'pip' | 'uv' | 'npm' | 'cargo' | 'apt'>; /** * Extra CLI arguments appended to the harness command. Tokenized by whitespace split at submission time; quoted strings are not supported. */ args?: string; /** * Env vars injected into the container. Null values permitted for backward compatibility; the editor strips them on save. */ envVars?: { [key: string]: string | null; }; /** * External file mounts referencing previously uploaded objects. Valid only on snapshot-type configs; agent-harness configs attach files via the run_config_files join table instead and the server rejects this field on save. */ mounts?: Array<{ /** * Platform file ID referencing an object already uploaded to GCS. */ source: string; /** * Absolute container path where the referenced file is mounted at compute creation time. Must be absolute and must not contain parent-directory segments. */ mountPath: string; }>; /** * Env-var names this config expects the runner to inject. Resolved against the version's attached customer secrets at submit time. */ customerSecrets?: Array<{ /** * Env-var name (uppercase + digits + underscore, leading letter) the harness expects to receive at runtime; resolved against attached customer secrets at job-submit time. */ envVarName: string; }>; /** * Egress allowlist for the container. An empty list denies general outbound traffic; hosts independently authorized by attached proxy credentials remain reachable. Any list containing the exact '*' entry permits everything, and a nonempty list without '*' restricts general egress to those domains. Null explicitly selects no run-config egress policy and overrides an inherited problem-version allowlist; omission defers to the consuming context. */ allowedDomains?: Array | null; /** * Wall-clock timeout for the harness invocation (seconds). */ timeoutSeconds?: number; /** * MCP tools the harness exposes, as returned by the MCP service list_tools(). Metadata only — persisted for future grader-UI use and not consumed at submit time. */ mcpTools?: Array<{ /** * Tool name as exposed by the MCP service. The newer catalogue format encodes the service as a dotted prefix (e.g. "gitea.create_user"); use mcpToolServiceKey to extract it. */ name: string; /** * Human-readable description of what the tool does. */ description: string; /** * MCP service the tool belongs to. Omitted when encoded as the name prefix. */ service?: string; /** * Grouping category for the tool in UIs. */ category?: string; /** * Display ordering hint within a category. */ sortOrder?: number; /** * Whether the tool only reads state (no side effects). Omitted when unknown. */ readOnly?: boolean; /** * Tool invocation timeout in seconds. */ timeout?: number; /** * Tool input JSON Schema, stored as an opaque JSON string (see comment). */ inputSchema: string | { [key: string]: unknown; }; /** * Optional human-friendly label for the service (MCP wire key _service_label). */ serviceLabel?: string; }>; /** * The WORLDSIM_BAKE_REF the mcpTools catalogue was discovered against. Server-owned: set during MCP tool discovery. On other writes a client-supplied value is ignored, and the stored tag is carried forward while mcpTools is unchanged (a changed WORLDSIM_BAKE_REF keeps it, so worldsim validation detects the mismatch) and cleared when mcpTools changes. Used when submitting problem versions to reject an MCP allowlist that would be materialized from a catalogue stale relative to the dispatch-time parent bake. */ mcpToolsBakeRef?: string; /** * Seeded-entity overrides for the worldsim MCP functional tool checks, as an opaque JSON-object string with the runner's snake_case keys (e.g. {"erpnext_company":"Northline","keycloak_realm":"northline"}). Emitted as the probe_context block of the mounted mcp-tools.yaml when a run forks the worldsim solver child from this config. Ignored when the problem version inherits the solver's MCP tools: the runner then reads the probe_context block of the file this config names in WORLDSIM_MCP_TOOLS_FILE. Only read by runs that set WORLDSIM_RUN_MCP_TOOL_CHECKS=true. */ mcpToolsProbeContext?: string; /** * Declared execution environment for a snapshot run config's persistent compute (container ref, shared/grade dirs, and image-supplied solver verbs). Omit to inherit the platform defaults. */ computeEnv?: { /** * Child-container name the platform runs the solver/grade verbs in (via docker exec). Omit to inherit the platform default. */ containerRef?: string; /** * Directory bind-mounted from the pod into the container where grade mounts land and are read. Omit to inherit the platform default. */ sharedMountDir?: string; /** * Directory a compute_exec grade writes $GRADE_OUTPUT into (on a path the exec side both writes and reads). Omit to inherit the platform default. */ gradeOutputDir?: string; /** * Image-supplied solver-lifecycle verb scripts. Omit to use the platform default verbs. */ runVerbs?: { /** * Optional child-container readiness probe; prints a verdict token before launch. */ readiness?: string; /** * Terminate any in-flight agent and clear prior-run state (idempotent). */ reset: string; /** * Launch the agent on $PROMPT, detached; the platform polls status afterward. */ submit: string; /** * Print exactly one ComputeRunPhase token to stdout. */ status: string; /** * Print the successful run result to stdout (read on completed). */ result: string; /** * Print failure diagnostics to stdout (read on failed). */ error: string; }; }; /** * Infra-retry policy override for runs launched from this run-config. Omit to use the platform default; an eval-level override (EvaluationMetadataSchema.retryPolicy) takes precedence over this when both are set. */ retryPolicy?: { /** * Additional attempts allowed after a failure classified as infra (container eviction, image pull error, queue orphan) before the run terminates as failed. Omit to use the platform default (2). */ maxInfraRetries?: number; }; }; /** * New container-authored default config template. Send null to clear; omit to leave unchanged. */ configTemplate?: { [key: string]: unknown; } | null; /** * New container-authored config JSON Schema. Send null to clear; omit to leave unchanged. */ configSchema?: { [key: string]: unknown; } | null; /** * New probe spec. Editing this on a draft clears the verification timestamp and the most-recent probe pointer. Omit to leave unchanged. */ probe?: { /** * Deterministic stdin handed to the agent when the probe runs. The verifier judges the resulting transcript against the quality check. */ prompt: string; /** * Optional additional input files staged alongside the prompt, used for harness-specific fixtures. */ files?: Array<{ /** * GCS object path the agent-service FilesService reads when staging the probe. */ objectPath: string; /** * Absolute container path where the probe file is mounted at probe-run time. */ mountPath: string; }>; /** * Plain-English description of what a passing transcript looks like, fed to the LLM judge. Falls back to "Agent responded with the correct answer" when omitted. */ qualityCheck?: string; }; /** * New notes. Send null to clear; omit to leave unchanged. */ notes?: string | null; }; /** * Request body for rotating an existing secret’s value. Policy fields are immutable. */ export type UpdateSecretDto = { /** * Ready-to-send header value, including any auth scheme prefix. Leading and trailing whitespace is trimmed; the result is written verbatim into the outbound request header. */ value: string; }; /** * Partial update payload for an existing user-defined synthesizer job. */ export type UpdateSynthesizerJobBodyDto = { /** * Updated display name for the synthesizer. */ name?: string; /** * Updated description; pass null to clear. */ description?: string | null; /** * Updated agent system prompt. */ systemPrompt?: string; /** * Updated pinned run-config version for harness and model; pass null to clear and fall back to the environment-level synthesizer binding. */ runConfigVersionId?: string | null; /** * Updated declaration of which inputs to bundle into the input tarball. */ contextInputs?: { /** * File buckets to include in the synthesizer input tarball. */ files: { /** * Include the problem primary files in the input tarball. */ problem: boolean; /** * Include supporting (read-only) files in the input tarball. */ supporting: boolean; /** * Include grader-support files (non-gold) in the input tarball. */ graderSupport: boolean; /** * Include gold-standard files in the input tarball. */ goldStandard: boolean; }; /** * When true, include the problem version current rubrics in the input tarball. */ rubrics: boolean; /** * Existing problem-version field values to copy into the manifest so the synthesizer can condition on them. */ currentFieldValues: Array<'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId'>; /** * When true, include the active form schema and current answers in the manifest. Defaults to false for backward compatibility. */ forms?: boolean; }; /** * Updated allowed write targets; at least one target must remain. */ targetFields?: Array<'prompt' | 'tools' | 'allowedDomains' | 'containerImage' | 'containerSize' | 'gpuType' | 'timeoutSeconds' | 'toolTimeouts' | 'maxTurns' | 'installedPackageManagers' | 'gradingConfig' | 'singleAgentRubric' | 'privileged' | 'issueTemplate' | 'solverRunConfigVersionId' | 'graderRunConfigVersionId' | 'qaRunConfigVersionId' | 'synthesizerRunConfigVersionId' | 'rubrics' | 'formAnswers' | 'problemFiles' | 'supportingFiles' | 'graderSupportFiles'>; }; /** * Request body for updating a custom tag (rename, recolor, or edit description). */ export type UpdateTagDto = { /** * Human-readable tag label (e.g. "FINAL"). Trimmed; unique within its scope. */ label?: string; /** * Badge color as a 6-digit hex string (e.g. "#22c55e"). */ color?: string; /** * New description; omit to leave unchanged, null to clear. */ description?: string | null; }; /** * Request body for PATCH /v1/organizations/:organizationId/taiga-images/:taigaImageId. Only name + description are mutable; userDockerfile is immutable — delete and recreate to change image content. */ export type UpdateTaigaImageDto = { /** * User-facing label for a catalog entry. Unique within an org so the env integration picker is unambiguous. */ name?: string; /** * Optional human notes about the image — what was built, when, with which deps. */ description?: string | null; }; /** * Request body for creating or updating a form answer on a problem version. */ export type UpsertFormAnswerBodyDto = { /** * Form version that the supplied answers validate against. */ formVersionId: string; /** * Answer payload keyed by form field name. */ answers: { [key: string]: unknown; }; }; /** * Conflict returned when the form version is unpublished or the problem version is locked. */ export type UpsertFormAnswerConflictResponseDto = ({ code: 'form_version_not_published'; } & FormVersionNotPublishedErrorDto) | ({ code: 'form_problem_version_locked'; } & FormProblemVersionLockedErrorDto); /** * A user. Represents one human actor with a stable platform identity. */ export type UserDto = { /** * Stable user identifier (UUID). */ id: string; /** * External user identifier from the caller's identity provider. Null for users created without an upstream identity link. */ externalId: string | null; /** * Display name of the user. */ name: string; /** * Primary contact email of the user. */ email: string; /** * Timestamp when the user was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the user was last updated (ISO-8601, UTC). */ updatedAt: string; }; /** * Response payload for the user-efficiency report. */ export type UserEfficiencyResponseDto = { /** * One efficiency row per user included in the report. */ rows: Array<{ /** * Stable user identifier (UUID). */ userId: string; /** * Display name of the user at the time the row was computed. */ userName: string; /** * Total number of problem runs the user has executed. */ totalRuns: number; /** * Average rubric score across the user’s runs. Null when no scored runs exist. */ avgScore: number | null; /** * Total USD spend across the user’s runs. Null when no priced runs exist. */ totalCostUsd: number | null; /** * Average USD spend per run for the user. Null when no priced runs exist. */ avgCostPerRun: number | null; /** * Average USD spend per distinct problem the user has attempted. Null when no priced runs exist. */ avgCostPerProblem: number | null; }>; }; /** * Cursor-paginated page of platform users. */ export type UserPageDto = { /** * Items in this page, ordered per the requested sort. */ items: Array<{ /** * Stable user identifier (UUID). */ id: string; /** * External user identifier from the caller's identity provider. Null for users created without an upstream identity link. */ externalId: string | null; /** * Display name of the user. */ name: string; /** * Primary contact email of the user. */ email: string; /** * Timestamp when the user was created (ISO-8601, UTC). */ createdAt: string; /** * Timestamp when the user was last updated (ISO-8601, UTC). */ updatedAt: string; }>; /** * Cursor for fetching the next page, or null when this is the last page. */ nextCursor: string | null; /** * Total number of items matching the filter across all pages. */ total: number; }; /** * Signed download URL for one file in a run workspace, resolved on demand. */ export type WorkspaceFileDownloadUrlResponseDto = { /** * Short-lived signed URL for downloading the file contents directly. */ downloadUrl: string; }; /** * Composition group that aggregates child scores as a weighted sum; failed children contribute 0 in the numerator while their weight remains in the denominator. */ export type Schema0 = { /** * Discriminator: aggregate children as a weighted sum of their scores. */ type: 'weighted-sum'; /** * Child grading configs and weights (1–10 entries); weights produce a weighted average. */ children: Array; }; /** * Full round-trippable canonical automation aggregate. */ export type ManagedAgentsAutomationDefinitionResponseWritable = { /** * Managed agent selected by this automation. */ agentId: string; /** * Immutable agent version pinned for all admitted runs. */ agentVersionId: string; /** * Human-readable automation name. */ displayName: string; /** * Execution environment selected for admitted sessions. */ environmentId: string; /** * Prompt definition frozen onto admitted runs. */ initialPrompt: ManagedAgentsAutomationLiteralPrompt; /** * Run defaults frozen onto admitted runs. */ runDefaults: ManagedAgentsCanonicalAutomationRunDefaults; /** * Complete ordered trigger set. */ triggers: Array; }; /** * Delivery identity: a customer webhook or an integration connection. */ export type ManagedAgentsEventSourceDeliveryWritable = ManagedAgentsWebhookEventSourceDeliveryWritable | ManagedAgentsIntegrationEventSourceDeliveryWritable; /** * Delivery identity without member-only verification configuration. */ export type ManagedAgentsEventSourceDeliverySummaryWritable = ManagedAgentsWebhookEventSourceDeliverySummary | ManagedAgentsIntegrationEventSourceDeliveryWritable; /** * Bounded page of event sources owned by the calling workspace. */ export type ManagedAgentsEventSourcePageResponseWritable = { /** * Event sources in newest-first order. */ items: Array; /** * Opaque cursor for the next page, or null when this is the last page. */ nextCursor: null | string; /** * Total event sources visible to the caller. */ total: number; }; /** * Configured inbound event source, including its verification policy and lifecycle state. */ export type ManagedAgentsEventSourceResponseWritable = { /** * Webhook configuration or owning integration connection. */ delivery: ManagedAgentsEventSourceDeliveryWritable; /** * Human-readable source name shown in the automation catalog. */ displayName: string; /** * Inbound provider protocol interpreted by this source. */ type: 'slack_events_api' | 'github_webhook' | 'custom_webhook'; }; /** * Compact event-source representation returned by the collection endpoint. */ export type ManagedAgentsEventSourceSummaryWritable = { /** * Time the event source was created. */ createdAt: string; /** * Webhook endpoint or owning integration connection. */ delivery: ManagedAgentsEventSourceDeliverySummaryWritable; /** * Human-readable source name. */ displayName: string; /** * Stable identifier for the event source. */ eventSourceId: string; /** * Monotonic revision represented by the member ETag. */ revision: number; /** * Current lifecycle state. */ status: 'paused' | 'active'; /** * Inbound provider protocol interpreted by this source. */ type: 'slack_events_api' | 'github_webhook' | 'custom_webhook'; /** * Time the event source was last changed. */ updatedAt: string; }; /** * An upload session: where to send a large file's parts. */ export type ManagedAgentsFileUploadResponseWritable = { /** * The declared size of the whole file in bytes. */ byteSize: number; }; /** * Connection-managed delivery; no customer webhook or verification credential is required. */ export type ManagedAgentsIntegrationEventSourceDeliveryWritable = { /** * Delivery through the platform integration callback. */ kind: 'integration'; }; /** * Model and guidance for automatic learning from an agent's finished sessions. The default model follows the agent's model. */ export type ManagedAgentsLearningConfigWritable = { /** * Model used for all memory learning stages. Empty inherits the agent's model; an explicit model reference or model id overrides it. */ memory_model_ref?: string; }; /** * Customer-owned webhook endpoint and its non-secret verification configuration. */ export type ManagedAgentsWebhookEventSourceDeliveryWritable = { /** * Customer-configured webhook delivery. */ kind: 'webhook'; /** * Verification policy for custom webhook delivery. */ verification?: ManagedAgentsEventSourceVerificationResponse; /** * Signing-secret reference for Slack or GitHub webhook delivery. */ verificationCredential?: ManagedAgentsEventSourceCredentialRef; }; export type GetManagedAgentsV1AgentTemplatesData = { body?: never; path?: never; query?: never; url: '/managed-agents/v1/agent-templates'; }; export type GetManagedAgentsV1AgentTemplatesErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1AgentTemplatesError = GetManagedAgentsV1AgentTemplatesErrors[keyof GetManagedAgentsV1AgentTemplatesErrors]; export type GetManagedAgentsV1AgentTemplatesResponses = { /** * Response body of GET /v1/agent-templates: the static startup-validated agent template catalog. */ 200: ManagedAgentsAgentTemplateListResponse; }; export type GetManagedAgentsV1AgentTemplatesResponse = GetManagedAgentsV1AgentTemplatesResponses[keyof GetManagedAgentsV1AgentTemplatesResponses]; export type GetManagedAgentsV1AgentMemoryData = { body?: never; path?: never; query?: never; url: '/managed-agents/v1/agent_memory'; }; export type GetManagedAgentsV1AgentMemoryErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1AgentMemoryError = GetManagedAgentsV1AgentMemoryErrors[keyof GetManagedAgentsV1AgentMemoryErrors]; export type GetManagedAgentsV1AgentMemoryResponses = { /** * Current memory and learning status across the organization's agents. */ 200: ManagedAgentsAgentMemoryListResponse; }; export type GetManagedAgentsV1AgentMemoryResponse = GetManagedAgentsV1AgentMemoryResponses[keyof GetManagedAgentsV1AgentMemoryResponses]; export type GetManagedAgentsV1AgentsData = { body?: never; path?: never; query?: { /** * Comma-separated tag ids, with at most 32 distinct ids. Blank segments are ignored. An agent must carry every requested tag (AND semantics). Unknown or cross-organization ids return 404. */ tag_ids?: string; }; url: '/managed-agents/v1/agents'; }; export type GetManagedAgentsV1AgentsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1AgentsError = GetManagedAgentsV1AgentsErrors[keyof GetManagedAgentsV1AgentsErrors]; export type GetManagedAgentsV1AgentsResponses = { /** * Response body of GET /v1/agents. Unpaginated: the whole organization is returned in one document, so callers need no cursor here. Each row is the agent's current mutable definition; its immutable snapshots are listed by GET /v1/agents/{agent_id}/versions. */ 200: ManagedAgentsAgentListResponse; }; export type GetManagedAgentsV1AgentsResponse = GetManagedAgentsV1AgentsResponses[keyof GetManagedAgentsV1AgentsResponses]; export type PostManagedAgentsV1AgentsData = { body: ManagedAgentsCreateAgentRequest; headers?: { /** * Replay-protection key in an organization-wide namespace shared by keyed mutations. It must contain 1 to 256 visible ASCII characters and be sent as exactly one header value. Request identity is the exact HTTP method, escaped path, raw query, and raw body bytes. The same request replays the original successful response; any different request returns 409 idempotency_conflict, and an active matching request returns 409 idempotency_in_progress. Completed receipts are retained for approximately 24 hours, pending claims may be reclaimed after approximately 1 hour, and no deduplication is guaranteed after expiry. */ 'Idempotency-Key'?: string; }; path?: never; query?: never; url: '/managed-agents/v1/agents'; }; export type PostManagedAgentsV1AgentsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1AgentsError = PostManagedAgentsV1AgentsErrors[keyof PostManagedAgentsV1AgentsErrors]; export type PostManagedAgentsV1AgentsResponses = { /** * A configured agent: its versioned execution definition plus current mutable classification tags. Publishing the execution definition mints a new immutable AgentVersion; applying tags does not. A session records the version it ran and never snapshots tags. */ 200: ManagedAgentsAgent; }; export type PostManagedAgentsV1AgentsResponse = PostManagedAgentsV1AgentsResponses[keyof PostManagedAgentsV1AgentsResponses]; export type DeleteManagedAgentsV1AgentsByAgentIdData = { body?: never; path: { /** * Agent id (UUID) as returned by createAgent or listAgents. */ agent_id: string; }; query?: never; url: '/managed-agents/v1/agents/{agent_id}'; }; export type DeleteManagedAgentsV1AgentsByAgentIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type DeleteManagedAgentsV1AgentsByAgentIdError = DeleteManagedAgentsV1AgentsByAgentIdErrors[keyof DeleteManagedAgentsV1AgentsByAgentIdErrors]; export type DeleteManagedAgentsV1AgentsByAgentIdResponses = { /** * Shared response body of every soft-delete endpoint, on agents, environments, tags, vaults, vault credentials, webhook bindings, and sessions. Soft delete is a tombstone, not an erase: the row stops appearing in list and get responses but is retained, and there is no undelete endpoint to bring it back. Irreversible erasure is the separate, confirmation-gated purge path. */ 200: ManagedAgentsDeletedResponse; }; export type DeleteManagedAgentsV1AgentsByAgentIdResponse = DeleteManagedAgentsV1AgentsByAgentIdResponses[keyof DeleteManagedAgentsV1AgentsByAgentIdResponses]; export type GetManagedAgentsV1AgentsByAgentIdData = { body?: never; path: { /** * Agent id (UUID) as returned by createAgent or listAgents. */ agent_id: string; }; query?: never; url: '/managed-agents/v1/agents/{agent_id}'; }; export type GetManagedAgentsV1AgentsByAgentIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1AgentsByAgentIdError = GetManagedAgentsV1AgentsByAgentIdErrors[keyof GetManagedAgentsV1AgentsByAgentIdErrors]; export type GetManagedAgentsV1AgentsByAgentIdResponses = { /** * A configured agent: its versioned execution definition plus current mutable classification tags. Publishing the execution definition mints a new immutable AgentVersion; applying tags does not. A session records the version it ran and never snapshots tags. */ 200: ManagedAgentsAgent; }; export type GetManagedAgentsV1AgentsByAgentIdResponse = GetManagedAgentsV1AgentsByAgentIdResponses[keyof GetManagedAgentsV1AgentsByAgentIdResponses]; export type GetManagedAgentsV1AgentsByAgentIdLearningData = { body?: never; path: { /** * Agent id (UUID) as returned by createAgent or listAgents. */ agent_id: string; }; query?: never; url: '/managed-agents/v1/agents/{agent_id}/learning'; }; export type GetManagedAgentsV1AgentsByAgentIdLearningErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1AgentsByAgentIdLearningError = GetManagedAgentsV1AgentsByAgentIdLearningErrors[keyof GetManagedAgentsV1AgentsByAgentIdLearningErrors]; export type GetManagedAgentsV1AgentsByAgentIdLearningResponses = { /** * Model and guidance for automatic learning from an agent's finished sessions. The default model follows the agent's model. */ 200: ManagedAgentsLearningConfig; }; export type GetManagedAgentsV1AgentsByAgentIdLearningResponse = GetManagedAgentsV1AgentsByAgentIdLearningResponses[keyof GetManagedAgentsV1AgentsByAgentIdLearningResponses]; export type PatchManagedAgentsV1AgentsByAgentIdLearningData = { body: ManagedAgentsLearningConfigRequest; path: { /** * Agent id (UUID) as returned by createAgent or listAgents. */ agent_id: string; }; query?: never; url: '/managed-agents/v1/agents/{agent_id}/learning'; }; export type PatchManagedAgentsV1AgentsByAgentIdLearningErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * The request is well formed but failed semantic validation. */ 422: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PatchManagedAgentsV1AgentsByAgentIdLearningError = PatchManagedAgentsV1AgentsByAgentIdLearningErrors[keyof PatchManagedAgentsV1AgentsByAgentIdLearningErrors]; export type PatchManagedAgentsV1AgentsByAgentIdLearningResponses = { /** * Model and guidance for automatic learning from an agent's finished sessions. The default model follows the agent's model. */ 200: ManagedAgentsLearningConfig; }; export type PatchManagedAgentsV1AgentsByAgentIdLearningResponse = PatchManagedAgentsV1AgentsByAgentIdLearningResponses[keyof PatchManagedAgentsV1AgentsByAgentIdLearningResponses]; export type GetManagedAgentsV1AgentsByAgentIdMemoriesData = { body?: never; path: { /** * Agent whose permanent collection is being searched. */ agent_id: string; }; query?: { /** * Case-insensitive search across memory path, summary, and content. */ query?: string; /** * Top-level collection topic returned in topics; filters an entire path segment. */ topic?: string; /** * Sort by most recently updated (default) or alphabetically by path. */ sort?: 'updated' | 'alphabetical'; /** * Opaque next_cursor from the previous page with the same search settings. */ cursor?: string; /** * Page size from 1 through 100, default 50. */ limit?: number; }; url: '/managed-agents/v1/agents/{agent_id}/memories'; }; export type GetManagedAgentsV1AgentsByAgentIdMemoriesErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1AgentsByAgentIdMemoriesError = GetManagedAgentsV1AgentsByAgentIdMemoriesErrors[keyof GetManagedAgentsV1AgentsByAgentIdMemoriesErrors]; export type GetManagedAgentsV1AgentsByAgentIdMemoriesResponses = { /** * A searchable page of an agent's current memories. */ 200: ManagedAgentsAgentMemoriesPage; }; export type GetManagedAgentsV1AgentsByAgentIdMemoriesResponse = GetManagedAgentsV1AgentsByAgentIdMemoriesResponses[keyof GetManagedAgentsV1AgentsByAgentIdMemoriesResponses]; export type GetManagedAgentsV1AgentsByAgentIdMemoryData = { body?: never; path: { /** * Agent id (UUID) as returned by createAgent or listAgents. */ agent_id: string; }; query?: never; url: '/managed-agents/v1/agents/{agent_id}/memory'; }; export type GetManagedAgentsV1AgentsByAgentIdMemoryErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1AgentsByAgentIdMemoryError = GetManagedAgentsV1AgentsByAgentIdMemoryErrors[keyof GetManagedAgentsV1AgentsByAgentIdMemoryErrors]; export type GetManagedAgentsV1AgentsByAgentIdMemoryResponses = { /** * One agent's living memory collection and automatic learning progress. */ 200: ManagedAgentsAgentMemorySummary; }; export type GetManagedAgentsV1AgentsByAgentIdMemoryResponse = GetManagedAgentsV1AgentsByAgentIdMemoryResponses[keyof GetManagedAgentsV1AgentsByAgentIdMemoryResponses]; export type GetManagedAgentsV1AgentsByAgentIdMemoryActivityData = { body?: never; path: { /** * Agent whose automatic memory runs are listed. */ agent_id: string; }; query?: { /** * Opaque next_cursor from the previous activity page. */ cursor?: string; /** * Page size from 1 through 100, default 50. */ limit?: number; }; url: '/managed-agents/v1/agents/{agent_id}/memory/activity'; }; export type GetManagedAgentsV1AgentsByAgentIdMemoryActivityErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1AgentsByAgentIdMemoryActivityError = GetManagedAgentsV1AgentsByAgentIdMemoryActivityErrors[keyof GetManagedAgentsV1AgentsByAgentIdMemoryActivityErrors]; export type GetManagedAgentsV1AgentsByAgentIdMemoryActivityResponses = { /** * An agent's automatic memory activity, including checks with no changes and retrying failures. */ 200: ManagedAgentsMemoryActivityPage; }; export type GetManagedAgentsV1AgentsByAgentIdMemoryActivityResponse = GetManagedAgentsV1AgentsByAgentIdMemoryActivityResponses[keyof GetManagedAgentsV1AgentsByAgentIdMemoryActivityResponses]; export type PutManagedAgentsV1AgentsByAgentIdTagsData = { body: ManagedAgentsReplaceAgentTagsRequest; path: { /** * Agent id (UUID) whose classifications are replaced. */ agent_id: string; }; query?: never; url: '/managed-agents/v1/agents/{agent_id}/tags'; }; export type PutManagedAgentsV1AgentsByAgentIdTagsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PutManagedAgentsV1AgentsByAgentIdTagsError = PutManagedAgentsV1AgentsByAgentIdTagsErrors[keyof PutManagedAgentsV1AgentsByAgentIdTagsErrors]; export type PutManagedAgentsV1AgentsByAgentIdTagsResponses = { /** * A complete set of organization-scoped tag definitions. GET /v1/tags returns the organization catalog; agent tag PUT routes return the agent's resulting exact set. */ 200: ManagedAgentsTagListResponse; }; export type PutManagedAgentsV1AgentsByAgentIdTagsResponse = PutManagedAgentsV1AgentsByAgentIdTagsResponses[keyof PutManagedAgentsV1AgentsByAgentIdTagsResponses]; export type DeleteManagedAgentsV1AgentsByAgentIdTagsByTagIdData = { body?: never; path: { /** * Agent id (UUID) as returned by createAgent or listAgents. */ agent_id: string; /** * Tag id (UUID) as returned by createTag or listTags. */ tag_id: string; }; query?: never; url: '/managed-agents/v1/agents/{agent_id}/tags/{tag_id}'; }; export type DeleteManagedAgentsV1AgentsByAgentIdTagsByTagIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type DeleteManagedAgentsV1AgentsByAgentIdTagsByTagIdError = DeleteManagedAgentsV1AgentsByAgentIdTagsByTagIdErrors[keyof DeleteManagedAgentsV1AgentsByAgentIdTagsByTagIdErrors]; export type DeleteManagedAgentsV1AgentsByAgentIdTagsByTagIdResponses = { /** * No Content */ 204: void; }; export type DeleteManagedAgentsV1AgentsByAgentIdTagsByTagIdResponse = DeleteManagedAgentsV1AgentsByAgentIdTagsByTagIdResponses[keyof DeleteManagedAgentsV1AgentsByAgentIdTagsByTagIdResponses]; export type PutManagedAgentsV1AgentsByAgentIdTagsByTagIdData = { body?: never; path: { /** * Agent id (UUID) as returned by createAgent or listAgents. */ agent_id: string; /** * Tag id (UUID) as returned by createTag or listTags. */ tag_id: string; }; query?: never; url: '/managed-agents/v1/agents/{agent_id}/tags/{tag_id}'; }; export type PutManagedAgentsV1AgentsByAgentIdTagsByTagIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PutManagedAgentsV1AgentsByAgentIdTagsByTagIdError = PutManagedAgentsV1AgentsByAgentIdTagsByTagIdErrors[keyof PutManagedAgentsV1AgentsByAgentIdTagsByTagIdErrors]; export type PutManagedAgentsV1AgentsByAgentIdTagsByTagIdResponses = { /** * A complete set of organization-scoped tag definitions. GET /v1/tags returns the organization catalog; agent tag PUT routes return the agent's resulting exact set. */ 200: ManagedAgentsTagListResponse; }; export type PutManagedAgentsV1AgentsByAgentIdTagsByTagIdResponse = PutManagedAgentsV1AgentsByAgentIdTagsByTagIdResponses[keyof PutManagedAgentsV1AgentsByAgentIdTagsByTagIdResponses]; export type GetManagedAgentsV1AgentsByAgentIdVersionsData = { body?: never; path: { /** * Agent id (UUID) as returned by createAgent or listAgents. */ agent_id: string; }; query?: never; url: '/managed-agents/v1/agents/{agent_id}/versions'; }; export type GetManagedAgentsV1AgentsByAgentIdVersionsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1AgentsByAgentIdVersionsError = GetManagedAgentsV1AgentsByAgentIdVersionsErrors[keyof GetManagedAgentsV1AgentsByAgentIdVersionsErrors]; export type GetManagedAgentsV1AgentsByAgentIdVersionsResponses = { /** * Response body of GET /v1/agents/{agent_id}/versions. Scoped to the one agent in the path, so an empty list means that agent has no versions yet, not that no agents exist. Versions are immutable snapshots: pin one to make a session reproducible. */ 200: ManagedAgentsAgentVersionListResponse; }; export type GetManagedAgentsV1AgentsByAgentIdVersionsResponse = GetManagedAgentsV1AgentsByAgentIdVersionsResponses[keyof GetManagedAgentsV1AgentsByAgentIdVersionsResponses]; export type PostManagedAgentsV1AgentsByAgentIdVersionsData = { body: ManagedAgentsCreateAgentVersionRequest; path: { /** * Agent id (UUID) as returned by createAgent or listAgents. */ agent_id: string; }; query?: never; url: '/managed-agents/v1/agents/{agent_id}/versions'; }; export type PostManagedAgentsV1AgentsByAgentIdVersionsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1AgentsByAgentIdVersionsError = PostManagedAgentsV1AgentsByAgentIdVersionsErrors[keyof PostManagedAgentsV1AgentsByAgentIdVersionsErrors]; export type PostManagedAgentsV1AgentsByAgentIdVersionsResponses = { /** * A configured agent: its versioned execution definition plus current mutable classification tags. Publishing the execution definition mints a new immutable AgentVersion; applying tags does not. A session records the version it ran and never snapshots tags. */ 201: ManagedAgentsAgent; }; export type PostManagedAgentsV1AgentsByAgentIdVersionsResponse = PostManagedAgentsV1AgentsByAgentIdVersionsResponses[keyof PostManagedAgentsV1AgentsByAgentIdVersionsResponses]; export type GetManagedAgentsV1AgentsByAgentIdVersionsByAgentVersionIdData = { body?: never; path: { /** * Agent id (UUID) the version belongs to. */ agent_id: string; /** * Immutable agent version id (UUID), as listed by listAgentVersions or reported as an agent's latest_agent_version_id. */ agent_version_id: string; }; query?: never; url: '/managed-agents/v1/agents/{agent_id}/versions/{agent_version_id}'; }; export type GetManagedAgentsV1AgentsByAgentIdVersionsByAgentVersionIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1AgentsByAgentIdVersionsByAgentVersionIdError = GetManagedAgentsV1AgentsByAgentIdVersionsByAgentVersionIdErrors[keyof GetManagedAgentsV1AgentsByAgentIdVersionsByAgentVersionIdErrors]; export type GetManagedAgentsV1AgentsByAgentIdVersionsByAgentVersionIdResponses = { /** * An immutable snapshot of an agent's configuration, minted on every update. Sessions reference a version rather than the agent, so a running session's behaviour cannot change under it. */ 200: ManagedAgentsAgentVersion; }; export type GetManagedAgentsV1AgentsByAgentIdVersionsByAgentVersionIdResponse = GetManagedAgentsV1AgentsByAgentIdVersionsByAgentVersionIdResponses[keyof GetManagedAgentsV1AgentsByAgentIdVersionsByAgentVersionIdResponses]; export type GetManagedAgentsV1AnalyticsByFamilyData = { body?: never; path: { /** * Metric family to read: managed_agent_usage for tool, token, and cost figures, managed_agent_turn for turn counts and turn duration percentiles, managed_agent_environment for sandbox startup latency, managed_agent_completion for first successful root-session completions, and managed_agent_quality for immutable evaluation and criterion verdicts. */ family: 'managed_agent_usage' | 'managed_agent_turn' | 'managed_agent_environment' | 'managed_agent_completion' | 'managed_agent_quality'; }; query?: { /** * Read locality. workspace is the caller's own organization; tenant aggregates every workspace in the parent tenant organization and requires a Tenant Admin role. */ scope?: 'workspace' | 'tenant'; /** * With scope=tenant, narrow to one workspace of the tenant. Ignored at workspace scope, where the authenticated organization is authoritative. */ workspace_id?: string; /** * RFC 3339 start of the window. Defaults to seven days before to. Widened outward to a bucket boundary. */ from?: string; /** * RFC 3339 exclusive end of the window. Defaults to now. */ to?: string; /** * Series bucket width. Defaults to hourly for windows up to two days and daily beyond that. */ granularity?: 'hour' | 'day'; /** * Filter to work under sessions launched from this agent, including its subagents. */ launched_agent_id?: string; /** * Filter to work performed by this agent, whether it was launched directly or delegated to. */ executing_agent_id?: string; /** * Filter to one immutable agent version. */ executing_agent_version_id?: string; /** * Filter to one provider model id. */ model?: string; /** * Filter by the system a project or external source belongs to, e.g. slack_thread. */ project_source?: string; /** * Filter to one project or external source id within project_source. */ project_id?: string; /** * Filter to one tool. Note that token and cost figures are model spend and are not attributable to a tool, so filtering by one reports only that tool's own direct cost. */ tool_name?: string; /** * Filter by outcome: tool call state for usage, startup result for environments, or immutable verdict for quality. */ outcome?: 'in_flight' | 'completed' | 'failed' | 'ready' | 'pending' | 'pass' | 'fail' | 'not_applicable'; /** * Filter environment analytics to one sandbox provider, e.g. runs or docker. self_hosted is accepted for historical queries. */ sandbox_provider?: string; /** * Filter environment analytics to one environment. */ environment_id?: string; /** * Filter environment analytics by compute kind: cpu, or an accelerator type and name such as gpu:a100. */ compute_class?: string; /** * Filter environment analytics to one machine type, or to the requested CPU and memory shape when the provider names none. */ machine_type?: string; /** * Filter quality analytics to evaluations of one target agent. */ target_agent_id?: string; /** * Filter quality analytics to one immutable target-agent version. */ target_agent_version_id?: string; /** * Filter quality analytics to verdicts produced by one evaluator agent. */ evaluator_agent_id?: string; /** * Filter quality analytics to one immutable evaluator-agent version. */ evaluator_agent_version_id?: string; /** * Filter quality analytics to one stable rubric criterion key. */ criterion_key?: string; /** * Filter quality analytics by the target task archetype frozen on the evaluation. */ archetype?: string; /** * Filter quality analytics by the target size bucket frozen on the evaluation. */ size_bucket?: string; /** * Return the series split into one line per value of this dimension, for a stacked chart, alongside the combined series. Capped at the top eight groups by the family's ranking measure. Omit for the combined series only. */ series_group_by?: string; /** * Rows per breakdown. */ limit?: number; }; url: '/managed-agents/v1/analytics/{family}'; }; export type GetManagedAgentsV1AnalyticsByFamilyErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiError; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1AnalyticsByFamilyError = GetManagedAgentsV1AnalyticsByFamilyErrors[keyof GetManagedAgentsV1AnalyticsByFamilyErrors]; export type GetManagedAgentsV1AnalyticsByFamilyResponses = { /** * Pre-aggregated analytics for one metric family, scope, and time window. Figures are kept up to date as work happens rather than recomputed from session events, so a response is fast regardless of how much history the organization has, and states its own freshness through as_of and lag_seconds. */ 200: ManagedAgentsAnalyticsResponse; }; export type GetManagedAgentsV1AnalyticsByFamilyResponse = GetManagedAgentsV1AnalyticsByFamilyResponses[keyof GetManagedAgentsV1AnalyticsByFamilyResponses]; export type GetManagedAgentsV1AutomationRunsData = { body?: never; path?: never; query?: { /** * Narrow to one automation. */ automationId?: string; /** * Narrow to one stored trigger. Manual runs have no trigger id. */ triggerId?: string; /** * Narrow to one event source. */ eventSourceId?: string; /** * Narrow to one admission kind. */ triggerType?: 'manual' | 'schedule' | 'slack' | 'github' | 'webhook'; /** * Narrow to one session-creation outcome. */ status?: 'pending' | 'created' | 'failed'; /** * Only runs recorded at or after this RFC 3339 instant. */ createdAtGte?: string; /** * Only runs recorded before this RFC 3339 instant. */ createdAtLt?: string; /** * Maximum run records to return. Defaults to 50. */ limit?: number; /** * Opaque cursor from nextCursor. Pass it unchanged with the same normalized filters and limit. */ cursor?: string; }; url: '/managed-agents/v1/automation-runs'; }; export type GetManagedAgentsV1AutomationRunsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1AutomationRunsError = GetManagedAgentsV1AutomationRunsErrors[keyof GetManagedAgentsV1AutomationRunsErrors]; export type GetManagedAgentsV1AutomationRunsResponses = { /** * A bounded snapshot-consistent page of canonical automation runs. */ 200: ManagedAgentsAutomationDefinitionRunPageResponse; }; export type GetManagedAgentsV1AutomationRunsResponse = GetManagedAgentsV1AutomationRunsResponses[keyof GetManagedAgentsV1AutomationRunsResponses]; export type GetManagedAgentsV1AutomationRunsByAutomationRunIdData = { body?: never; path: { /** * Stable canonical automation-run identifier. */ automationRunId: string; }; query?: never; url: '/managed-agents/v1/automation-runs/{automationRunId}'; }; export type GetManagedAgentsV1AutomationRunsByAutomationRunIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1AutomationRunsByAutomationRunIdError = GetManagedAgentsV1AutomationRunsByAutomationRunIdErrors[keyof GetManagedAgentsV1AutomationRunsByAutomationRunIdErrors]; export type GetManagedAgentsV1AutomationRunsByAutomationRunIdResponses = { /** * Canonical record of one admitted automation run and its frozen execution context. */ 200: ManagedAgentsAutomationDefinitionRunResponse; }; export type GetManagedAgentsV1AutomationRunsByAutomationRunIdResponse = GetManagedAgentsV1AutomationRunsByAutomationRunIdResponses[keyof GetManagedAgentsV1AutomationRunsByAutomationRunIdResponses]; export type GetManagedAgentsV1AutomationsData = { body?: never; path?: never; query?: { /** * Maximum automation summaries to return. Defaults to 50. */ limit?: number; /** * Opaque cursor from nextCursor. Pass it unchanged with the same limit. */ cursor?: string; }; url: '/managed-agents/v1/automations'; }; export type GetManagedAgentsV1AutomationsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1AutomationsError = GetManagedAgentsV1AutomationsErrors[keyof GetManagedAgentsV1AutomationsErrors]; export type GetManagedAgentsV1AutomationsResponses = { /** * Bounded page of canonical automation summaries. */ 200: ManagedAgentsAutomationDefinitionPageResponse; }; export type GetManagedAgentsV1AutomationsResponse = GetManagedAgentsV1AutomationsResponses[keyof GetManagedAgentsV1AutomationsResponses]; export type PostManagedAgentsV1AutomationsData = { body: ManagedAgentsAutomationDefinitionRequest; headers: { /** * Replay-protection key in an organization-wide namespace shared by keyed mutations. It must contain 1 to 256 visible ASCII characters and be sent as exactly one header value. Request identity is the exact HTTP method, escaped path, raw query, and raw body bytes. The same request replays the original successful response; any different request returns 409 idempotency_conflict, and an active matching request returns 409 idempotency_in_progress. Completed receipts are retained for approximately 24 hours, pending claims may be reclaimed after approximately 1 hour, and no deduplication is guaranteed after expiry. */ 'Idempotency-Key': string; }; path?: never; query?: never; url: '/managed-agents/v1/automations'; }; export type PostManagedAgentsV1AutomationsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ({ code: 'conflict'; } & ManagedAgentsApiErrorConflict) | ({ code: 'idempotency_conflict'; } & ManagedAgentsApiErrorIdempotencyConflict) | ({ code: 'idempotency_in_progress'; } & ManagedAgentsApiErrorIdempotencyInProgress); /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiErrorPayloadTooLarge; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * The request is well formed but failed semantic validation. */ 422: ManagedAgentsApiErrorSemanticValidationFailed; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'idempotency_unavailable'; } & ManagedAgentsApiErrorIdempotencyUnavailable) | ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1AutomationsError = PostManagedAgentsV1AutomationsErrors[keyof PostManagedAgentsV1AutomationsErrors]; export type PostManagedAgentsV1AutomationsResponses = { /** * Full round-trippable canonical automation aggregate. */ 201: ManagedAgentsAutomationDefinitionResponse; }; export type PostManagedAgentsV1AutomationsResponse = PostManagedAgentsV1AutomationsResponses[keyof PostManagedAgentsV1AutomationsResponses]; export type DeleteManagedAgentsV1AutomationsByAutomationIdData = { body?: never; headers: { /** * Strong ETag returned by the latest canonical automation member read. */ 'If-Match': string; }; path: { /** * Stable canonical automation identifier. */ automationId: string; }; query?: never; url: '/managed-agents/v1/automations/{automationId}'; }; export type DeleteManagedAgentsV1AutomationsByAutomationIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiErrorConflict; /** * A request precondition does not match the current resource state. */ 412: ManagedAgentsApiErrorPreconditionFailed; /** * The request requires a precondition. */ 428: ManagedAgentsApiErrorPreconditionRequired; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type DeleteManagedAgentsV1AutomationsByAutomationIdError = DeleteManagedAgentsV1AutomationsByAutomationIdErrors[keyof DeleteManagedAgentsV1AutomationsByAutomationIdErrors]; export type DeleteManagedAgentsV1AutomationsByAutomationIdResponses = { /** * No Content */ 204: void; }; export type DeleteManagedAgentsV1AutomationsByAutomationIdResponse = DeleteManagedAgentsV1AutomationsByAutomationIdResponses[keyof DeleteManagedAgentsV1AutomationsByAutomationIdResponses]; export type GetManagedAgentsV1AutomationsByAutomationIdData = { body?: never; headers?: { /** * Strong ETag from an earlier member read. A match returns 304 without a body. */ 'If-None-Match'?: string; }; path: { /** * Stable canonical automation identifier. */ automationId: string; }; query?: never; url: '/managed-agents/v1/automations/{automationId}'; }; export type GetManagedAgentsV1AutomationsByAutomationIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1AutomationsByAutomationIdError = GetManagedAgentsV1AutomationsByAutomationIdErrors[keyof GetManagedAgentsV1AutomationsByAutomationIdErrors]; export type GetManagedAgentsV1AutomationsByAutomationIdResponses = { /** * Full round-trippable canonical automation aggregate. */ 200: ManagedAgentsAutomationDefinitionResponse; }; export type GetManagedAgentsV1AutomationsByAutomationIdResponse = GetManagedAgentsV1AutomationsByAutomationIdResponses[keyof GetManagedAgentsV1AutomationsByAutomationIdResponses]; export type PutManagedAgentsV1AutomationsByAutomationIdData = { body: ManagedAgentsAutomationDefinitionRequest; headers: { /** * Strong ETag returned by the latest canonical automation member read. */ 'If-Match': string; }; path: { /** * Stable canonical automation identifier. */ automationId: string; }; query?: never; url: '/managed-agents/v1/automations/{automationId}'; }; export type PutManagedAgentsV1AutomationsByAutomationIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiErrorConflict; /** * A request precondition does not match the current resource state. */ 412: ManagedAgentsApiErrorPreconditionFailed; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiErrorPayloadTooLarge; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * The request is well formed but failed semantic validation. */ 422: ManagedAgentsApiErrorSemanticValidationFailed; /** * The request requires a precondition. */ 428: ManagedAgentsApiErrorPreconditionRequired; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PutManagedAgentsV1AutomationsByAutomationIdError = PutManagedAgentsV1AutomationsByAutomationIdErrors[keyof PutManagedAgentsV1AutomationsByAutomationIdErrors]; export type PutManagedAgentsV1AutomationsByAutomationIdResponses = { /** * Full round-trippable canonical automation aggregate. */ 200: ManagedAgentsAutomationDefinitionResponse; }; export type PutManagedAgentsV1AutomationsByAutomationIdResponse = PutManagedAgentsV1AutomationsByAutomationIdResponses[keyof PutManagedAgentsV1AutomationsByAutomationIdResponses]; export type PostManagedAgentsV1AutomationsByAutomationIdPauseData = { body?: never; headers: { /** * Strong ETag returned by the latest canonical automation member read. */ 'If-Match': string; }; path: { /** * Stable canonical automation identifier. */ automationId: string; }; query?: never; url: '/managed-agents/v1/automations/{automationId}/pause'; }; export type PostManagedAgentsV1AutomationsByAutomationIdPauseErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiErrorConflict; /** * A request precondition does not match the current resource state. */ 412: ManagedAgentsApiErrorPreconditionFailed; /** * The request requires a precondition. */ 428: ManagedAgentsApiErrorPreconditionRequired; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1AutomationsByAutomationIdPauseError = PostManagedAgentsV1AutomationsByAutomationIdPauseErrors[keyof PostManagedAgentsV1AutomationsByAutomationIdPauseErrors]; export type PostManagedAgentsV1AutomationsByAutomationIdPauseResponses = { /** * Full round-trippable canonical automation aggregate. */ 200: ManagedAgentsAutomationDefinitionResponse; }; export type PostManagedAgentsV1AutomationsByAutomationIdPauseResponse = PostManagedAgentsV1AutomationsByAutomationIdPauseResponses[keyof PostManagedAgentsV1AutomationsByAutomationIdPauseResponses]; export type PostManagedAgentsV1AutomationsByAutomationIdResumeData = { body?: never; headers: { /** * Strong ETag returned by the latest canonical automation member read. */ 'If-Match': string; }; path: { /** * Stable canonical automation identifier. */ automationId: string; }; query?: never; url: '/managed-agents/v1/automations/{automationId}/resume'; }; export type PostManagedAgentsV1AutomationsByAutomationIdResumeErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiErrorConflict; /** * A request precondition does not match the current resource state. */ 412: ManagedAgentsApiErrorPreconditionFailed; /** * The request requires a precondition. */ 428: ManagedAgentsApiErrorPreconditionRequired; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1AutomationsByAutomationIdResumeError = PostManagedAgentsV1AutomationsByAutomationIdResumeErrors[keyof PostManagedAgentsV1AutomationsByAutomationIdResumeErrors]; export type PostManagedAgentsV1AutomationsByAutomationIdResumeResponses = { /** * Full round-trippable canonical automation aggregate. */ 200: ManagedAgentsAutomationDefinitionResponse; }; export type PostManagedAgentsV1AutomationsByAutomationIdResumeResponse = PostManagedAgentsV1AutomationsByAutomationIdResumeResponses[keyof PostManagedAgentsV1AutomationsByAutomationIdResumeResponses]; export type PostManagedAgentsV1AutomationsByAutomationIdRunsData = { body: ManagedAgentsManualAutomationDefinitionRunRequest; headers: { /** * Replay-protection key in an organization-wide namespace shared by keyed mutations. It must contain 1 to 256 visible ASCII characters and be sent as exactly one header value. Request identity is the exact HTTP method, escaped path, raw query, and raw body bytes. The same request replays the original successful response; any different request returns 409 idempotency_conflict, and an active matching request returns 409 idempotency_in_progress. Completed receipts are retained for approximately 24 hours, pending claims may be reclaimed after approximately 1 hour, and no deduplication is guaranteed after expiry. */ 'Idempotency-Key': string; }; path: { /** * Stable canonical automation identifier. */ automationId: string; }; query?: never; url: '/managed-agents/v1/automations/{automationId}/runs'; }; export type PostManagedAgentsV1AutomationsByAutomationIdRunsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ({ code: 'conflict'; } & ManagedAgentsApiErrorConflict) | ({ code: 'idempotency_conflict'; } & ManagedAgentsApiErrorIdempotencyConflict) | ({ code: 'idempotency_in_progress'; } & ManagedAgentsApiErrorIdempotencyInProgress); /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiErrorPayloadTooLarge; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'idempotency_unavailable'; } & ManagedAgentsApiErrorIdempotencyUnavailable) | ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1AutomationsByAutomationIdRunsError = PostManagedAgentsV1AutomationsByAutomationIdRunsErrors[keyof PostManagedAgentsV1AutomationsByAutomationIdRunsErrors]; export type PostManagedAgentsV1AutomationsByAutomationIdRunsResponses = { /** * Canonical record of one admitted automation run and its frozen execution context. */ 200: ManagedAgentsAutomationDefinitionRunResponse; }; export type PostManagedAgentsV1AutomationsByAutomationIdRunsResponse = PostManagedAgentsV1AutomationsByAutomationIdRunsResponses[keyof PostManagedAgentsV1AutomationsByAutomationIdRunsResponses]; export type GetManagedAgentsV1AutomationsByAutomationIdStatusData = { body?: never; path: { /** * Stable canonical automation identifier. */ automationId: string; }; query?: never; url: '/managed-agents/v1/automations/{automationId}/status'; }; export type GetManagedAgentsV1AutomationsByAutomationIdStatusErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1AutomationsByAutomationIdStatusError = GetManagedAgentsV1AutomationsByAutomationIdStatusErrors[keyof GetManagedAgentsV1AutomationsByAutomationIdStatusErrors]; export type GetManagedAgentsV1AutomationsByAutomationIdStatusResponses = { /** * Read-only scheduler state for a canonical automation, independent of its writable definition. */ 200: ManagedAgentsAutomationDefinitionRuntimeStatus; }; export type GetManagedAgentsV1AutomationsByAutomationIdStatusResponse = GetManagedAgentsV1AutomationsByAutomationIdStatusResponses[keyof GetManagedAgentsV1AutomationsByAutomationIdStatusResponses]; export type GetManagedAgentsV1ComputeOfferingsData = { body?: never; path?: never; query?: never; url: '/managed-agents/v1/compute-offerings'; }; export type GetManagedAgentsV1ComputeOfferingsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1ComputeOfferingsError = GetManagedAgentsV1ComputeOfferingsErrors[keyof GetManagedAgentsV1ComputeOfferingsErrors]; export type GetManagedAgentsV1ComputeOfferingsResponses = { /** * Response body of GET /v1/compute-offerings. Describes this deployment's compute capability rather than the caller's data, so every organization sees the same list. Use CPU offering capacity to size CPU environments. For GPU environments, use the catalog to select an exclusive accelerator and understand host placement; sandbox CPU and memory limits remain service-owned and can be smaller than the host. */ 200: ManagedAgentsComputeOfferingListResponse; }; export type GetManagedAgentsV1ComputeOfferingsResponse = GetManagedAgentsV1ComputeOfferingsResponses[keyof GetManagedAgentsV1ComputeOfferingsResponses]; export type GetManagedAgentsV1CostEstimatesSessionHourData = { body?: never; path?: never; query: { /** * Model id as stored on the agent, for example litellm:anthropic/claude-sonnet-5. */ model: string; /** * Existing agent whose completed sessions set the utilization. Omit for a new agent. */ agentId?: string; /** * Utilization prior when the agent has no history: interactive (waits on a person) or autonomous. */ workload?: 'interactive' | 'autonomous'; /** * Requested sandbox CPU in millicores; 0 prices no CPU. */ cpuMilli?: number; /** * Requested sandbox memory in MiB; 0 prices no memory. */ memoryMib?: number; /** * Accelerator model name, for example l4 or a100. Omit for a CPU-only shape. */ accelerator?: string; /** * Accelerator count; 0 means 1 when accelerator is set. */ acceleratorCount?: number; /** * Price the shape at spot rates. */ spot?: boolean; }; url: '/managed-agents/v1/cost-estimates/session-hour'; }; export type GetManagedAgentsV1CostEstimatesSessionHourErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'auth_unavailable'; } & ManagedAgentsApiErrorAuthUnavailable) | ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1CostEstimatesSessionHourError = GetManagedAgentsV1CostEstimatesSessionHourErrors[keyof GetManagedAgentsV1CostEstimatesSessionHourErrors]; export type GetManagedAgentsV1CostEstimatesSessionHourResponses = { /** * What one session hour is likely to cost the calling organization, at its billed rates. */ 200: ManagedAgentsSessionHourEstimate; }; export type GetManagedAgentsV1CostEstimatesSessionHourResponse = GetManagedAgentsV1CostEstimatesSessionHourResponses[keyof GetManagedAgentsV1CostEstimatesSessionHourResponses]; export type GetManagedAgentsV1EnvironmentSetupTemplatesData = { body?: never; headers?: { /** * Previously returned ETag. When it still identifies the current representation, the response is 304 with no body. */ 'If-None-Match'?: string; }; path?: never; query?: never; url: '/managed-agents/v1/environment-setup-templates'; }; export type GetManagedAgentsV1EnvironmentSetupTemplatesErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'auth_unavailable'; } & ManagedAgentsApiErrorAuthUnavailable) | ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable) | ({ code: 'setup_runs_unavailable'; } & ManagedAgentsApiErrorSetupRunsUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1EnvironmentSetupTemplatesError = GetManagedAgentsV1EnvironmentSetupTemplatesErrors[keyof GetManagedAgentsV1EnvironmentSetupTemplatesErrors]; export type GetManagedAgentsV1EnvironmentSetupTemplatesResponses = { /** * Starting-point setup scripts the console and agents share. Copy one into setup.script and edit it; none is a preset that has to be used as is. */ 200: ManagedAgentsEnvironmentSetupTemplateListResponse; }; export type GetManagedAgentsV1EnvironmentSetupTemplatesResponse = GetManagedAgentsV1EnvironmentSetupTemplatesResponses[keyof GetManagedAgentsV1EnvironmentSetupTemplatesResponses]; export type GetManagedAgentsV1EnvironmentsData = { body?: never; path?: never; query?: never; url: '/managed-agents/v1/environments'; }; export type GetManagedAgentsV1EnvironmentsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1EnvironmentsError = GetManagedAgentsV1EnvironmentsErrors[keyof GetManagedAgentsV1EnvironmentsErrors]; export type GetManagedAgentsV1EnvironmentsResponses = { /** * Response body of GET /v1/environments. An environment is the sandbox recipe a session runs inside; pick an environment_id from here when starting a session with POST /v1/sessions. */ 200: ManagedAgentsEnvironmentListResponse; }; export type GetManagedAgentsV1EnvironmentsResponse = GetManagedAgentsV1EnvironmentsResponses[keyof GetManagedAgentsV1EnvironmentsResponses]; export type PostManagedAgentsV1EnvironmentsData = { body: ManagedAgentsCreateEnvironmentRequest; path?: never; query?: { /** * When true, a manual setup run is started as soon as the environment is saved, so one call both writes the configuration and begins proving it. The response is the environment with setup_verification.active_setup_run_id naming the run to poll; the status reads running unless an earlier verified verdict is being kept while it re-verifies. Ignored when the environment has no setup script. */ verify?: boolean; }; url: '/managed-agents/v1/environments'; }; export type PostManagedAgentsV1EnvironmentsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * The request is well formed but failed semantic validation. */ 422: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1EnvironmentsError = PostManagedAgentsV1EnvironmentsErrors[keyof PostManagedAgentsV1EnvironmentsErrors]; export type PostManagedAgentsV1EnvironmentsResponses = { /** * A sandbox environment a session executes in: its provider, resources, mounts, setup steps and idle/delete lifecycle. Created and started independently of any session. */ 200: ManagedAgentsEnvironment; }; export type PostManagedAgentsV1EnvironmentsResponse = PostManagedAgentsV1EnvironmentsResponses[keyof PostManagedAgentsV1EnvironmentsResponses]; export type DeleteManagedAgentsV1EnvironmentsByEnvironmentIdData = { body?: never; path: { /** * Environment id (UUID) as returned by createEnvironment or listEnvironments. */ environment_id: string; }; query?: never; url: '/managed-agents/v1/environments/{environment_id}'; }; export type DeleteManagedAgentsV1EnvironmentsByEnvironmentIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type DeleteManagedAgentsV1EnvironmentsByEnvironmentIdError = DeleteManagedAgentsV1EnvironmentsByEnvironmentIdErrors[keyof DeleteManagedAgentsV1EnvironmentsByEnvironmentIdErrors]; export type DeleteManagedAgentsV1EnvironmentsByEnvironmentIdResponses = { /** * Shared response body of every soft-delete endpoint, on agents, environments, tags, vaults, vault credentials, webhook bindings, and sessions. Soft delete is a tombstone, not an erase: the row stops appearing in list and get responses but is retained, and there is no undelete endpoint to bring it back. Irreversible erasure is the separate, confirmation-gated purge path. */ 200: ManagedAgentsDeletedResponse; }; export type DeleteManagedAgentsV1EnvironmentsByEnvironmentIdResponse = DeleteManagedAgentsV1EnvironmentsByEnvironmentIdResponses[keyof DeleteManagedAgentsV1EnvironmentsByEnvironmentIdResponses]; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdData = { body?: never; path: { /** * Environment id (UUID) as returned by createEnvironment or listEnvironments. */ environment_id: string; }; query?: never; url: '/managed-agents/v1/environments/{environment_id}'; }; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdError = GetManagedAgentsV1EnvironmentsByEnvironmentIdErrors[keyof GetManagedAgentsV1EnvironmentsByEnvironmentIdErrors]; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdResponses = { /** * A sandbox environment a session executes in: its provider, resources, mounts, setup steps and idle/delete lifecycle. Created and started independently of any session. */ 200: ManagedAgentsEnvironment; }; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdResponse = GetManagedAgentsV1EnvironmentsByEnvironmentIdResponses[keyof GetManagedAgentsV1EnvironmentsByEnvironmentIdResponses]; export type PatchManagedAgentsV1EnvironmentsByEnvironmentIdData = { body: ManagedAgentsUpdateEnvironmentRequest; path: { /** * Environment id (UUID) as returned by createEnvironment or listEnvironments. */ environment_id: string; }; query?: { /** * When true, a manual setup run is started as soon as the update is saved. Read setup_verification.active_setup_run_id from the response and poll getEnvironmentSetupRun; setup_verification.setup_run_id keeps naming an earlier verified run while it re-verifies. Ignored when the environment has no setup script. Starting the run is authorized exactly as createEnvironmentSetupRun is, so a caller who may update the environment but may not start a setup run is refused with 403 rather than saved without one. */ verify?: boolean; }; url: '/managed-agents/v1/environments/{environment_id}'; }; export type PatchManagedAgentsV1EnvironmentsByEnvironmentIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A request precondition does not match the current resource state. */ 412: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * The request is well formed but failed semantic validation. */ 422: ManagedAgentsApiError; /** * The request requires a precondition. */ 428: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PatchManagedAgentsV1EnvironmentsByEnvironmentIdError = PatchManagedAgentsV1EnvironmentsByEnvironmentIdErrors[keyof PatchManagedAgentsV1EnvironmentsByEnvironmentIdErrors]; export type PatchManagedAgentsV1EnvironmentsByEnvironmentIdResponses = { /** * A sandbox environment a session executes in: its provider, resources, mounts, setup steps and idle/delete lifecycle. Created and started independently of any session. */ 200: ManagedAgentsEnvironment; }; export type PatchManagedAgentsV1EnvironmentsByEnvironmentIdResponse = PatchManagedAgentsV1EnvironmentsByEnvironmentIdResponses[keyof PatchManagedAgentsV1EnvironmentsByEnvironmentIdResponses]; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsData = { body?: never; path: { /** * Environment id (UUID). */ environment_id: string; }; query?: { /** * Maximum runs to return, newest first. Defaults to 50. */ limit?: number; }; url: '/managed-agents/v1/environments/{environment_id}/setup-runs'; }; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsError = GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsErrors[keyof GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsErrors]; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsResponses = { /** * Recent setup runs for one environment, newest first. The newest manual run is the one the environment's setup_verification describes. */ 200: ManagedAgentsEnvironmentSetupRunListResponse; }; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsResponse = GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsResponses[keyof GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsResponses]; export type PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsData = { body?: never; path: { /** * Environment id (UUID) as returned by createEnvironment or listEnvironments. */ environment_id: string; }; query?: never; url: '/managed-agents/v1/environments/{environment_id}/setup-runs'; }; export type PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request is well formed but failed semantic validation. */ 422: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsError = PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsErrors[keyof PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsErrors]; export type PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsResponses = { /** * One execution of an environment's setup script on fresh compute: provision, GPU check, script, profile, image capture, cleanup. Read status until terminal, then hint, failed_line, and stderr_tail; the full log is a separate call. */ 202: ManagedAgentsEnvironmentSetupRun; }; export type PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsResponse = PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsResponses[keyof PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsResponses]; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdData = { body?: never; path: { /** * Environment id (UUID). */ environment_id: string; /** * Setup run id as returned by createEnvironmentSetupRun or the environment's setup_verification.active_setup_run_id. */ setup_run_id: string; }; query?: { /** * Block up to this many seconds for the run to reach succeeded, failed, or cancelled before responding. The server caps the wait at 5 seconds; larger values are accepted and clamped. 0 (the default) returns immediately and is recommended through the public API: sleep two seconds client-side and repeat to avoid timeouts on long-held requests. */ wait_seconds?: number; }; url: '/managed-agents/v1/environments/{environment_id}/setup-runs/{setup_run_id}'; }; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdError = GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdErrors[keyof GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdErrors]; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdResponses = { /** * One execution of an environment's setup script on fresh compute: provision, GPU check, script, profile, image capture, cleanup. Read status until terminal, then hint, failed_line, and stderr_tail; the full log is a separate call. */ 200: ManagedAgentsEnvironmentSetupRun; }; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdResponse = GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdResponses[keyof GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdResponses]; export type PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdCancelData = { body?: never; path: { /** * Environment id (UUID). */ environment_id: string; /** * Setup run id as returned by createEnvironmentSetupRun or the environment's setup_verification.active_setup_run_id. */ setup_run_id: string; }; query?: never; url: '/managed-agents/v1/environments/{environment_id}/setup-runs/{setup_run_id}/cancel'; }; export type PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdCancelErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdCancelError = PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdCancelErrors[keyof PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdCancelErrors]; export type PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdCancelResponses = { /** * One execution of an environment's setup script on fresh compute: provision, GPU check, script, profile, image capture, cleanup. Read status until terminal, then hint, failed_line, and stderr_tail; the full log is a separate call. */ 200: ManagedAgentsEnvironmentSetupRun; }; export type PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdCancelResponse = PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdCancelResponses[keyof PostManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdCancelResponses]; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdLogData = { body?: never; path: { /** * Environment id (UUID). */ environment_id: string; /** * Setup run id. */ setup_run_id: string; }; query?: { /** * Return lines with seq greater than this. Pass the previous response's next_after to continue a tail; 0 (the default) starts from the beginning. */ after?: number; /** * Maximum lines to return. Defaults to 500. */ limit?: number; /** * When no new lines exist and the run is still going, block up to this many seconds for more before responding. The server caps the wait at 5 seconds; larger values are accepted and clamped. Through the public API, prefer wait_seconds=0, sleep two seconds client-side, and loop with after=next_after until status is terminal. */ wait_seconds?: number; }; url: '/managed-agents/v1/environments/{environment_id}/setup-runs/{setup_run_id}/log'; }; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdLogErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdLogError = GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdLogErrors[keyof GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdLogErrors]; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdLogResponses = { /** * A page of a setup run's log with the cursor for the next page. stdout, stderr, marker (the script line about to run), and system (setup phase notes) are interleaved in capture order. */ 200: ManagedAgentsEnvironmentSetupRunLogResponse; }; export type GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdLogResponse = GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdLogResponses[keyof GetManagedAgentsV1EnvironmentsByEnvironmentIdSetupRunsBySetupRunIdLogResponses]; export type GetManagedAgentsV1EvaluationRunsData = { body?: never; path?: never; query?: { /** * Maximum runs to return. Defaults to 50. */ limit?: number; /** * Opaque signed continuation from next_page_token. It is bound to this organization and effective limit and expires after one hour. */ page_token?: string; }; url: '/managed-agents/v1/evaluation-runs'; }; export type GetManagedAgentsV1EvaluationRunsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1EvaluationRunsError = GetManagedAgentsV1EvaluationRunsErrors[keyof GetManagedAgentsV1EvaluationRunsErrors]; export type GetManagedAgentsV1EvaluationRunsResponses = { /** * One page of organization-scoped evaluation-run summaries and an optional continuation. */ 200: ManagedAgentsEvaluationRunListResponse; }; export type GetManagedAgentsV1EvaluationRunsResponse = GetManagedAgentsV1EvaluationRunsResponses[keyof GetManagedAgentsV1EvaluationRunsResponses]; export type GetManagedAgentsV1EvaluationsData = { body?: never; path?: never; query?: { /** * Narrow to one target session. Unknown, deleted-without-history, and cross-organization ids return 404. */ target_session_id?: string; /** * Narrow to verdicts for one target agent. Retained same-organization history remains readable after deletion. */ target_agent_id?: string; /** * Narrow to verdicts produced by one evaluator agent. Retained same-organization history remains readable after deletion. */ evaluator_agent_id?: string; /** * Narrow to one evaluation run, by the run_session_id listEvaluationRuns returns. */ run_session_id?: string; /** * Maximum verdicts to return. Defaults to 50. */ limit?: number; /** * Opaque signed continuation from next_page_token. It is bound to this organization, filters, and effective limit and expires after one hour. */ page_token?: string; }; url: '/managed-agents/v1/evaluations'; }; export type GetManagedAgentsV1EvaluationsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1EvaluationsError = GetManagedAgentsV1EvaluationsErrors[keyof GetManagedAgentsV1EvaluationsErrors]; export type GetManagedAgentsV1EvaluationsResponses = { /** * One organization-scoped page of immutable evaluation verdicts and an optional continuation. */ 200: ManagedAgentsEvaluationListResponse; }; export type GetManagedAgentsV1EvaluationsResponse = GetManagedAgentsV1EvaluationsResponses[keyof GetManagedAgentsV1EvaluationsResponses]; export type GetManagedAgentsV1EvaluationsOverviewData = { body?: never; path?: never; query: { /** * Length of the current window. The prior window is the adjacent interval of equal length. */ range?: '7d' | '28d' | '90d'; /** * Immutable evaluation-agent version whose rubric and verdicts define this overview. */ evaluator_agent_version_id: string; /** * Optionally narrow page-level metrics, table rows, and retained history to one target agent. */ target_agent_id?: string; /** * Repeat to explicitly compare up to five target agents; absent values select the page target or the first five whole-filter agents. */ series_target_agent_id?: Array; /** * Repeat to add scoped previous target-agent versions; automatic latest versions plus these values may total at most twelve traces. */ series_previous_target_agent_version_id?: Array; /** * Verdict population plotted for each selected target-agent version. */ series_metric?: 'overall' | 'criterion'; /** * Rubric key plotted when series_metric is criterion; required exactly for that metric. */ series_criterion_key?: string; /** * Opt into bounded adaptive chart positions from exact timestamps through days. Omit for the legacy fixed daily grid. */ series_resolution?: 'adaptive'; /** * Maximum target-agent rows to return. Defaults to 25. */ limit?: number; /** * Opaque signed continuation bound to the organization, frozen watermark, range, evaluator, singular table target, and effective limit. Comparison agents, versions, and metric may change without resetting the table page. Expires after one hour. */ page_token?: string; }; url: '/managed-agents/v1/evaluations/overview'; }; export type GetManagedAgentsV1EvaluationsOverviewErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1EvaluationsOverviewError = GetManagedAgentsV1EvaluationsOverviewErrors[keyof GetManagedAgentsV1EvaluationsOverviewErrors]; export type GetManagedAgentsV1EvaluationsOverviewResponses = { /** * Complete fixed-window evaluation Overview plus an optional signed target-agent continuation. */ 200: ManagedAgentsEvaluationOverviewResponse; }; export type GetManagedAgentsV1EvaluationsOverviewResponse = GetManagedAgentsV1EvaluationsOverviewResponses[keyof GetManagedAgentsV1EvaluationsOverviewResponses]; export type GetManagedAgentsV1EventSourcesData = { body?: never; path?: never; query?: { /** * Maximum source summaries to return. Defaults to 50. */ limit?: number; /** * Opaque cursor from nextCursor. Pass it unchanged with the same limit. */ cursor?: string; }; url: '/managed-agents/v1/event-sources'; }; export type GetManagedAgentsV1EventSourcesErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1EventSourcesError = GetManagedAgentsV1EventSourcesErrors[keyof GetManagedAgentsV1EventSourcesErrors]; export type GetManagedAgentsV1EventSourcesResponses = { /** * Bounded page of event sources owned by the calling workspace. */ 200: ManagedAgentsEventSourcePageResponse; }; export type GetManagedAgentsV1EventSourcesResponse = GetManagedAgentsV1EventSourcesResponses[keyof GetManagedAgentsV1EventSourcesResponses]; export type PostManagedAgentsV1EventSourcesData = { body: ManagedAgentsSlackEventSourceRequest | ManagedAgentsGithubEventSourceRequest | ManagedAgentsUnsignedCustomEventSourceRequest | ManagedAgentsHmacCustomEventSourceRequest; headers: { /** * Replay-protection key in an organization-wide namespace shared by keyed mutations. It must contain 1 to 256 visible ASCII characters and be sent as exactly one header value. Request identity is the exact HTTP method, escaped path, raw query, and raw body bytes. The same request replays the original successful response; any different request returns 409 idempotency_conflict, and an active matching request returns 409 idempotency_in_progress. Completed receipts are retained for approximately 24 hours, pending claims may be reclaimed after approximately 1 hour, and no deduplication is guaranteed after expiry. */ 'Idempotency-Key': string; }; path?: never; query?: never; url: '/managed-agents/v1/event-sources'; }; export type PostManagedAgentsV1EventSourcesErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ({ code: 'conflict'; } & ManagedAgentsApiErrorConflict) | ({ code: 'idempotency_conflict'; } & ManagedAgentsApiErrorIdempotencyConflict) | ({ code: 'idempotency_in_progress'; } & ManagedAgentsApiErrorIdempotencyInProgress); /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiErrorPayloadTooLarge; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * The request is well formed but failed semantic validation. */ 422: ManagedAgentsApiErrorSemanticValidationFailed; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'idempotency_unavailable'; } & ManagedAgentsApiErrorIdempotencyUnavailable) | ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1EventSourcesError = PostManagedAgentsV1EventSourcesErrors[keyof PostManagedAgentsV1EventSourcesErrors]; export type PostManagedAgentsV1EventSourcesResponses = { /** * Configured inbound event source, including its verification policy and lifecycle state. */ 201: ManagedAgentsEventSourceResponse; }; export type PostManagedAgentsV1EventSourcesResponse = PostManagedAgentsV1EventSourcesResponses[keyof PostManagedAgentsV1EventSourcesResponses]; export type DeleteManagedAgentsV1EventSourcesByEventSourceIdData = { body?: never; headers: { /** * Strong ETag returned by the latest event-source member read. */ 'If-Match': string; }; path: { /** * Stable event-source identifier. */ eventSourceId: string; }; query?: never; url: '/managed-agents/v1/event-sources/{eventSourceId}'; }; export type DeleteManagedAgentsV1EventSourcesByEventSourceIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiErrorConflict; /** * A request precondition does not match the current resource state. */ 412: ManagedAgentsApiErrorPreconditionFailed; /** * The request requires a precondition. */ 428: ManagedAgentsApiErrorPreconditionRequired; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type DeleteManagedAgentsV1EventSourcesByEventSourceIdError = DeleteManagedAgentsV1EventSourcesByEventSourceIdErrors[keyof DeleteManagedAgentsV1EventSourcesByEventSourceIdErrors]; export type DeleteManagedAgentsV1EventSourcesByEventSourceIdResponses = { /** * No Content */ 204: void; }; export type DeleteManagedAgentsV1EventSourcesByEventSourceIdResponse = DeleteManagedAgentsV1EventSourcesByEventSourceIdResponses[keyof DeleteManagedAgentsV1EventSourcesByEventSourceIdResponses]; export type GetManagedAgentsV1EventSourcesByEventSourceIdData = { body?: never; headers?: { /** * Strong ETag from an earlier member read. A match returns 304 without a body. */ 'If-None-Match'?: string; }; path: { /** * Stable event-source identifier. */ eventSourceId: string; }; query?: never; url: '/managed-agents/v1/event-sources/{eventSourceId}'; }; export type GetManagedAgentsV1EventSourcesByEventSourceIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1EventSourcesByEventSourceIdError = GetManagedAgentsV1EventSourcesByEventSourceIdErrors[keyof GetManagedAgentsV1EventSourcesByEventSourceIdErrors]; export type GetManagedAgentsV1EventSourcesByEventSourceIdResponses = { /** * Configured inbound event source, including its verification policy and lifecycle state. */ 200: ManagedAgentsEventSourceResponse; }; export type GetManagedAgentsV1EventSourcesByEventSourceIdResponse = GetManagedAgentsV1EventSourcesByEventSourceIdResponses[keyof GetManagedAgentsV1EventSourcesByEventSourceIdResponses]; export type PutManagedAgentsV1EventSourcesByEventSourceIdData = { body: ManagedAgentsSlackEventSourceRequest | ManagedAgentsGithubEventSourceRequest | ManagedAgentsUnsignedCustomEventSourceRequest | ManagedAgentsHmacCustomEventSourceRequest; headers: { /** * Strong ETag returned by the latest event-source member read. */ 'If-Match': string; }; path: { /** * Stable event-source identifier. */ eventSourceId: string; }; query?: never; url: '/managed-agents/v1/event-sources/{eventSourceId}'; }; export type PutManagedAgentsV1EventSourcesByEventSourceIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiErrorConflict; /** * A request precondition does not match the current resource state. */ 412: ManagedAgentsApiErrorPreconditionFailed; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiErrorPayloadTooLarge; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * The request is well formed but failed semantic validation. */ 422: ManagedAgentsApiErrorSemanticValidationFailed; /** * The request requires a precondition. */ 428: ManagedAgentsApiErrorPreconditionRequired; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PutManagedAgentsV1EventSourcesByEventSourceIdError = PutManagedAgentsV1EventSourcesByEventSourceIdErrors[keyof PutManagedAgentsV1EventSourcesByEventSourceIdErrors]; export type PutManagedAgentsV1EventSourcesByEventSourceIdResponses = { /** * Configured inbound event source, including its verification policy and lifecycle state. */ 200: ManagedAgentsEventSourceResponse; }; export type PutManagedAgentsV1EventSourcesByEventSourceIdResponse = PutManagedAgentsV1EventSourcesByEventSourceIdResponses[keyof PutManagedAgentsV1EventSourcesByEventSourceIdResponses]; export type PostManagedAgentsV1EventSourcesByEventSourceIdPauseData = { body?: never; headers: { /** * Strong ETag returned by the latest event-source member read. */ 'If-Match': string; }; path: { /** * Stable event-source identifier. */ eventSourceId: string; }; query?: never; url: '/managed-agents/v1/event-sources/{eventSourceId}/pause'; }; export type PostManagedAgentsV1EventSourcesByEventSourceIdPauseErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiErrorConflict; /** * A request precondition does not match the current resource state. */ 412: ManagedAgentsApiErrorPreconditionFailed; /** * The request requires a precondition. */ 428: ManagedAgentsApiErrorPreconditionRequired; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1EventSourcesByEventSourceIdPauseError = PostManagedAgentsV1EventSourcesByEventSourceIdPauseErrors[keyof PostManagedAgentsV1EventSourcesByEventSourceIdPauseErrors]; export type PostManagedAgentsV1EventSourcesByEventSourceIdPauseResponses = { /** * Configured inbound event source, including its verification policy and lifecycle state. */ 200: ManagedAgentsEventSourceResponse; }; export type PostManagedAgentsV1EventSourcesByEventSourceIdPauseResponse = PostManagedAgentsV1EventSourcesByEventSourceIdPauseResponses[keyof PostManagedAgentsV1EventSourcesByEventSourceIdPauseResponses]; export type PostManagedAgentsV1EventSourcesByEventSourceIdResumeData = { body?: never; headers: { /** * Strong ETag returned by the latest event-source member read. */ 'If-Match': string; }; path: { /** * Stable event-source identifier. */ eventSourceId: string; }; query?: never; url: '/managed-agents/v1/event-sources/{eventSourceId}/resume'; }; export type PostManagedAgentsV1EventSourcesByEventSourceIdResumeErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiErrorConflict; /** * A request precondition does not match the current resource state. */ 412: ManagedAgentsApiErrorPreconditionFailed; /** * The request requires a precondition. */ 428: ManagedAgentsApiErrorPreconditionRequired; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1EventSourcesByEventSourceIdResumeError = PostManagedAgentsV1EventSourcesByEventSourceIdResumeErrors[keyof PostManagedAgentsV1EventSourcesByEventSourceIdResumeErrors]; export type PostManagedAgentsV1EventSourcesByEventSourceIdResumeResponses = { /** * Configured inbound event source, including its verification policy and lifecycle state. */ 200: ManagedAgentsEventSourceResponse; }; export type PostManagedAgentsV1EventSourcesByEventSourceIdResumeResponse = PostManagedAgentsV1EventSourcesByEventSourceIdResumeResponses[keyof PostManagedAgentsV1EventSourcesByEventSourceIdResumeResponses]; export type GetManagedAgentsV1EventSourcesByEventSourceIdStatusData = { body?: never; path: { /** * Stable event-source identifier. */ eventSourceId: string; }; query?: never; url: '/managed-agents/v1/event-sources/{eventSourceId}/status'; }; export type GetManagedAgentsV1EventSourcesByEventSourceIdStatusErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1EventSourcesByEventSourceIdStatusError = GetManagedAgentsV1EventSourcesByEventSourceIdStatusErrors[keyof GetManagedAgentsV1EventSourcesByEventSourceIdStatusErrors]; export type GetManagedAgentsV1EventSourcesByEventSourceIdStatusResponses = { /** * Operational status for one event source without secret material. */ 200: ManagedAgentsEventSourceStatusResponse; }; export type GetManagedAgentsV1EventSourcesByEventSourceIdStatusResponse = GetManagedAgentsV1EventSourcesByEventSourceIdStatusResponses[keyof GetManagedAgentsV1EventSourcesByEventSourceIdStatusResponses]; export type GetManagedAgentsV1FilesData = { body?: never; path?: never; query?: { /** * Return only the files this session produced. */ scope_session_id?: string; /** * Return only these files, comma-separated or repeated, for resolving a session's attachments in one read. At most 100 ids, answered as one page: limit and page_token are refused alongside it, an id that names nothing visible is left out rather than reported, and a file_ids that names no id at all answers no files. */ file_ids?: Array; /** * Return only uploads or only session outputs. */ source?: 'upload' | 'session_output'; /** * Maximum files to return per page; defaults to 200, newest first. */ limit?: number; /** * Opaque cursor from a previous response's next_page_token. Send it with the same filters and limit the previous page used; a token issued for a different query, organization, or collection is refused. */ page_token?: string; }; url: '/managed-agents/v1/files'; }; export type GetManagedAgentsV1FilesErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1FilesError = GetManagedAgentsV1FilesErrors[keyof GetManagedAgentsV1FilesErrors]; export type GetManagedAgentsV1FilesResponses = { /** * Response body of GET /v1/files. */ 200: ManagedAgentsFileListResponse; }; export type GetManagedAgentsV1FilesResponse = GetManagedAgentsV1FilesResponses[keyof GetManagedAgentsV1FilesResponses]; export type DeleteManagedAgentsV1FilesByFileIdData = { body?: never; path: { /** * File id (UUID) as returned by uploadFile or listFiles. */ file_id: string; }; query?: never; url: '/managed-agents/v1/files/{file_id}'; }; export type DeleteManagedAgentsV1FilesByFileIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type DeleteManagedAgentsV1FilesByFileIdError = DeleteManagedAgentsV1FilesByFileIdErrors[keyof DeleteManagedAgentsV1FilesByFileIdErrors]; export type DeleteManagedAgentsV1FilesByFileIdResponses = { /** * Shared response body of every soft-delete endpoint, on agents, environments, tags, vaults, vault credentials, webhook bindings, and sessions. Soft delete is a tombstone, not an erase: the row stops appearing in list and get responses but is retained, and there is no undelete endpoint to bring it back. Irreversible erasure is the separate, confirmation-gated purge path. */ 200: ManagedAgentsDeletedResponse; }; export type DeleteManagedAgentsV1FilesByFileIdResponse = DeleteManagedAgentsV1FilesByFileIdResponses[keyof DeleteManagedAgentsV1FilesByFileIdResponses]; export type GetManagedAgentsV1FilesByFileIdData = { body?: never; path: { /** * File id (UUID) as returned by uploadFile or listFiles. */ file_id: string; }; query?: never; url: '/managed-agents/v1/files/{file_id}'; }; export type GetManagedAgentsV1FilesByFileIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1FilesByFileIdError = GetManagedAgentsV1FilesByFileIdErrors[keyof GetManagedAgentsV1FilesByFileIdErrors]; export type GetManagedAgentsV1FilesByFileIdResponses = { /** * A file object: bytes uploaded once and attachable to any number of sessions as a resource, or bytes a session produced. Attaching a file mounts it read-only into the session's sandbox at a path the session is told about. */ 200: ManagedAgentsFile; }; export type GetManagedAgentsV1FilesByFileIdResponse = GetManagedAgentsV1FilesByFileIdResponses[keyof GetManagedAgentsV1FilesByFileIdResponses]; export type GetManagedAgentsV1IntegrationsConnectionsByConnectionIdChannelCatalogData = { body?: never; path: { /** * Slack integration connection identifier. */ connectionId: string; }; query?: never; url: '/managed-agents/v1/integrations/connections/{connectionId}/channel-catalog'; }; export type GetManagedAgentsV1IntegrationsConnectionsByConnectionIdChannelCatalogErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * The request is well formed but failed semantic validation. */ 422: ({ code: 'slack_channels_rejected'; } & ManagedAgentsApiErrorSlackChannelsRejected) | ({ code: 'slack_connection_malformed'; } & ManagedAgentsApiErrorSlackConnectionMalformed) | ({ code: 'slack_installation_mismatch'; } & ManagedAgentsApiErrorSlackInstallationMismatch) | ({ code: 'slack_missing_scope'; } & ManagedAgentsApiErrorSlackMissingScope) | ({ code: 'slack_reapproval_required'; } & ManagedAgentsApiErrorSlackReapprovalRequired); /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited) | ({ code: 'slack_rate_limited'; } & ManagedAgentsApiErrorSlackRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'auth_unavailable'; } & ManagedAgentsApiErrorAuthUnavailable) | ({ code: 'integrations_unconfigured'; } & ManagedAgentsApiErrorIntegrationsUnconfigured) | ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable) | ({ code: 'slack_channels_unavailable'; } & ManagedAgentsApiErrorSlackChannelsUnavailable) | ({ code: 'slack_channels_unconfigured'; } & ManagedAgentsApiErrorSlackChannelsUnconfigured); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1IntegrationsConnectionsByConnectionIdChannelCatalogError = GetManagedAgentsV1IntegrationsConnectionsByConnectionIdChannelCatalogErrors[keyof GetManagedAgentsV1IntegrationsConnectionsByConnectionIdChannelCatalogErrors]; export type GetManagedAgentsV1IntegrationsConnectionsByConnectionIdChannelCatalogResponses = { /** * The channels a Slack connection's bot is a member of, read live from Slack with a short cache. Returned to populate the channel picker when creating or editing a Slack trigger binding; the binding itself still stores the channel id. */ 200: ManagedAgentsSlackChannels; }; export type GetManagedAgentsV1IntegrationsConnectionsByConnectionIdChannelCatalogResponse = GetManagedAgentsV1IntegrationsConnectionsByConnectionIdChannelCatalogResponses[keyof GetManagedAgentsV1IntegrationsConnectionsByConnectionIdChannelCatalogResponses]; export type PostManagedAgentsV1McpProbeData = { body: ManagedAgentsProbeMcpServerRequest; path?: never; query?: never; url: '/managed-agents/v1/mcp/probe'; }; export type PostManagedAgentsV1McpProbeErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1McpProbeError = PostManagedAgentsV1McpProbeErrors[keyof PostManagedAgentsV1McpProbeErrors]; export type PostManagedAgentsV1McpProbeResponses = { /** * Response body of POST /v1/mcp/probe: the result of one live connection attempt to an MCP server, run through the same URL and vault resolution a real session uses. This envelope is a verdict rather than a resource: a server that is down is still HTTP 200 with ok=false, so a caller can distinguish "the server you configured is unreachable" from "this API is unreachable". Nothing is persisted by a probe. */ 200: ManagedAgentsMcpProbeResponse; }; export type PostManagedAgentsV1McpProbeResponse = PostManagedAgentsV1McpProbeResponses[keyof PostManagedAgentsV1McpProbeResponses]; export type GetManagedAgentsV1MemoryStoresData = { body?: never; path?: never; query?: { /** * Only stores belonging to this agent. */ agent_id?: string; /** * Only stores with this provenance. */ origin?: 'curated' | 'reflection'; /** * Only stores in this state. */ status?: 'active' | 'archived'; /** * Include archived stores. Omitted by default. */ include_archived?: boolean; }; url: '/managed-agents/v1/memory_stores'; }; export type GetManagedAgentsV1MemoryStoresErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1MemoryStoresError = GetManagedAgentsV1MemoryStoresErrors[keyof GetManagedAgentsV1MemoryStoresErrors]; export type GetManagedAgentsV1MemoryStoresResponses = { /** * The memory stores in the calling organization, newest first. */ 200: ManagedAgentsMemoryStoreListResponse; }; export type GetManagedAgentsV1MemoryStoresResponse = GetManagedAgentsV1MemoryStoresResponses[keyof GetManagedAgentsV1MemoryStoresResponses]; export type PostManagedAgentsV1MemoryStoresData = { body: ManagedAgentsMemoryStoreRequest; path?: never; query?: never; url: '/managed-agents/v1/memory_stores'; }; export type PostManagedAgentsV1MemoryStoresErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1MemoryStoresError = PostManagedAgentsV1MemoryStoresErrors[keyof PostManagedAgentsV1MemoryStoresErrors]; export type PostManagedAgentsV1MemoryStoresResponses = { /** * A collection of path-addressed documents an agent reads across sessions. Attaching a store adds one note to the system prompt naming what it contains; the agent browses, searches, and reads its contents on demand, so store size does not enter the prompt. */ 201: ManagedAgentsMemoryStore; }; export type PostManagedAgentsV1MemoryStoresResponse = PostManagedAgentsV1MemoryStoresResponses[keyof PostManagedAgentsV1MemoryStoresResponses]; export type DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdData = { body?: never; path: { /** * Memory store id (UUID) as returned by createMemoryStore or listMemoryStores. */ memory_store_id: string; }; query?: never; url: '/managed-agents/v1/memory_stores/{memory_store_id}'; }; export type DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdError = DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdErrors[keyof DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdErrors]; export type DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdResponses = { /** * No Content */ 204: void; }; export type DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdResponse = DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdResponses[keyof DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdResponses]; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdData = { body?: never; path: { /** * Memory store id (UUID) as returned by createMemoryStore or listMemoryStores. */ memory_store_id: string; }; query?: never; url: '/managed-agents/v1/memory_stores/{memory_store_id}'; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdError = GetManagedAgentsV1MemoryStoresByMemoryStoreIdErrors[keyof GetManagedAgentsV1MemoryStoresByMemoryStoreIdErrors]; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdResponses = { /** * A collection of path-addressed documents an agent reads across sessions. Attaching a store adds one note to the system prompt naming what it contains; the agent browses, searches, and reads its contents on demand, so store size does not enter the prompt. */ 200: ManagedAgentsMemoryStore; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdResponse = GetManagedAgentsV1MemoryStoresByMemoryStoreIdResponses[keyof GetManagedAgentsV1MemoryStoresByMemoryStoreIdResponses]; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdData = { body: ManagedAgentsMemoryStoreRequest; path: { /** * Memory store id (UUID) as returned by createMemoryStore or listMemoryStores. */ memory_store_id: string; }; query?: never; url: '/managed-agents/v1/memory_stores/{memory_store_id}'; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdError = PostManagedAgentsV1MemoryStoresByMemoryStoreIdErrors[keyof PostManagedAgentsV1MemoryStoresByMemoryStoreIdErrors]; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdResponses = { /** * A collection of path-addressed documents an agent reads across sessions. Attaching a store adds one note to the system prompt naming what it contains; the agent browses, searches, and reads its contents on demand, so store size does not enter the prompt. */ 200: ManagedAgentsMemoryStore; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdResponse = PostManagedAgentsV1MemoryStoresByMemoryStoreIdResponses[keyof PostManagedAgentsV1MemoryStoresByMemoryStoreIdResponses]; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdArchiveData = { body?: never; path: { /** * Memory store id (UUID) as returned by createMemoryStore or listMemoryStores. */ memory_store_id: string; }; query?: never; url: '/managed-agents/v1/memory_stores/{memory_store_id}/archive'; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdArchiveErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdArchiveError = PostManagedAgentsV1MemoryStoresByMemoryStoreIdArchiveErrors[keyof PostManagedAgentsV1MemoryStoresByMemoryStoreIdArchiveErrors]; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdArchiveResponses = { /** * No Content */ 204: void; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdArchiveResponse = PostManagedAgentsV1MemoryStoresByMemoryStoreIdArchiveResponses[keyof PostManagedAgentsV1MemoryStoresByMemoryStoreIdArchiveResponses]; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesData = { body?: never; path: { /** * Memory store id (UUID) whose namespace is being browsed. */ memory_store_id: string; }; query?: { /** * Directory to list, ending in a slash. Matches whole path segments, so /notes/ excludes /notes-archive/. Defaults to /. */ path_prefix?: string; /** * 0 lists the whole subtree, 1 lists immediate children with directories collapsed into prefixes. Any other value is a 400. Defaults to 0. */ depth?: number; }; url: '/managed-agents/v1/memory_stores/{memory_store_id}/memories'; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesError = GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesErrors[keyof GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesErrors]; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesResponses = { /** * One level of a memory store's namespace: memories and the prefixes standing for the paths beneath them. */ 200: ManagedAgentsMemoryListResponse; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesResponse = GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesResponses[keyof GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesResponses]; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesData = { body: ManagedAgentsMemoryCreateRequest; path: { /** * Memory store id (UUID) as returned by createMemoryStore or listMemoryStores. */ memory_store_id: string; }; query?: never; url: '/managed-agents/v1/memory_stores/{memory_store_id}/memories'; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * The request is well formed but failed semantic validation. */ 422: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesError = PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesErrors[keyof PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesErrors]; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesResponses = { /** * One path-addressed document in a memory store. The path hierarchy is the routing structure an agent browses, so it carries the meaning a per-memory prompt description otherwise would. */ 201: ManagedAgentsMemory; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesResponse = PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesResponses[keyof PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesResponses]; export type DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdData = { body?: never; path: { /** * Memory store id (UUID) the memory belongs to. */ memory_store_id: string; /** * Memory id (UUID) as returned by createMemory. */ memory_id: string; }; query?: never; url: '/managed-agents/v1/memory_stores/{memory_store_id}/memories/{memory_id}'; }; export type DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdError = DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdErrors[keyof DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdErrors]; export type DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdResponses = { /** * No Content */ 204: void; }; export type DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdResponse = DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdResponses[keyof DeleteManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdResponses]; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdData = { body?: never; path: { /** * Memory store id (UUID) the memory belongs to. */ memory_store_id: string; /** * Memory id (UUID) as returned by createMemory. */ memory_id: string; }; query?: never; url: '/managed-agents/v1/memory_stores/{memory_store_id}/memories/{memory_id}'; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdError = GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdErrors[keyof GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdErrors]; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdResponses = { /** * One path-addressed document in a memory store. The path hierarchy is the routing structure an agent browses, so it carries the meaning a per-memory prompt description otherwise would. */ 200: ManagedAgentsMemory; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdResponse = GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdResponses[keyof GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdResponses]; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdData = { body: ManagedAgentsMemoryRequest; path: { /** * Memory store id (UUID) the memory belongs to. */ memory_store_id: string; /** * Memory id (UUID) as returned by createMemory. */ memory_id: string; }; query?: never; url: '/managed-agents/v1/memory_stores/{memory_store_id}/memories/{memory_id}'; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * The request is well formed but failed semantic validation. */ 422: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdError = PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdErrors[keyof PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdErrors]; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdResponses = { /** * One path-addressed document in a memory store. The path hierarchy is the routing structure an agent browses, so it carries the meaning a per-memory prompt description otherwise would. */ 200: ManagedAgentsMemory; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdResponse = PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdResponses[keyof PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoriesByMemoryIdResponses]; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryData = { body?: never; path: { /** * Memory store id (UUID) the memory belongs to. */ memory_store_id: string; }; query: { /** * Path of the memory, exactly as a listing or search returned it. */ path: string; }; url: '/managed-agents/v1/memory_stores/{memory_store_id}/memory'; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryError = GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryErrors[keyof GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryErrors]; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryResponses = { /** * One path-addressed document in a memory store. The path hierarchy is the routing structure an agent browses, so it carries the meaning a per-memory prompt description otherwise would. */ 200: ManagedAgentsMemory; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryResponse = GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryResponses[keyof GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryResponses]; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsData = { body?: never; path: { /** * Memory store id (UUID) whose history is being read. */ memory_store_id: string; }; query?: { /** * Only versions of this memory. The memory may since have been deleted. */ memory_id?: string; /** * Page size from 1 through 100, default 50. */ limit?: number; /** * Opaque next_cursor from the previous history page, with the same memory_id filter. */ cursor?: string; }; url: '/managed-agents/v1/memory_stores/{memory_store_id}/memory_versions'; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsError = GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsErrors[keyof GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsErrors]; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsResponses = { /** * A page of immutable memory history, including the evidence and reason for each change. */ 200: ManagedAgentsMemoryVersionPage; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsResponse = GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsResponses[keyof GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsResponses]; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdData = { body?: never; path: { /** * Memory store id (UUID) the version belongs to. */ memory_store_id: string; /** * Memory version id (UUID) as returned by listMemoryVersions. */ memory_version_id: string; }; query?: never; url: '/managed-agents/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}'; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdError = GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdErrors[keyof GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdErrors]; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdResponses = { /** * One immutable change to a memory. Versions belong to the store rather than the memory, so the audit trail survives the memory being deleted. */ 200: ManagedAgentsMemoryVersion; }; export type GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdResponse = GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdResponses[keyof GetManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdResponses]; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRedactData = { body?: never; path: { /** * Memory store id (UUID) the version belongs to. */ memory_store_id: string; /** * Memory version id (UUID) as returned by listMemoryVersions. */ memory_version_id: string; }; query?: never; url: '/managed-agents/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact'; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRedactErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request is well formed but failed semantic validation. */ 422: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRedactError = PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRedactErrors[keyof PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRedactErrors]; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRedactResponses = { /** * No Content */ 204: void; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRedactResponse = PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRedactResponses[keyof PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRedactResponses]; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRestoreData = { body?: never; path: { /** * Memory store id (UUID) the version belongs to. */ memory_store_id: string; /** * Memory version id (UUID) as returned by listMemoryVersions. */ memory_version_id: string; }; query?: never; url: '/managed-agents/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/restore'; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRestoreErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request is well formed but failed semantic validation. */ 422: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRestoreError = PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRestoreErrors[keyof PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRestoreErrors]; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRestoreResponses = { /** * One path-addressed document in a memory store. The path hierarchy is the routing structure an agent browses, so it carries the meaning a per-memory prompt description otherwise would. */ 200: ManagedAgentsMemory; }; export type PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRestoreResponse = PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRestoreResponses[keyof PostManagedAgentsV1MemoryStoresByMemoryStoreIdMemoryVersionsByMemoryVersionIdRestoreResponses]; export type GetManagedAgentsV1ModelsData = { body?: never; headers?: { /** * Previously returned ETag. When it still identifies the current representation, the response is 304 with no body. */ 'If-None-Match'?: string; }; path?: never; query?: never; url: '/managed-agents/v1/models'; }; export type GetManagedAgentsV1ModelsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'auth_unavailable'; } & ManagedAgentsApiErrorAuthUnavailable) | ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'model_gateway_unconfigured'; } & ManagedAgentsApiErrorModelGatewayUnconfigured) | ({ code: 'model_gateway_unreachable'; } & ManagedAgentsApiErrorModelGatewayUnreachable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1ModelsError = GetManagedAgentsV1ModelsErrors[keyof GetManagedAgentsV1ModelsErrors]; export type GetManagedAgentsV1ModelsResponses = { /** * Response body of GET /v1/models. Unlike the other catalogs this one is not stored per organization: it reflects the models currently available and is cached briefly, so a successful response can be slightly stale, and the operation returns 503 rather than an empty list when the model catalog cannot be read and nothing is cached. */ 200: ManagedAgentsGatewayModelListResponse; }; export type GetManagedAgentsV1ModelsResponse = GetManagedAgentsV1ModelsResponses[keyof GetManagedAgentsV1ModelsResponses]; export type GetManagedAgentsV1ReflectionsData = { body?: never; path?: never; query?: { /** * Only runs for this agent. */ agent_id?: string; /** * Only runs in this state. */ status?: 'pending' | 'running' | 'completed' | 'failed' | 'canceled'; /** * Only runs started this way. */ triggered_by?: 'schedule' | 'counter' | 'manual'; /** * Maximum runs to return. Defaults to 50. */ limit?: number; }; url: '/managed-agents/v1/reflections'; }; export type GetManagedAgentsV1ReflectionsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1ReflectionsError = GetManagedAgentsV1ReflectionsErrors[keyof GetManagedAgentsV1ReflectionsErrors]; export type GetManagedAgentsV1ReflectionsResponses = { /** * Memory learning runs, newest first. */ 200: ManagedAgentsReflectionListResponse; }; export type GetManagedAgentsV1ReflectionsResponse = GetManagedAgentsV1ReflectionsResponses[keyof GetManagedAgentsV1ReflectionsResponses]; export type GetManagedAgentsV1ReflectionsByReflectionIdData = { body?: never; path: { /** * Consolidation run id (UUID) as returned by listReflections. */ reflection_id: string; }; query?: never; url: '/managed-agents/v1/reflections/{reflection_id}'; }; export type GetManagedAgentsV1ReflectionsByReflectionIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1ReflectionsByReflectionIdError = GetManagedAgentsV1ReflectionsByReflectionIdErrors[keyof GetManagedAgentsV1ReflectionsByReflectionIdErrors]; export type GetManagedAgentsV1ReflectionsByReflectionIdResponses = { /** * One learning run: it reads reports from an agent's finished sessions and applies a set of changes to the agent's learned memory in one step. It runs as an ordinary session, so the whole run is readable through driver_session_id. */ 200: ManagedAgentsReflection; }; export type GetManagedAgentsV1ReflectionsByReflectionIdResponse = GetManagedAgentsV1ReflectionsByReflectionIdResponses[keyof GetManagedAgentsV1ReflectionsByReflectionIdResponses]; export type GetManagedAgentsV1RepositoryAutomationPullRequestReviewsBySessionIdResultData = { body?: never; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; }; query?: never; url: '/managed-agents/v1/repository-automation/pull-request-reviews/{session_id}/result'; }; export type GetManagedAgentsV1RepositoryAutomationPullRequestReviewsBySessionIdResultErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiError; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request is well formed but failed semantic validation. */ 422: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1RepositoryAutomationPullRequestReviewsBySessionIdResultError = GetManagedAgentsV1RepositoryAutomationPullRequestReviewsBySessionIdResultErrors[keyof GetManagedAgentsV1RepositoryAutomationPullRequestReviewsBySessionIdResultErrors]; export type GetManagedAgentsV1RepositoryAutomationPullRequestReviewsBySessionIdResultResponses = { /** * The completed review for one pull request review session. Available only after the session completes, and returned only once every claimed finding location has been rebound to the trusted exact-SHA diff manifest. */ 200: ManagedAgentsPullRequestReviewResultResponse; }; export type GetManagedAgentsV1RepositoryAutomationPullRequestReviewsBySessionIdResultResponse = GetManagedAgentsV1RepositoryAutomationPullRequestReviewsBySessionIdResultResponses[keyof GetManagedAgentsV1RepositoryAutomationPullRequestReviewsBySessionIdResultResponses]; export type GetManagedAgentsV1SandboxProvidersData = { body?: never; headers?: { /** * Previously returned ETag. When it still identifies the current representation, the response is 304 with no body. */ 'If-None-Match'?: string; }; path?: never; query?: never; url: '/managed-agents/v1/sandbox-providers'; }; export type GetManagedAgentsV1SandboxProvidersErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiErrorInvalidRequest; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiErrorUnauthorized; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ({ code: 'rate_limit_exceeded'; } & ManagedAgentsApiErrorRateLimitExceeded) | ({ code: 'rate_limited'; } & ManagedAgentsApiErrorRateLimited); /** * An unexpected server-side failure. */ 500: ({ code: 'internal_error'; } & ManagedAgentsApiErrorInternalError) | ({ code: 'invariant_violation'; } & ManagedAgentsApiErrorInvariantViolation); /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ({ code: 'auth_unavailable'; } & ManagedAgentsApiErrorAuthUnavailable) | ({ code: 'managed_agents_unavailable'; } & ManagedAgentsApiErrorManagedAgentsUnavailable) | ({ code: 'service_unavailable'; } & ManagedAgentsApiErrorServiceUnavailable); /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SandboxProvidersError = GetManagedAgentsV1SandboxProvidersErrors[keyof GetManagedAgentsV1SandboxProvidersErrors]; export type GetManagedAgentsV1SandboxProvidersResponses = { /** * Response body of GET /v1/sandbox-providers. The only list here that describes the service's own capabilities rather than the caller's data: it needs no storage read and returns the same answer for every organization. Whether a listed provider is actually usable right now is a separate check, GET /v1/sandbox-providers/{provider}/status. */ 200: ManagedAgentsSandboxProviderListResponse; }; export type GetManagedAgentsV1SandboxProvidersResponse = GetManagedAgentsV1SandboxProvidersResponses[keyof GetManagedAgentsV1SandboxProvidersResponses]; export type GetManagedAgentsV1SandboxProvidersByProviderStatusData = { body?: never; path: { /** * Sandbox provider id, as reported by listSandboxProviders. Connectivity status exists only for runs; the others return 400. self_hosted is retired but accepted for historical queries. */ provider: 'runs' | 'self_hosted' | 'docker'; }; query?: never; url: '/managed-agents/v1/sandbox-providers/{provider}/status'; }; export type GetManagedAgentsV1SandboxProvidersByProviderStatusErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiError; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SandboxProvidersByProviderStatusError = GetManagedAgentsV1SandboxProvidersByProviderStatusErrors[keyof GetManagedAgentsV1SandboxProvidersByProviderStatusErrors]; export type GetManagedAgentsV1SandboxProvidersByProviderStatusResponses = { /** * Result of a live connectivity check against a deployment-owned sandbox compute provider. Returned when probing a provider, and provisions no billable compute. */ 200: ManagedAgentsSandboxProviderStatus; }; export type GetManagedAgentsV1SandboxProvidersByProviderStatusResponse = GetManagedAgentsV1SandboxProvidersByProviderStatusResponses[keyof GetManagedAgentsV1SandboxProvidersByProviderStatusResponses]; export type GetManagedAgentsV1SessionsData = { body?: never; path?: never; query?: { /** * Filter by session status. */ status?: string; /** * Filter by session kind. Accepts a comma-separated list (kind=chat,api_call) to match any of several kinds, which is how a caller selects agent sessions without RL rollouts. A kind filter never widens visibility. session_analyst rows are hidden by default; naming that kind returns them only when the caller's scope permits the classified sessions. */ kind?: string; /** * Filter by agent id. */ agent_id?: string; /** * Comma-separated current agent tag ids, with at most 32 distinct ids. A session row's agent must carry every requested tag (AND semantics). Unknown or cross-organization ids return 404. Tags are resolved at read time, not from the session snapshot. */ tag_ids?: string; external_source_type?: string; external_source_id?: string; /** * Exact-match filter on caller-defined session metadata as key:value, split at the first colon. Repeat the parameter to require several pairs; a session's root must carry every one (AND semantics). Children of a matching root match too, so combine with root_only to list only the roots. */ metadata?: Array; /** * Require the root session to carry this caller-defined metadata key with any value. Repeatable; every listed key must be present. */ metadata_key?: Array; /** * Return only root sessions. Use this for model-cost list rows so children cannot consume the bounded page before their tree root. */ root_only?: boolean; /** * Return only root sessions whose active browser handoff is awaiting a person (not already being driven or resolved). Applied before ordering and pagination. */ needs_user?: boolean; /** * Filter root sessions by their newest immutable evaluation verdict before pagination. evaluated matches any verdict; none matches sessions with no evaluation. */ evaluation_result?: 'pass' | 'fail' | 'not_applicable' | 'evaluated' | 'none'; /** * Page size. When more rows match, the response carries next_page_token; pass it back as page_token with the same filters and limit to read the next page. */ limit?: number; /** * Signed continuation token from a previous page's next_page_token. Bound to the organization and to the exact filters and limit it was issued for; valid for one hour. */ page_token?: string; }; url: '/managed-agents/v1/sessions'; }; export type GetManagedAgentsV1SessionsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsError = GetManagedAgentsV1SessionsErrors[keyof GetManagedAgentsV1SessionsErrors]; export type GetManagedAgentsV1SessionsResponses = { /** * Response body of GET /v1/sessions. Keyset-paginated over (updated_at, id): a page is a stable window at the moment it is read, but a session updated between two page reads moves to the front of the list, so a live list may show it twice or skip it once. Ordinary callers receive only unclassified public session trees; callers with elevated classified-data access can receive classified rows allowed by their scope. Each row is a summary without the start-time snapshots; read one session for those. Token and cost totals are not included; fetch them for a batch of ids via GET /v1/sessions/usage and GET /v1/sessions/costs. */ 200: ManagedAgentsSessionListResponse; }; export type GetManagedAgentsV1SessionsResponse = GetManagedAgentsV1SessionsResponses[keyof GetManagedAgentsV1SessionsResponses]; export type PostManagedAgentsV1SessionsData = { body: ManagedAgentsStartSessionRequest; headers: { /** * Replay-protection key in an organization-wide namespace shared by keyed mutations. It must contain 1 to 256 visible ASCII characters and be sent as exactly one header value. Request identity is the exact HTTP method, escaped path, raw query, and raw body bytes. The same request replays the original successful response; any different request returns 409 idempotency_conflict, and an active matching request returns 409 idempotency_in_progress. Completed receipts are retained for approximately 24 hours, pending claims may be reclaimed after approximately 1 hour, and no deduplication is guaranteed after expiry. */ 'Idempotency-Key': string; }; path?: never; query?: never; url: '/managed-agents/v1/sessions'; }; export type PostManagedAgentsV1SessionsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * The request is well formed but failed semantic validation. */ 422: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1SessionsError = PostManagedAgentsV1SessionsErrors[keyof PostManagedAgentsV1SessionsErrors]; export type PostManagedAgentsV1SessionsResponses = { /** * Response body of POST /v1/sessions, returned with HTTP 202 and a Location header. The 202 is load-bearing: the session is accepted, not started, so no status, sandbox, or event exists yet and nothing here reports success of the run. Poll status_path, or stream events, to observe provisioning and execution. */ 202: ManagedAgentsSessionCreatedResponse; }; export type PostManagedAgentsV1SessionsResponse = PostManagedAgentsV1SessionsResponses[keyof PostManagedAgentsV1SessionsResponses]; export type GetManagedAgentsV1SessionsCostsData = { body?: never; path?: never; query: { /** * Comma-separated session ids. The response preserves request order and duplicates. If any id is missing or outside the caller's organization/access policy, the complete request returns the same non-disclosing 404. */ session_ids: string; }; url: '/managed-agents/v1/sessions/costs'; }; export type GetManagedAgentsV1SessionsCostsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsCostsError = GetManagedAgentsV1SessionsCostsErrors[keyof GetManagedAgentsV1SessionsCostsErrors]; export type GetManagedAgentsV1SessionsCostsResponses = { /** * Model-cost rollups for a batch of sessions, so a list view can show spend per row without one read per session. */ 200: ManagedAgentsSessionModelCostListResponse; }; export type GetManagedAgentsV1SessionsCostsResponse = GetManagedAgentsV1SessionsCostsResponses[keyof GetManagedAgentsV1SessionsCostsResponses]; export type GetManagedAgentsV1SessionsGestaltData = { body?: never; path?: never; query: { /** * Limit the snapshot to one agent in the caller workspace, before truncation. */ agent_id?: string; /** * RFC 3339 start of the window; sessions created at or after it are included. At most 30 days ago globally, or 400 days with agent_id. */ since: string; }; url: '/managed-agents/v1/sessions/gestalt'; }; export type GetManagedAgentsV1SessionsGestaltErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsGestaltError = GetManagedAgentsV1SessionsGestaltErrors[keyof GetManagedAgentsV1SessionsGestaltErrors]; export type GetManagedAgentsV1SessionsGestaltResponses = { /** * Response body of GET /v1/sessions/gestalt: a compact snapshot of every root session the caller may list in a window, read at one instant. Ordinary callers receive only unclassified public roots; callers with elevated classified-data access can receive classified roots. Designed to be drawn whole -- one tile per session -- and kept current by streamSessionGestalt rather than re-read. */ 200: ManagedAgentsSessionGestaltResponse; }; export type GetManagedAgentsV1SessionsGestaltResponse = GetManagedAgentsV1SessionsGestaltResponses[keyof GetManagedAgentsV1SessionsGestaltResponses]; export type GetManagedAgentsV1SessionsMetadataKeysData = { body?: never; path?: never; query?: never; url: '/managed-agents/v1/sessions/metadata-keys'; }; export type GetManagedAgentsV1SessionsMetadataKeysErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsMetadataKeysError = GetManagedAgentsV1SessionsMetadataKeysErrors[keyof GetManagedAgentsV1SessionsMetadataKeysErrors]; export type GetManagedAgentsV1SessionsMetadataKeysResponses = { /** * Response body of GET /v1/sessions/metadata-keys: the distinct caller-defined metadata keys across the sessions the caller may list. */ 200: ManagedAgentsSessionMetadataKeysResponse; }; export type GetManagedAgentsV1SessionsMetadataKeysResponse = GetManagedAgentsV1SessionsMetadataKeysResponses[keyof GetManagedAgentsV1SessionsMetadataKeysResponses]; export type GetManagedAgentsV1SessionsMetadataValuesData = { body?: never; path?: never; query: { /** * The caller-defined metadata key whose values to list. Same alphabet as on startSession: letters, digits, '_', '.', and '-', up to 64 characters. */ key: string; /** * Case-sensitive prefix the returned values must start with, up to 512 characters. Omit to list every value up to limit. */ q?: string; /** * Most distinct values to return. When more match, truncated is true; narrow q rather than asking for more. */ limit?: number; }; url: '/managed-agents/v1/sessions/metadata-values'; }; export type GetManagedAgentsV1SessionsMetadataValuesErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsMetadataValuesError = GetManagedAgentsV1SessionsMetadataValuesErrors[keyof GetManagedAgentsV1SessionsMetadataValuesErrors]; export type GetManagedAgentsV1SessionsMetadataValuesResponses = { /** * Response body of GET /v1/sessions/metadata-values: the distinct values one caller-defined metadata key takes across the sessions the caller may list. */ 200: ManagedAgentsSessionMetadataValuesResponse; }; export type GetManagedAgentsV1SessionsMetadataValuesResponse = GetManagedAgentsV1SessionsMetadataValuesResponses[keyof GetManagedAgentsV1SessionsMetadataValuesResponses]; export type GetManagedAgentsV1SessionsUsageData = { body?: never; path?: never; query: { /** * Comma-separated session ids to roll up, matching the ids returned by GET /v1/sessions. Ids that do not exist in this organization or are outside the caller's access policy are omitted from the response rather than erroring. */ session_ids: string; }; url: '/managed-agents/v1/sessions/usage'; }; export type GetManagedAgentsV1SessionsUsageErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsUsageError = GetManagedAgentsV1SessionsUsageErrors[keyof GetManagedAgentsV1SessionsUsageErrors]; export type GetManagedAgentsV1SessionsUsageResponses = { /** * Response body of GET /v1/sessions/usage: token and cost totals for an explicit batch of session ids, so a list view can show a cost per row without reading every session's events. session_ids is required and bounded; too many ids is rejected outright rather than truncated, because a silently short answer is indistinguishable from idle sessions. */ 200: ManagedAgentsSessionUsageListResponse; }; export type GetManagedAgentsV1SessionsUsageResponse = GetManagedAgentsV1SessionsUsageResponses[keyof GetManagedAgentsV1SessionsUsageResponses]; export type DeleteManagedAgentsV1SessionsBySessionIdData = { body?: never; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}'; }; export type DeleteManagedAgentsV1SessionsBySessionIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type DeleteManagedAgentsV1SessionsBySessionIdError = DeleteManagedAgentsV1SessionsBySessionIdErrors[keyof DeleteManagedAgentsV1SessionsBySessionIdErrors]; export type DeleteManagedAgentsV1SessionsBySessionIdResponses = { /** * Shared response body of every soft-delete endpoint, on agents, environments, tags, vaults, vault credentials, webhook bindings, and sessions. Soft delete is a tombstone, not an erase: the row stops appearing in list and get responses but is retained, and there is no undelete endpoint to bring it back. Irreversible erasure is the separate, confirmation-gated purge path. */ 200: ManagedAgentsDeletedResponse; }; export type DeleteManagedAgentsV1SessionsBySessionIdResponse = DeleteManagedAgentsV1SessionsBySessionIdResponses[keyof DeleteManagedAgentsV1SessionsBySessionIdResponses]; export type GetManagedAgentsV1SessionsBySessionIdData = { body?: never; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; }; query?: { /** * full (default) returns the whole session. summary omits agent_snapshot, model_snapshot and config — written once at start and never changed — which a poller that already holds them should ask for: they are most of the row's bytes. */ view?: 'full' | 'summary'; }; url: '/managed-agents/v1/sessions/{session_id}'; }; export type GetManagedAgentsV1SessionsBySessionIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsBySessionIdError = GetManagedAgentsV1SessionsBySessionIdErrors[keyof GetManagedAgentsV1SessionsBySessionIdErrors]; export type GetManagedAgentsV1SessionsBySessionIdResponses = { /** * One durable agent run: its lifecycle status (active, awaiting_human, completed, failed, cancelled), the agent version, environment, model, and credentials it was pinned to, and its place in a multi-agent tree. Returned when starting, reading, or listing sessions; imported RL rollouts appear as sessions too and run no agent loop. */ 200: ManagedAgentsSession; }; export type GetManagedAgentsV1SessionsBySessionIdResponse = GetManagedAgentsV1SessionsBySessionIdResponses[keyof GetManagedAgentsV1SessionsBySessionIdResponses]; export type PostManagedAgentsV1SessionsBySessionIdAnalystData = { body?: ManagedAgentsOpenSessionAnalystRequest; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}/analyst'; }; export type PostManagedAgentsV1SessionsBySessionIdAnalystErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1SessionsBySessionIdAnalystError = PostManagedAgentsV1SessionsBySessionIdAnalystErrors[keyof PostManagedAgentsV1SessionsBySessionIdAnalystErrors]; export type PostManagedAgentsV1SessionsBySessionIdAnalystResponses = { /** * Response body of openSessionAnalyst: the caller's read-only analyst session over a session tree, if there is one, and whether it was just started. */ 200: ManagedAgentsSessionAnalystResponse; /** * Response body of openSessionAnalyst: the caller's read-only analyst session over a session tree, if there is one, and whether it was just started. */ 201: ManagedAgentsSessionAnalystResponse; }; export type PostManagedAgentsV1SessionsBySessionIdAnalystResponse = PostManagedAgentsV1SessionsBySessionIdAnalystResponses[keyof PostManagedAgentsV1SessionsBySessionIdAnalystResponses]; export type GetManagedAgentsV1SessionsBySessionIdBoardData = { body?: never; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}/board'; }; export type GetManagedAgentsV1SessionsBySessionIdBoardErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsBySessionIdBoardError = GetManagedAgentsV1SessionsBySessionIdBoardErrors[keyof GetManagedAgentsV1SessionsBySessionIdBoardErrors]; export type GetManagedAgentsV1SessionsBySessionIdBoardResponses = { /** * A snapshot of one session tree's shared task board: its tasks, posts, and members. Present once the tree has entered team state; an auto-mode tree that has not posted reads as an empty board. */ 200: ManagedAgentsBoard; }; export type GetManagedAgentsV1SessionsBySessionIdBoardResponse = GetManagedAgentsV1SessionsBySessionIdBoardResponses[keyof GetManagedAgentsV1SessionsBySessionIdBoardResponses]; export type PostManagedAgentsV1SessionsBySessionIdCancelData = { body?: never; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}/cancel'; }; export type PostManagedAgentsV1SessionsBySessionIdCancelErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1SessionsBySessionIdCancelError = PostManagedAgentsV1SessionsBySessionIdCancelErrors[keyof PostManagedAgentsV1SessionsBySessionIdCancelErrors]; export type PostManagedAgentsV1SessionsBySessionIdCancelResponses = { /** * Response body of POST /v1/sessions/{session_id}/cancel. Cancel is terminal for the run but not for the record: the session is stopped and the sandbox torn down, while the session, its events, and its outcomes remain readable. The session row itself is removed from reads only by the separate soft-delete endpoint. */ 200: ManagedAgentsCancelledResponse; }; export type PostManagedAgentsV1SessionsBySessionIdCancelResponse = PostManagedAgentsV1SessionsBySessionIdCancelResponses[keyof PostManagedAgentsV1SessionsBySessionIdCancelResponses]; export type GetManagedAgentsV1SessionsBySessionIdCostsData = { body?: never; path: { /** * Session id (UUID) the cost read is scoped to. Any id in the tree; scope decides how far the read reaches from it. An id outside the caller's organization/access policy returns a non-disclosing 404. */ session_id: string; }; query?: { /** * self selects only this session; subtree selects this session and descendants; tree selects the complete root tree. */ scope?: 'self' | 'subtree' | 'tree'; limit?: number; /** * Signed, organization/session/scope/limit/snapshot-bound continuation token. */ page_token?: string; /** * Signed token returned by a model-cost detail page. Pins this companion read to the exact same organization/session/scope snapshot. */ model_cost_snapshot_token?: string; }; url: '/managed-agents/v1/sessions/{session_id}/costs'; }; export type GetManagedAgentsV1SessionsBySessionIdCostsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsBySessionIdCostsError = GetManagedAgentsV1SessionsBySessionIdCostsErrors[keyof GetManagedAgentsV1SessionsBySessionIdCostsErrors]; export type GetManagedAgentsV1SessionsBySessionIdCostsResponses = { /** * One page of model-cost attempts for a session scope, together with the rollups for the same pinned snapshot, so a page and its totals cannot disagree. Continuation pages and companion hierarchy reads stay on that snapshot rather than re-reading a moving ledger. */ 200: ManagedAgentsSessionModelCostDetailResponse; }; export type GetManagedAgentsV1SessionsBySessionIdCostsResponse = GetManagedAgentsV1SessionsBySessionIdCostsResponses[keyof GetManagedAgentsV1SessionsBySessionIdCostsResponses]; export type GetManagedAgentsV1SessionsBySessionIdCostsSessionsData = { body?: never; path: { /** * Session id (UUID) the cost read is scoped to. Any id in the tree; scope decides how far the read reaches from it. An id outside the caller's organization/access policy returns a non-disclosing 404. */ session_id: string; }; query?: { /** * self selects only this session; subtree selects this session and descendants; tree selects the complete root tree. */ scope?: 'self' | 'subtree' | 'tree'; limit?: number; /** * Signed, organization/session/scope/limit/snapshot-bound continuation token. */ page_token?: string; /** * Signed token returned by a model-cost detail page. Pins this companion read to the exact same organization/session/scope snapshot. */ model_cost_snapshot_token?: string; }; url: '/managed-agents/v1/sessions/{session_id}/costs/sessions'; }; export type GetManagedAgentsV1SessionsBySessionIdCostsSessionsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsBySessionIdCostsSessionsError = GetManagedAgentsV1SessionsBySessionIdCostsSessionsErrors[keyof GetManagedAgentsV1SessionsBySessionIdCostsSessionsErrors]; export type GetManagedAgentsV1SessionsBySessionIdCostsSessionsResponses = { /** * One page of the session hierarchy behind a model-cost read, paginated independently of the attempt detail so a wide tree cannot crowd out attempts. */ 200: ManagedAgentsSessionModelCostNodeListResponse; }; export type GetManagedAgentsV1SessionsBySessionIdCostsSessionsResponse = GetManagedAgentsV1SessionsBySessionIdCostsSessionsResponses[keyof GetManagedAgentsV1SessionsBySessionIdCostsSessionsResponses]; export type GetManagedAgentsV1SessionsBySessionIdEventsData = { body?: never; path: { /** * Session id (UUID) whose root timeline is read. */ session_id: string; }; query?: { /** * Exclusive continuation cursor: a lowercase canonical UUID event id, normally the previous page's next_page_token. Malformed values return 400. */ after_event_id?: string; /** * Maximum event count requested. The response may contain fewer events when the aggregate serialized-byte budget is reached. */ limit?: number; /** * Opt-in compatibility mode. images rehydrates private image refs under strict response caps; omitted by default. */ hydrate?: 'images'; /** * Set to signed to add a short-lived url (and url_expires_at) to stored image blocks within the per-read signing budget. Omitted when signing is unavailable or the budget is exhausted; the authenticated getSessionImage endpoint always works. */ image_urls?: 'signed'; /** * External event payloads hydrate by default. Set refs to return bounded stubs and private reference metadata only. */ payloads?: 'refs'; }; url: '/managed-agents/v1/sessions/{session_id}/events'; }; export type GetManagedAgentsV1SessionsBySessionIdEventsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsBySessionIdEventsError = GetManagedAgentsV1SessionsBySessionIdEventsErrors[keyof GetManagedAgentsV1SessionsBySessionIdEventsErrors]; export type GetManagedAgentsV1SessionsBySessionIdEventsResponses = { /** * Response body of GET /v1/sessions/{session_id}/events: one page of the merged chronological timeline for the whole session tree the path session belongs to, not just that session's own events. The page is bounded twice, by the limit parameter and by an aggregate serialized-byte budget, and the byte budget wins; a single event too large for the budget is returned alone with its content marked oversized and must be fetched in full from the per-event content endpoint. */ 200: ManagedAgentsEventPageResponse; }; export type GetManagedAgentsV1SessionsBySessionIdEventsResponse = GetManagedAgentsV1SessionsBySessionIdEventsResponses[keyof GetManagedAgentsV1SessionsBySessionIdEventsResponses]; export type PostManagedAgentsV1SessionsBySessionIdEventsData = { body: ManagedAgentsSessionEventSendRequest; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}/events'; }; export type PostManagedAgentsV1SessionsBySessionIdEventsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiError; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * The request is well formed but failed semantic validation. */ 422: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1SessionsBySessionIdEventsError = PostManagedAgentsV1SessionsBySessionIdEventsErrors[keyof PostManagedAgentsV1SessionsBySessionIdEventsErrors]; export type PostManagedAgentsV1SessionsBySessionIdEventsResponses = { /** * Shared response body of POST /v1/sessions/{session_id}/events and POST /v1/sessions/{session_id}/interrupt-and-send. It acknowledges durable acceptance of the turn, never the agent's reply: read the reply by listing events or streaming. Compare events_accepted against what was sent to detect silently dropped entries, and read delivery_state to learn whether an agent is actually going to act on them. events_accepted counts canonical events rather than requests, so interrupt-and-send reports 2 for its single instruction: the stop and the message that follows it. */ 200: ManagedAgentsEventsAcceptedResponse; }; export type PostManagedAgentsV1SessionsBySessionIdEventsResponse = PostManagedAgentsV1SessionsBySessionIdEventsResponses[keyof PostManagedAgentsV1SessionsBySessionIdEventsResponses]; export type GetManagedAgentsV1SessionsBySessionIdEventsByEventIdContentData = { body?: never; path: { /** * Session id (UUID) the event belongs to. */ session_id: string; /** * Event id, a lowercase canonical UUIDv7 taken from an event returned by listSessionEvents. Event ids sort chronologically. */ event_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}/events/{event_id}/content'; }; export type GetManagedAgentsV1SessionsBySessionIdEventsByEventIdContentErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsBySessionIdEventsByEventIdContentError = GetManagedAgentsV1SessionsBySessionIdEventsByEventIdContentErrors[keyof GetManagedAgentsV1SessionsBySessionIdEventsByEventIdContentErrors]; export type GetManagedAgentsV1SessionsBySessionIdEventsByEventIdContentResponses = { /** * The body of a session event, shaped like a provider message: content blocks plus the stop reason and token usage the provider returned. Every event in a session transcript carries one. */ 200: ManagedAgentsEventContent; }; export type GetManagedAgentsV1SessionsBySessionIdEventsByEventIdContentResponse = GetManagedAgentsV1SessionsBySessionIdEventsByEventIdContentResponses[keyof GetManagedAgentsV1SessionsBySessionIdEventsByEventIdContentResponses]; export type PostManagedAgentsV1SessionsBySessionIdHandoffAccessData = { body?: never; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}/handoff/access'; }; export type PostManagedAgentsV1SessionsBySessionIdHandoffAccessErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiError; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request is well formed but failed semantic validation. */ 422: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1SessionsBySessionIdHandoffAccessError = PostManagedAgentsV1SessionsBySessionIdHandoffAccessErrors[keyof PostManagedAgentsV1SessionsBySessionIdHandoffAccessErrors]; export type PostManagedAgentsV1SessionsBySessionIdHandoffAccessResponses = { /** * Response body of POST /v1/sessions/{session_id}/handoff/access. The URL is an ephemeral credential, is never persisted by Managed Agents, and the response is always Cache-Control: no-store. */ 200: ManagedAgentsHandoffAccessResponse; }; export type PostManagedAgentsV1SessionsBySessionIdHandoffAccessResponse = PostManagedAgentsV1SessionsBySessionIdHandoffAccessResponses[keyof PostManagedAgentsV1SessionsBySessionIdHandoffAccessResponses]; export type PostManagedAgentsV1SessionsBySessionIdInterruptData = { body?: ManagedAgentsInterruptRequest; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}/interrupt'; }; export type PostManagedAgentsV1SessionsBySessionIdInterruptErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1SessionsBySessionIdInterruptError = PostManagedAgentsV1SessionsBySessionIdInterruptErrors[keyof PostManagedAgentsV1SessionsBySessionIdInterruptErrors]; export type PostManagedAgentsV1SessionsBySessionIdInterruptResponses = { /** * Response body of POST /v1/sessions/{session_id}/interrupt. An interrupt is a cooperative control, not a session cancellation: the session stays alive and keeps accepting events. Use POST /v1/sessions/{session_id}/cancel to stop it. */ 200: ManagedAgentsInterruptedResponse; }; export type PostManagedAgentsV1SessionsBySessionIdInterruptResponse = PostManagedAgentsV1SessionsBySessionIdInterruptResponses[keyof PostManagedAgentsV1SessionsBySessionIdInterruptResponses]; export type PostManagedAgentsV1SessionsBySessionIdInterruptAndSendData = { body: ManagedAgentsInterruptAndSendRequest; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}/interrupt-and-send'; }; export type PostManagedAgentsV1SessionsBySessionIdInterruptAndSendErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1SessionsBySessionIdInterruptAndSendError = PostManagedAgentsV1SessionsBySessionIdInterruptAndSendErrors[keyof PostManagedAgentsV1SessionsBySessionIdInterruptAndSendErrors]; export type PostManagedAgentsV1SessionsBySessionIdInterruptAndSendResponses = { /** * Shared response body of POST /v1/sessions/{session_id}/events and POST /v1/sessions/{session_id}/interrupt-and-send. It acknowledges durable acceptance of the turn, never the agent's reply: read the reply by listing events or streaming. Compare events_accepted against what was sent to detect silently dropped entries, and read delivery_state to learn whether an agent is actually going to act on them. events_accepted counts canonical events rather than requests, so interrupt-and-send reports 2 for its single instruction: the stop and the message that follows it. */ 200: ManagedAgentsEventsAcceptedResponse; }; export type PostManagedAgentsV1SessionsBySessionIdInterruptAndSendResponse = PostManagedAgentsV1SessionsBySessionIdInterruptAndSendResponses[keyof PostManagedAgentsV1SessionsBySessionIdInterruptAndSendResponses]; export type GetManagedAgentsV1SessionsBySessionIdOutcomesData = { body?: never; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}/outcomes'; }; export type GetManagedAgentsV1SessionsBySessionIdOutcomesErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsBySessionIdOutcomesError = GetManagedAgentsV1SessionsBySessionIdOutcomesErrors[keyof GetManagedAgentsV1SessionsBySessionIdOutcomesErrors]; export type GetManagedAgentsV1SessionsBySessionIdOutcomesResponses = { /** * Response body of GET /v1/sessions/{session_id}/outcomes. An outcome is the structured verdict a grader or the agent itself writes for a session; a session may accumulate more than one, so this is a list rather than a single object. */ 200: ManagedAgentsOutcomeListResponse; }; export type GetManagedAgentsV1SessionsBySessionIdOutcomesResponse = GetManagedAgentsV1SessionsBySessionIdOutcomesResponses[keyof GetManagedAgentsV1SessionsBySessionIdOutcomesResponses]; export type PostManagedAgentsV1SessionsBySessionIdOutcomesData = { body: ManagedAgentsDefineOutcomeRequest; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}/outcomes'; }; export type PostManagedAgentsV1SessionsBySessionIdOutcomesErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1SessionsBySessionIdOutcomesError = PostManagedAgentsV1SessionsBySessionIdOutcomesErrors[keyof PostManagedAgentsV1SessionsBySessionIdOutcomesErrors]; export type PostManagedAgentsV1SessionsBySessionIdOutcomesResponses = { /** * A session's definition of done: the task to achieve plus a rubric a grader scores the work against, tracked through its own grading lifecycle. Defined when the session starts, and read back to see whether the work was accepted. */ 200: ManagedAgentsOutcome; }; export type PostManagedAgentsV1SessionsBySessionIdOutcomesResponse = PostManagedAgentsV1SessionsBySessionIdOutcomesResponses[keyof PostManagedAgentsV1SessionsBySessionIdOutcomesResponses]; export type GetManagedAgentsV1SessionsBySessionIdPendingInputsData = { body?: never; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}/pending-inputs'; }; export type GetManagedAgentsV1SessionsBySessionIdPendingInputsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsBySessionIdPendingInputsError = GetManagedAgentsV1SessionsBySessionIdPendingInputsErrors[keyof GetManagedAgentsV1SessionsBySessionIdPendingInputsErrors]; export type GetManagedAgentsV1SessionsBySessionIdPendingInputsResponses = { /** * Response body of GET /v1/sessions/{session_id}/pending-inputs: what the session has durably accepted but not yet read. These inputs are deliberately absent from the transcript until a turn boundary promotes them, so a client can show them as waiting rather than as history the agent has already acted on. */ 200: ManagedAgentsPendingInputsResponse; }; export type GetManagedAgentsV1SessionsBySessionIdPendingInputsResponse = GetManagedAgentsV1SessionsBySessionIdPendingInputsResponses[keyof GetManagedAgentsV1SessionsBySessionIdPendingInputsResponses]; export type GetManagedAgentsV1SessionsBySessionIdResourceSamplesData = { body?: never; path: { /** * Any session id (UUID) in the tree. The sandbox is shared by the whole tree, so every id in it returns the same usage. */ session_id: string; }; query?: { /** * Inclusive lower bound on bucket_start, RFC 3339. Omit for the start of the tree. */ from?: string; /** * Exclusive upper bound on bucket_start, RFC 3339. Omit for now. */ to?: string; /** * minute returns per-minute summaries only; raw also includes each bucket's per-sample arrays at the producer's cadence (five seconds by default). Use raw for the window on screen and minute for the overview. */ resolution?: 'minute' | 'raw'; /** * Maximum buckets per page, across all of the tree's sandbox attachments. */ limit?: number; /** * Signed continuation token from a previous page's next_page_token. Bound to the organization, session, and filters it was issued for. */ page_token?: string; }; url: '/managed-agents/v1/sessions/{session_id}/resource-samples'; }; export type GetManagedAgentsV1SessionsBySessionIdResourceSamplesErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsBySessionIdResourceSamplesError = GetManagedAgentsV1SessionsBySessionIdResourceSamplesErrors[keyof GetManagedAgentsV1SessionsBySessionIdResourceSamplesErrors]; export type GetManagedAgentsV1SessionsBySessionIdResourceSamplesResponses = { /** * Sandbox CPU, memory, and accelerator usage for a session tree, as minute buckets per sandbox attachment. Samples are what the sandbox measured of itself, collected on tool calls and on read. */ 200: ManagedAgentsSessionResourceSamplesResponse; }; export type GetManagedAgentsV1SessionsBySessionIdResourceSamplesResponse = GetManagedAgentsV1SessionsBySessionIdResourceSamplesResponses[keyof GetManagedAgentsV1SessionsBySessionIdResourceSamplesResponses]; export type GetManagedAgentsV1SessionsBySessionIdResourcesData = { body?: never; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}/resources'; }; export type GetManagedAgentsV1SessionsBySessionIdResourcesErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsBySessionIdResourcesError = GetManagedAgentsV1SessionsBySessionIdResourcesErrors[keyof GetManagedAgentsV1SessionsBySessionIdResourcesErrors]; export type GetManagedAgentsV1SessionsBySessionIdResourcesResponses = { /** * Response body of GET and POST /v1/sessions/{session_id}/resources. A POST returns only the resources it attached. */ 200: ManagedAgentsSessionResourceListResponse; }; export type GetManagedAgentsV1SessionsBySessionIdResourcesResponse = GetManagedAgentsV1SessionsBySessionIdResourcesResponses[keyof GetManagedAgentsV1SessionsBySessionIdResourcesResponses]; export type PostManagedAgentsV1SessionsBySessionIdResourcesData = { body: ManagedAgentsAddSessionResourcesRequest; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}/resources'; }; export type PostManagedAgentsV1SessionsBySessionIdResourcesErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1SessionsBySessionIdResourcesError = PostManagedAgentsV1SessionsBySessionIdResourcesErrors[keyof PostManagedAgentsV1SessionsBySessionIdResourcesErrors]; export type PostManagedAgentsV1SessionsBySessionIdResourcesResponses = { /** * Response body of GET and POST /v1/sessions/{session_id}/resources. A POST returns only the resources it attached. */ 201: ManagedAgentsSessionResourceListResponse; }; export type PostManagedAgentsV1SessionsBySessionIdResourcesResponse = PostManagedAgentsV1SessionsBySessionIdResourcesResponses[keyof PostManagedAgentsV1SessionsBySessionIdResourcesResponses]; export type DeleteManagedAgentsV1SessionsBySessionIdResourcesByResourceIdData = { body?: never; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; /** * Resource id as returned by addSessionResources or listSessionResources. */ resource_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}/resources/{resource_id}'; }; export type DeleteManagedAgentsV1SessionsBySessionIdResourcesByResourceIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type DeleteManagedAgentsV1SessionsBySessionIdResourcesByResourceIdError = DeleteManagedAgentsV1SessionsBySessionIdResourcesByResourceIdErrors[keyof DeleteManagedAgentsV1SessionsBySessionIdResourcesByResourceIdErrors]; export type DeleteManagedAgentsV1SessionsBySessionIdResourcesByResourceIdResponses = { /** * Shared response body of every soft-delete endpoint, on agents, environments, tags, vaults, vault credentials, webhook bindings, and sessions. Soft delete is a tombstone, not an erase: the row stops appearing in list and get responses but is retained, and there is no undelete endpoint to bring it back. Irreversible erasure is the separate, confirmation-gated purge path. */ 200: ManagedAgentsDeletedResponse; }; export type DeleteManagedAgentsV1SessionsBySessionIdResourcesByResourceIdResponse = DeleteManagedAgentsV1SessionsBySessionIdResourcesByResourceIdResponses[keyof DeleteManagedAgentsV1SessionsBySessionIdResourcesByResourceIdResponses]; export type GetManagedAgentsV1SessionsBySessionIdResourcesByResourceIdData = { body?: never; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; /** * Resource id as returned by addSessionResources or listSessionResources. */ resource_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}/resources/{resource_id}'; }; export type GetManagedAgentsV1SessionsBySessionIdResourcesByResourceIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsBySessionIdResourcesByResourceIdError = GetManagedAgentsV1SessionsBySessionIdResourcesByResourceIdErrors[keyof GetManagedAgentsV1SessionsBySessionIdResourcesByResourceIdErrors]; export type GetManagedAgentsV1SessionsBySessionIdResourcesByResourceIdResponses = { /** * A file attached to a session. The file is placed read-only in the session's sandbox under its files directory, and the agent knows it is there, so it can read it with read_file or from a shell without being told where to look. */ 200: ManagedAgentsSessionResource; }; export type GetManagedAgentsV1SessionsBySessionIdResourcesByResourceIdResponse = GetManagedAgentsV1SessionsBySessionIdResourcesByResourceIdResponses[keyof GetManagedAgentsV1SessionsBySessionIdResourcesByResourceIdResponses]; export type GetManagedAgentsV1SessionsBySessionIdThreadsData = { body?: never; path: { /** * Session id (UUID) as returned by startSession or listSessions. */ session_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}/threads'; }; export type GetManagedAgentsV1SessionsBySessionIdThreadsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsBySessionIdThreadsError = GetManagedAgentsV1SessionsBySessionIdThreadsErrors[keyof GetManagedAgentsV1SessionsBySessionIdThreadsErrors]; export type GetManagedAgentsV1SessionsBySessionIdThreadsResponses = { /** * Response body of GET /v1/sessions/{session_id}/threads. The path id may name any session in a multi-agent tree; the registry returned is always the whole tree's, resolved through that session's root, so a subagent id and its root id return the same set. */ 200: ManagedAgentsSessionThreadListResponse; }; export type GetManagedAgentsV1SessionsBySessionIdThreadsResponse = GetManagedAgentsV1SessionsBySessionIdThreadsResponses[keyof GetManagedAgentsV1SessionsBySessionIdThreadsResponses]; export type GetManagedAgentsV1SessionsBySessionIdThreadsByThreadIdData = { body?: never; path: { /** * Any session id (UUID) in the tree; the read resolves to its root session. */ session_id: string; /** * Thread id as returned by listSessionThreads. Threads the runtime creates carry the sub-session's UUID; an imported transcript may carry the source system's own thread id. */ thread_id: string; }; query?: never; url: '/managed-agents/v1/sessions/{session_id}/threads/{thread_id}'; }; export type GetManagedAgentsV1SessionsBySessionIdThreadsByThreadIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsBySessionIdThreadsByThreadIdError = GetManagedAgentsV1SessionsBySessionIdThreadsByThreadIdErrors[keyof GetManagedAgentsV1SessionsBySessionIdThreadsByThreadIdErrors]; export type GetManagedAgentsV1SessionsBySessionIdThreadsByThreadIdResponses = { /** * One context-isolated execution stream inside a multi-agent session tree, as registered in the thread registry. Returned when listing a session's threads or reading a whole session tree. */ 200: ManagedAgentsSessionThread; }; export type GetManagedAgentsV1SessionsBySessionIdThreadsByThreadIdResponse = GetManagedAgentsV1SessionsBySessionIdThreadsByThreadIdResponses[keyof GetManagedAgentsV1SessionsBySessionIdThreadsByThreadIdResponses]; export type GetManagedAgentsV1SessionsBySessionIdTreeData = { body?: never; path: { /** * Any session id (UUID) in the tree; the read resolves to its root session. */ session_id: string; }; query?: { /** * Opt-in compatibility mode. images rehydrates private image refs under strict response caps; omitted by default. */ hydrate?: 'images'; /** * Set to signed to add a short-lived url (and url_expires_at) to stored image blocks within the per-read signing budget. Omitted when signing is unavailable or the budget is exhausted; the authenticated getSessionImage endpoint always works. */ image_urls?: 'signed'; /** * External event payloads hydrate by default. Set refs to return bounded stubs and private reference metadata only. */ payloads?: 'refs'; }; url: '/managed-agents/v1/sessions/{session_id}/tree'; }; export type GetManagedAgentsV1SessionsBySessionIdTreeErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SessionsBySessionIdTreeError = GetManagedAgentsV1SessionsBySessionIdTreeErrors[keyof GetManagedAgentsV1SessionsBySessionIdTreeErrors]; export type GetManagedAgentsV1SessionsBySessionIdTreeResponses = { /** * A whole multi-agent session tree: every session and thread in it, plus a bounded page of the merged chronological event log. Returned when reading the tree containing a given session. */ 200: ManagedAgentsTreeResult; }; export type GetManagedAgentsV1SessionsBySessionIdTreeResponse = GetManagedAgentsV1SessionsBySessionIdTreeResponses[keyof GetManagedAgentsV1SessionsBySessionIdTreeResponses]; export type GetManagedAgentsV1SkillGroupsData = { body?: never; path?: never; query?: { /** * How many groups to return. Defaults to 100, the maximum is 500. */ limit?: number; /** * The next_page_token from a previous response. Pass it back with the same limit to read the next page. */ page_token?: string; }; url: '/managed-agents/v1/skill-groups'; }; export type GetManagedAgentsV1SkillGroupsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SkillGroupsError = GetManagedAgentsV1SkillGroupsErrors[keyof GetManagedAgentsV1SkillGroupsErrors]; export type GetManagedAgentsV1SkillGroupsResponses = { /** * Response body of GET /v1/skill-groups. Paged: read to the end by following next_page_token until it is absent. Each row carries how many live skills are filed under the group, so a catalog listing can show the size of a folder it has not opened. */ 200: ManagedAgentsSkillGroupListResponse; }; export type GetManagedAgentsV1SkillGroupsResponse = GetManagedAgentsV1SkillGroupsResponses[keyof GetManagedAgentsV1SkillGroupsResponses]; export type PostManagedAgentsV1SkillGroupsData = { body: ManagedAgentsSkillGroupRequest; path?: never; query?: never; url: '/managed-agents/v1/skill-groups'; }; export type PostManagedAgentsV1SkillGroupsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1SkillGroupsError = PostManagedAgentsV1SkillGroupsErrors[keyof PostManagedAgentsV1SkillGroupsErrors]; export type PostManagedAgentsV1SkillGroupsResponses = { /** * A folder of skills, for browsing a large catalog and for attaching a whole set to an agent in one entry. Attaching a group resolves to its members when a session starts, so adding a skill to the group reaches every agent already attached to it. Groups are never disclosed to the model. */ 201: ManagedAgentsSkillGroup; }; export type PostManagedAgentsV1SkillGroupsResponse = PostManagedAgentsV1SkillGroupsResponses[keyof PostManagedAgentsV1SkillGroupsResponses]; export type DeleteManagedAgentsV1SkillGroupsBySkillGroupIdData = { body?: never; path: { /** * Skill group id (UUID) as returned by createSkillGroup or listSkillGroups. */ skill_group_id: string; }; query?: never; url: '/managed-agents/v1/skill-groups/{skill_group_id}'; }; export type DeleteManagedAgentsV1SkillGroupsBySkillGroupIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type DeleteManagedAgentsV1SkillGroupsBySkillGroupIdError = DeleteManagedAgentsV1SkillGroupsBySkillGroupIdErrors[keyof DeleteManagedAgentsV1SkillGroupsBySkillGroupIdErrors]; export type DeleteManagedAgentsV1SkillGroupsBySkillGroupIdResponses = { /** * Shared response body of every soft-delete endpoint, on agents, environments, tags, vaults, vault credentials, webhook bindings, and sessions. Soft delete is a tombstone, not an erase: the row stops appearing in list and get responses but is retained, and there is no undelete endpoint to bring it back. Irreversible erasure is the separate, confirmation-gated purge path. */ 200: ManagedAgentsDeletedResponse; }; export type DeleteManagedAgentsV1SkillGroupsBySkillGroupIdResponse = DeleteManagedAgentsV1SkillGroupsBySkillGroupIdResponses[keyof DeleteManagedAgentsV1SkillGroupsBySkillGroupIdResponses]; export type GetManagedAgentsV1SkillGroupsBySkillGroupIdData = { body?: never; path: { /** * Skill group id (UUID) as returned by createSkillGroup or listSkillGroups. */ skill_group_id: string; }; query?: never; url: '/managed-agents/v1/skill-groups/{skill_group_id}'; }; export type GetManagedAgentsV1SkillGroupsBySkillGroupIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SkillGroupsBySkillGroupIdError = GetManagedAgentsV1SkillGroupsBySkillGroupIdErrors[keyof GetManagedAgentsV1SkillGroupsBySkillGroupIdErrors]; export type GetManagedAgentsV1SkillGroupsBySkillGroupIdResponses = { /** * A folder of skills, for browsing a large catalog and for attaching a whole set to an agent in one entry. Attaching a group resolves to its members when a session starts, so adding a skill to the group reaches every agent already attached to it. Groups are never disclosed to the model. */ 200: ManagedAgentsSkillGroup; }; export type GetManagedAgentsV1SkillGroupsBySkillGroupIdResponse = GetManagedAgentsV1SkillGroupsBySkillGroupIdResponses[keyof GetManagedAgentsV1SkillGroupsBySkillGroupIdResponses]; export type PatchManagedAgentsV1SkillGroupsBySkillGroupIdData = { body: ManagedAgentsSkillGroupPatchRequest; path: { /** * Skill group id (UUID) as returned by createSkillGroup or listSkillGroups. */ skill_group_id: string; }; query?: never; url: '/managed-agents/v1/skill-groups/{skill_group_id}'; }; export type PatchManagedAgentsV1SkillGroupsBySkillGroupIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PatchManagedAgentsV1SkillGroupsBySkillGroupIdError = PatchManagedAgentsV1SkillGroupsBySkillGroupIdErrors[keyof PatchManagedAgentsV1SkillGroupsBySkillGroupIdErrors]; export type PatchManagedAgentsV1SkillGroupsBySkillGroupIdResponses = { /** * A folder of skills, for browsing a large catalog and for attaching a whole set to an agent in one entry. Attaching a group resolves to its members when a session starts, so adding a skill to the group reaches every agent already attached to it. Groups are never disclosed to the model. */ 200: ManagedAgentsSkillGroup; }; export type PatchManagedAgentsV1SkillGroupsBySkillGroupIdResponse = PatchManagedAgentsV1SkillGroupsBySkillGroupIdResponses[keyof PatchManagedAgentsV1SkillGroupsBySkillGroupIdResponses]; export type GetManagedAgentsV1SkillGroupsBySkillGroupIdSkillsData = { body?: never; path: { /** * Skill group id (UUID) whose skills to list. */ skill_group_id: string; }; query?: { /** * How many skills to return. Defaults to 100, the maximum is 500. */ limit?: number; /** * The next_page_token from a previous response. Pass it back with the same limit to read the next page. */ page_token?: string; }; url: '/managed-agents/v1/skill-groups/{skill_group_id}/skills'; }; export type GetManagedAgentsV1SkillGroupsBySkillGroupIdSkillsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SkillGroupsBySkillGroupIdSkillsError = GetManagedAgentsV1SkillGroupsBySkillGroupIdSkillsErrors[keyof GetManagedAgentsV1SkillGroupsBySkillGroupIdSkillsErrors]; export type GetManagedAgentsV1SkillGroupsBySkillGroupIdSkillsResponses = { /** * Response body of GET /v1/skills. Paged: read to the end by following next_page_token until it is absent. Each row carries the name and description an agent's prompt discloses, but not the instructions, which are read one version at a time. */ 200: ManagedAgentsSkillListResponse; }; export type GetManagedAgentsV1SkillGroupsBySkillGroupIdSkillsResponse = GetManagedAgentsV1SkillGroupsBySkillGroupIdSkillsResponses[keyof GetManagedAgentsV1SkillGroupsBySkillGroupIdSkillsResponses]; export type GetManagedAgentsV1SkillsData = { body?: never; path?: never; query?: { /** * Return only the skills filed under this group, which is how a console fills one folder. Answers 404 when the group is not there. Cannot be combined with ungrouped. */ skill_group_id?: string; /** * Return only the skills filed under no group. This is the catalog tree's root bucket, and the complement of skill_group_id rather than a client-side slice of the whole catalog. */ ungrouped?: boolean; /** * Return only skills whose name, display title, or description contains this term, case-insensitively. Matched as a literal substring, so % and _ carry no special meaning. A complete skill id also matches that skill. Combines with the group filters, and pages like any other query. */ search?: string; /** * How many skills to return. Defaults to 100, the maximum is 500. */ limit?: number; /** * The next_page_token from a previous response. Pass it back with the same filters and limit to read the next page; a token used with a different query is rejected rather than silently skipping rows. */ page_token?: string; }; url: '/managed-agents/v1/skills'; }; export type GetManagedAgentsV1SkillsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SkillsError = GetManagedAgentsV1SkillsErrors[keyof GetManagedAgentsV1SkillsErrors]; export type GetManagedAgentsV1SkillsResponses = { /** * Response body of GET /v1/skills. Paged: read to the end by following next_page_token until it is absent. Each row carries the name and description an agent's prompt discloses, but not the instructions, which are read one version at a time. */ 200: ManagedAgentsSkillListResponse; }; export type GetManagedAgentsV1SkillsResponse = GetManagedAgentsV1SkillsResponses[keyof GetManagedAgentsV1SkillsResponses]; export type PostManagedAgentsV1SkillsData = { body: ManagedAgentsSkillRequest; path?: never; query?: never; url: '/managed-agents/v1/skills'; }; export type PostManagedAgentsV1SkillsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1SkillsError = PostManagedAgentsV1SkillsErrors[keyof PostManagedAgentsV1SkillsErrors]; export type PostManagedAgentsV1SkillsResponses = { /** * A reusable procedure an agent loads when it judges the procedure relevant. Its name and description are disclosed in every turn; the instructions enter the conversation only when the agent activates it. Updating a skill mints a new immutable SkillVersion. */ 200: ManagedAgentsSkill; }; export type PostManagedAgentsV1SkillsResponse = PostManagedAgentsV1SkillsResponses[keyof PostManagedAgentsV1SkillsResponses]; export type PostManagedAgentsV1SkillsDisclosurePreviewData = { body: ManagedAgentsSkillDisclosurePreviewRequest; path?: never; query?: never; url: '/managed-agents/v1/skills/disclosure-preview'; }; export type PostManagedAgentsV1SkillsDisclosurePreviewErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1SkillsDisclosurePreviewError = PostManagedAgentsV1SkillsDisclosurePreviewErrors[keyof PostManagedAgentsV1SkillsDisclosurePreviewErrors]; export type PostManagedAgentsV1SkillsDisclosurePreviewResponses = { /** * What a set of skill attachments costs the model's prompt on every turn, and which skills the budget has reduced to a bare name. A skill listed without its description is still activatable but is unlikely to be chosen, because the description is the only signal the model has for choosing it. */ 200: ManagedAgentsDisclosurePreview; }; export type PostManagedAgentsV1SkillsDisclosurePreviewResponse = PostManagedAgentsV1SkillsDisclosurePreviewResponses[keyof PostManagedAgentsV1SkillsDisclosurePreviewResponses]; export type DeleteManagedAgentsV1SkillsBySkillIdData = { body?: never; path: { /** * Skill id (UUID) as returned by createSkill or listSkills. */ skill_id: string; }; query?: never; url: '/managed-agents/v1/skills/{skill_id}'; }; export type DeleteManagedAgentsV1SkillsBySkillIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type DeleteManagedAgentsV1SkillsBySkillIdError = DeleteManagedAgentsV1SkillsBySkillIdErrors[keyof DeleteManagedAgentsV1SkillsBySkillIdErrors]; export type DeleteManagedAgentsV1SkillsBySkillIdResponses = { /** * Shared response body of every soft-delete endpoint, on agents, environments, tags, vaults, vault credentials, webhook bindings, and sessions. Soft delete is a tombstone, not an erase: the row stops appearing in list and get responses but is retained, and there is no undelete endpoint to bring it back. Irreversible erasure is the separate, confirmation-gated purge path. */ 200: ManagedAgentsDeletedResponse; }; export type DeleteManagedAgentsV1SkillsBySkillIdResponse = DeleteManagedAgentsV1SkillsBySkillIdResponses[keyof DeleteManagedAgentsV1SkillsBySkillIdResponses]; export type GetManagedAgentsV1SkillsBySkillIdData = { body?: never; path: { /** * Skill id (UUID) as returned by createSkill or listSkills. */ skill_id: string; }; query?: never; url: '/managed-agents/v1/skills/{skill_id}'; }; export type GetManagedAgentsV1SkillsBySkillIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SkillsBySkillIdError = GetManagedAgentsV1SkillsBySkillIdErrors[keyof GetManagedAgentsV1SkillsBySkillIdErrors]; export type GetManagedAgentsV1SkillsBySkillIdResponses = { /** * A reusable procedure an agent loads when it judges the procedure relevant. Its name and description are disclosed in every turn; the instructions enter the conversation only when the agent activates it. Updating a skill mints a new immutable SkillVersion. */ 200: ManagedAgentsSkill; }; export type GetManagedAgentsV1SkillsBySkillIdResponse = GetManagedAgentsV1SkillsBySkillIdResponses[keyof GetManagedAgentsV1SkillsBySkillIdResponses]; export type PatchManagedAgentsV1SkillsBySkillIdData = { body: ManagedAgentsSkillPatchRequest; path: { /** * Skill id (UUID) as returned by createSkill or listSkills. */ skill_id: string; }; query?: never; url: '/managed-agents/v1/skills/{skill_id}'; }; export type PatchManagedAgentsV1SkillsBySkillIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PatchManagedAgentsV1SkillsBySkillIdError = PatchManagedAgentsV1SkillsBySkillIdErrors[keyof PatchManagedAgentsV1SkillsBySkillIdErrors]; export type PatchManagedAgentsV1SkillsBySkillIdResponses = { /** * A reusable procedure an agent loads when it judges the procedure relevant. Its name and description are disclosed in every turn; the instructions enter the conversation only when the agent activates it. Updating a skill mints a new immutable SkillVersion. */ 200: ManagedAgentsSkill; }; export type PatchManagedAgentsV1SkillsBySkillIdResponse = PatchManagedAgentsV1SkillsBySkillIdResponses[keyof PatchManagedAgentsV1SkillsBySkillIdResponses]; export type GetManagedAgentsV1SkillsBySkillIdVersionsData = { body?: never; path: { /** * Skill id (UUID) as returned by createSkill or listSkills. */ skill_id: string; }; query?: never; url: '/managed-agents/v1/skills/{skill_id}/versions'; }; export type GetManagedAgentsV1SkillsBySkillIdVersionsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SkillsBySkillIdVersionsError = GetManagedAgentsV1SkillsBySkillIdVersionsErrors[keyof GetManagedAgentsV1SkillsBySkillIdVersionsErrors]; export type GetManagedAgentsV1SkillsBySkillIdVersionsResponses = { /** * Response body of GET /v1/skills/{skill_id}/versions. Versions are immutable snapshots of the document: pin one on an agent to keep what its sessions run under fixed. Instructions are omitted here and returned when reading a single version. */ 200: ManagedAgentsSkillVersionListResponse; }; export type GetManagedAgentsV1SkillsBySkillIdVersionsResponse = GetManagedAgentsV1SkillsBySkillIdVersionsResponses[keyof GetManagedAgentsV1SkillsBySkillIdVersionsResponses]; export type PostManagedAgentsV1SkillsBySkillIdVersionsData = { body: ManagedAgentsCreateSkillVersionRequest; path: { /** * Skill id (UUID) as returned by createSkill or listSkills. */ skill_id: string; }; query?: never; url: '/managed-agents/v1/skills/{skill_id}/versions'; }; export type PostManagedAgentsV1SkillsBySkillIdVersionsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1SkillsBySkillIdVersionsError = PostManagedAgentsV1SkillsBySkillIdVersionsErrors[keyof PostManagedAgentsV1SkillsBySkillIdVersionsErrors]; export type PostManagedAgentsV1SkillsBySkillIdVersionsResponses = { /** * An immutable snapshot of a skill's document and metadata, minted on every update. An agent may pin one, so that what a session runs cannot change under it. */ 201: ManagedAgentsSkillVersion; }; export type PostManagedAgentsV1SkillsBySkillIdVersionsResponse = PostManagedAgentsV1SkillsBySkillIdVersionsResponses[keyof PostManagedAgentsV1SkillsBySkillIdVersionsResponses]; export type GetManagedAgentsV1SkillsBySkillIdVersionsBySkillVersionIdData = { body?: never; path: { /** * Skill id (UUID) the version belongs to. */ skill_id: string; /** * Immutable skill version id (UUID), as listed by listSkillVersions or reported as a skill's latest_skill_version_id. */ skill_version_id: string; }; query?: never; url: '/managed-agents/v1/skills/{skill_id}/versions/{skill_version_id}'; }; export type GetManagedAgentsV1SkillsBySkillIdVersionsBySkillVersionIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1SkillsBySkillIdVersionsBySkillVersionIdError = GetManagedAgentsV1SkillsBySkillIdVersionsBySkillVersionIdErrors[keyof GetManagedAgentsV1SkillsBySkillIdVersionsBySkillVersionIdErrors]; export type GetManagedAgentsV1SkillsBySkillIdVersionsBySkillVersionIdResponses = { /** * An immutable snapshot of a skill's document and metadata, minted on every update. An agent may pin one, so that what a session runs cannot change under it. */ 200: ManagedAgentsSkillVersion; }; export type GetManagedAgentsV1SkillsBySkillIdVersionsBySkillVersionIdResponse = GetManagedAgentsV1SkillsBySkillIdVersionsBySkillVersionIdResponses[keyof GetManagedAgentsV1SkillsBySkillIdVersionsBySkillVersionIdResponses]; export type GetManagedAgentsV1TagsData = { body?: never; path?: never; query?: never; url: '/managed-agents/v1/tags'; }; export type GetManagedAgentsV1TagsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1TagsError = GetManagedAgentsV1TagsErrors[keyof GetManagedAgentsV1TagsErrors]; export type GetManagedAgentsV1TagsResponses = { /** * A complete set of organization-scoped tag definitions. GET /v1/tags returns the organization catalog; agent tag PUT routes return the agent's resulting exact set. */ 200: ManagedAgentsTagListResponse; }; export type GetManagedAgentsV1TagsResponse = GetManagedAgentsV1TagsResponses[keyof GetManagedAgentsV1TagsResponses]; export type PostManagedAgentsV1TagsData = { body: ManagedAgentsCreateTagRequest; path?: never; query?: never; url: '/managed-agents/v1/tags'; }; export type PostManagedAgentsV1TagsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1TagsError = PostManagedAgentsV1TagsErrors[keyof PostManagedAgentsV1TagsErrors]; export type PostManagedAgentsV1TagsResponses = { /** * An organization-scoped classification definition. Applying or removing it changes only catalog membership: it does not update the agent, mint an AgentVersion, or affect running sessions. */ 200: ManagedAgentsTag; }; export type PostManagedAgentsV1TagsResponse = PostManagedAgentsV1TagsResponses[keyof PostManagedAgentsV1TagsResponses]; export type DeleteManagedAgentsV1TagsByTagIdData = { body?: never; path: { /** * Tag id (UUID) as returned by createTag or listTags. */ tag_id: string; }; query?: never; url: '/managed-agents/v1/tags/{tag_id}'; }; export type DeleteManagedAgentsV1TagsByTagIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type DeleteManagedAgentsV1TagsByTagIdError = DeleteManagedAgentsV1TagsByTagIdErrors[keyof DeleteManagedAgentsV1TagsByTagIdErrors]; export type DeleteManagedAgentsV1TagsByTagIdResponses = { /** * Shared response body of every soft-delete endpoint, on agents, environments, tags, vaults, vault credentials, webhook bindings, and sessions. Soft delete is a tombstone, not an erase: the row stops appearing in list and get responses but is retained, and there is no undelete endpoint to bring it back. Irreversible erasure is the separate, confirmation-gated purge path. */ 200: ManagedAgentsDeletedResponse; }; export type DeleteManagedAgentsV1TagsByTagIdResponse = DeleteManagedAgentsV1TagsByTagIdResponses[keyof DeleteManagedAgentsV1TagsByTagIdResponses]; export type GetManagedAgentsV1TagsByTagIdData = { body?: never; path: { /** * Tag id (UUID) as returned by createTag or listTags. */ tag_id: string; }; query?: never; url: '/managed-agents/v1/tags/{tag_id}'; }; export type GetManagedAgentsV1TagsByTagIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1TagsByTagIdError = GetManagedAgentsV1TagsByTagIdErrors[keyof GetManagedAgentsV1TagsByTagIdErrors]; export type GetManagedAgentsV1TagsByTagIdResponses = { /** * An organization-scoped classification definition. Applying or removing it changes only catalog membership: it does not update the agent, mint an AgentVersion, or affect running sessions. */ 200: ManagedAgentsTag; }; export type GetManagedAgentsV1TagsByTagIdResponse = GetManagedAgentsV1TagsByTagIdResponses[keyof GetManagedAgentsV1TagsByTagIdResponses]; export type PatchManagedAgentsV1TagsByTagIdData = { body: ManagedAgentsUpdateTagRequest; path: { /** * Tag id (UUID) as returned by createTag or listTags. */ tag_id: string; }; query?: never; url: '/managed-agents/v1/tags/{tag_id}'; }; export type PatchManagedAgentsV1TagsByTagIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PatchManagedAgentsV1TagsByTagIdError = PatchManagedAgentsV1TagsByTagIdErrors[keyof PatchManagedAgentsV1TagsByTagIdErrors]; export type PatchManagedAgentsV1TagsByTagIdResponses = { /** * An organization-scoped classification definition. Applying or removing it changes only catalog membership: it does not update the agent, mint an AgentVersion, or affect running sessions. */ 200: ManagedAgentsTag; }; export type PatchManagedAgentsV1TagsByTagIdResponse = PatchManagedAgentsV1TagsByTagIdResponses[keyof PatchManagedAgentsV1TagsByTagIdResponses]; export type GetManagedAgentsV1TriggerBindingsData = { body?: never; path?: never; query: { /** * Integration connection (UUID) whose bindings are listed. Required; the service rejects a request without it. */ connection_id: string; }; url: '/managed-agents/v1/trigger-bindings'; }; export type GetManagedAgentsV1TriggerBindingsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1TriggerBindingsError = GetManagedAgentsV1TriggerBindingsErrors[keyof GetManagedAgentsV1TriggerBindingsErrors]; export type GetManagedAgentsV1TriggerBindingsResponses = { /** * Response body of GET /v1/trigger-bindings. Unpaginated, and scoped to the one connection named by the required connection_id query parameter within the calling organization. */ 200: ManagedAgentsTriggerBindingListResponse; }; export type GetManagedAgentsV1TriggerBindingsResponse = GetManagedAgentsV1TriggerBindingsResponses[keyof GetManagedAgentsV1TriggerBindingsResponses]; export type PostManagedAgentsV1TriggerBindingsData = { body: ManagedAgentsCreateTriggerBindingRequest; path?: never; query?: never; url: '/managed-agents/v1/trigger-bindings'; }; export type PostManagedAgentsV1TriggerBindingsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiError; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1TriggerBindingsError = PostManagedAgentsV1TriggerBindingsErrors[keyof PostManagedAgentsV1TriggerBindingsErrors]; export type PostManagedAgentsV1TriggerBindingsResponses = { /** * One wake rule: which provider events start a session, and the agent, environment, and vaults that session runs with. New rules are Slack-only; retired GitHub rules remain readable and may be disabled or deleted during migration. */ 200: ManagedAgentsTriggerBinding; }; export type PostManagedAgentsV1TriggerBindingsResponse = PostManagedAgentsV1TriggerBindingsResponses[keyof PostManagedAgentsV1TriggerBindingsResponses]; export type DeleteManagedAgentsV1TriggerBindingsByBindingIdData = { body?: never; path: { /** * Trigger binding id (UUID) returned by the create or list operation. */ binding_id: string; }; query?: never; url: '/managed-agents/v1/trigger-bindings/{binding_id}'; }; export type DeleteManagedAgentsV1TriggerBindingsByBindingIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiError; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type DeleteManagedAgentsV1TriggerBindingsByBindingIdError = DeleteManagedAgentsV1TriggerBindingsByBindingIdErrors[keyof DeleteManagedAgentsV1TriggerBindingsByBindingIdErrors]; export type DeleteManagedAgentsV1TriggerBindingsByBindingIdResponses = { /** * Shared response body of every soft-delete endpoint, on agents, environments, tags, vaults, vault credentials, webhook bindings, and sessions. Soft delete is a tombstone, not an erase: the row stops appearing in list and get responses but is retained, and there is no undelete endpoint to bring it back. Irreversible erasure is the separate, confirmation-gated purge path. */ 200: ManagedAgentsDeletedResponse; }; export type DeleteManagedAgentsV1TriggerBindingsByBindingIdResponse = DeleteManagedAgentsV1TriggerBindingsByBindingIdResponses[keyof DeleteManagedAgentsV1TriggerBindingsByBindingIdResponses]; export type PatchManagedAgentsV1TriggerBindingsByBindingIdData = { body: ManagedAgentsUpdateTriggerBindingRequest; path: { /** * Trigger binding id (UUID) returned by the create or list operation. */ binding_id: string; }; query?: never; url: '/managed-agents/v1/trigger-bindings/{binding_id}'; }; export type PatchManagedAgentsV1TriggerBindingsByBindingIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiError; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PatchManagedAgentsV1TriggerBindingsByBindingIdError = PatchManagedAgentsV1TriggerBindingsByBindingIdErrors[keyof PatchManagedAgentsV1TriggerBindingsByBindingIdErrors]; export type PatchManagedAgentsV1TriggerBindingsByBindingIdResponses = { /** * One wake rule: which provider events start a session, and the agent, environment, and vaults that session runs with. New rules are Slack-only; retired GitHub rules remain readable and may be disabled or deleted during migration. */ 200: ManagedAgentsTriggerBinding; }; export type PatchManagedAgentsV1TriggerBindingsByBindingIdResponse = PatchManagedAgentsV1TriggerBindingsByBindingIdResponses[keyof PatchManagedAgentsV1TriggerBindingsByBindingIdResponses]; export type GetManagedAgentsV1VaultsData = { body?: never; path?: never; query?: never; url: '/managed-agents/v1/vaults'; }; export type GetManagedAgentsV1VaultsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1VaultsError = GetManagedAgentsV1VaultsErrors[keyof GetManagedAgentsV1VaultsErrors]; export type GetManagedAgentsV1VaultsResponses = { /** * Response body of GET /v1/vaults. A vault is the grantable unit of credential access: the vault_ids passed when starting a session decide which credentials that session may use. This lists the containers only; use GET /v1/vaults/{vault_id}/credentials for contents. */ 200: ManagedAgentsVaultListResponse; }; export type GetManagedAgentsV1VaultsResponse = GetManagedAgentsV1VaultsResponses[keyof GetManagedAgentsV1VaultsResponses]; export type PostManagedAgentsV1VaultsData = { body: ManagedAgentsCreateVaultRequest; path?: never; query?: never; url: '/managed-agents/v1/vaults'; }; export type PostManagedAgentsV1VaultsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1VaultsError = PostManagedAgentsV1VaultsErrors[keyof PostManagedAgentsV1VaultsErrors]; export type PostManagedAgentsV1VaultsResponses = { /** * A named group of credentials an agent session may be granted. A session references vaults by id; the credential values inside are resolved at execution time and are never returned over the API. */ 200: ManagedAgentsVault; }; export type PostManagedAgentsV1VaultsResponse = PostManagedAgentsV1VaultsResponses[keyof PostManagedAgentsV1VaultsResponses]; export type DeleteManagedAgentsV1VaultsByVaultIdData = { body?: never; path: { /** * Vault id (UUID) as returned by createVault or listVaults. */ vault_id: string; }; query?: never; url: '/managed-agents/v1/vaults/{vault_id}'; }; export type DeleteManagedAgentsV1VaultsByVaultIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type DeleteManagedAgentsV1VaultsByVaultIdError = DeleteManagedAgentsV1VaultsByVaultIdErrors[keyof DeleteManagedAgentsV1VaultsByVaultIdErrors]; export type DeleteManagedAgentsV1VaultsByVaultIdResponses = { /** * Shared response body of every soft-delete endpoint, on agents, environments, tags, vaults, vault credentials, webhook bindings, and sessions. Soft delete is a tombstone, not an erase: the row stops appearing in list and get responses but is retained, and there is no undelete endpoint to bring it back. Irreversible erasure is the separate, confirmation-gated purge path. */ 200: ManagedAgentsDeletedResponse; }; export type DeleteManagedAgentsV1VaultsByVaultIdResponse = DeleteManagedAgentsV1VaultsByVaultIdResponses[keyof DeleteManagedAgentsV1VaultsByVaultIdResponses]; export type GetManagedAgentsV1VaultsByVaultIdData = { body?: never; path: { /** * Vault id (UUID) as returned by createVault or listVaults. */ vault_id: string; }; query?: never; url: '/managed-agents/v1/vaults/{vault_id}'; }; export type GetManagedAgentsV1VaultsByVaultIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1VaultsByVaultIdError = GetManagedAgentsV1VaultsByVaultIdErrors[keyof GetManagedAgentsV1VaultsByVaultIdErrors]; export type GetManagedAgentsV1VaultsByVaultIdResponses = { /** * A named group of credentials an agent session may be granted. A session references vaults by id; the credential values inside are resolved at execution time and are never returned over the API. */ 200: ManagedAgentsVault; }; export type GetManagedAgentsV1VaultsByVaultIdResponse = GetManagedAgentsV1VaultsByVaultIdResponses[keyof GetManagedAgentsV1VaultsByVaultIdResponses]; export type PatchManagedAgentsV1VaultsByVaultIdData = { body: ManagedAgentsUpdateVaultRequest; path: { /** * Vault id (UUID) as returned by createVault or listVaults. */ vault_id: string; }; query?: never; url: '/managed-agents/v1/vaults/{vault_id}'; }; export type PatchManagedAgentsV1VaultsByVaultIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PatchManagedAgentsV1VaultsByVaultIdError = PatchManagedAgentsV1VaultsByVaultIdErrors[keyof PatchManagedAgentsV1VaultsByVaultIdErrors]; export type PatchManagedAgentsV1VaultsByVaultIdResponses = { /** * A named group of credentials an agent session may be granted. A session references vaults by id; the credential values inside are resolved at execution time and are never returned over the API. */ 200: ManagedAgentsVault; }; export type PatchManagedAgentsV1VaultsByVaultIdResponse = PatchManagedAgentsV1VaultsByVaultIdResponses[keyof PatchManagedAgentsV1VaultsByVaultIdResponses]; export type GetManagedAgentsV1VaultsByVaultIdCredentialsData = { body?: never; path: { /** * Vault id (UUID) as returned by createVault or listVaults. */ vault_id: string; }; query?: never; url: '/managed-agents/v1/vaults/{vault_id}/credentials'; }; export type GetManagedAgentsV1VaultsByVaultIdCredentialsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1VaultsByVaultIdCredentialsError = GetManagedAgentsV1VaultsByVaultIdCredentialsErrors[keyof GetManagedAgentsV1VaultsByVaultIdCredentialsErrors]; export type GetManagedAgentsV1VaultsByVaultIdCredentialsResponses = { /** * Response body of GET /v1/vaults/{vault_id}/credentials. Unlike the other list envelopes this one is deliberately lossy: each row describes a credential and points at its secret-manager reference, and the secret material is never returned by any read endpoint. To learn whether a credential actually works, probe with POST /v1/mcp/probe. */ 200: ManagedAgentsVaultCredentialListResponse; }; export type GetManagedAgentsV1VaultsByVaultIdCredentialsResponse = GetManagedAgentsV1VaultsByVaultIdCredentialsResponses[keyof GetManagedAgentsV1VaultsByVaultIdCredentialsResponses]; export type PostManagedAgentsV1VaultsByVaultIdCredentialsData = { body: ManagedAgentsCreateVaultCredentialRequest; path: { /** * Vault id (UUID) as returned by createVault or listVaults. */ vault_id: string; }; query?: never; url: '/managed-agents/v1/vaults/{vault_id}/credentials'; }; export type PostManagedAgentsV1VaultsByVaultIdCredentialsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1VaultsByVaultIdCredentialsError = PostManagedAgentsV1VaultsByVaultIdCredentialsErrors[keyof PostManagedAgentsV1VaultsByVaultIdCredentialsErrors]; export type PostManagedAgentsV1VaultsByVaultIdCredentialsResponses = { /** * One credential in a vault, described without its secret value — no field on this shape can carry secret material, which is what makes it safe to list over the API. Returned when managing a vault's contents; the value itself is opened only inside a running session. */ 200: ManagedAgentsVaultCredential; }; export type PostManagedAgentsV1VaultsByVaultIdCredentialsResponse = PostManagedAgentsV1VaultsByVaultIdCredentialsResponses[keyof PostManagedAgentsV1VaultsByVaultIdCredentialsResponses]; export type DeleteManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdData = { body?: never; path: { /** * Vault id (UUID) that owns the credential. */ vault_id: string; /** * Credential reference id (UUID) within the vault, as returned by listVaultCredentials. */ credential_id: string; }; query?: never; url: '/managed-agents/v1/vaults/{vault_id}/credentials/{credential_id}'; }; export type DeleteManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type DeleteManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdError = DeleteManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdErrors[keyof DeleteManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdErrors]; export type DeleteManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdResponses = { /** * Shared response body of every soft-delete endpoint, on agents, environments, tags, vaults, vault credentials, webhook bindings, and sessions. Soft delete is a tombstone, not an erase: the row stops appearing in list and get responses but is retained, and there is no undelete endpoint to bring it back. Irreversible erasure is the separate, confirmation-gated purge path. */ 200: ManagedAgentsDeletedResponse; }; export type DeleteManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdResponse = DeleteManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdResponses[keyof DeleteManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdResponses]; export type GetManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdData = { body?: never; path: { /** * Vault id (UUID) that owns the credential. */ vault_id: string; /** * Credential reference id (UUID) within the vault, as returned by listVaultCredentials. */ credential_id: string; }; query?: never; url: '/managed-agents/v1/vaults/{vault_id}/credentials/{credential_id}'; }; export type GetManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdError = GetManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdErrors[keyof GetManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdErrors]; export type GetManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdResponses = { /** * One credential in a vault, described without its secret value — no field on this shape can carry secret material, which is what makes it safe to list over the API. Returned when managing a vault's contents; the value itself is opened only inside a running session. */ 200: ManagedAgentsVaultCredential; }; export type GetManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdResponse = GetManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdResponses[keyof GetManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdResponses]; export type PatchManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdData = { body: ManagedAgentsUpdateVaultCredentialRequest; path: { /** * Vault id (UUID) that owns the credential. */ vault_id: string; /** * Credential reference id (UUID) within the vault, as returned by listVaultCredentials. */ credential_id: string; }; query?: never; url: '/managed-agents/v1/vaults/{vault_id}/credentials/{credential_id}'; }; export type PatchManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PatchManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdError = PatchManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdErrors[keyof PatchManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdErrors]; export type PatchManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdResponses = { /** * One credential in a vault, described without its secret value — no field on this shape can carry secret material, which is what makes it safe to list over the API. Returned when managing a vault's contents; the value itself is opened only inside a running session. */ 200: ManagedAgentsVaultCredential; }; export type PatchManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdResponse = PatchManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdResponses[keyof PatchManagedAgentsV1VaultsByVaultIdCredentialsByCredentialIdResponses]; export type GetManagedAgentsV1WebhookEndpointsData = { body?: never; path?: never; query?: never; url: '/managed-agents/v1/webhook-endpoints'; }; export type GetManagedAgentsV1WebhookEndpointsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1WebhookEndpointsError = GetManagedAgentsV1WebhookEndpointsErrors[keyof GetManagedAgentsV1WebhookEndpointsErrors]; export type GetManagedAgentsV1WebhookEndpointsResponses = { /** * Webhook endpoints available to automations in the calling organization. */ 200: ManagedAgentsWebhookEndpointListResponse; }; export type GetManagedAgentsV1WebhookEndpointsResponse = GetManagedAgentsV1WebhookEndpointsResponses[keyof GetManagedAgentsV1WebhookEndpointsResponses]; export type PostManagedAgentsV1WebhookEndpointsData = { body: ManagedAgentsWebhookEndpointRequest; path?: never; query?: never; url: '/managed-agents/v1/webhook-endpoints'; }; export type PostManagedAgentsV1WebhookEndpointsErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiErrorNotFound; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PostManagedAgentsV1WebhookEndpointsError = PostManagedAgentsV1WebhookEndpointsErrors[keyof PostManagedAgentsV1WebhookEndpointsErrors]; export type PostManagedAgentsV1WebhookEndpointsResponses = { /** * An organization-owned, provider-neutral webhook ingress endpoint with configurable verification and acknowledgement. */ 201: ManagedAgentsWebhookEndpoint; }; export type PostManagedAgentsV1WebhookEndpointsResponse = PostManagedAgentsV1WebhookEndpointsResponses[keyof PostManagedAgentsV1WebhookEndpointsResponses]; export type DeleteManagedAgentsV1WebhookEndpointsByEndpointIdData = { body?: never; path: { /** * Webhook endpoint id (UUID) as returned by createWebhookEndpoint or listWebhookEndpoints. */ endpoint_id: string; }; query?: never; url: '/managed-agents/v1/webhook-endpoints/{endpoint_id}'; }; export type DeleteManagedAgentsV1WebhookEndpointsByEndpointIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type DeleteManagedAgentsV1WebhookEndpointsByEndpointIdError = DeleteManagedAgentsV1WebhookEndpointsByEndpointIdErrors[keyof DeleteManagedAgentsV1WebhookEndpointsByEndpointIdErrors]; export type DeleteManagedAgentsV1WebhookEndpointsByEndpointIdResponses = { /** * No Content */ 204: void; }; export type DeleteManagedAgentsV1WebhookEndpointsByEndpointIdResponse = DeleteManagedAgentsV1WebhookEndpointsByEndpointIdResponses[keyof DeleteManagedAgentsV1WebhookEndpointsByEndpointIdResponses]; export type GetManagedAgentsV1WebhookEndpointsByEndpointIdData = { body?: never; path: { /** * Webhook endpoint id (UUID) as returned by createWebhookEndpoint or listWebhookEndpoints. */ endpoint_id: string; }; query?: never; url: '/managed-agents/v1/webhook-endpoints/{endpoint_id}'; }; export type GetManagedAgentsV1WebhookEndpointsByEndpointIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type GetManagedAgentsV1WebhookEndpointsByEndpointIdError = GetManagedAgentsV1WebhookEndpointsByEndpointIdErrors[keyof GetManagedAgentsV1WebhookEndpointsByEndpointIdErrors]; export type GetManagedAgentsV1WebhookEndpointsByEndpointIdResponses = { /** * An organization-owned, provider-neutral webhook ingress endpoint with configurable verification and acknowledgement. */ 200: ManagedAgentsWebhookEndpoint; }; export type GetManagedAgentsV1WebhookEndpointsByEndpointIdResponse = GetManagedAgentsV1WebhookEndpointsByEndpointIdResponses[keyof GetManagedAgentsV1WebhookEndpointsByEndpointIdResponses]; export type PutManagedAgentsV1WebhookEndpointsByEndpointIdData = { body: ManagedAgentsWebhookEndpointRequest; path: { /** * Webhook endpoint id (UUID) as returned by createWebhookEndpoint or listWebhookEndpoints. */ endpoint_id: string; }; query?: never; url: '/managed-agents/v1/webhook-endpoints/{endpoint_id}'; }; export type PutManagedAgentsV1WebhookEndpointsByEndpointIdErrors = { /** * The request was rejected by schema or semantic validation. */ 400: ManagedAgentsApiError; /** * The caller is unauthenticated. */ 401: ManagedAgentsApiError; /** * The caller lacks a required permission or capability. */ 403: ManagedAgentsApiErrorForbidden; /** * No such resource is reachable for this caller. */ 404: ManagedAgentsApiError; /** * The request conflicts with the resource state, or with an in-flight idempotent replay. */ 409: ManagedAgentsApiError; /** * The request exceeds a size or transaction budget. */ 413: ManagedAgentsApiError; /** * The request body uses a media type this operation does not accept. */ 415: ManagedAgentsApiErrorUnsupportedMediaType; /** * A rate limit is exhausted. Honor `Retry-After`. */ 429: ManagedAgentsApiError; /** * An unexpected server-side failure. */ 500: ManagedAgentsApiError; /** * The service returned an invalid response. */ 502: ManagedAgentsApiErrorBadGateway; /** * A dependency is unavailable. Retryable. */ 503: ManagedAgentsApiError; /** * The service did not respond before the timeout. Retryable. */ 504: ManagedAgentsApiErrorGatewayTimeout; }; export type PutManagedAgentsV1WebhookEndpointsByEndpointIdError = PutManagedAgentsV1WebhookEndpointsByEndpointIdErrors[keyof PutManagedAgentsV1WebhookEndpointsByEndpointIdErrors]; export type PutManagedAgentsV1WebhookEndpointsByEndpointIdResponses = { /** * An organization-owned, provider-neutral webhook ingress endpoint with configurable verification and acknowledgement. */ 200: ManagedAgentsWebhookEndpoint; }; export type PutManagedAgentsV1WebhookEndpointsByEndpointIdResponse = PutManagedAgentsV1WebhookEndpointsByEndpointIdResponses[keyof PutManagedAgentsV1WebhookEndpointsByEndpointIdResponses]; export type GetV1ComputesData = { body?: never; path?: never; query?: never; url: '/v1/computes'; }; export type GetV1ComputesErrors = { /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ComputesError = GetV1ComputesErrors[keyof GetV1ComputesErrors]; export type GetV1ComputesResponses = { /** * Computes for the caller */ 200: OwnedComputeListResponseDto; }; export type GetV1ComputesResponse = GetV1ComputesResponses[keyof GetV1ComputesResponses]; export type PostV1ComputesData = { body: CreateComputeRequestDto; path?: never; query?: never; url: '/v1/computes'; }; export type PostV1ComputesErrors = { /** * Invalid request (e.g. privileged container on a non-gke launcher) */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Environment not found or not accessible to the caller (body/header mismatch and cross-org collapse to 404 to avoid existence leak), or runConfigVersionId is not reachable from the environment */ 404: TargetApiErrorNotFound; /** * The caller already has an active compute in this environment, compute admission changed concurrently, or the caller reached the active leased-compute limit. */ 409: ComputeCreateConflictResponseDto; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; /** * Agent Service returned an undocumented compute-provisioning conflict */ 502: ApiErrorStatus502; }; export type PostV1ComputesError = PostV1ComputesErrors[keyof PostV1ComputesErrors]; export type PostV1ComputesResponses = { /** * Compute created and reserved for the caller */ 201: ComputeResultDto; }; export type PostV1ComputesResponse = PostV1ComputesResponses[keyof PostV1ComputesResponses]; export type DeleteV1ComputesByComputeIdData = { body?: never; path: { /** * Stable compute identifier (UUID). Long-lived per-user sandbox. */ computeId: string; }; query?: never; url: '/v1/computes/{computeId}'; }; export type DeleteV1ComputesByComputeIdErrors = { /** * Upstream rejected the delete (e.g. malformed id) */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Compute not found or not owned by caller */ 404: TargetApiErrorNotFound; /** * Compute is in a non-deletable state */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1ComputesByComputeIdError = DeleteV1ComputesByComputeIdErrors[keyof DeleteV1ComputesByComputeIdErrors]; export type DeleteV1ComputesByComputeIdResponses = { /** * Compute deleted */ 204: void; }; export type DeleteV1ComputesByComputeIdResponse = DeleteV1ComputesByComputeIdResponses[keyof DeleteV1ComputesByComputeIdResponses]; export type GetV1ComputesByComputeIdData = { body?: never; path: { /** * Stable compute identifier (UUID). Long-lived per-user sandbox. */ computeId: string; }; query?: never; url: '/v1/computes/{computeId}'; }; export type GetV1ComputesByComputeIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Compute not found or not owned by caller */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ComputesByComputeIdError = GetV1ComputesByComputeIdErrors[keyof GetV1ComputesByComputeIdErrors]; export type GetV1ComputesByComputeIdResponses = { /** * Compute */ 200: ComputeResultDto; }; export type GetV1ComputesByComputeIdResponse = GetV1ComputesByComputeIdResponses[keyof GetV1ComputesByComputeIdResponses]; export type DeleteV1ComputesByComputeIdAccessSessionsData = { body?: never; path: { /** * Stable compute identifier (UUID). Long-lived per-user sandbox. */ computeId: string; }; query?: never; url: '/v1/computes/{computeId}/access/sessions'; }; export type DeleteV1ComputesByComputeIdAccessSessionsErrors = { /** * Upstream rejected the revoke (e.g. malformed id) */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Compute not found or not owned by caller */ 404: TargetApiErrorNotFound; /** * Compute is not in a state that supports revoke */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1ComputesByComputeIdAccessSessionsError = DeleteV1ComputesByComputeIdAccessSessionsErrors[keyof DeleteV1ComputesByComputeIdAccessSessionsErrors]; export type DeleteV1ComputesByComputeIdAccessSessionsResponses = { /** * All active access sessions revoked */ 204: void; }; export type DeleteV1ComputesByComputeIdAccessSessionsResponse = DeleteV1ComputesByComputeIdAccessSessionsResponses[keyof DeleteV1ComputesByComputeIdAccessSessionsResponses]; export type PostV1ComputesByComputeIdAccessSessionsData = { body?: never; path: { /** * Stable compute identifier (UUID). Long-lived per-user sandbox. */ computeId: string; }; query?: never; url: '/v1/computes/{computeId}/access/sessions'; }; export type PostV1ComputesByComputeIdAccessSessionsErrors = { /** * Upstream rejected the mint (e.g. malformed id) */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Compute not found or not owned by caller */ 404: TargetApiErrorNotFound; /** * Compute is not in a state that supports access */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1ComputesByComputeIdAccessSessionsError = PostV1ComputesByComputeIdAccessSessionsErrors[keyof PostV1ComputesByComputeIdAccessSessionsErrors]; export type PostV1ComputesByComputeIdAccessSessionsResponses = { /** * Redemption URL minted with expiry */ 201: ComputeAccessSessionDto; }; export type PostV1ComputesByComputeIdAccessSessionsResponse = PostV1ComputesByComputeIdAccessSessionsResponses[keyof PostV1ComputesByComputeIdAccessSessionsResponses]; export type PostV1ComputesByComputeIdExecData = { body: ExecCommandRequestDto; path: { /** * Stable compute identifier (UUID). Long-lived per-user sandbox. */ computeId: string; }; query?: never; url: '/v1/computes/{computeId}/exec'; }; export type PostV1ComputesByComputeIdExecErrors = { /** * Invalid request body (e.g. timeoutSeconds out of range, empty command) */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Compute not found or not owned by caller */ 404: TargetApiErrorNotFound; /** * Compute is not running */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1ComputesByComputeIdExecError = PostV1ComputesByComputeIdExecErrors[keyof PostV1ComputesByComputeIdExecErrors]; export type PostV1ComputesByComputeIdExecResponses = { /** * Exec result (stdout, stderr, exit code) */ 200: ExecResultDto; }; export type PostV1ComputesByComputeIdExecResponse = PostV1ComputesByComputeIdExecResponses[keyof PostV1ComputesByComputeIdExecResponses]; export type PostV1ComputesByComputeIdStartData = { body?: never; path: { /** * Stable compute identifier (UUID). Long-lived per-user sandbox. */ computeId: string; }; query?: never; url: '/v1/computes/{computeId}/start'; }; export type PostV1ComputesByComputeIdStartErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Compute not found or not owned by caller */ 404: TargetApiErrorNotFound; /** * Compute is not in a startable state */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1ComputesByComputeIdStartError = PostV1ComputesByComputeIdStartErrors[keyof PostV1ComputesByComputeIdStartErrors]; export type PostV1ComputesByComputeIdStartResponses = { /** * Compute start initiated */ 200: ComputeResultDto; }; export type PostV1ComputesByComputeIdStartResponse = PostV1ComputesByComputeIdStartResponses[keyof PostV1ComputesByComputeIdStartResponses]; export type PostV1ComputesByComputeIdStopData = { body?: never; path: { /** * Stable compute identifier (UUID). Long-lived per-user sandbox. */ computeId: string; }; query?: never; url: '/v1/computes/{computeId}/stop'; }; export type PostV1ComputesByComputeIdStopErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Compute not found or not owned by caller */ 404: TargetApiErrorNotFound; /** * Compute is not in a stoppable state */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1ComputesByComputeIdStopError = PostV1ComputesByComputeIdStopErrors[keyof PostV1ComputesByComputeIdStopErrors]; export type PostV1ComputesByComputeIdStopResponses = { /** * Compute stop initiated */ 200: ComputeResultDto; }; export type PostV1ComputesByComputeIdStopResponse = PostV1ComputesByComputeIdStopResponses[keyof PostV1ComputesByComputeIdStopResponses]; export type PostV1CustomerSecretsData = { body: CreateCustomerSecretDto; path?: never; query?: never; url: '/v1/customer-secrets'; }; export type PostV1CustomerSecretsErrors = { /** * Invalid scope or fields */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller cannot write at this scope */ 403: TargetApiErrorForbidden; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; /** * Secret Manager backend is unavailable. */ 503: ApiErrorStatus503; }; export type PostV1CustomerSecretsError = PostV1CustomerSecretsErrors[keyof PostV1CustomerSecretsErrors]; export type PostV1CustomerSecretsResponses = { /** * Customer secret created */ 201: CustomerSecretDto; }; export type PostV1CustomerSecretsResponse = PostV1CustomerSecretsResponses[keyof PostV1CustomerSecretsResponses]; export type DeleteV1CustomerSecretsByCustomerSecretIdData = { body?: never; path: { /** * Stable customer-secret identifier (UUID). */ customerSecretId: string; }; query?: never; url: '/v1/customer-secrets/{customerSecretId}'; }; export type DeleteV1CustomerSecretsByCustomerSecretIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Customer secret not found */ 404: TargetApiErrorNotFound; /** * Customer secret is still attached to one or more run configs */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1CustomerSecretsByCustomerSecretIdError = DeleteV1CustomerSecretsByCustomerSecretIdErrors[keyof DeleteV1CustomerSecretsByCustomerSecretIdErrors]; export type DeleteV1CustomerSecretsByCustomerSecretIdResponses = { /** * Customer secret deleted */ 204: void; }; export type DeleteV1CustomerSecretsByCustomerSecretIdResponse = DeleteV1CustomerSecretsByCustomerSecretIdResponses[keyof DeleteV1CustomerSecretsByCustomerSecretIdResponses]; export type GetV1CustomerSecretsByCustomerSecretIdData = { body?: never; path: { /** * Stable customer-secret identifier (UUID). */ customerSecretId: string; }; query?: never; url: '/v1/customer-secrets/{customerSecretId}'; }; export type GetV1CustomerSecretsByCustomerSecretIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Customer secret not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1CustomerSecretsByCustomerSecretIdError = GetV1CustomerSecretsByCustomerSecretIdErrors[keyof GetV1CustomerSecretsByCustomerSecretIdErrors]; export type GetV1CustomerSecretsByCustomerSecretIdResponses = { /** * Customer secret metadata */ 200: CustomerSecretDto; }; export type GetV1CustomerSecretsByCustomerSecretIdResponse = GetV1CustomerSecretsByCustomerSecretIdResponses[keyof GetV1CustomerSecretsByCustomerSecretIdResponses]; export type PatchV1CustomerSecretsByCustomerSecretIdData = { body: UpdateCustomerSecretDto; path: { /** * Stable customer-secret identifier (UUID). */ customerSecretId: string; }; query?: never; url: '/v1/customer-secrets/{customerSecretId}'; }; export type PatchV1CustomerSecretsByCustomerSecretIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Customer secret not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; /** * Secret Manager backend is unavailable. */ 503: ApiErrorStatus503; }; export type PatchV1CustomerSecretsByCustomerSecretIdError = PatchV1CustomerSecretsByCustomerSecretIdErrors[keyof PatchV1CustomerSecretsByCustomerSecretIdErrors]; export type PatchV1CustomerSecretsByCustomerSecretIdResponses = { /** * Customer secret updated */ 200: CustomerSecretDto; }; export type PatchV1CustomerSecretsByCustomerSecretIdResponse = PatchV1CustomerSecretsByCustomerSecretIdResponses[keyof PatchV1CustomerSecretsByCustomerSecretIdResponses]; export type GetV1EnvironmentsData = { body?: never; path?: never; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; /** * Field to sort by. Allowed values depend on the entity being listed. */ sortBy?: string; /** * Sort direction. Defaults to ascending when omitted. */ sortDirection?: 'asc' | 'desc'; /** * Free-text filter applied to the entity searchable fields. */ search?: string; /** * External-id filter. Pass the literal string 'null' to match envs with no external id, or any other non-empty value for an exact match. Omit to disable the filter. */ externalId?: string; }; url: '/v1/environments'; }; export type GetV1EnvironmentsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsError = GetV1EnvironmentsErrors[keyof GetV1EnvironmentsErrors]; export type GetV1EnvironmentsResponses = { /** * Paginated list of environments */ 200: EnvironmentWithCountsPageDto; }; export type GetV1EnvironmentsResponse = GetV1EnvironmentsResponses[keyof GetV1EnvironmentsResponses]; export type PostV1EnvironmentsData = { body: CreateEnvironmentDto; path?: never; query?: never; url: '/v1/environments'; }; export type PostV1EnvironmentsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Scope mismatch with request body */ 403: TargetApiErrorForbidden; /** * Organization not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsError = PostV1EnvironmentsErrors[keyof PostV1EnvironmentsErrors]; export type PostV1EnvironmentsResponses = { /** * Environment already exists (idempotent) */ 200: EnvironmentDto; /** * Environment created */ 201: EnvironmentDto; }; export type PostV1EnvironmentsResponse = PostV1EnvironmentsResponses[keyof PostV1EnvironmentsResponses]; export type GetV1EnvironmentsByExternalIdByEnvironmentExternalIdData = { body?: never; path: { /** * External environment identifier provided by the caller's source-of-truth system. */ environmentExternalId: string; }; query?: never; url: '/v1/environments/by-external-id/{environmentExternalId}'; }; export type GetV1EnvironmentsByExternalIdByEnvironmentExternalIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Missing required permission */ 403: TargetApiErrorForbidden; /** * Environment not found, or exists outside the caller's scope (404 on scope mismatch prevents an existence oracle) */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByExternalIdByEnvironmentExternalIdError = GetV1EnvironmentsByExternalIdByEnvironmentExternalIdErrors[keyof GetV1EnvironmentsByExternalIdByEnvironmentExternalIdErrors]; export type GetV1EnvironmentsByExternalIdByEnvironmentExternalIdResponses = { /** * Environment details */ 200: EnvironmentDto; }; export type GetV1EnvironmentsByExternalIdByEnvironmentExternalIdResponse = GetV1EnvironmentsByExternalIdByEnvironmentExternalIdResponses[keyof GetV1EnvironmentsByExternalIdByEnvironmentExternalIdResponses]; export type PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdDeletionsData = { body: RemoveExternalIdsDto; path: { /** * External environment identifier provided by the caller's source-of-truth system. */ environmentExternalId: string; }; query?: never; url: '/v1/environments/by-external-id/{environmentExternalId}/problems/by-external-id/deletions'; }; export type PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdDeletionsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Missing problems:delete permission */ 403: TargetApiErrorForbidden; /** * Environment not found, or scoped caller addressed an environment outside their tenant scope */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdDeletionsError = PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdDeletionsErrors[keyof PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdDeletionsErrors]; export type PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdDeletionsResponses = { /** * Mapping of soft-deleted external IDs to problem IDs */ 200: ExternalIdToProblemIdMapDto; }; export type PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdDeletionsResponse = PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdDeletionsResponses[keyof PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdDeletionsResponses]; export type PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdResetsData = { body: RemoveExternalIdsDto; path: { /** * External environment identifier provided by the caller's source-of-truth system. */ environmentExternalId: string; }; query?: never; url: '/v1/environments/by-external-id/{environmentExternalId}/problems/by-external-id/resets'; }; export type PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdResetsErrors = { /** * One or more externalIds did not resolve to an active non-template problem in the environment */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Missing versions:delete + problems:delete permissions */ 403: TargetApiErrorForbidden; /** * Environment not found, or scoped caller addressed an environment outside their tenant scope */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdResetsError = PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdResetsErrors[keyof PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdResetsErrors]; export type PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdResetsResponses = { /** * Mapping of reset external IDs to problem IDs */ 200: ExternalIdToProblemIdMapDto; }; export type PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdResetsResponse = PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdResetsResponses[keyof PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdResetsResponses]; export type GetV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesData = { body?: never; path: { /** * External environment identifier provided by the caller's source-of-truth system. */ environmentExternalId: string; /** * External problem identifier provided by the caller's source-of-truth system. */ problemExternalId: string; }; query?: never; url: '/v1/environments/by-external-id/{environmentExternalId}/problems/by-external-id/{problemExternalId}/issues'; }; export type GetV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Environment or problem not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesError = GetV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesErrors[keyof GetV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesErrors]; export type GetV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesResponses = { /** * List of issues */ 200: IssueListDto; }; export type GetV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesResponse = GetV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesResponses[keyof GetV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesResponses]; export type PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesData = { body: CreateIssueBodyDto; path: { /** * External environment identifier provided by the caller's source-of-truth system. */ environmentExternalId: string; /** * External problem identifier provided by the caller's source-of-truth system. */ problemExternalId: string; }; query?: never; url: '/v1/environments/by-external-id/{environmentExternalId}/problems/by-external-id/{problemExternalId}/issues'; }; export type PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Environment or problem not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesError = PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesErrors[keyof PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesErrors]; export type PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesResponses = { /** * Issue created */ 201: IssueDto; }; export type PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesResponse = PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesResponses[keyof PostV1EnvironmentsByExternalIdByEnvironmentExternalIdProblemsByExternalIdByProblemExternalIdIssuesResponses]; export type DeleteV1EnvironmentsByEnvironmentIdData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}'; }; export type DeleteV1EnvironmentsByEnvironmentIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Scope mismatch */ 403: TargetApiErrorForbidden; /** * Environment not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1EnvironmentsByEnvironmentIdError = DeleteV1EnvironmentsByEnvironmentIdErrors[keyof DeleteV1EnvironmentsByEnvironmentIdErrors]; export type DeleteV1EnvironmentsByEnvironmentIdResponses = { /** * Environment deleted */ 204: void; }; export type DeleteV1EnvironmentsByEnvironmentIdResponse = DeleteV1EnvironmentsByEnvironmentIdResponses[keyof DeleteV1EnvironmentsByEnvironmentIdResponses]; export type GetV1EnvironmentsByEnvironmentIdData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}'; }; export type GetV1EnvironmentsByEnvironmentIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Missing required permission */ 403: TargetApiErrorForbidden; /** * Environment not found, or exists outside the caller's scope (404 on scope mismatch prevents an existence oracle) */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdError = GetV1EnvironmentsByEnvironmentIdErrors[keyof GetV1EnvironmentsByEnvironmentIdErrors]; export type GetV1EnvironmentsByEnvironmentIdResponses = { /** * Environment details */ 200: EnvironmentDto; }; export type GetV1EnvironmentsByEnvironmentIdResponse = GetV1EnvironmentsByEnvironmentIdResponses[keyof GetV1EnvironmentsByEnvironmentIdResponses]; export type GetV1EnvironmentsByEnvironmentIdBuiltInSynthesizersByBuiltInSynthesizerKeyData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable string key identifying a hardcoded built-in synthesizer. */ builtInSynthesizerKey: 'improve-prompt' | 'generate-tools' | 'generate-rubrics'; }; query?: never; url: '/v1/environments/{environmentId}/built-in-synthesizers/{builtInSynthesizerKey}'; }; export type GetV1EnvironmentsByEnvironmentIdBuiltInSynthesizersByBuiltInSynthesizerKeyErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Built-in synthesizer not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdBuiltInSynthesizersByBuiltInSynthesizerKeyError = GetV1EnvironmentsByEnvironmentIdBuiltInSynthesizersByBuiltInSynthesizerKeyErrors[keyof GetV1EnvironmentsByEnvironmentIdBuiltInSynthesizersByBuiltInSynthesizerKeyErrors]; export type GetV1EnvironmentsByEnvironmentIdBuiltInSynthesizersByBuiltInSynthesizerKeyResponses = { /** * Built-in synthesizer found */ 200: BuiltInSynthesizerDto; }; export type GetV1EnvironmentsByEnvironmentIdBuiltInSynthesizersByBuiltInSynthesizerKeyResponse = GetV1EnvironmentsByEnvironmentIdBuiltInSynthesizersByBuiltInSynthesizerKeyResponses[keyof GetV1EnvironmentsByEnvironmentIdBuiltInSynthesizersByBuiltInSynthesizerKeyResponses]; export type GetV1EnvironmentsByEnvironmentIdCostLimitsData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/cost-limits'; }; export type GetV1EnvironmentsByEnvironmentIdCostLimitsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment access denied */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdCostLimitsError = GetV1EnvironmentsByEnvironmentIdCostLimitsErrors[keyof GetV1EnvironmentsByEnvironmentIdCostLimitsErrors]; export type GetV1EnvironmentsByEnvironmentIdCostLimitsResponses = { /** * List of cost limits */ 200: CostLimitListDto; }; export type GetV1EnvironmentsByEnvironmentIdCostLimitsResponse = GetV1EnvironmentsByEnvironmentIdCostLimitsResponses[keyof GetV1EnvironmentsByEnvironmentIdCostLimitsResponses]; export type PutV1EnvironmentsByEnvironmentIdCostLimitsData = { body: CreateCostLimitDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/cost-limits'; }; export type PutV1EnvironmentsByEnvironmentIdCostLimitsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment access denied */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PutV1EnvironmentsByEnvironmentIdCostLimitsError = PutV1EnvironmentsByEnvironmentIdCostLimitsErrors[keyof PutV1EnvironmentsByEnvironmentIdCostLimitsErrors]; export type PutV1EnvironmentsByEnvironmentIdCostLimitsResponses = { /** * Cost limit upserted */ 200: CostLimitDto; }; export type PutV1EnvironmentsByEnvironmentIdCostLimitsResponse = PutV1EnvironmentsByEnvironmentIdCostLimitsResponses[keyof PutV1EnvironmentsByEnvironmentIdCostLimitsResponses]; export type GetV1EnvironmentsByEnvironmentIdCostLimitsProblemStatusByProblemIdData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable problem identifier (UUID). */ problemId: string; }; query?: never; url: '/v1/environments/{environmentId}/cost-limits/problem-status/{problemId}'; }; export type GetV1EnvironmentsByEnvironmentIdCostLimitsProblemStatusByProblemIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment access denied */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdCostLimitsProblemStatusByProblemIdError = GetV1EnvironmentsByEnvironmentIdCostLimitsProblemStatusByProblemIdErrors[keyof GetV1EnvironmentsByEnvironmentIdCostLimitsProblemStatusByProblemIdErrors]; export type GetV1EnvironmentsByEnvironmentIdCostLimitsProblemStatusByProblemIdResponses = { /** * Problem cost status */ 200: ProblemCostStatusDto; }; export type GetV1EnvironmentsByEnvironmentIdCostLimitsProblemStatusByProblemIdResponse = GetV1EnvironmentsByEnvironmentIdCostLimitsProblemStatusByProblemIdResponses[keyof GetV1EnvironmentsByEnvironmentIdCostLimitsProblemStatusByProblemIdResponses]; export type DeleteV1EnvironmentsByEnvironmentIdCostLimitsByCostLimitIdData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable cost-limit identifier (UUID). */ costLimitId: string; }; query?: never; url: '/v1/environments/{environmentId}/cost-limits/{costLimitId}'; }; export type DeleteV1EnvironmentsByEnvironmentIdCostLimitsByCostLimitIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment access denied */ 403: TargetApiErrorForbidden; /** * Cost limit not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1EnvironmentsByEnvironmentIdCostLimitsByCostLimitIdError = DeleteV1EnvironmentsByEnvironmentIdCostLimitsByCostLimitIdErrors[keyof DeleteV1EnvironmentsByEnvironmentIdCostLimitsByCostLimitIdErrors]; export type DeleteV1EnvironmentsByEnvironmentIdCostLimitsByCostLimitIdResponses = { /** * Cost limit deleted */ 204: void; }; export type DeleteV1EnvironmentsByEnvironmentIdCostLimitsByCostLimitIdResponse = DeleteV1EnvironmentsByEnvironmentIdCostLimitsByCostLimitIdResponses[keyof DeleteV1EnvironmentsByEnvironmentIdCostLimitsByCostLimitIdResponses]; export type GetV1EnvironmentsByEnvironmentIdExportsData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/exports'; }; export type GetV1EnvironmentsByEnvironmentIdExportsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch, or caller is problem-scoped (env-wide listing not permitted) */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdExportsError = GetV1EnvironmentsByEnvironmentIdExportsErrors[keyof GetV1EnvironmentsByEnvironmentIdExportsErrors]; export type GetV1EnvironmentsByEnvironmentIdExportsResponses = { /** * List of exports */ 200: ExportResponseListDto; }; export type GetV1EnvironmentsByEnvironmentIdExportsResponse = GetV1EnvironmentsByEnvironmentIdExportsResponses[keyof GetV1EnvironmentsByEnvironmentIdExportsResponses]; export type PostV1EnvironmentsByEnvironmentIdExportsData = { body: CreateExportBodyDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/exports'; }; export type PostV1EnvironmentsByEnvironmentIdExportsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Scope mismatch (environment or problem) */ 403: TargetApiErrorForbidden; /** * Environment or problems not found */ 404: TargetApiErrorNotFound; /** * An active export already exists */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdExportsError = PostV1EnvironmentsByEnvironmentIdExportsErrors[keyof PostV1EnvironmentsByEnvironmentIdExportsErrors]; export type PostV1EnvironmentsByEnvironmentIdExportsResponses = { /** * Export created and enqueued */ 201: ExportResponseDto; }; export type PostV1EnvironmentsByEnvironmentIdExportsResponse = PostV1EnvironmentsByEnvironmentIdExportsResponses[keyof PostV1EnvironmentsByEnvironmentIdExportsResponses]; export type DeleteV1EnvironmentsByEnvironmentIdExternalIdData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/external-id'; }; export type DeleteV1EnvironmentsByEnvironmentIdExternalIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Scope mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Environment not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1EnvironmentsByEnvironmentIdExternalIdError = DeleteV1EnvironmentsByEnvironmentIdExternalIdErrors[keyof DeleteV1EnvironmentsByEnvironmentIdExternalIdErrors]; export type DeleteV1EnvironmentsByEnvironmentIdExternalIdResponses = { /** * External ID detached or already absent */ 204: void; }; export type DeleteV1EnvironmentsByEnvironmentIdExternalIdResponse = DeleteV1EnvironmentsByEnvironmentIdExternalIdResponses[keyof DeleteV1EnvironmentsByEnvironmentIdExternalIdResponses]; export type PutV1EnvironmentsByEnvironmentIdExternalIdData = { body: AttachEnvironmentExternalIdDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/external-id'; }; export type PutV1EnvironmentsByEnvironmentIdExternalIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Scope mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Environment not found */ 404: TargetApiErrorNotFound; /** * Environment already has an external ID, or the supplied external ID is in use elsewhere */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PutV1EnvironmentsByEnvironmentIdExternalIdError = PutV1EnvironmentsByEnvironmentIdExternalIdErrors[keyof PutV1EnvironmentsByEnvironmentIdExternalIdErrors]; export type PutV1EnvironmentsByEnvironmentIdExternalIdResponses = { /** * Updated environment */ 200: EnvironmentDto; }; export type PutV1EnvironmentsByEnvironmentIdExternalIdResponse = PutV1EnvironmentsByEnvironmentIdExternalIdResponses[keyof PutV1EnvironmentsByEnvironmentIdExternalIdResponses]; export type GetV1EnvironmentsByEnvironmentIdFilesData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query: { /** * Restrict results to environment files of this type. */ type: 'instructions' | 'agent-input'; }; url: '/v1/environments/{environmentId}/files'; }; export type GetV1EnvironmentsByEnvironmentIdFilesErrors = { /** * Invalid file type query parameter */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdFilesError = GetV1EnvironmentsByEnvironmentIdFilesErrors[keyof GetV1EnvironmentsByEnvironmentIdFilesErrors]; export type GetV1EnvironmentsByEnvironmentIdFilesResponses = { /** * List of environment files with signed download URLs */ 200: ListEnvironmentFilesResponseDto; }; export type GetV1EnvironmentsByEnvironmentIdFilesResponse = GetV1EnvironmentsByEnvironmentIdFilesResponses[keyof GetV1EnvironmentsByEnvironmentIdFilesResponses]; export type PostV1EnvironmentsByEnvironmentIdFilesFinalizeUploadsData = { body: FinalizeEnvironmentFileUploadsRequestDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/files/finalize-uploads'; }; export type PostV1EnvironmentsByEnvironmentIdFilesFinalizeUploadsErrors = { /** * Object path mismatch, GCS-reported size/mime violates policy, or count limit reached */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Uploaded file not found in GCS */ 404: TargetApiErrorNotFound; /** * One or more uploaded objects have already been finalized */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdFilesFinalizeUploadsError = PostV1EnvironmentsByEnvironmentIdFilesFinalizeUploadsErrors[keyof PostV1EnvironmentsByEnvironmentIdFilesFinalizeUploadsErrors]; export type PostV1EnvironmentsByEnvironmentIdFilesFinalizeUploadsResponses = { /** * File records created */ 201: FinalizeEnvironmentFileUploadsResponseDto; }; export type PostV1EnvironmentsByEnvironmentIdFilesFinalizeUploadsResponse = PostV1EnvironmentsByEnvironmentIdFilesFinalizeUploadsResponses[keyof PostV1EnvironmentsByEnvironmentIdFilesFinalizeUploadsResponses]; export type PostV1EnvironmentsByEnvironmentIdFilesSignedUploadUrlsData = { body: CreateEnvironmentFileUploadUrlsRequestDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/files/signed-upload-urls'; }; export type PostV1EnvironmentsByEnvironmentIdFilesSignedUploadUrlsErrors = { /** * File exceeds size limit, has a disallowed mime type, or count limit reached */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdFilesSignedUploadUrlsError = PostV1EnvironmentsByEnvironmentIdFilesSignedUploadUrlsErrors[keyof PostV1EnvironmentsByEnvironmentIdFilesSignedUploadUrlsErrors]; export type PostV1EnvironmentsByEnvironmentIdFilesSignedUploadUrlsResponses = { /** * Signed upload URLs generated */ 200: CreateEnvironmentFileUploadUrlsResponseDto; }; export type PostV1EnvironmentsByEnvironmentIdFilesSignedUploadUrlsResponse = PostV1EnvironmentsByEnvironmentIdFilesSignedUploadUrlsResponses[keyof PostV1EnvironmentsByEnvironmentIdFilesSignedUploadUrlsResponses]; export type DeleteV1EnvironmentsByEnvironmentIdFilesByEnvironmentFileIdData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable environment-file identifier (UUID). Files scoped to an environment (templates, shared assets). */ environmentFileId: string; }; query?: never; url: '/v1/environments/{environmentId}/files/{environmentFileId}'; }; export type DeleteV1EnvironmentsByEnvironmentIdFilesByEnvironmentFileIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * File not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1EnvironmentsByEnvironmentIdFilesByEnvironmentFileIdError = DeleteV1EnvironmentsByEnvironmentIdFilesByEnvironmentFileIdErrors[keyof DeleteV1EnvironmentsByEnvironmentIdFilesByEnvironmentFileIdErrors]; export type DeleteV1EnvironmentsByEnvironmentIdFilesByEnvironmentFileIdResponses = { /** * File soft-deleted */ 204: void; }; export type DeleteV1EnvironmentsByEnvironmentIdFilesByEnvironmentFileIdResponse = DeleteV1EnvironmentsByEnvironmentIdFilesByEnvironmentFileIdResponses[keyof DeleteV1EnvironmentsByEnvironmentIdFilesByEnvironmentFileIdResponses]; export type DeleteV1EnvironmentsByEnvironmentIdFormsData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/forms'; }; export type DeleteV1EnvironmentsByEnvironmentIdFormsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment scope mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * No attached bundle */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1EnvironmentsByEnvironmentIdFormsError = DeleteV1EnvironmentsByEnvironmentIdFormsErrors[keyof DeleteV1EnvironmentsByEnvironmentIdFormsErrors]; export type DeleteV1EnvironmentsByEnvironmentIdFormsResponses = { /** * Bundle detached */ 204: void; }; export type DeleteV1EnvironmentsByEnvironmentIdFormsResponse = DeleteV1EnvironmentsByEnvironmentIdFormsResponses[keyof DeleteV1EnvironmentsByEnvironmentIdFormsResponses]; export type GetV1EnvironmentsByEnvironmentIdFormsData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/forms'; }; export type GetV1EnvironmentsByEnvironmentIdFormsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment scope mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Environment not found or out of scope */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdFormsError = GetV1EnvironmentsByEnvironmentIdFormsErrors[keyof GetV1EnvironmentsByEnvironmentIdFormsErrors]; export type GetV1EnvironmentsByEnvironmentIdFormsResponses = { /** * The attached bundle, or null if none */ 200: EnvFormBundleResponseDto; }; export type GetV1EnvironmentsByEnvironmentIdFormsResponse = GetV1EnvironmentsByEnvironmentIdFormsResponses[keyof GetV1EnvironmentsByEnvironmentIdFormsResponses]; export type PostV1EnvironmentsByEnvironmentIdFormsData = { body: CreateAndAttachFormBodyDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/forms'; }; export type PostV1EnvironmentsByEnvironmentIdFormsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment scope mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Environment already has an attached form bundle */ 409: EnvironmentFormAlreadyAttachedErrorDto; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdFormsError = PostV1EnvironmentsByEnvironmentIdFormsErrors[keyof PostV1EnvironmentsByEnvironmentIdFormsErrors]; export type PostV1EnvironmentsByEnvironmentIdFormsResponses = { /** * Bundle created and attached */ 201: FormWithInitialVersionResponseDto; }; export type PostV1EnvironmentsByEnvironmentIdFormsResponse = PostV1EnvironmentsByEnvironmentIdFormsResponses[keyof PostV1EnvironmentsByEnvironmentIdFormsResponses]; export type PostV1EnvironmentsByEnvironmentIdFormsByFormIdData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable form identifier (UUID). Forms are versioned structured-input schemas. */ formId: string; }; query?: never; url: '/v1/environments/{environmentId}/forms/{formId}'; }; export type PostV1EnvironmentsByEnvironmentIdFormsByFormIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment scope mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Bundle not found */ 404: TargetApiErrorNotFound; /** * Environment already has an attached form bundle */ 409: EnvironmentFormAlreadyAttachedErrorDto; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdFormsByFormIdError = PostV1EnvironmentsByEnvironmentIdFormsByFormIdErrors[keyof PostV1EnvironmentsByEnvironmentIdFormsByFormIdErrors]; export type PostV1EnvironmentsByEnvironmentIdFormsByFormIdResponses = { /** * Bundle attached */ 201: AttachExistingFormResponseDto; }; export type PostV1EnvironmentsByEnvironmentIdFormsByFormIdResponse = PostV1EnvironmentsByEnvironmentIdFormsByFormIdResponses[keyof PostV1EnvironmentsByEnvironmentIdFormsByFormIdResponses]; export type GetV1EnvironmentsByEnvironmentIdImportsData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/imports'; }; export type GetV1EnvironmentsByEnvironmentIdImportsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdImportsError = GetV1EnvironmentsByEnvironmentIdImportsErrors[keyof GetV1EnvironmentsByEnvironmentIdImportsErrors]; export type GetV1EnvironmentsByEnvironmentIdImportsResponses = { /** * List of imports */ 200: ImportResponseListDto; }; export type GetV1EnvironmentsByEnvironmentIdImportsResponse = GetV1EnvironmentsByEnvironmentIdImportsResponses[keyof GetV1EnvironmentsByEnvironmentIdImportsResponses]; export type PostV1EnvironmentsByEnvironmentIdImportsInitiateData = { body: InitiateImportBodyDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/imports/initiate'; }; export type PostV1EnvironmentsByEnvironmentIdImportsInitiateErrors = { /** * Invalid filename or missing user header */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch */ 403: TargetApiErrorForbidden; /** * Environment not found */ 404: TargetApiErrorNotFound; /** * An active import already exists */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdImportsInitiateError = PostV1EnvironmentsByEnvironmentIdImportsInitiateErrors[keyof PostV1EnvironmentsByEnvironmentIdImportsInitiateErrors]; export type PostV1EnvironmentsByEnvironmentIdImportsInitiateResponses = { /** * Import initiated, upload URL returned */ 201: InitiateImportResponseDto; }; export type PostV1EnvironmentsByEnvironmentIdImportsInitiateResponse = PostV1EnvironmentsByEnvironmentIdImportsInitiateResponses[keyof PostV1EnvironmentsByEnvironmentIdImportsInitiateResponses]; export type GetV1EnvironmentsByEnvironmentIdJobsV2Data = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; /** * Field to sort by. Allowed values depend on the entity being listed. */ sortBy?: string; /** * Sort direction. Defaults to ascending when omitted. */ sortDirection?: 'asc' | 'desc'; /** * Free-text filter applied to the entity searchable fields. */ search?: string; /** * Filter by the strategy discriminator (e.g. `taiga_send`). */ type?: string; /** * When `true` (default), only root jobs are returned. `false` includes child rows too. */ root?: 'true' | 'false'; }; url: '/v1/environments/{environmentId}/jobs-v2'; }; export type GetV1EnvironmentsByEnvironmentIdJobsV2Errors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdJobsV2Error = GetV1EnvironmentsByEnvironmentIdJobsV2Errors[keyof GetV1EnvironmentsByEnvironmentIdJobsV2Errors]; export type GetV1EnvironmentsByEnvironmentIdJobsV2Responses = { /** * Paginated list of jobs */ 200: JobV2ListResponseDto; }; export type GetV1EnvironmentsByEnvironmentIdJobsV2Response = GetV1EnvironmentsByEnvironmentIdJobsV2Responses[keyof GetV1EnvironmentsByEnvironmentIdJobsV2Responses]; export type DeleteV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; }; query?: never; url: '/v1/environments/{environmentId}/jobs-v2/{jobV2Id}'; }; export type DeleteV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Job is not terminal */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdError = DeleteV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdErrors[keyof DeleteV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdErrors]; export type DeleteV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdResponses = { /** * Job soft-deleted */ 204: void; }; export type DeleteV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdResponse = DeleteV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdResponses[keyof DeleteV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdResponses]; export type GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; }; query?: never; url: '/v1/environments/{environmentId}/jobs-v2/{jobV2Id}'; }; export type GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Job not found or not linked to this environment */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdError = GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdErrors[keyof GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdErrors]; export type GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdResponses = { /** * The job row */ 200: JobV2ResponseDto; }; export type GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdResponse = GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdResponses[keyof GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdResponses]; export type PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdCancelData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; }; query?: never; url: '/v1/environments/{environmentId}/jobs-v2/{jobV2Id}/cancel'; }; export type PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdCancelErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdCancelError = PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdCancelErrors[keyof PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdCancelErrors]; export type PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdCancelResponses = { /** * Job cancelled (or was already terminal) */ 204: void; }; export type PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdCancelResponse = PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdCancelResponses[keyof PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdCancelResponses]; export type GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdChildrenData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; }; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; /** * Field to sort by. Allowed values depend on the entity being listed. */ sortBy?: string; /** * Sort direction. Defaults to ascending when omitted. */ sortDirection?: 'asc' | 'desc'; /** * Free-text filter applied to the entity searchable fields. */ search?: string; }; url: '/v1/environments/{environmentId}/jobs-v2/{jobV2Id}/children'; }; export type GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdChildrenErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdChildrenError = GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdChildrenErrors[keyof GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdChildrenErrors]; export type GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdChildrenResponses = { /** * Paginated children of the parent job */ 200: JobV2ListResponseDto; }; export type GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdChildrenResponse = GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdChildrenResponses[keyof GetV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdChildrenResponses]; export type PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdRerunData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; }; query?: never; url: '/v1/environments/{environmentId}/jobs-v2/{jobV2Id}/rerun'; }; export type PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdRerunErrors = { /** * Invalid input or a run-config file mount path clashes with a problem file */ 400: RunConfigFileClashBadRequestDto; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Job is not terminal, a running-stage QA gate has not passed, or (for an evaluation attempt) the attempt is no longer failed or its evaluation was cancelled or deleted — including when either condition is only discovered as a race during the rerun itself. */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdRerunError = PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdRerunErrors[keyof PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdRerunErrors]; export type PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdRerunResponses = { /** * New root job created for the rerun */ 201: RerunJobV2ResponseDto; }; export type PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdRerunResponse = PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdRerunResponses[keyof PostV1EnvironmentsByEnvironmentIdJobsV2ByJobV2IdRerunResponses]; export type GetV1EnvironmentsByEnvironmentIdProblemListItemsData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; /** * Sort direction. Defaults to ascending when omitted. */ sortDirection?: 'asc' | 'desc'; /** * Free-text search filter applied across problem title and external id. */ search?: string; /** * Comma-separated list of model identifiers; matches problems with at least one run on any listed model. */ models?: Array; /** * Which aggregate (avg, min, or max) the score bounds apply to. Defaults to the average. */ avgScoreMetric?: 'avg' | 'min' | 'max'; /** * Inclusive lower bound on the selected score metric, expressed as a 0–100 percentage. */ avgScoreMin?: number; /** * Inclusive upper bound on the selected score metric, expressed as a 0–100 percentage. */ avgScoreMax?: number; /** * Inclusive lower bound on problem creation date, in YYYY-MM-DD form (UTC calendar day). */ createdAtFrom?: string; /** * Inclusive upper bound on problem creation date, in YYYY-MM-DD form (UTC calendar day). */ createdAtTo?: string; /** * JSON-encoded enrichment-dimension filters. Send one query-string value containing a JSON object that maps dimension names to allowed string values. */ enrichmentFilters?: string; /** * Local sort column. Mutually exclusive with the enrichment sort axis. */ sortBy?: 'createdAt' | 'updatedAt' | 'latestVersionCreatedAt' | 'title' | 'externalId' | 'avgScore' | 'cost' | 'runs'; /** * Enrichment-dimension key (e.g. workflow, priority) to sort by. Mutually exclusive with the local sort column. */ sortByEnrichment?: string; }; url: '/v1/environments/{environmentId}/problem-list-items'; }; export type GetV1EnvironmentsByEnvironmentIdProblemListItemsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Environment not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdProblemListItemsError = GetV1EnvironmentsByEnvironmentIdProblemListItemsErrors[keyof GetV1EnvironmentsByEnvironmentIdProblemListItemsErrors]; export type GetV1EnvironmentsByEnvironmentIdProblemListItemsResponses = { /** * Page of ProblemListItem */ 200: ProblemListItemsResponseDto; }; export type GetV1EnvironmentsByEnvironmentIdProblemListItemsResponse = GetV1EnvironmentsByEnvironmentIdProblemListItemsResponses[keyof GetV1EnvironmentsByEnvironmentIdProblemListItemsResponses]; export type GetV1EnvironmentsByEnvironmentIdProblemListStatsData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: { /** * Free-text search filter applied across problem title and external id. */ search?: string; /** * Comma-separated list of model identifiers; matches problems with at least one run on any listed model. */ models?: Array; /** * Which aggregate (avg, min, or max) the score bounds apply to. Defaults to the average. */ avgScoreMetric?: 'avg' | 'min' | 'max'; /** * Inclusive lower bound on the selected score metric, expressed as a 0–100 percentage. */ avgScoreMin?: number; /** * Inclusive upper bound on the selected score metric, expressed as a 0–100 percentage. */ avgScoreMax?: number; /** * Inclusive lower bound on problem creation date, in YYYY-MM-DD form (UTC calendar day). */ createdAtFrom?: string; /** * Inclusive upper bound on problem creation date, in YYYY-MM-DD form (UTC calendar day). */ createdAtTo?: string; /** * JSON-encoded enrichment-dimension filters. Send one query-string value containing a JSON object that maps dimension names to allowed string values. */ enrichmentFilters?: string; }; url: '/v1/environments/{environmentId}/problem-list-stats'; }; export type GetV1EnvironmentsByEnvironmentIdProblemListStatsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Environment not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdProblemListStatsError = GetV1EnvironmentsByEnvironmentIdProblemListStatsErrors[keyof GetV1EnvironmentsByEnvironmentIdProblemListStatsErrors]; export type GetV1EnvironmentsByEnvironmentIdProblemListStatsResponses = { /** * ProblemListStats */ 200: ProblemListStatsDto; }; export type GetV1EnvironmentsByEnvironmentIdProblemListStatsResponse = GetV1EnvironmentsByEnvironmentIdProblemListStatsResponses[keyof GetV1EnvironmentsByEnvironmentIdProblemListStatsResponses]; export type GetV1EnvironmentsByEnvironmentIdProblemSummariesData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: { /** * Case-insensitive substring match against id, external ID, or title. */ search?: string; /** * Maximum rows to return. A server default applies when omitted. */ limit?: number; /** * When true, only problems with at least one locked version are returned. */ lockedOnly?: 'true' | 'false'; }; url: '/v1/environments/{environmentId}/problem-summaries'; }; export type GetV1EnvironmentsByEnvironmentIdProblemSummariesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Environment not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdProblemSummariesError = GetV1EnvironmentsByEnvironmentIdProblemSummariesErrors[keyof GetV1EnvironmentsByEnvironmentIdProblemSummariesErrors]; export type GetV1EnvironmentsByEnvironmentIdProblemSummariesResponses = { /** * ProblemSummariesResponse */ 200: ProblemSummariesResponseDto; }; export type GetV1EnvironmentsByEnvironmentIdProblemSummariesResponse = GetV1EnvironmentsByEnvironmentIdProblemSummariesResponses[keyof GetV1EnvironmentsByEnvironmentIdProblemSummariesResponses]; export type PostV1EnvironmentsByEnvironmentIdProblemsData = { body: CreateProblemsDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/problems'; }; export type PostV1EnvironmentsByEnvironmentIdProblemsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Environment not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdProblemsError = PostV1EnvironmentsByEnvironmentIdProblemsErrors[keyof PostV1EnvironmentsByEnvironmentIdProblemsErrors]; export type PostV1EnvironmentsByEnvironmentIdProblemsResponses = { /** * Problems already existed (idempotent) */ 200: CreateProblemsResponseDto; /** * Problems created */ 201: CreateProblemsResponseDto; }; export type PostV1EnvironmentsByEnvironmentIdProblemsResponse = PostV1EnvironmentsByEnvironmentIdProblemsResponses[keyof PostV1EnvironmentsByEnvironmentIdProblemsResponses]; export type GetV1EnvironmentsByEnvironmentIdProblemsByExternalIdsData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query: { /** * Problem external IDs to look up. Repeat the param for each value. Capped at 1000. */ externalIds: string | Array; }; url: '/v1/environments/{environmentId}/problems-by-external-ids'; }; export type GetV1EnvironmentsByEnvironmentIdProblemsByExternalIdsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Environment not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdProblemsByExternalIdsError = GetV1EnvironmentsByEnvironmentIdProblemsByExternalIdsErrors[keyof GetV1EnvironmentsByEnvironmentIdProblemsByExternalIdsErrors]; export type GetV1EnvironmentsByEnvironmentIdProblemsByExternalIdsResponses = { /** * Problem[] */ 200: ProblemListDto; }; export type GetV1EnvironmentsByEnvironmentIdProblemsByExternalIdsResponse = GetV1EnvironmentsByEnvironmentIdProblemsByExternalIdsResponses[keyof GetV1EnvironmentsByEnvironmentIdProblemsByExternalIdsResponses]; export type PostV1EnvironmentsByEnvironmentIdProblemsWithVersionData = { body: CreateProblemWithVersionDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/problems/with-version'; }; export type PostV1EnvironmentsByEnvironmentIdProblemsWithVersionErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Environment or problem not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdProblemsWithVersionError = PostV1EnvironmentsByEnvironmentIdProblemsWithVersionErrors[keyof PostV1EnvironmentsByEnvironmentIdProblemsWithVersionErrors]; export type PostV1EnvironmentsByEnvironmentIdProblemsWithVersionResponses = { /** * Problem already existed; version ensured */ 200: CreateProblemWithVersionResponseDto; /** * Problem and version created */ 201: CreateProblemWithVersionResponseDto; }; export type PostV1EnvironmentsByEnvironmentIdProblemsWithVersionResponse = PostV1EnvironmentsByEnvironmentIdProblemsWithVersionResponses[keyof PostV1EnvironmentsByEnvironmentIdProblemsWithVersionResponses]; export type GetV1EnvironmentsByEnvironmentIdQaConfigsData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/qa-configs'; }; export type GetV1EnvironmentsByEnvironmentIdQaConfigsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdQaConfigsError = GetV1EnvironmentsByEnvironmentIdQaConfigsErrors[keyof GetV1EnvironmentsByEnvironmentIdQaConfigsErrors]; export type GetV1EnvironmentsByEnvironmentIdQaConfigsResponses = { /** * List of configs */ 200: QaConfigResponseArrayDto; }; export type GetV1EnvironmentsByEnvironmentIdQaConfigsResponse = GetV1EnvironmentsByEnvironmentIdQaConfigsResponses[keyof GetV1EnvironmentsByEnvironmentIdQaConfigsResponses]; export type PostV1EnvironmentsByEnvironmentIdQaConfigsData = { body: CreateQaConfigBodyDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/qa-configs'; }; export type PostV1EnvironmentsByEnvironmentIdQaConfigsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * A QA config with this name or built-in key already exists in this environment */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdQaConfigsError = PostV1EnvironmentsByEnvironmentIdQaConfigsErrors[keyof PostV1EnvironmentsByEnvironmentIdQaConfigsErrors]; export type PostV1EnvironmentsByEnvironmentIdQaConfigsResponses = { /** * Config created */ 201: QaConfigResponseDto; }; export type PostV1EnvironmentsByEnvironmentIdQaConfigsResponse = PostV1EnvironmentsByEnvironmentIdQaConfigsResponses[keyof PostV1EnvironmentsByEnvironmentIdQaConfigsResponses]; export type GetV1EnvironmentsByEnvironmentIdQaGatesData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/qa-gates'; }; export type GetV1EnvironmentsByEnvironmentIdQaGatesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdQaGatesError = GetV1EnvironmentsByEnvironmentIdQaGatesErrors[keyof GetV1EnvironmentsByEnvironmentIdQaGatesErrors]; export type GetV1EnvironmentsByEnvironmentIdQaGatesResponses = { /** * List of gates */ 200: QaGateResponseArrayDto; }; export type GetV1EnvironmentsByEnvironmentIdQaGatesResponse = GetV1EnvironmentsByEnvironmentIdQaGatesResponses[keyof GetV1EnvironmentsByEnvironmentIdQaGatesResponses]; export type PostV1EnvironmentsByEnvironmentIdQaGatesData = { body: CreateQaGateBodyDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/qa-gates'; }; export type PostV1EnvironmentsByEnvironmentIdQaGatesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * QA config not found in this environment */ 404: TargetApiErrorNotFound; /** * A gate for this QA config already exists */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdQaGatesError = PostV1EnvironmentsByEnvironmentIdQaGatesErrors[keyof PostV1EnvironmentsByEnvironmentIdQaGatesErrors]; export type PostV1EnvironmentsByEnvironmentIdQaGatesResponses = { /** * Gate created */ 201: QaGateResponseDto; }; export type PostV1EnvironmentsByEnvironmentIdQaGatesResponse = PostV1EnvironmentsByEnvironmentIdQaGatesResponses[keyof PostV1EnvironmentsByEnvironmentIdQaGatesResponses]; export type DeleteV1EnvironmentsByEnvironmentIdQaGatesByQaGateIdData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable QA-gate identifier (UUID). Gates require a passing QA verdict before a problem can advance. */ qaGateId: string; }; query?: never; url: '/v1/environments/{environmentId}/qa-gates/{qaGateId}'; }; export type DeleteV1EnvironmentsByEnvironmentIdQaGatesByQaGateIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Gate not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1EnvironmentsByEnvironmentIdQaGatesByQaGateIdError = DeleteV1EnvironmentsByEnvironmentIdQaGatesByQaGateIdErrors[keyof DeleteV1EnvironmentsByEnvironmentIdQaGatesByQaGateIdErrors]; export type DeleteV1EnvironmentsByEnvironmentIdQaGatesByQaGateIdResponses = { /** * Gate removed */ 204: void; }; export type DeleteV1EnvironmentsByEnvironmentIdQaGatesByQaGateIdResponse = DeleteV1EnvironmentsByEnvironmentIdQaGatesByQaGateIdResponses[keyof DeleteV1EnvironmentsByEnvironmentIdQaGatesByQaGateIdResponses]; export type GetV1EnvironmentsByEnvironmentIdQaJobsData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; /** * Field to sort by. Allowed values depend on the entity being listed. */ sortBy?: string; /** * Sort direction. Defaults to ascending when omitted. */ sortDirection?: 'asc' | 'desc'; /** * Free-text filter applied to the entity searchable fields. */ search?: string; /** * Stable QA-batch identifier (UUID). Groups QA jobs that should be evaluated together. */ batchId?: string; /** * Stable problem identifier (UUID). */ problemId?: string; /** * Search by QA job ID, problem ID, or config ID (UUID exact match), or by problem title, external ID, or QA config name (substring match) */ problemSearch?: string; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId?: string; /** * Comma-separated statuses */ status?: string; /** * Comma-separated config IDs */ qaConfigId?: string; /** * Comma-separated: individual, aggregate */ kind?: string; /** * Minimum score (0-1) */ scoreMin?: number; /** * Maximum score (0-1) */ scoreMax?: number; /** * Comma-separated grade values */ grade?: string; }; url: '/v1/environments/{environmentId}/qa-jobs'; }; export type GetV1EnvironmentsByEnvironmentIdQaJobsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdQaJobsError = GetV1EnvironmentsByEnvironmentIdQaJobsErrors[keyof GetV1EnvironmentsByEnvironmentIdQaJobsErrors]; export type GetV1EnvironmentsByEnvironmentIdQaJobsResponses = { /** * Paginated list of jobs */ 200: QaJobPageResponseDto; }; export type GetV1EnvironmentsByEnvironmentIdQaJobsResponse = GetV1EnvironmentsByEnvironmentIdQaJobsResponses[keyof GetV1EnvironmentsByEnvironmentIdQaJobsResponses]; export type PostV1EnvironmentsByEnvironmentIdQaJobsData = { body: TriggerQaJobBodyDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/qa-jobs'; }; export type PostV1EnvironmentsByEnvironmentIdQaJobsErrors = { /** * Invalid input or a run-config file mount path clashes with a problem file */ 400: RunConfigFileClashBadRequestDto; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdQaJobsError = PostV1EnvironmentsByEnvironmentIdQaJobsErrors[keyof PostV1EnvironmentsByEnvironmentIdQaJobsErrors]; export type PostV1EnvironmentsByEnvironmentIdQaJobsResponses = { /** * Job accepted for async submission */ 202: QaJobResponseDto; }; export type PostV1EnvironmentsByEnvironmentIdQaJobsResponse = PostV1EnvironmentsByEnvironmentIdQaJobsResponses[keyof PostV1EnvironmentsByEnvironmentIdQaJobsResponses]; export type PostV1EnvironmentsByEnvironmentIdQaJobsBatchData = { body: TriggerQaJobBatchBodyDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/qa-jobs/batch'; }; export type PostV1EnvironmentsByEnvironmentIdQaJobsBatchErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdQaJobsBatchError = PostV1EnvironmentsByEnvironmentIdQaJobsBatchErrors[keyof PostV1EnvironmentsByEnvironmentIdQaJobsBatchErrors]; export type PostV1EnvironmentsByEnvironmentIdQaJobsBatchResponses = { /** * Batch accepted for async submission */ 202: QaJobBatchResponseDto; }; export type PostV1EnvironmentsByEnvironmentIdQaJobsBatchResponse = PostV1EnvironmentsByEnvironmentIdQaJobsBatchResponses[keyof PostV1EnvironmentsByEnvironmentIdQaJobsBatchResponses]; export type GetV1EnvironmentsByEnvironmentIdQaJobsGradesData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/qa-jobs/grades'; }; export type GetV1EnvironmentsByEnvironmentIdQaJobsGradesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdQaJobsGradesError = GetV1EnvironmentsByEnvironmentIdQaJobsGradesErrors[keyof GetV1EnvironmentsByEnvironmentIdQaJobsGradesErrors]; export type GetV1EnvironmentsByEnvironmentIdQaJobsGradesResponses = { /** * Distinct grade values for the environment */ 200: Array; }; export type GetV1EnvironmentsByEnvironmentIdQaJobsGradesResponse = GetV1EnvironmentsByEnvironmentIdQaJobsGradesResponses[keyof GetV1EnvironmentsByEnvironmentIdQaJobsGradesResponses]; export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable QA-job identifier (UUID). */ qaJobId: string; }; query?: never; url: '/v1/environments/{environmentId}/qa-jobs/{qaJobId}'; }; export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Job not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdError = GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdErrors[keyof GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdErrors]; export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdResponses = { /** * Job found */ 200: QaJobResponseDto; }; export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdResponse = GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdResponses[keyof GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdResponses]; export type PostV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdCancelData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable QA-job identifier (UUID). */ qaJobId: string; }; query?: never; url: '/v1/environments/{environmentId}/qa-jobs/{qaJobId}/cancel'; }; export type PostV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdCancelErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Job not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdCancelError = PostV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdCancelErrors[keyof PostV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdCancelErrors]; export type PostV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdCancelResponses = { /** * Job cancelled */ 200: QaJobResponseDto; }; export type PostV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdCancelResponse = PostV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdCancelResponses[keyof PostV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdCancelResponses]; export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable QA-job identifier (UUID). */ qaJobId: string; }; query?: never; url: '/v1/environments/{environmentId}/qa-jobs/{qaJobId}/transcript'; }; export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Transcript not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptError = GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptErrors[keyof GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptErrors]; export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptResponses = { /** * Transcript content as plain text */ 200: string; }; export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptResponse = GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptResponses[keyof GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptResponses]; export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptLiveData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable QA-job identifier (UUID). */ qaJobId: string; }; query?: { /** * Return only events whose sequence is greater than this value. Omit to read the whole transcript. */ after?: string; /** * When true, wrap the events in an object that also carries the generation token of the run they came from. Omit for the bare event array. */ envelope?: 'true' | 'false'; }; url: '/v1/environments/{environmentId}/qa-jobs/{qaJobId}/transcript/live'; }; export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptLiveErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Job not active or no external run ID */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptLiveError = GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptLiveErrors[keyof GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptLiveErrors]; export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptLiveResponses = { /** * Live transcript events as a JSON-encoded array, or a JSON-encoded object with the events and the run generation when the envelope flag is set */ 200: string; }; export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptLiveResponse = GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptLiveResponses[keyof GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptLiveResponses]; export type GetV1EnvironmentsByEnvironmentIdQaTriggersData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/qa-triggers'; }; export type GetV1EnvironmentsByEnvironmentIdQaTriggersErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdQaTriggersError = GetV1EnvironmentsByEnvironmentIdQaTriggersErrors[keyof GetV1EnvironmentsByEnvironmentIdQaTriggersErrors]; export type GetV1EnvironmentsByEnvironmentIdQaTriggersResponses = { /** * List of triggers */ 200: QaTriggerResponseArrayDto; }; export type GetV1EnvironmentsByEnvironmentIdQaTriggersResponse = GetV1EnvironmentsByEnvironmentIdQaTriggersResponses[keyof GetV1EnvironmentsByEnvironmentIdQaTriggersResponses]; export type PostV1EnvironmentsByEnvironmentIdQaTriggersData = { body: CreateQaTriggerBodyDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/qa-triggers'; }; export type PostV1EnvironmentsByEnvironmentIdQaTriggersErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * QA config not found in this environment */ 404: TargetApiErrorNotFound; /** * A trigger for this QA config and event already exists */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdQaTriggersError = PostV1EnvironmentsByEnvironmentIdQaTriggersErrors[keyof PostV1EnvironmentsByEnvironmentIdQaTriggersErrors]; export type PostV1EnvironmentsByEnvironmentIdQaTriggersResponses = { /** * Trigger created */ 201: QaTriggerResponseDto; }; export type PostV1EnvironmentsByEnvironmentIdQaTriggersResponse = PostV1EnvironmentsByEnvironmentIdQaTriggersResponses[keyof PostV1EnvironmentsByEnvironmentIdQaTriggersResponses]; export type DeleteV1EnvironmentsByEnvironmentIdQaTriggersByQaTriggerIdData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable QA-trigger identifier (UUID). A trigger fires a QA job when a platform event occurs. */ qaTriggerId: string; }; query?: never; url: '/v1/environments/{environmentId}/qa-triggers/{qaTriggerId}'; }; export type DeleteV1EnvironmentsByEnvironmentIdQaTriggersByQaTriggerIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Trigger not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1EnvironmentsByEnvironmentIdQaTriggersByQaTriggerIdError = DeleteV1EnvironmentsByEnvironmentIdQaTriggersByQaTriggerIdErrors[keyof DeleteV1EnvironmentsByEnvironmentIdQaTriggersByQaTriggerIdErrors]; export type DeleteV1EnvironmentsByEnvironmentIdQaTriggersByQaTriggerIdResponses = { /** * Trigger removed */ 204: void; }; export type DeleteV1EnvironmentsByEnvironmentIdQaTriggersByQaTriggerIdResponse = DeleteV1EnvironmentsByEnvironmentIdQaTriggersByQaTriggerIdResponses[keyof DeleteV1EnvironmentsByEnvironmentIdQaTriggersByQaTriggerIdResponses]; export type GetV1EnvironmentsByEnvironmentIdRunConfigDefaultsInheritedData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: { /** * When provided, resolves the inherited default at the problem scope instead of the environment scope. */ problemId?: string; }; url: '/v1/environments/{environmentId}/run-config-defaults/inherited'; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigDefaultsInheritedErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Environment unreachable for this caller, or problemId does not belong to the env */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigDefaultsInheritedError = GetV1EnvironmentsByEnvironmentIdRunConfigDefaultsInheritedErrors[keyof GetV1EnvironmentsByEnvironmentIdRunConfigDefaultsInheritedErrors]; export type GetV1EnvironmentsByEnvironmentIdRunConfigDefaultsInheritedResponses = { /** * Inherited default metadata, or null if none */ 200: InheritedRunConfigDefaultDto | null; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigDefaultsInheritedResponse = GetV1EnvironmentsByEnvironmentIdRunConfigDefaultsInheritedResponses[keyof GetV1EnvironmentsByEnvironmentIdRunConfigDefaultsInheritedResponses]; export type PostV1EnvironmentsByEnvironmentIdRunConfigMenusByRoleEntriesData = { body: AddMenuEntryBodyDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * The role a run config plays at a binding slot: solver, grader, qa, or synthesizer. */ role: 'solver' | 'grader' | 'qa' | 'synthesizer'; }; query?: never; url: '/v1/environments/{environmentId}/run-config-menus/{role}/entries'; }; export type PostV1EnvironmentsByEnvironmentIdRunConfigMenusByRoleEntriesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Run-config version is already on this menu */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdRunConfigMenusByRoleEntriesError = PostV1EnvironmentsByEnvironmentIdRunConfigMenusByRoleEntriesErrors[keyof PostV1EnvironmentsByEnvironmentIdRunConfigMenusByRoleEntriesErrors]; export type PostV1EnvironmentsByEnvironmentIdRunConfigMenusByRoleEntriesResponses = { /** * The updated menu */ 200: ResolvedMenuDto; }; export type PostV1EnvironmentsByEnvironmentIdRunConfigMenusByRoleEntriesResponse = PostV1EnvironmentsByEnvironmentIdRunConfigMenusByRoleEntriesResponses[keyof PostV1EnvironmentsByEnvironmentIdRunConfigMenusByRoleEntriesResponses]; export type GetV1EnvironmentsByEnvironmentIdRunConfigReadinessData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/run-config-readiness'; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigReadinessErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigReadinessError = GetV1EnvironmentsByEnvironmentIdRunConfigReadinessErrors[keyof GetV1EnvironmentsByEnvironmentIdRunConfigReadinessErrors]; export type GetV1EnvironmentsByEnvironmentIdRunConfigReadinessResponses = { /** * Whether the environment solver menu can authorize public execution */ 200: RunConfigReadinessDto; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigReadinessResponse = GetV1EnvironmentsByEnvironmentIdRunConfigReadinessResponses[keyof GetV1EnvironmentsByEnvironmentIdRunConfigReadinessResponses]; export type GetV1EnvironmentsByEnvironmentIdRunConfigsData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: { /** * Comma-separated tags. Returns run configs carrying ANY of the supplied tags (OR semantics). */ tags?: string; }; url: '/v1/environments/{environmentId}/run-configs'; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigsError = GetV1EnvironmentsByEnvironmentIdRunConfigsErrors[keyof GetV1EnvironmentsByEnvironmentIdRunConfigsErrors]; export type GetV1EnvironmentsByEnvironmentIdRunConfigsResponses = { /** * Env-scope run configs */ 200: RunConfigListItemListDto; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigsResponse = GetV1EnvironmentsByEnvironmentIdRunConfigsResponses[keyof GetV1EnvironmentsByEnvironmentIdRunConfigsResponses]; export type GetV1EnvironmentsByEnvironmentIdRunConfigsBindableData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/run-configs/bindable'; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigsBindableErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigsBindableError = GetV1EnvironmentsByEnvironmentIdRunConfigsBindableErrors[keyof GetV1EnvironmentsByEnvironmentIdRunConfigsBindableErrors]; export type GetV1EnvironmentsByEnvironmentIdRunConfigsBindableResponses = { /** * Bindable run configs for the environment */ 200: BindableRunConfigListDto; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigsBindableResponse = GetV1EnvironmentsByEnvironmentIdRunConfigsBindableResponses[keyof GetV1EnvironmentsByEnvironmentIdRunConfigsBindableResponses]; export type GetV1EnvironmentsByEnvironmentIdRunConfigsReapedData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; /** * Field to sort by. Allowed values depend on the entity being listed. */ sortBy?: string; /** * Sort direction. Defaults to ascending when omitted. */ sortDirection?: 'asc' | 'desc'; /** * Free-text filter applied to the entity searchable fields. */ search?: string; }; url: '/v1/environments/{environmentId}/run-configs/reaped'; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigsReapedErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Environment unreachable for this caller */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigsReapedError = GetV1EnvironmentsByEnvironmentIdRunConfigsReapedErrors[keyof GetV1EnvironmentsByEnvironmentIdRunConfigsReapedErrors]; export type GetV1EnvironmentsByEnvironmentIdRunConfigsReapedResponses = { /** * Reaped env-scope run configs */ 200: ReapedRunConfigPageDto; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigsReapedResponse = GetV1EnvironmentsByEnvironmentIdRunConfigsReapedResponses[keyof GetV1EnvironmentsByEnvironmentIdRunConfigsReapedResponses]; export type GetV1EnvironmentsByEnvironmentIdRunConfigsSnapshotsData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/run-configs/snapshots'; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigsSnapshotsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Environment not found or out of scope */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigsSnapshotsError = GetV1EnvironmentsByEnvironmentIdRunConfigsSnapshotsErrors[keyof GetV1EnvironmentsByEnvironmentIdRunConfigsSnapshotsErrors]; export type GetV1EnvironmentsByEnvironmentIdRunConfigsSnapshotsResponses = { /** * Snapshot run configs with inlined version */ 200: RunConfigWithVersionListDto; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigsSnapshotsResponse = GetV1EnvironmentsByEnvironmentIdRunConfigsSnapshotsResponses[keyof GetV1EnvironmentsByEnvironmentIdRunConfigsSnapshotsResponses]; export type GetV1EnvironmentsByEnvironmentIdRunConfigsVisibleData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: { /** * Comma-separated tags. Returns run configs carrying ANY of the supplied tags (OR semantics). */ tags?: string; }; url: '/v1/environments/{environmentId}/run-configs/visible'; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigsVisibleErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigsVisibleError = GetV1EnvironmentsByEnvironmentIdRunConfigsVisibleErrors[keyof GetV1EnvironmentsByEnvironmentIdRunConfigsVisibleErrors]; export type GetV1EnvironmentsByEnvironmentIdRunConfigsVisibleResponses = { /** * Visible run configs */ 200: RunConfigListItemListDto; }; export type GetV1EnvironmentsByEnvironmentIdRunConfigsVisibleResponse = GetV1EnvironmentsByEnvironmentIdRunConfigsVisibleResponses[keyof GetV1EnvironmentsByEnvironmentIdRunConfigsVisibleResponses]; export type PatchV1EnvironmentsByEnvironmentIdSettingsData = { body: UpdateEnvironmentSettingsDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/settings'; }; export type PatchV1EnvironmentsByEnvironmentIdSettingsErrors = { /** * Validation error or import file size exceeds platform limit */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Scope mismatch */ 403: TargetApiErrorForbidden; /** * Environment not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PatchV1EnvironmentsByEnvironmentIdSettingsError = PatchV1EnvironmentsByEnvironmentIdSettingsErrors[keyof PatchV1EnvironmentsByEnvironmentIdSettingsErrors]; export type PatchV1EnvironmentsByEnvironmentIdSettingsResponses = { /** * Updated environment */ 200: EnvironmentDto; }; export type PatchV1EnvironmentsByEnvironmentIdSettingsResponse = PatchV1EnvironmentsByEnvironmentIdSettingsResponses[keyof PatchV1EnvironmentsByEnvironmentIdSettingsResponses]; export type GetV1EnvironmentsByEnvironmentIdSynthesizerJobsData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/synthesizer-jobs'; }; export type GetV1EnvironmentsByEnvironmentIdSynthesizerJobsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdSynthesizerJobsError = GetV1EnvironmentsByEnvironmentIdSynthesizerJobsErrors[keyof GetV1EnvironmentsByEnvironmentIdSynthesizerJobsErrors]; export type GetV1EnvironmentsByEnvironmentIdSynthesizerJobsResponses = { /** * List of synthesizers */ 200: SynthesizerListDto; }; export type GetV1EnvironmentsByEnvironmentIdSynthesizerJobsResponse = GetV1EnvironmentsByEnvironmentIdSynthesizerJobsResponses[keyof GetV1EnvironmentsByEnvironmentIdSynthesizerJobsResponses]; export type PostV1EnvironmentsByEnvironmentIdSynthesizerJobsData = { body: CreateSynthesizerJobBodyDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/synthesizer-jobs'; }; export type PostV1EnvironmentsByEnvironmentIdSynthesizerJobsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * No synthesizer run config is available */ 422: ApiErrorStatus422; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdSynthesizerJobsError = PostV1EnvironmentsByEnvironmentIdSynthesizerJobsErrors[keyof PostV1EnvironmentsByEnvironmentIdSynthesizerJobsErrors]; export type PostV1EnvironmentsByEnvironmentIdSynthesizerJobsResponses = { /** * Synthesizer job created */ 201: SynthesizerJobDto; }; export type PostV1EnvironmentsByEnvironmentIdSynthesizerJobsResponse = PostV1EnvironmentsByEnvironmentIdSynthesizerJobsResponses[keyof PostV1EnvironmentsByEnvironmentIdSynthesizerJobsResponses]; export type GetV1EnvironmentsByEnvironmentIdSynthesizerRunsData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; /** * Field to sort by. Allowed values depend on the entity being listed. */ sortBy?: string; /** * Sort direction. Defaults to ascending when omitted. */ sortDirection?: 'asc' | 'desc'; /** * Free-text filter applied to the entity searchable fields. */ search?: string; }; url: '/v1/environments/{environmentId}/synthesizer-runs'; }; export type GetV1EnvironmentsByEnvironmentIdSynthesizerRunsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdSynthesizerRunsError = GetV1EnvironmentsByEnvironmentIdSynthesizerRunsErrors[keyof GetV1EnvironmentsByEnvironmentIdSynthesizerRunsErrors]; export type GetV1EnvironmentsByEnvironmentIdSynthesizerRunsResponses = { /** * Paginated list of synthesizer runs */ 200: SynthesizerRunPageDto; }; export type GetV1EnvironmentsByEnvironmentIdSynthesizerRunsResponse = GetV1EnvironmentsByEnvironmentIdSynthesizerRunsResponses[keyof GetV1EnvironmentsByEnvironmentIdSynthesizerRunsResponses]; export type GetV1EnvironmentsByEnvironmentIdTemplateData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/template'; }; export type GetV1EnvironmentsByEnvironmentIdTemplateErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Missing required permission */ 403: TargetApiErrorForbidden; /** * Environment not found, no template configured, or environment exists outside the caller's scope (404 on scope mismatch prevents an existence oracle) */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdTemplateError = GetV1EnvironmentsByEnvironmentIdTemplateErrors[keyof GetV1EnvironmentsByEnvironmentIdTemplateErrors]; export type GetV1EnvironmentsByEnvironmentIdTemplateResponses = { /** * Template problem ID and version ID */ 200: TemplateResponseDto; }; export type GetV1EnvironmentsByEnvironmentIdTemplateResponse = GetV1EnvironmentsByEnvironmentIdTemplateResponses[keyof GetV1EnvironmentsByEnvironmentIdTemplateResponses]; export type PutV1EnvironmentsByEnvironmentIdTemplateData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; }; query?: never; url: '/v1/environments/{environmentId}/template'; }; export type PutV1EnvironmentsByEnvironmentIdTemplateErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Scope mismatch */ 403: TargetApiErrorForbidden; /** * Environment not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PutV1EnvironmentsByEnvironmentIdTemplateError = PutV1EnvironmentsByEnvironmentIdTemplateErrors[keyof PutV1EnvironmentsByEnvironmentIdTemplateErrors]; export type PutV1EnvironmentsByEnvironmentIdTemplateResponses = { /** * Template problem ID and version ID */ 200: EnsureTemplateResponseDto; }; export type PutV1EnvironmentsByEnvironmentIdTemplateResponse = PutV1EnvironmentsByEnvironmentIdTemplateResponses[keyof PutV1EnvironmentsByEnvironmentIdTemplateResponses]; export type GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdOracleQaResultData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; }; query?: never; url: '/v1/environments/{environmentId}/versions/{problemVersionId}/oracle-qa-result'; }; export type GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdOracleQaResultErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdOracleQaResultError = GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdOracleQaResultErrors[keyof GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdOracleQaResultErrors]; export type GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdOracleQaResultResponses = { /** * Oracle QA result (or null if none exists) */ 200: OracleQaResultResponseDto | null; }; export type GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdOracleQaResultResponse = GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdOracleQaResultResponses[keyof GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdOracleQaResultResponses]; export type GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdQaGateStatusData = { body?: never; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; }; query?: never; url: '/v1/environments/{environmentId}/versions/{problemVersionId}/qa-gate-status'; }; export type GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdQaGateStatusErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Version not found in this environment */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdQaGateStatusError = GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdQaGateStatusErrors[keyof GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdQaGateStatusErrors]; export type GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdQaGateStatusResponses = { /** * Gate status */ 200: QaGateStatusResponseDto; }; export type GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdQaGateStatusResponse = GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdQaGateStatusResponses[keyof GetV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdQaGateStatusResponses]; export type PostV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdStageClearanceData = { body: StageClearanceRequestBodyDto; path: { /** * Stable environment identifier (UUID). */ environmentId: string; /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; }; query?: never; url: '/v1/environments/{environmentId}/versions/{problemVersionId}/stage-clearance'; }; export type PostV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdStageClearanceErrors = { /** * Override not allowed for this stage */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Version not found in this environment */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdStageClearanceError = PostV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdStageClearanceErrors[keyof PostV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdStageClearanceErrors]; export type PostV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdStageClearanceResponses = { /** * Clearance result */ 200: StageClearanceResponseDto; }; export type PostV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdStageClearanceResponse = PostV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdStageClearanceResponses[keyof PostV1EnvironmentsByEnvironmentIdVersionsByProblemVersionIdStageClearanceResponses]; export type GetV1EvaluationsData = { body?: never; path?: never; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; /** * Field to sort by. Allowed values depend on the entity being listed. */ sortBy?: string; /** * Sort direction. Defaults to ascending when omitted. */ sortDirection?: 'asc' | 'desc'; /** * Free-text filter applied to the entity searchable fields. */ search?: string; /** * Comma-separated tags. Returns evaluations carrying ANY of the supplied tags (OR semantics). */ tags?: string; }; url: '/v1/evaluations'; }; export type GetV1EvaluationsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EvaluationsError = GetV1EvaluationsErrors[keyof GetV1EvaluationsErrors]; export type GetV1EvaluationsResponses = { /** * Paginated list of evaluations */ 200: EvaluationPageResponseDto; }; export type GetV1EvaluationsResponse = GetV1EvaluationsResponses[keyof GetV1EvaluationsResponses]; export type PostV1EvaluationsData = { body: CreateEvaluationBodyDto; path?: never; query?: never; url: '/v1/evaluations'; }; export type PostV1EvaluationsErrors = { /** * Invalid input, unlocked versions, or referenced environments spanning more than one organization */ 400: RunConfigFileClashBadRequestDto; /** * X-User-External-Id header required */ 401: TargetApiErrorUnauthorized; /** * One or more referenced environments are outside the caller's scope */ 403: TargetApiErrorForbidden; /** * One or more referenced problem versions or environments are not found or outside the caller's scope */ 404: TargetApiErrorNotFound; /** * A running-stage QA gate has not passed for a referenced problem version */ 409: ApiErrorStatus409; /** * Rate limit exceeded */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EvaluationsError = PostV1EvaluationsErrors[keyof PostV1EvaluationsErrors]; export type PostV1EvaluationsResponses = { /** * Evaluation created and v2 job spawned */ 201: EvaluationDetailResponseDto; }; export type PostV1EvaluationsResponse = PostV1EvaluationsResponses[keyof PostV1EvaluationsResponses]; export type PostV1EvaluationsBulkData = { body: CreateEvaluationBodyDto; path?: never; query?: never; url: '/v1/evaluations/bulk'; }; export type PostV1EvaluationsBulkErrors = { /** * Invalid input, unlocked versions, or referenced environments spanning more than one organization */ 400: RunConfigFileClashBadRequestDto; /** * X-User-External-Id header required */ 401: TargetApiErrorUnauthorized; /** * One or more referenced environments are outside the caller's scope */ 403: TargetApiErrorForbidden; /** * One or more referenced problem versions or environments are not found or outside the caller's scope */ 404: TargetApiErrorNotFound; /** * A running-stage QA gate has not passed for a referenced problem version */ 409: ApiErrorStatus409; /** * Rate limit exceeded */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EvaluationsBulkError = PostV1EvaluationsBulkErrors[keyof PostV1EvaluationsBulkErrors]; export type PostV1EvaluationsBulkResponses = { /** * Evaluation created and v2 job spawned */ 201: EvaluationDetailResponseDto; }; export type PostV1EvaluationsBulkResponse = PostV1EvaluationsBulkResponses[keyof PostV1EvaluationsBulkResponses]; export type PostV1EvaluationsGradeOnlyData = { body: CreateGradeOnlyEvaluationBodyDto; path?: never; query?: never; url: '/v1/evaluations/grade-only'; }; export type PostV1EvaluationsGradeOnlyErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * One or more referenced source problem runs are not found or outside the caller's scope */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EvaluationsGradeOnlyError = PostV1EvaluationsGradeOnlyErrors[keyof PostV1EvaluationsGradeOnlyErrors]; export type PostV1EvaluationsGradeOnlyResponses = { /** * Grade-only evaluation created and orchestration job spawned */ 201: EvaluationDetailResponseDto; }; export type PostV1EvaluationsGradeOnlyResponse = PostV1EvaluationsGradeOnlyResponses[keyof PostV1EvaluationsGradeOnlyResponses]; export type DeleteV1EvaluationsByEvaluationIdData = { body?: never; path: { /** * Stable evaluation identifier (UUID). An evaluation is a multi-problem comparison run. */ evaluationId: string; }; query?: never; url: '/v1/evaluations/{evaluationId}'; }; export type DeleteV1EvaluationsByEvaluationIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Evaluation not found or outside the caller's scope */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1EvaluationsByEvaluationIdError = DeleteV1EvaluationsByEvaluationIdErrors[keyof DeleteV1EvaluationsByEvaluationIdErrors]; export type DeleteV1EvaluationsByEvaluationIdResponses = { /** * Evaluation deleted */ 204: void; }; export type DeleteV1EvaluationsByEvaluationIdResponse = DeleteV1EvaluationsByEvaluationIdResponses[keyof DeleteV1EvaluationsByEvaluationIdResponses]; export type GetV1EvaluationsByEvaluationIdData = { body?: never; path: { /** * Stable evaluation identifier (UUID). An evaluation is a multi-problem comparison run. */ evaluationId: string; }; query?: never; url: '/v1/evaluations/{evaluationId}'; }; export type GetV1EvaluationsByEvaluationIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Evaluation not found or outside the caller's scope */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EvaluationsByEvaluationIdError = GetV1EvaluationsByEvaluationIdErrors[keyof GetV1EvaluationsByEvaluationIdErrors]; export type GetV1EvaluationsByEvaluationIdResponses = { /** * Evaluation with solvers and problems */ 200: EvaluationDetailResponseDto; }; export type GetV1EvaluationsByEvaluationIdResponse = GetV1EvaluationsByEvaluationIdResponses[keyof GetV1EvaluationsByEvaluationIdResponses]; export type PostV1EvaluationsByEvaluationIdCancelData = { body?: never; path: { /** * Stable evaluation identifier (UUID). An evaluation is a multi-problem comparison run. */ evaluationId: string; }; query?: never; url: '/v1/evaluations/{evaluationId}/cancel'; }; export type PostV1EvaluationsByEvaluationIdCancelErrors = { /** * Evaluation is not in a cancellable state */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Evaluation not found or outside the caller's scope */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EvaluationsByEvaluationIdCancelError = PostV1EvaluationsByEvaluationIdCancelErrors[keyof PostV1EvaluationsByEvaluationIdCancelErrors]; export type PostV1EvaluationsByEvaluationIdCancelResponses = { /** * Evaluation cancelled */ 204: void; }; export type PostV1EvaluationsByEvaluationIdCancelResponse = PostV1EvaluationsByEvaluationIdCancelResponses[keyof PostV1EvaluationsByEvaluationIdCancelResponses]; export type GetV1EvaluationsByEvaluationIdExportsData = { body?: never; path: { /** * Stable evaluation identifier (UUID). An evaluation is a multi-problem comparison run. */ evaluationId: string; }; query?: never; url: '/v1/evaluations/{evaluationId}/exports'; }; export type GetV1EvaluationsByEvaluationIdExportsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing the 'exports:read' permission */ 403: TargetApiErrorForbidden; /** * Evaluation not found or outside the caller's scope */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EvaluationsByEvaluationIdExportsError = GetV1EvaluationsByEvaluationIdExportsErrors[keyof GetV1EvaluationsByEvaluationIdExportsErrors]; export type GetV1EvaluationsByEvaluationIdExportsResponses = { /** * List of exports */ 200: EvaluationExportResponseListDto; }; export type GetV1EvaluationsByEvaluationIdExportsResponse = GetV1EvaluationsByEvaluationIdExportsResponses[keyof GetV1EvaluationsByEvaluationIdExportsResponses]; export type PostV1EvaluationsByEvaluationIdExportsData = { body: CreateEvaluationExportBodyDto; path: { /** * Stable evaluation identifier (UUID). An evaluation is a multi-problem comparison run. */ evaluationId: string; }; query?: never; url: '/v1/evaluations/{evaluationId}/exports'; }; export type PostV1EvaluationsByEvaluationIdExportsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * X-User-External-Id header required */ 401: TargetApiErrorUnauthorized; /** * Caller is missing the 'exports:create' permission */ 403: TargetApiErrorForbidden; /** * Evaluation not found or outside the caller's scope */ 404: TargetApiErrorNotFound; /** * The evaluation is not terminal, or an active evaluation export already exists */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EvaluationsByEvaluationIdExportsError = PostV1EvaluationsByEvaluationIdExportsErrors[keyof PostV1EvaluationsByEvaluationIdExportsErrors]; export type PostV1EvaluationsByEvaluationIdExportsResponses = { /** * Export created and enqueued */ 201: EvaluationExportResponseDto; }; export type PostV1EvaluationsByEvaluationIdExportsResponse = PostV1EvaluationsByEvaluationIdExportsResponses[keyof PostV1EvaluationsByEvaluationIdExportsResponses]; export type GetV1EvaluationsByEvaluationIdExportsByExportIdData = { body?: never; path: { /** * Stable evaluation identifier (UUID). An evaluation is a multi-problem comparison run. */ evaluationId: string; /** * Stable export-job identifier (UUID). */ exportId: string; }; query?: never; url: '/v1/evaluations/{evaluationId}/exports/{exportId}'; }; export type GetV1EvaluationsByEvaluationIdExportsByExportIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing the 'exports:read' permission */ 403: TargetApiErrorForbidden; /** * Export not found, or evaluation outside the caller's scope */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EvaluationsByEvaluationIdExportsByExportIdError = GetV1EvaluationsByEvaluationIdExportsByExportIdErrors[keyof GetV1EvaluationsByEvaluationIdExportsByExportIdErrors]; export type GetV1EvaluationsByEvaluationIdExportsByExportIdResponses = { /** * Export found */ 200: EvaluationExportResponseDto; }; export type GetV1EvaluationsByEvaluationIdExportsByExportIdResponse = GetV1EvaluationsByEvaluationIdExportsByExportIdResponses[keyof GetV1EvaluationsByEvaluationIdExportsByExportIdResponses]; export type PostV1EvaluationsByEvaluationIdExportsByExportIdCancelData = { body?: never; path: { /** * Stable evaluation identifier (UUID). An evaluation is a multi-problem comparison run. */ evaluationId: string; /** * Stable export-job identifier (UUID). */ exportId: string; }; query?: never; url: '/v1/evaluations/{evaluationId}/exports/{exportId}/cancel'; }; export type PostV1EvaluationsByEvaluationIdExportsByExportIdCancelErrors = { /** * Export is not in a cancellable state */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing the 'exports:delete' permission */ 403: TargetApiErrorForbidden; /** * Export not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1EvaluationsByEvaluationIdExportsByExportIdCancelError = PostV1EvaluationsByEvaluationIdExportsByExportIdCancelErrors[keyof PostV1EvaluationsByEvaluationIdExportsByExportIdCancelErrors]; export type PostV1EvaluationsByEvaluationIdExportsByExportIdCancelResponses = { /** * Export cancelled */ 204: void; }; export type PostV1EvaluationsByEvaluationIdExportsByExportIdCancelResponse = PostV1EvaluationsByEvaluationIdExportsByExportIdCancelResponses[keyof PostV1EvaluationsByEvaluationIdExportsByExportIdCancelResponses]; export type GetV1EvaluationsByEvaluationIdResultsData = { body?: never; path: { /** * Stable evaluation identifier (UUID). An evaluation is a multi-problem comparison run. */ evaluationId: string; }; query?: never; url: '/v1/evaluations/{evaluationId}/results'; }; export type GetV1EvaluationsByEvaluationIdResultsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Evaluation not found or outside the caller's scope */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1EvaluationsByEvaluationIdResultsError = GetV1EvaluationsByEvaluationIdResultsErrors[keyof GetV1EvaluationsByEvaluationIdResultsErrors]; export type GetV1EvaluationsByEvaluationIdResultsResponses = { /** * Results matrix with per-cell statistics */ 200: EvaluationResultsResponseDto | EvaluationGradeOnlyResultsResponseDto; }; export type GetV1EvaluationsByEvaluationIdResultsResponse = GetV1EvaluationsByEvaluationIdResultsResponses[keyof GetV1EvaluationsByEvaluationIdResultsResponses]; export type GetV1ExportsByExportIdData = { body?: never; path: { /** * Stable export-job identifier (UUID). */ exportId: string; }; query?: never; url: '/v1/exports/{exportId}'; }; export type GetV1ExportsByExportIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Export not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ExportsByExportIdError = GetV1ExportsByExportIdErrors[keyof GetV1ExportsByExportIdErrors]; export type GetV1ExportsByExportIdResponses = { /** * Export found */ 200: ExportResponseDto; }; export type GetV1ExportsByExportIdResponse = GetV1ExportsByExportIdResponses[keyof GetV1ExportsByExportIdResponses]; export type PostV1ExportsByExportIdCancelData = { body?: never; path: { /** * Stable export-job identifier (UUID). */ exportId: string; }; query?: never; url: '/v1/exports/{exportId}/cancel'; }; export type PostV1ExportsByExportIdCancelErrors = { /** * Export is not in a cancellable state */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch */ 403: TargetApiErrorForbidden; /** * Export not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1ExportsByExportIdCancelError = PostV1ExportsByExportIdCancelErrors[keyof PostV1ExportsByExportIdCancelErrors]; export type PostV1ExportsByExportIdCancelResponses = { /** * Export cancelled */ 204: void; }; export type PostV1ExportsByExportIdCancelResponse = PostV1ExportsByExportIdCancelResponses[keyof PostV1ExportsByExportIdCancelResponses]; export type PostV1FilesFinalizeUploadsData = { body: FinalizeUploadRequestDto; path?: never; query?: never; url: '/v1/files/finalize-uploads'; }; export type PostV1FilesFinalizeUploadsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1FilesFinalizeUploadsError = PostV1FilesFinalizeUploadsErrors[keyof PostV1FilesFinalizeUploadsErrors]; export type PostV1FilesFinalizeUploadsResponses = { /** * File records created */ 201: FileListDto; }; export type PostV1FilesFinalizeUploadsResponse = PostV1FilesFinalizeUploadsResponses[keyof PostV1FilesFinalizeUploadsResponses]; export type PostV1FilesSignedUploadUrlsData = { body: SignedUploadUrlRequestDto; path?: never; query?: never; url: '/v1/files/signed-upload-urls'; }; export type PostV1FilesSignedUploadUrlsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1FilesSignedUploadUrlsError = PostV1FilesSignedUploadUrlsErrors[keyof PostV1FilesSignedUploadUrlsErrors]; export type PostV1FilesSignedUploadUrlsResponses = { /** * Signed upload URLs generated */ 201: SignedUploadUrlResponseDto; }; export type PostV1FilesSignedUploadUrlsResponse = PostV1FilesSignedUploadUrlsResponses[keyof PostV1FilesSignedUploadUrlsResponses]; export type GetV1FilesByProblemFileIdDownloadData = { body?: never; path: { /** * Stable file identifier (UUID). Files are problem-scoped uploads. */ problemFileId: string; }; query?: never; url: '/v1/files/{problemFileId}/download'; }; export type GetV1FilesByProblemFileIdDownloadErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * File not found or outside the caller scope */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1FilesByProblemFileIdDownloadError = GetV1FilesByProblemFileIdDownloadErrors[keyof GetV1FilesByProblemFileIdDownloadErrors]; export type GetV1FilesByProblemFileIdDownloadResponses = { /** * File download stream */ 200: Blob | File; }; export type GetV1FilesByProblemFileIdDownloadResponse = GetV1FilesByProblemFileIdDownloadResponses[keyof GetV1FilesByProblemFileIdDownloadResponses]; export type GetV1FormsByFormIdData = { body?: never; path: { /** * Stable form identifier (UUID). Forms are versioned structured-input schemas. */ formId: string; }; query?: never; url: '/v1/forms/{formId}'; }; export type GetV1FormsByFormIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Bundle not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1FormsByFormIdError = GetV1FormsByFormIdErrors[keyof GetV1FormsByFormIdErrors]; export type GetV1FormsByFormIdResponses = { /** * Bundle with versions */ 200: FormWithVersionsResponseDto; }; export type GetV1FormsByFormIdResponse = GetV1FormsByFormIdResponses[keyof GetV1FormsByFormIdResponses]; export type PatchV1FormsByFormIdData = { body: UpdateFormBodyDto; path: { /** * Stable form identifier (UUID). Forms are versioned structured-input schemas. */ formId: string; }; query?: never; url: '/v1/forms/{formId}'; }; export type PatchV1FormsByFormIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Bundle not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PatchV1FormsByFormIdError = PatchV1FormsByFormIdErrors[keyof PatchV1FormsByFormIdErrors]; export type PatchV1FormsByFormIdResponses = { /** * Bundle updated */ 200: FormDto; }; export type PatchV1FormsByFormIdResponse = PatchV1FormsByFormIdResponses[keyof PatchV1FormsByFormIdResponses]; export type PostV1FormsByFormIdVersionsData = { body: CreateFormVersionBodyDto; path: { /** * Stable form identifier (UUID). Forms are versioned structured-input schemas. */ formId: string; }; query?: never; url: '/v1/forms/{formId}/versions'; }; export type PostV1FormsByFormIdVersionsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Bundle not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1FormsByFormIdVersionsError = PostV1FormsByFormIdVersionsErrors[keyof PostV1FormsByFormIdVersionsErrors]; export type PostV1FormsByFormIdVersionsResponses = { /** * Draft created */ 201: FormVersionDto; }; export type PostV1FormsByFormIdVersionsResponse = PostV1FormsByFormIdVersionsResponses[keyof PostV1FormsByFormIdVersionsResponses]; export type DeleteV1FormsByFormIdVersionsByFormVersionIdData = { body?: never; path: { /** * Stable form identifier (UUID). Forms are versioned structured-input schemas. */ formId: string; /** * Stable form-version identifier (UUID). */ formVersionId: string; }; query?: never; url: '/v1/forms/{formId}/versions/{formVersionId}'; }; export type DeleteV1FormsByFormIdVersionsByFormVersionIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * Version is published or is the only remaining version */ 409: DeleteFormVersionConflictResponseDto; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1FormsByFormIdVersionsByFormVersionIdError = DeleteV1FormsByFormIdVersionsByFormVersionIdErrors[keyof DeleteV1FormsByFormIdVersionsByFormVersionIdErrors]; export type DeleteV1FormsByFormIdVersionsByFormVersionIdResponses = { /** * Draft deleted */ 204: void; }; export type DeleteV1FormsByFormIdVersionsByFormVersionIdResponse = DeleteV1FormsByFormIdVersionsByFormVersionIdResponses[keyof DeleteV1FormsByFormIdVersionsByFormVersionIdResponses]; export type PatchV1FormsByFormIdVersionsByFormVersionIdData = { body: UpdateFormVersionBodyDto; path: { /** * Stable form identifier (UUID). Forms are versioned structured-input schemas. */ formId: string; /** * Stable form-version identifier (UUID). */ formVersionId: string; }; query?: never; url: '/v1/forms/{formId}/versions/{formVersionId}'; }; export type PatchV1FormsByFormIdVersionsByFormVersionIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * Version is already published */ 409: FormVersionAlreadyPublishedErrorDto; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PatchV1FormsByFormIdVersionsByFormVersionIdError = PatchV1FormsByFormIdVersionsByFormVersionIdErrors[keyof PatchV1FormsByFormIdVersionsByFormVersionIdErrors]; export type PatchV1FormsByFormIdVersionsByFormVersionIdResponses = { /** * Draft updated */ 200: FormVersionDto; }; export type PatchV1FormsByFormIdVersionsByFormVersionIdResponse = PatchV1FormsByFormIdVersionsByFormVersionIdResponses[keyof PatchV1FormsByFormIdVersionsByFormVersionIdResponses]; export type PostV1FormsByFormIdVersionsByFormVersionIdPublishData = { body?: never; path: { /** * Stable form identifier (UUID). Forms are versioned structured-input schemas. */ formId: string; /** * Stable form-version identifier (UUID). */ formVersionId: string; }; query?: never; url: '/v1/forms/{formId}/versions/{formVersionId}/publish'; }; export type PostV1FormsByFormIdVersionsByFormVersionIdPublishErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1FormsByFormIdVersionsByFormVersionIdPublishError = PostV1FormsByFormIdVersionsByFormVersionIdPublishErrors[keyof PostV1FormsByFormIdVersionsByFormVersionIdPublishErrors]; export type PostV1FormsByFormIdVersionsByFormVersionIdPublishResponses = { /** * Version published */ 200: FormVersionDto; }; export type PostV1FormsByFormIdVersionsByFormVersionIdPublishResponse = PostV1FormsByFormIdVersionsByFormVersionIdPublishResponses[keyof PostV1FormsByFormIdVersionsByFormVersionIdPublishResponses]; export type GetV1ImagesData = { body?: never; path?: never; query?: never; url: '/v1/images'; }; export type GetV1ImagesErrors = { /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ImagesError = GetV1ImagesErrors[keyof GetV1ImagesErrors]; export type GetV1ImagesResponses = { /** * Array of image summaries */ 200: ImagesResponseDto; }; export type GetV1ImagesResponse = GetV1ImagesResponses[keyof GetV1ImagesResponses]; export type GetV1ImagesByImageIdData = { body?: never; path: { /** * Stable identifier for a runtime container image. */ imageId: string; }; query?: never; url: '/v1/images/{imageId}'; }; export type GetV1ImagesByImageIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ImagesByImageIdError = GetV1ImagesByImageIdErrors[keyof GetV1ImagesByImageIdErrors]; export type GetV1ImagesByImageIdResponses = { /** * Image detail with model list extracted from config */ 200: ImageDetailDto; }; export type GetV1ImagesByImageIdResponse = GetV1ImagesByImageIdResponses[keyof GetV1ImagesByImageIdResponses]; export type GetV1ImportsPlatformLimitsData = { body?: never; path?: never; query?: never; url: '/v1/imports/platform-limits'; }; export type GetV1ImportsPlatformLimitsErrors = { /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ImportsPlatformLimitsError = GetV1ImportsPlatformLimitsErrors[keyof GetV1ImportsPlatformLimitsErrors]; export type GetV1ImportsPlatformLimitsResponses = { /** * Platform limits (null when not available) */ 200: ImportPlatformLimitsDto; }; export type GetV1ImportsPlatformLimitsResponse = GetV1ImportsPlatformLimitsResponses[keyof GetV1ImportsPlatformLimitsResponses]; export type GetV1ImportsByImportIdData = { body?: never; path: { /** * Stable import-job identifier (UUID). */ importId: string; }; query?: never; url: '/v1/imports/{importId}'; }; export type GetV1ImportsByImportIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Import not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ImportsByImportIdError = GetV1ImportsByImportIdErrors[keyof GetV1ImportsByImportIdErrors]; export type GetV1ImportsByImportIdResponses = { /** * Import found */ 200: ImportResponseDto; }; export type GetV1ImportsByImportIdResponse = GetV1ImportsByImportIdResponses[keyof GetV1ImportsByImportIdResponses]; export type PostV1ImportsByImportIdCancelData = { body?: never; path: { /** * Stable import-job identifier (UUID). */ importId: string; }; query?: never; url: '/v1/imports/{importId}/cancel'; }; export type PostV1ImportsByImportIdCancelErrors = { /** * Import is not in a cancellable state */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Import not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1ImportsByImportIdCancelError = PostV1ImportsByImportIdCancelErrors[keyof PostV1ImportsByImportIdCancelErrors]; export type PostV1ImportsByImportIdCancelResponses = { /** * Import cancelled */ 204: void; }; export type PostV1ImportsByImportIdCancelResponse = PostV1ImportsByImportIdCancelResponses[keyof PostV1ImportsByImportIdCancelResponses]; export type PostV1ImportsByImportIdConfirmUploadData = { body?: never; path: { /** * Stable import-job identifier (UUID). */ importId: string; }; query?: never; url: '/v1/imports/{importId}/confirm-upload'; }; export type PostV1ImportsByImportIdConfirmUploadErrors = { /** * Import is not in pending state, uploaded file exceeds size limits, or content type does not match the declared format */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Import not found or file not uploaded */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1ImportsByImportIdConfirmUploadError = PostV1ImportsByImportIdConfirmUploadErrors[keyof PostV1ImportsByImportIdConfirmUploadErrors]; export type PostV1ImportsByImportIdConfirmUploadResponses = { /** * Upload confirmed, processing started */ 200: ImportResponseDto; }; export type PostV1ImportsByImportIdConfirmUploadResponse = PostV1ImportsByImportIdConfirmUploadResponses[keyof PostV1ImportsByImportIdConfirmUploadResponses]; export type DeleteV1IssuesByIssueIdData = { body?: never; path: { /** * Stable issue identifier (UUID). Issues are author-flagged notes attached to a problem. */ issueId: string; }; query?: never; url: '/v1/issues/{issueId}'; }; export type DeleteV1IssuesByIssueIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Not authenticated */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Issue not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1IssuesByIssueIdError = DeleteV1IssuesByIssueIdErrors[keyof DeleteV1IssuesByIssueIdErrors]; export type DeleteV1IssuesByIssueIdResponses = { /** * Issue deleted */ 204: void; }; export type DeleteV1IssuesByIssueIdResponse = DeleteV1IssuesByIssueIdResponses[keyof DeleteV1IssuesByIssueIdResponses]; export type GetV1IssuesByIssueIdData = { body?: never; path: { /** * Stable issue identifier (UUID). Issues are author-flagged notes attached to a problem. */ issueId: string; }; query?: never; url: '/v1/issues/{issueId}'; }; export type GetV1IssuesByIssueIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Issue not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1IssuesByIssueIdError = GetV1IssuesByIssueIdErrors[keyof GetV1IssuesByIssueIdErrors]; export type GetV1IssuesByIssueIdResponses = { /** * Issue found */ 200: IssueDto; }; export type GetV1IssuesByIssueIdResponse = GetV1IssuesByIssueIdResponses[keyof GetV1IssuesByIssueIdResponses]; export type PatchV1IssuesByIssueIdData = { body: UpdateIssueBodyDto; path: { /** * Stable issue identifier (UUID). Issues are author-flagged notes attached to a problem. */ issueId: string; }; query?: never; url: '/v1/issues/{issueId}'; }; export type PatchV1IssuesByIssueIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Not authenticated */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Issue not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PatchV1IssuesByIssueIdError = PatchV1IssuesByIssueIdErrors[keyof PatchV1IssuesByIssueIdErrors]; export type PatchV1IssuesByIssueIdResponses = { /** * Issue updated */ 200: IssueDto; }; export type PatchV1IssuesByIssueIdResponse = PatchV1IssuesByIssueIdResponses[keyof PatchV1IssuesByIssueIdResponses]; export type GetV1IssuesByIssueIdCommentsData = { body?: never; path: { /** * Stable issue identifier (UUID). Issues are author-flagged notes attached to a problem. */ issueId: string; }; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; /** * Field to sort by. Allowed values depend on the entity being listed. */ sortBy?: string; /** * Sort direction. Defaults to ascending when omitted. */ sortDirection?: 'asc' | 'desc'; /** * Free-text filter applied to the entity searchable fields. */ search?: string; }; url: '/v1/issues/{issueId}/comments'; }; export type GetV1IssuesByIssueIdCommentsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Issue not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1IssuesByIssueIdCommentsError = GetV1IssuesByIssueIdCommentsErrors[keyof GetV1IssuesByIssueIdCommentsErrors]; export type GetV1IssuesByIssueIdCommentsResponses = { /** * Paginated list of comments */ 200: IssueCommentPageDto; }; export type GetV1IssuesByIssueIdCommentsResponse = GetV1IssuesByIssueIdCommentsResponses[keyof GetV1IssuesByIssueIdCommentsResponses]; export type PostV1IssuesByIssueIdCommentsData = { body: CreateIssueCommentBodyDto; path: { /** * Stable issue identifier (UUID). Issues are author-flagged notes attached to a problem. */ issueId: string; }; query?: never; url: '/v1/issues/{issueId}/comments'; }; export type PostV1IssuesByIssueIdCommentsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Issue not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1IssuesByIssueIdCommentsError = PostV1IssuesByIssueIdCommentsErrors[keyof PostV1IssuesByIssueIdCommentsErrors]; export type PostV1IssuesByIssueIdCommentsResponses = { /** * Comment created */ 201: IssueCommentDto; }; export type PostV1IssuesByIssueIdCommentsResponse = PostV1IssuesByIssueIdCommentsResponses[keyof PostV1IssuesByIssueIdCommentsResponses]; export type DeleteV1IssuesByIssueIdCommentsByIssueCommentIdData = { body?: never; path: { /** * Stable issue identifier (UUID). Issues are author-flagged notes attached to a problem. */ issueId: string; /** * Stable issue-comment identifier (UUID). */ issueCommentId: string; }; query?: never; url: '/v1/issues/{issueId}/comments/{issueCommentId}'; }; export type DeleteV1IssuesByIssueIdCommentsByIssueCommentIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Not authenticated */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Comment not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1IssuesByIssueIdCommentsByIssueCommentIdError = DeleteV1IssuesByIssueIdCommentsByIssueCommentIdErrors[keyof DeleteV1IssuesByIssueIdCommentsByIssueCommentIdErrors]; export type DeleteV1IssuesByIssueIdCommentsByIssueCommentIdResponses = { /** * Comment deleted */ 204: void; }; export type DeleteV1IssuesByIssueIdCommentsByIssueCommentIdResponse = DeleteV1IssuesByIssueIdCommentsByIssueCommentIdResponses[keyof DeleteV1IssuesByIssueIdCommentsByIssueCommentIdResponses]; export type PatchV1IssuesByIssueIdCommentsByIssueCommentIdData = { body: UpdateIssueCommentBodyDto; path: { /** * Stable issue identifier (UUID). Issues are author-flagged notes attached to a problem. */ issueId: string; /** * Stable issue-comment identifier (UUID). */ issueCommentId: string; }; query?: never; url: '/v1/issues/{issueId}/comments/{issueCommentId}'; }; export type PatchV1IssuesByIssueIdCommentsByIssueCommentIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Not authenticated */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Comment not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PatchV1IssuesByIssueIdCommentsByIssueCommentIdError = PatchV1IssuesByIssueIdCommentsByIssueCommentIdErrors[keyof PatchV1IssuesByIssueIdCommentsByIssueCommentIdErrors]; export type PatchV1IssuesByIssueIdCommentsByIssueCommentIdResponses = { /** * Comment updated */ 200: IssueCommentDto; }; export type PatchV1IssuesByIssueIdCommentsByIssueCommentIdResponse = PatchV1IssuesByIssueIdCommentsByIssueCommentIdResponses[keyof PatchV1IssuesByIssueIdCommentsByIssueCommentIdResponses]; export type GetV1JobsByJobIdProblemRunsData = { body?: never; path: { /** * Stable job identifier (UUID). Jobs are background-orchestration containers that may launch many problem runs. */ jobId: string; }; query?: never; url: '/v1/jobs/{jobId}/problem-runs'; }; export type GetV1JobsByJobIdProblemRunsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1JobsByJobIdProblemRunsError = GetV1JobsByJobIdProblemRunsErrors[keyof GetV1JobsByJobIdProblemRunsErrors]; export type GetV1JobsByJobIdProblemRunsResponses = { /** * List of problem runs for the job */ 200: ProblemRunResponseListDto; }; export type GetV1JobsByJobIdProblemRunsResponse = GetV1JobsByJobIdProblemRunsResponses[keyof GetV1JobsByJobIdProblemRunsResponses]; export type GetV1JobsByJobIdRubricScoresData = { body?: never; path: { /** * Stable job identifier (UUID). Jobs are background-orchestration containers that may launch many problem runs. */ jobId: string; }; query?: never; url: '/v1/jobs/{jobId}/rubric-scores'; }; export type GetV1JobsByJobIdRubricScoresErrors = { /** * Job has too many rubric scores for matrix view (> 10 000) */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Job not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1JobsByJobIdRubricScoresError = GetV1JobsByJobIdRubricScoresErrors[keyof GetV1JobsByJobIdRubricScoresErrors]; export type GetV1JobsByJobIdRubricScoresResponses = { /** * Flat list of rubric scores for every run in the job */ 200: RubricScoreWithRubricArrayDto; }; export type GetV1JobsByJobIdRubricScoresResponse = GetV1JobsByJobIdRubricScoresResponses[keyof GetV1JobsByJobIdRubricScoresResponses]; export type GetV1MarketplaceImagesData = { body?: never; path?: never; query?: { /** * Optional case-insensitive substring to filter images by repository name or description. */ search?: string; /** * Maximum number of items to return per page (1-100). */ limit?: number; /** * Zero-based offset into the result set. */ offset?: number; /** * Sort order: by most recent push time, by repository name, or by tag count. */ sort?: 'recent' | 'name' | 'tags'; }; url: '/v1/marketplace/images'; }; export type GetV1MarketplaceImagesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1MarketplaceImagesError = GetV1MarketplaceImagesErrors[keyof GetV1MarketplaceImagesErrors]; export type GetV1MarketplaceImagesResponses = { /** * Paginated list of marketplace images */ 200: MarketplaceListResponseDto; }; export type GetV1MarketplaceImagesResponse = GetV1MarketplaceImagesResponses[keyof GetV1MarketplaceImagesResponses]; export type GetV1MarketplaceImagesByMarketplaceImageIdData = { body?: never; path: { /** * Marketplace image identifier (UUID). */ marketplaceImageId: string; }; query?: never; url: '/v1/marketplace/images/{marketplaceImageId}'; }; export type GetV1MarketplaceImagesByMarketplaceImageIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Image not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1MarketplaceImagesByMarketplaceImageIdError = GetV1MarketplaceImagesByMarketplaceImageIdErrors[keyof GetV1MarketplaceImagesByMarketplaceImageIdErrors]; export type GetV1MarketplaceImagesByMarketplaceImageIdResponses = { /** * Marketplace image detail */ 200: MarketplaceImageDto; }; export type GetV1MarketplaceImagesByMarketplaceImageIdResponse = GetV1MarketplaceImagesByMarketplaceImageIdResponses[keyof GetV1MarketplaceImagesByMarketplaceImageIdResponses]; export type GetV1MeIdentityData = { body?: never; path?: never; query?: never; url: '/v1/me/identity'; }; export type GetV1MeIdentityErrors = { /** * Not authenticated */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1MeIdentityError = GetV1MeIdentityErrors[keyof GetV1MeIdentityErrors]; export type GetV1MeIdentityResponses = { /** * Internal user identity */ 200: MeIdentityResponseDto; }; export type GetV1MeIdentityResponse = GetV1MeIdentityResponses[keyof GetV1MeIdentityResponses]; export type GetV1MePermissionsData = { body?: never; path?: never; query?: never; url: '/v1/me/permissions'; }; export type GetV1MePermissionsErrors = { /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1MePermissionsError = GetV1MePermissionsErrors[keyof GetV1MePermissionsErrors]; export type GetV1MePermissionsResponses = { /** * List of permission entries granted to the caller */ 200: MePermissionsResponseDto; }; export type GetV1MePermissionsResponse = GetV1MePermissionsResponses[keyof GetV1MePermissionsResponses]; export type GetV1ModelsData = { body?: never; path?: never; query?: never; url: '/v1/models'; }; export type GetV1ModelsErrors = { /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ModelsError = GetV1ModelsErrors[keyof GetV1ModelsErrors]; export type GetV1ModelsResponses = { /** * Array of model IDs */ 200: ModelsResponseDto; }; export type GetV1ModelsResponse = GetV1ModelsResponses[keyof GetV1ModelsResponses]; export type PostV1OrganizationsByOrganizationIdCheckFixCyclesData = { body: CreateCheckFixCycleDto; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; }; query?: never; url: '/v1/organizations/{organizationId}/check-fix-cycles'; }; export type PostV1OrganizationsByOrganizationIdCheckFixCyclesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Organization access denied */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1OrganizationsByOrganizationIdCheckFixCyclesError = PostV1OrganizationsByOrganizationIdCheckFixCyclesErrors[keyof PostV1OrganizationsByOrganizationIdCheckFixCyclesErrors]; export type PostV1OrganizationsByOrganizationIdCheckFixCyclesResponses = { /** * check_fix_cycle job created */ 201: CheckFixCycleResponseDto; }; export type PostV1OrganizationsByOrganizationIdCheckFixCyclesResponse = PostV1OrganizationsByOrganizationIdCheckFixCyclesResponses[keyof PostV1OrganizationsByOrganizationIdCheckFixCyclesResponses]; export type GetV1OrganizationsByOrganizationIdCheckFixCyclesByJobV2IdData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; }; query?: never; url: '/v1/organizations/{organizationId}/check-fix-cycles/{jobV2Id}'; }; export type GetV1OrganizationsByOrganizationIdCheckFixCyclesByJobV2IdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdCheckFixCyclesByJobV2IdError = GetV1OrganizationsByOrganizationIdCheckFixCyclesByJobV2IdErrors[keyof GetV1OrganizationsByOrganizationIdCheckFixCyclesByJobV2IdErrors]; export type GetV1OrganizationsByOrganizationIdCheckFixCyclesByJobV2IdResponses = { /** * The job row */ 200: CheckFixCycleResponseDto; }; export type GetV1OrganizationsByOrganizationIdCheckFixCyclesByJobV2IdResponse = GetV1OrganizationsByOrganizationIdCheckFixCyclesByJobV2IdResponses[keyof GetV1OrganizationsByOrganizationIdCheckFixCyclesByJobV2IdResponses]; export type PostV1OrganizationsByOrganizationIdFilesMetadataData = { body: BatchOrganizationFileMetadataRequestDto; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; }; query?: never; url: '/v1/organizations/{organizationId}/files/metadata'; }; export type PostV1OrganizationsByOrganizationIdFilesMetadataErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * One or more files not found in org scope */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1OrganizationsByOrganizationIdFilesMetadataError = PostV1OrganizationsByOrganizationIdFilesMetadataErrors[keyof PostV1OrganizationsByOrganizationIdFilesMetadataErrors]; export type PostV1OrganizationsByOrganizationIdFilesMetadataResponses = { /** * File metadata in request order */ 200: OrganizationFileMetadataListDto; }; export type PostV1OrganizationsByOrganizationIdFilesMetadataResponse = PostV1OrganizationsByOrganizationIdFilesMetadataResponses[keyof PostV1OrganizationsByOrganizationIdFilesMetadataResponses]; export type GetV1OrganizationsByOrganizationIdFormsData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; }; query?: never; url: '/v1/organizations/{organizationId}/forms'; }; export type GetV1OrganizationsByOrganizationIdFormsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Organization scope mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdFormsError = GetV1OrganizationsByOrganizationIdFormsErrors[keyof GetV1OrganizationsByOrganizationIdFormsErrors]; export type GetV1OrganizationsByOrganizationIdFormsResponses = { /** * Org-attached form bundles, ordered by most-recently-attached */ 200: OrganizationFormListResponseDto; }; export type GetV1OrganizationsByOrganizationIdFormsResponse = GetV1OrganizationsByOrganizationIdFormsResponses[keyof GetV1OrganizationsByOrganizationIdFormsResponses]; export type PostV1OrganizationsByOrganizationIdFormsData = { body: CreateAndAttachFormBodyDto; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; }; query?: never; url: '/v1/organizations/{organizationId}/forms'; }; export type PostV1OrganizationsByOrganizationIdFormsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Organization scope mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1OrganizationsByOrganizationIdFormsError = PostV1OrganizationsByOrganizationIdFormsErrors[keyof PostV1OrganizationsByOrganizationIdFormsErrors]; export type PostV1OrganizationsByOrganizationIdFormsResponses = { /** * Bundle created and attached */ 201: FormWithInitialVersionResponseDto; }; export type PostV1OrganizationsByOrganizationIdFormsResponse = PostV1OrganizationsByOrganizationIdFormsResponses[keyof PostV1OrganizationsByOrganizationIdFormsResponses]; export type DeleteV1OrganizationsByOrganizationIdFormsByFormIdData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable form identifier (UUID). Forms are versioned structured-input schemas. */ formId: string; }; query?: never; url: '/v1/organizations/{organizationId}/forms/{formId}'; }; export type DeleteV1OrganizationsByOrganizationIdFormsByFormIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Organization scope mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Bundle not attached to this organization */ 404: TargetApiErrorNotFound; /** * Bundle is still referenced by env or problem scopes in this organization */ 409: FormStillReferencedBodyDto; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1OrganizationsByOrganizationIdFormsByFormIdError = DeleteV1OrganizationsByOrganizationIdFormsByFormIdErrors[keyof DeleteV1OrganizationsByOrganizationIdFormsByFormIdErrors]; export type DeleteV1OrganizationsByOrganizationIdFormsByFormIdResponses = { /** * Bundle detached */ 204: void; }; export type DeleteV1OrganizationsByOrganizationIdFormsByFormIdResponse = DeleteV1OrganizationsByOrganizationIdFormsByFormIdResponses[keyof DeleteV1OrganizationsByOrganizationIdFormsByFormIdResponses]; export type PostV1OrganizationsByOrganizationIdGitRepoClaimsData = { body: CreateGitRepoClaimDto; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; }; query?: never; url: '/v1/organizations/{organizationId}/git-repo-claims'; }; export type PostV1OrganizationsByOrganizationIdGitRepoClaimsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Organization access denied */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; /** * Git host provisioning failed */ 502: ApiErrorStatus502; }; export type PostV1OrganizationsByOrganizationIdGitRepoClaimsError = PostV1OrganizationsByOrganizationIdGitRepoClaimsErrors[keyof PostV1OrganizationsByOrganizationIdGitRepoClaimsErrors]; export type PostV1OrganizationsByOrganizationIdGitRepoClaimsResponses = { /** * Repo claim provisioned */ 201: GitRepoClaimDto; }; export type PostV1OrganizationsByOrganizationIdGitRepoClaimsResponse = PostV1OrganizationsByOrganizationIdGitRepoClaimsResponses[keyof PostV1OrganizationsByOrganizationIdGitRepoClaimsResponses]; export type GetV1OrganizationsByOrganizationIdJobsV2Data = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; }; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; /** * Field to sort by. Allowed values depend on the entity being listed. */ sortBy?: string; /** * Sort direction. Defaults to ascending when omitted. */ sortDirection?: 'asc' | 'desc'; /** * Free-text filter applied to the entity searchable fields. */ search?: string; /** * Filter by the strategy discriminator (e.g. `taiga_send`). */ type?: string; /** * When `true` (default), only root jobs are returned. `false` includes child rows too. */ root?: 'true' | 'false'; }; url: '/v1/organizations/{organizationId}/jobs-v2'; }; export type GetV1OrganizationsByOrganizationIdJobsV2Errors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdJobsV2Error = GetV1OrganizationsByOrganizationIdJobsV2Errors[keyof GetV1OrganizationsByOrganizationIdJobsV2Errors]; export type GetV1OrganizationsByOrganizationIdJobsV2Responses = { /** * Paginated list of jobs */ 200: JobV2ListResponseDto; }; export type GetV1OrganizationsByOrganizationIdJobsV2Response = GetV1OrganizationsByOrganizationIdJobsV2Responses[keyof GetV1OrganizationsByOrganizationIdJobsV2Responses]; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; }; query?: never; url: '/v1/organizations/{organizationId}/jobs-v2/{jobV2Id}'; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Job not found or not linked to this organization */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdError = GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdErrors[keyof GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdErrors]; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdResponses = { /** * The job row */ 200: JobV2ResponseDto; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdResponse = GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdResponses[keyof GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdResponses]; export type PostV1OrganizationsByOrganizationIdJobsV2ByJobV2IdCancelData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; }; query?: never; url: '/v1/organizations/{organizationId}/jobs-v2/{jobV2Id}/cancel'; }; export type PostV1OrganizationsByOrganizationIdJobsV2ByJobV2IdCancelErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1OrganizationsByOrganizationIdJobsV2ByJobV2IdCancelError = PostV1OrganizationsByOrganizationIdJobsV2ByJobV2IdCancelErrors[keyof PostV1OrganizationsByOrganizationIdJobsV2ByJobV2IdCancelErrors]; export type PostV1OrganizationsByOrganizationIdJobsV2ByJobV2IdCancelResponses = { /** * Job cancelled (or was already terminal) */ 204: void; }; export type PostV1OrganizationsByOrganizationIdJobsV2ByJobV2IdCancelResponse = PostV1OrganizationsByOrganizationIdJobsV2ByJobV2IdCancelResponses[keyof PostV1OrganizationsByOrganizationIdJobsV2ByJobV2IdCancelResponses]; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdChildrenData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; }; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; /** * Field to sort by. Allowed values depend on the entity being listed. */ sortBy?: string; /** * Sort direction. Defaults to ascending when omitted. */ sortDirection?: 'asc' | 'desc'; /** * Free-text filter applied to the entity searchable fields. */ search?: string; }; url: '/v1/organizations/{organizationId}/jobs-v2/{jobV2Id}/children'; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdChildrenErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdChildrenError = GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdChildrenErrors[keyof GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdChildrenErrors]; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdChildrenResponses = { /** * Paginated children of the parent job */ 200: JobV2ListResponseDto; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdChildrenResponse = GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdChildrenResponses[keyof GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdChildrenResponses]; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventLogData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; }; query?: { /** * Return only events whose sequence is greater than this value. Omit to read the whole transcript. */ after?: string; /** * When true, wrap the events in an object that also carries the generation token of the run they came from. Omit for the bare event array. */ envelope?: 'true' | 'false'; }; url: '/v1/organizations/{organizationId}/jobs-v2/{jobV2Id}/event-log'; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventLogErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventLogError = GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventLogErrors[keyof GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventLogErrors]; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventLogResponses = { /** * This job's own raw agent-service event replay */ 200: RolloutTraceResponseDto; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventLogResponse = GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventLogResponses[keyof GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventLogResponses]; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventsData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; }; query?: never; url: '/v1/organizations/{organizationId}/jobs-v2/{jobV2Id}/events'; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventsError = GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventsErrors[keyof GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventsErrors]; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventsResponses = { /** * Latest status/blocks/terminal snapshot */ 200: RunEventsSnapshotDto; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventsResponse = GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventsResponses[keyof GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventsResponses]; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdOutputFilesData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; }; query?: never; url: '/v1/organizations/{organizationId}/jobs-v2/{jobV2Id}/output-files'; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdOutputFilesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdOutputFilesError = GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdOutputFilesErrors[keyof GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdOutputFilesErrors]; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdOutputFilesResponses = { /** * Output files with signed download URLs */ 200: RolloutOutputFileListDto; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdOutputFilesResponse = GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdOutputFilesResponses[keyof GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdOutputFilesResponses]; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdEventsData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; /** * Opaque agent-service run id of the rollout to trace. */ rolloutRunId: string; }; query?: { /** * Return only events whose sequence is greater than this value. Omit to read the whole transcript. */ after?: string; /** * When true, wrap the events in an object that also carries the generation token of the run they came from. Omit for the bare event array. */ envelope?: 'true' | 'false'; }; url: '/v1/organizations/{organizationId}/jobs-v2/{jobV2Id}/rollouts/{rolloutRunId}/events'; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdEventsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Rollout not found for this job */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdEventsError = GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdEventsErrors[keyof GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdEventsErrors]; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdEventsResponses = { /** * Trace events for the rollout */ 200: RolloutTraceResponseDto; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdEventsResponse = GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdEventsResponses[keyof GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdEventsResponses]; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdFilesData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; /** * Opaque agent-service run id of the rollout whose files to list. */ rolloutRunId: string; }; query?: never; url: '/v1/organizations/{organizationId}/jobs-v2/{jobV2Id}/rollouts/{rolloutRunId}/files'; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdFilesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Rollout not found for this job */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdFilesError = GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdFilesErrors[keyof GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdFilesErrors]; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdFilesResponses = { /** * Output files with signed download URLs for the rollout */ 200: RolloutOutputFileListDto; }; export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdFilesResponse = GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdFilesResponses[keyof GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdFilesResponses]; export type PostV1OrganizationsByOrganizationIdRolloutBatchesData = { body: CreateRolloutBatchDto; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; }; query?: never; url: '/v1/organizations/{organizationId}/rollout-batches'; }; export type PostV1OrganizationsByOrganizationIdRolloutBatchesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Organization access denied */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1OrganizationsByOrganizationIdRolloutBatchesError = PostV1OrganizationsByOrganizationIdRolloutBatchesErrors[keyof PostV1OrganizationsByOrganizationIdRolloutBatchesErrors]; export type PostV1OrganizationsByOrganizationIdRolloutBatchesResponses = { /** * rollout_batch job created */ 201: RolloutBatchResponseDto; }; export type PostV1OrganizationsByOrganizationIdRolloutBatchesResponse = PostV1OrganizationsByOrganizationIdRolloutBatchesResponses[keyof PostV1OrganizationsByOrganizationIdRolloutBatchesResponses]; export type GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; }; query?: never; url: '/v1/organizations/{organizationId}/rollout-batches/{jobV2Id}'; }; export type GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdError = GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdErrors[keyof GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdErrors]; export type GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdResponses = { /** * The job row */ 200: RolloutBatchResponseDto; }; export type GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdResponse = GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdResponses[keyof GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdResponses]; export type GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdResultsData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; }; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; /** * Field to sort by. Allowed values depend on the entity being listed. */ sortBy?: string; /** * Sort direction. Defaults to ascending when omitted. */ sortDirection?: 'asc' | 'desc'; /** * Free-text filter applied to the entity searchable fields. */ search?: string; }; url: '/v1/organizations/{organizationId}/rollout-batches/{jobV2Id}/results'; }; export type GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdResultsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdResultsError = GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdResultsErrors[keyof GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdResultsErrors]; export type GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdResultsResponses = { /** * Raw per-rollout results, one page of rollouts */ 200: RolloutBatchResultsResponseDto; }; export type GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdResultsResponse = GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdResultsResponses[keyof GetV1OrganizationsByOrganizationIdRolloutBatchesByJobV2IdResultsResponses]; export type PostV1OrganizationsByOrganizationIdRunConfigRunsData = { body: CreateRunConfigRunDto; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; }; query?: never; url: '/v1/organizations/{organizationId}/run-config-runs'; }; export type PostV1OrganizationsByOrganizationIdRunConfigRunsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Organization access denied */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1OrganizationsByOrganizationIdRunConfigRunsError = PostV1OrganizationsByOrganizationIdRunConfigRunsErrors[keyof PostV1OrganizationsByOrganizationIdRunConfigRunsErrors]; export type PostV1OrganizationsByOrganizationIdRunConfigRunsResponses = { /** * run_config_run job created */ 201: RunConfigRunResponseDto; }; export type PostV1OrganizationsByOrganizationIdRunConfigRunsResponse = PostV1OrganizationsByOrganizationIdRunConfigRunsResponses[keyof PostV1OrganizationsByOrganizationIdRunConfigRunsResponses]; export type GetV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; }; query?: never; url: '/v1/organizations/{organizationId}/run-config-runs/{jobV2Id}'; }; export type GetV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdError = GetV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdErrors[keyof GetV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdErrors]; export type GetV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdResponses = { /** * The job row */ 200: RunConfigRunResponseDto; }; export type GetV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdResponse = GetV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdResponses[keyof GetV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdResponses]; export type PostV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdCancelData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; }; query?: never; url: '/v1/organizations/{organizationId}/run-config-runs/{jobV2Id}/cancel'; }; export type PostV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdCancelErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdCancelError = PostV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdCancelErrors[keyof PostV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdCancelErrors]; export type PostV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdCancelResponses = { /** * Cancellation accepted */ 204: void; }; export type PostV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdCancelResponse = PostV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdCancelResponses[keyof PostV1OrganizationsByOrganizationIdRunConfigRunsByJobV2IdCancelResponses]; export type GetV1OrganizationsByOrganizationIdRunConfigsData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; }; query?: { /** * Comma-separated tags. Returns run configs carrying ANY of the supplied tags (OR semantics). */ tags?: string; }; url: '/v1/organizations/{organizationId}/run-configs'; }; export type GetV1OrganizationsByOrganizationIdRunConfigsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdRunConfigsError = GetV1OrganizationsByOrganizationIdRunConfigsErrors[keyof GetV1OrganizationsByOrganizationIdRunConfigsErrors]; export type GetV1OrganizationsByOrganizationIdRunConfigsResponses = { /** * Org-scope run configs */ 200: RunConfigListItemListDto; }; export type GetV1OrganizationsByOrganizationIdRunConfigsResponse = GetV1OrganizationsByOrganizationIdRunConfigsResponses[keyof GetV1OrganizationsByOrganizationIdRunConfigsResponses]; export type GetV1OrganizationsByOrganizationIdRunConfigsReapedData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; }; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; /** * Field to sort by. Allowed values depend on the entity being listed. */ sortBy?: string; /** * Sort direction. Defaults to ascending when omitted. */ sortDirection?: 'asc' | 'desc'; /** * Free-text filter applied to the entity searchable fields. */ search?: string; }; url: '/v1/organizations/{organizationId}/run-configs/reaped'; }; export type GetV1OrganizationsByOrganizationIdRunConfigsReapedErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Organization unreachable for this caller */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdRunConfigsReapedError = GetV1OrganizationsByOrganizationIdRunConfigsReapedErrors[keyof GetV1OrganizationsByOrganizationIdRunConfigsReapedErrors]; export type GetV1OrganizationsByOrganizationIdRunConfigsReapedResponses = { /** * Reaped org-scope run configs */ 200: ReapedRunConfigPageDto; }; export type GetV1OrganizationsByOrganizationIdRunConfigsReapedResponse = GetV1OrganizationsByOrganizationIdRunConfigsReapedResponses[keyof GetV1OrganizationsByOrganizationIdRunConfigsReapedResponses]; export type GetV1OrganizationsByOrganizationIdRunConfigsVisibleData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; }; query?: { /** * Comma-separated tags. Returns run configs carrying ANY of the supplied tags (OR semantics). */ tags?: string; }; url: '/v1/organizations/{organizationId}/run-configs/visible'; }; export type GetV1OrganizationsByOrganizationIdRunConfigsVisibleErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdRunConfigsVisibleError = GetV1OrganizationsByOrganizationIdRunConfigsVisibleErrors[keyof GetV1OrganizationsByOrganizationIdRunConfigsVisibleErrors]; export type GetV1OrganizationsByOrganizationIdRunConfigsVisibleResponses = { /** * Visible run configs */ 200: RunConfigListItemListDto; }; export type GetV1OrganizationsByOrganizationIdRunConfigsVisibleResponse = GetV1OrganizationsByOrganizationIdRunConfigsVisibleResponses[keyof GetV1OrganizationsByOrganizationIdRunConfigsVisibleResponses]; export type GetV1OrganizationsByOrganizationIdSkillsData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; }; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; }; url: '/v1/organizations/{organizationId}/skills'; }; export type GetV1OrganizationsByOrganizationIdSkillsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdSkillsError = GetV1OrganizationsByOrganizationIdSkillsErrors[keyof GetV1OrganizationsByOrganizationIdSkillsErrors]; export type GetV1OrganizationsByOrganizationIdSkillsResponses = { /** * Cursor-paginated active skills (caller org + platform); soft-deleted rows are excluded */ 200: AgentSkillPageDto; }; export type GetV1OrganizationsByOrganizationIdSkillsResponse = GetV1OrganizationsByOrganizationIdSkillsResponses[keyof GetV1OrganizationsByOrganizationIdSkillsResponses]; export type PostV1OrganizationsByOrganizationIdSkillsData = { body: CreateAgentSkillDto; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; }; query?: never; url: '/v1/organizations/{organizationId}/skills'; }; export type PostV1OrganizationsByOrganizationIdSkillsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Slug already taken in this scope */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1OrganizationsByOrganizationIdSkillsError = PostV1OrganizationsByOrganizationIdSkillsErrors[keyof PostV1OrganizationsByOrganizationIdSkillsErrors]; export type PostV1OrganizationsByOrganizationIdSkillsResponses = { /** * Skill created */ 201: AgentSkillDto; }; export type PostV1OrganizationsByOrganizationIdSkillsResponse = PostV1OrganizationsByOrganizationIdSkillsResponses[keyof PostV1OrganizationsByOrganizationIdSkillsResponses]; export type PostV1OrganizationsByOrganizationIdSkillsUploadData = { body: { /** * Skill bundle (.zip or .skill). */ file: Blob | File; }; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; }; query?: never; url: '/v1/organizations/{organizationId}/skills/upload'; }; export type PostV1OrganizationsByOrganizationIdSkillsUploadErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1OrganizationsByOrganizationIdSkillsUploadError = PostV1OrganizationsByOrganizationIdSkillsUploadErrors[keyof PostV1OrganizationsByOrganizationIdSkillsUploadErrors]; export type PostV1OrganizationsByOrganizationIdSkillsUploadResponses = { /** * Skill bundle uploaded */ 201: FileDto; }; export type PostV1OrganizationsByOrganizationIdSkillsUploadResponse = PostV1OrganizationsByOrganizationIdSkillsUploadResponses[keyof PostV1OrganizationsByOrganizationIdSkillsUploadResponses]; export type DeleteV1OrganizationsByOrganizationIdSkillsBySkillIdData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable skill identifier (UUID). Org-uploaded or platform-curated skill bundle mounted into an agent workspace. */ skillId: string; }; query?: never; url: '/v1/organizations/{organizationId}/skills/{skillId}'; }; export type DeleteV1OrganizationsByOrganizationIdSkillsBySkillIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Skill not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1OrganizationsByOrganizationIdSkillsBySkillIdError = DeleteV1OrganizationsByOrganizationIdSkillsBySkillIdErrors[keyof DeleteV1OrganizationsByOrganizationIdSkillsBySkillIdErrors]; export type DeleteV1OrganizationsByOrganizationIdSkillsBySkillIdResponses = { /** * Skill soft-deleted */ 204: void; }; export type DeleteV1OrganizationsByOrganizationIdSkillsBySkillIdResponse = DeleteV1OrganizationsByOrganizationIdSkillsBySkillIdResponses[keyof DeleteV1OrganizationsByOrganizationIdSkillsBySkillIdResponses]; export type GetV1OrganizationsByOrganizationIdSkillsBySkillIdData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable skill identifier (UUID). Org-uploaded or platform-curated skill bundle mounted into an agent workspace. */ skillId: string; }; query?: never; url: '/v1/organizations/{organizationId}/skills/{skillId}'; }; export type GetV1OrganizationsByOrganizationIdSkillsBySkillIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Skill not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdSkillsBySkillIdError = GetV1OrganizationsByOrganizationIdSkillsBySkillIdErrors[keyof GetV1OrganizationsByOrganizationIdSkillsBySkillIdErrors]; export type GetV1OrganizationsByOrganizationIdSkillsBySkillIdResponses = { /** * Skill detail (may be soft-deleted) */ 200: AgentSkillDetailDto; }; export type GetV1OrganizationsByOrganizationIdSkillsBySkillIdResponse = GetV1OrganizationsByOrganizationIdSkillsBySkillIdResponses[keyof GetV1OrganizationsByOrganizationIdSkillsBySkillIdResponses]; export type PatchV1OrganizationsByOrganizationIdSkillsBySkillIdData = { body: UpdateAgentSkillDto; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable skill identifier (UUID). Org-uploaded or platform-curated skill bundle mounted into an agent workspace. */ skillId: string; }; query?: never; url: '/v1/organizations/{organizationId}/skills/{skillId}'; }; export type PatchV1OrganizationsByOrganizationIdSkillsBySkillIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Skill not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PatchV1OrganizationsByOrganizationIdSkillsBySkillIdError = PatchV1OrganizationsByOrganizationIdSkillsBySkillIdErrors[keyof PatchV1OrganizationsByOrganizationIdSkillsBySkillIdErrors]; export type PatchV1OrganizationsByOrganizationIdSkillsBySkillIdResponses = { /** * Skill updated */ 200: AgentSkillDto; }; export type PatchV1OrganizationsByOrganizationIdSkillsBySkillIdResponse = PatchV1OrganizationsByOrganizationIdSkillsBySkillIdResponses[keyof PatchV1OrganizationsByOrganizationIdSkillsBySkillIdResponses]; export type GetV1OrganizationsByOrganizationIdSkillsBySkillIdContentData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable skill identifier (UUID). Org-uploaded or platform-curated skill bundle mounted into an agent workspace. */ skillId: string; }; query?: never; url: '/v1/organizations/{organizationId}/skills/{skillId}/content'; }; export type GetV1OrganizationsByOrganizationIdSkillsBySkillIdContentErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Skill not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdSkillsBySkillIdContentError = GetV1OrganizationsByOrganizationIdSkillsBySkillIdContentErrors[keyof GetV1OrganizationsByOrganizationIdSkillsBySkillIdContentErrors]; export type GetV1OrganizationsByOrganizationIdSkillsBySkillIdContentResponses = { /** * SKILL.md content as plain text */ 200: string; }; export type GetV1OrganizationsByOrganizationIdSkillsBySkillIdContentResponse = GetV1OrganizationsByOrganizationIdSkillsBySkillIdContentResponses[keyof GetV1OrganizationsByOrganizationIdSkillsBySkillIdContentResponses]; export type PostV1OrganizationsByOrganizationIdTuningRunsData = { body: CreateTuningRunDto; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; }; query?: never; url: '/v1/organizations/{organizationId}/tuning-runs'; }; export type PostV1OrganizationsByOrganizationIdTuningRunsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Organization access denied */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1OrganizationsByOrganizationIdTuningRunsError = PostV1OrganizationsByOrganizationIdTuningRunsErrors[keyof PostV1OrganizationsByOrganizationIdTuningRunsErrors]; export type PostV1OrganizationsByOrganizationIdTuningRunsResponses = { /** * tuning_run job created */ 201: TuningRunResponseDto; }; export type PostV1OrganizationsByOrganizationIdTuningRunsResponse = PostV1OrganizationsByOrganizationIdTuningRunsResponses[keyof PostV1OrganizationsByOrganizationIdTuningRunsResponses]; export type GetV1OrganizationsByOrganizationIdTuningRunsTrainingContractData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; }; query?: never; url: '/v1/organizations/{organizationId}/tuning-runs/training-contract'; }; export type GetV1OrganizationsByOrganizationIdTuningRunsTrainingContractErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdTuningRunsTrainingContractError = GetV1OrganizationsByOrganizationIdTuningRunsTrainingContractErrors[keyof GetV1OrganizationsByOrganizationIdTuningRunsTrainingContractErrors]; export type GetV1OrganizationsByOrganizationIdTuningRunsTrainingContractResponses = { /** * Every generated training-contract JSON Schema, keyed by filename */ 200: TrainingContractResponseDto; }; export type GetV1OrganizationsByOrganizationIdTuningRunsTrainingContractResponse = GetV1OrganizationsByOrganizationIdTuningRunsTrainingContractResponses[keyof GetV1OrganizationsByOrganizationIdTuningRunsTrainingContractResponses]; export type GetV1OrganizationsByOrganizationIdTuningRunsByJobV2IdData = { body?: never; path: { /** * Stable organization identifier (UUID). Top-level tenant boundary. */ organizationId: string; /** * Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework. */ jobV2Id: string; }; query?: never; url: '/v1/organizations/{organizationId}/tuning-runs/{jobV2Id}'; }; export type GetV1OrganizationsByOrganizationIdTuningRunsByJobV2IdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1OrganizationsByOrganizationIdTuningRunsByJobV2IdError = GetV1OrganizationsByOrganizationIdTuningRunsByJobV2IdErrors[keyof GetV1OrganizationsByOrganizationIdTuningRunsByJobV2IdErrors]; export type GetV1OrganizationsByOrganizationIdTuningRunsByJobV2IdResponses = { /** * The job row */ 200: TuningRunResponseDto; }; export type GetV1OrganizationsByOrganizationIdTuningRunsByJobV2IdResponse = GetV1OrganizationsByOrganizationIdTuningRunsByJobV2IdResponses[keyof GetV1OrganizationsByOrganizationIdTuningRunsByJobV2IdResponses]; export type PostV1ProblemRunsBulkData = { body: BulkCreateProblemRunsRequestDto; path?: never; query?: never; url: '/v1/problem-runs/bulk'; }; export type PostV1ProblemRunsBulkErrors = { /** * Invalid input or a run-config file mount path clashes with a problem file */ 400: RunConfigFileClashBadRequestDto; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Missing X-User-External-Id header or insufficient permissions */ 403: TargetApiErrorForbidden; /** * Referenced environment or problem versions are not found or outside the caller's scope */ 404: TargetApiErrorNotFound; /** * A running-stage QA gate has not passed for a referenced problem version */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1ProblemRunsBulkError = PostV1ProblemRunsBulkErrors[keyof PostV1ProblemRunsBulkErrors]; export type PostV1ProblemRunsBulkResponses = { /** * Bulk problem-runs submission created */ 201: BulkCreateProblemRunsResponseDto; }; export type PostV1ProblemRunsBulkResponse = PostV1ProblemRunsBulkResponses[keyof PostV1ProblemRunsBulkResponses]; export type PostV1ProblemRunsRegradeFailedGradersData = { body: RegradeFailedGradersRequestDto; path?: never; query?: never; url: '/v1/problem-runs/regrade-failed-graders'; }; export type PostV1ProblemRunsRegradeFailedGradersErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * No matching run found or outside the caller's scope */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1ProblemRunsRegradeFailedGradersError = PostV1ProblemRunsRegradeFailedGradersErrors[keyof PostV1ProblemRunsRegradeFailedGradersErrors]; export type PostV1ProblemRunsRegradeFailedGradersResponses = { /** * Failed-grader re-grades enqueued */ 201: RegradeFailedGradersResponseDto; }; export type PostV1ProblemRunsRegradeFailedGradersResponse = PostV1ProblemRunsRegradeFailedGradersResponses[keyof PostV1ProblemRunsRegradeFailedGradersResponses]; export type GetV1ProblemRunsByProblemRunIdData = { body?: never; path: { /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ problemRunId: string; }; query?: never; url: '/v1/problem-runs/{problemRunId}'; }; export type GetV1ProblemRunsByProblemRunIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem run not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemRunsByProblemRunIdError = GetV1ProblemRunsByProblemRunIdErrors[keyof GetV1ProblemRunsByProblemRunIdErrors]; export type GetV1ProblemRunsByProblemRunIdResponses = { /** * Problem run */ 200: ProblemRunResponseDto; }; export type GetV1ProblemRunsByProblemRunIdResponse = GetV1ProblemRunsByProblemRunIdResponses[keyof GetV1ProblemRunsByProblemRunIdResponses]; export type GetV1ProblemRunsByProblemRunIdFilesData = { body?: never; path: { /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ problemRunId: string; }; query?: never; url: '/v1/problem-runs/{problemRunId}/files'; }; export type GetV1ProblemRunsByProblemRunIdFilesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem run not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemRunsByProblemRunIdFilesError = GetV1ProblemRunsByProblemRunIdFilesErrors[keyof GetV1ProblemRunsByProblemRunIdFilesErrors]; export type GetV1ProblemRunsByProblemRunIdFilesResponses = { /** * Output files with signed download URLs */ 200: ProblemRunFileWithDownloadUrlListDto; }; export type GetV1ProblemRunsByProblemRunIdFilesResponse = GetV1ProblemRunsByProblemRunIdFilesResponses[keyof GetV1ProblemRunsByProblemRunIdFilesResponses]; export type GetV1ProblemRunsByProblemRunIdGradeHistoryData = { body?: never; path: { /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ problemRunId: string; }; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; }; url: '/v1/problem-runs/{problemRunId}/grade-history'; }; export type GetV1ProblemRunsByProblemRunIdGradeHistoryErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem run not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemRunsByProblemRunIdGradeHistoryError = GetV1ProblemRunsByProblemRunIdGradeHistoryErrors[keyof GetV1ProblemRunsByProblemRunIdGradeHistoryErrors]; export type GetV1ProblemRunsByProblemRunIdGradeHistoryResponses = { /** * Re-grade history */ 200: GradeHistoryResponseDto; }; export type GetV1ProblemRunsByProblemRunIdGradeHistoryResponse = GetV1ProblemRunsByProblemRunIdGradeHistoryResponses[keyof GetV1ProblemRunsByProblemRunIdGradeHistoryResponses]; export type GetV1ProblemRunsByProblemRunIdGradingRunsData = { body?: never; path: { /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ problemRunId: string; }; query?: never; url: '/v1/problem-runs/{problemRunId}/grading-runs'; }; export type GetV1ProblemRunsByProblemRunIdGradingRunsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem run not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemRunsByProblemRunIdGradingRunsError = GetV1ProblemRunsByProblemRunIdGradingRunsErrors[keyof GetV1ProblemRunsByProblemRunIdGradingRunsErrors]; export type GetV1ProblemRunsByProblemRunIdGradingRunsResponses = { /** * Returns grading sub-runs for the problem run */ 200: GradingSubRunResponseArrayDto; }; export type GetV1ProblemRunsByProblemRunIdGradingRunsResponse = GetV1ProblemRunsByProblemRunIdGradingRunsResponses[keyof GetV1ProblemRunsByProblemRunIdGradingRunsResponses]; export type GetV1ProblemRunsByProblemRunIdGradingRunsByGradingRunIdTranscriptData = { body?: never; path: { /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ problemRunId: string; /** * Stable grading-run identifier (UUID). One grader execution producing rubric scores for a problem run. */ gradingRunId: string; }; query?: never; url: '/v1/problem-runs/{problemRunId}/grading-runs/{gradingRunId}/transcript'; }; export type GetV1ProblemRunsByProblemRunIdGradingRunsByGradingRunIdTranscriptErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Grading run or transcript not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemRunsByProblemRunIdGradingRunsByGradingRunIdTranscriptError = GetV1ProblemRunsByProblemRunIdGradingRunsByGradingRunIdTranscriptErrors[keyof GetV1ProblemRunsByProblemRunIdGradingRunsByGradingRunIdTranscriptErrors]; export type GetV1ProblemRunsByProblemRunIdGradingRunsByGradingRunIdTranscriptResponses = { /** * Transcript content as plain text */ 200: string; }; export type GetV1ProblemRunsByProblemRunIdGradingRunsByGradingRunIdTranscriptResponse = GetV1ProblemRunsByProblemRunIdGradingRunsByGradingRunIdTranscriptResponses[keyof GetV1ProblemRunsByProblemRunIdGradingRunsByGradingRunIdTranscriptResponses]; export type PostV1ProblemRunsByProblemRunIdRegradeData = { body?: never; path: { /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ problemRunId: string; }; query?: never; url: '/v1/problem-runs/{problemRunId}/regrade'; }; export type PostV1ProblemRunsByProblemRunIdRegradeErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem run not found */ 404: TargetApiErrorNotFound; /** * Run is still in progress or was cancelled */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1ProblemRunsByProblemRunIdRegradeError = PostV1ProblemRunsByProblemRunIdRegradeErrors[keyof PostV1ProblemRunsByProblemRunIdRegradeErrors]; export type PostV1ProblemRunsByProblemRunIdRegradeResponses = { /** * Re-grade enqueued */ 201: RegradeProblemRunResponseDto; }; export type PostV1ProblemRunsByProblemRunIdRegradeResponse = PostV1ProblemRunsByProblemRunIdRegradeResponses[keyof PostV1ProblemRunsByProblemRunIdRegradeResponses]; export type GetV1ProblemRunsByProblemRunIdRubricScoresData = { body?: never; path: { /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ problemRunId: string; }; query?: never; url: '/v1/problem-runs/{problemRunId}/rubric-scores'; }; export type GetV1ProblemRunsByProblemRunIdRubricScoresErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem run not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemRunsByProblemRunIdRubricScoresError = GetV1ProblemRunsByProblemRunIdRubricScoresErrors[keyof GetV1ProblemRunsByProblemRunIdRubricScoresErrors]; export type GetV1ProblemRunsByProblemRunIdRubricScoresResponses = { /** * Returns rubric scores for the problem run */ 200: RubricScoreWithRubricArrayDto; }; export type GetV1ProblemRunsByProblemRunIdRubricScoresResponse = GetV1ProblemRunsByProblemRunIdRubricScoresResponses[keyof GetV1ProblemRunsByProblemRunIdRubricScoresResponses]; export type GetV1ProblemRunsByProblemRunIdRubricScoresByRubricScoreIdTranscriptData = { body?: never; path: { /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ problemRunId: string; /** * Stable rubric-score identifier (UUID). Points at one rubric's score for one problem run. */ rubricScoreId: string; }; query?: never; url: '/v1/problem-runs/{problemRunId}/rubric-scores/{rubricScoreId}/transcript'; }; export type GetV1ProblemRunsByProblemRunIdRubricScoresByRubricScoreIdTranscriptErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Rubric score or transcript not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemRunsByProblemRunIdRubricScoresByRubricScoreIdTranscriptError = GetV1ProblemRunsByProblemRunIdRubricScoresByRubricScoreIdTranscriptErrors[keyof GetV1ProblemRunsByProblemRunIdRubricScoresByRubricScoreIdTranscriptErrors]; export type GetV1ProblemRunsByProblemRunIdRubricScoresByRubricScoreIdTranscriptResponses = { /** * Transcript content as plain text */ 200: string; }; export type GetV1ProblemRunsByProblemRunIdRubricScoresByRubricScoreIdTranscriptResponse = GetV1ProblemRunsByProblemRunIdRubricScoresByRubricScoreIdTranscriptResponses[keyof GetV1ProblemRunsByProblemRunIdRubricScoresByRubricScoreIdTranscriptResponses]; export type GetV1ProblemRunsByProblemRunIdTranscriptData = { body?: never; path: { /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ problemRunId: string; }; query?: never; url: '/v1/problem-runs/{problemRunId}/transcript'; }; export type GetV1ProblemRunsByProblemRunIdTranscriptErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch */ 403: TargetApiErrorForbidden; /** * Transcript not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemRunsByProblemRunIdTranscriptError = GetV1ProblemRunsByProblemRunIdTranscriptErrors[keyof GetV1ProblemRunsByProblemRunIdTranscriptErrors]; export type GetV1ProblemRunsByProblemRunIdTranscriptResponses = { /** * Transcript content as plain text */ 200: string; }; export type GetV1ProblemRunsByProblemRunIdTranscriptResponse = GetV1ProblemRunsByProblemRunIdTranscriptResponses[keyof GetV1ProblemRunsByProblemRunIdTranscriptResponses]; export type GetV1ProblemRunsByProblemRunIdTranscriptLiveData = { body?: never; path: { /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ problemRunId: string; }; query?: { /** * Return only events whose sequence is greater than this value. Omit to read the whole transcript. */ after?: string; /** * When true, wrap the events in an object that also carries the generation token of the run they came from. Omit for the bare event array. */ envelope?: 'true' | 'false'; }; url: '/v1/problem-runs/{problemRunId}/transcript/live'; }; export type GetV1ProblemRunsByProblemRunIdTranscriptLiveErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch */ 403: TargetApiErrorForbidden; /** * Run not active or no external run ID */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemRunsByProblemRunIdTranscriptLiveError = GetV1ProblemRunsByProblemRunIdTranscriptLiveErrors[keyof GetV1ProblemRunsByProblemRunIdTranscriptLiveErrors]; export type GetV1ProblemRunsByProblemRunIdTranscriptLiveResponses = { /** * Live transcript events as a JSON array, or wrapped with the run generation when the envelope flag is set */ 200: AgentRunEventListDto | LiveTranscriptEnvelopeDto; }; export type GetV1ProblemRunsByProblemRunIdTranscriptLiveResponse = GetV1ProblemRunsByProblemRunIdTranscriptLiveResponses[keyof GetV1ProblemRunsByProblemRunIdTranscriptLiveResponses]; export type GetV1ProblemRunsByProblemRunIdUsageData = { body?: never; path: { /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ problemRunId: string; }; query?: never; url: '/v1/problem-runs/{problemRunId}/usage'; }; export type GetV1ProblemRunsByProblemRunIdUsageErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem run not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemRunsByProblemRunIdUsageError = GetV1ProblemRunsByProblemRunIdUsageErrors[keyof GetV1ProblemRunsByProblemRunIdUsageErrors]; export type GetV1ProblemRunsByProblemRunIdUsageResponses = { /** * Cost and resource usage */ 200: ProblemRunUsageResponseDto; }; export type GetV1ProblemRunsByProblemRunIdUsageResponse = GetV1ProblemRunsByProblemRunIdUsageResponses[keyof GetV1ProblemRunsByProblemRunIdUsageResponses]; export type GetV1ProblemRunsByProblemRunIdWorkspaceEntriesData = { body?: never; path: { /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ problemRunId: string; }; query?: { /** * Directory to list, relative to the run's output directory. Empty or omitted for the root. */ path?: string; /** * Maximum number of entries to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; }; url: '/v1/problem-runs/{problemRunId}/workspace-entries'; }; export type GetV1ProblemRunsByProblemRunIdWorkspaceEntriesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem run not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemRunsByProblemRunIdWorkspaceEntriesError = GetV1ProblemRunsByProblemRunIdWorkspaceEntriesErrors[keyof GetV1ProblemRunsByProblemRunIdWorkspaceEntriesErrors]; export type GetV1ProblemRunsByProblemRunIdWorkspaceEntriesResponses = { /** * One page of workspace entries */ 200: ListWorkspaceEntriesResponseDto; }; export type GetV1ProblemRunsByProblemRunIdWorkspaceEntriesResponse = GetV1ProblemRunsByProblemRunIdWorkspaceEntriesResponses[keyof GetV1ProblemRunsByProblemRunIdWorkspaceEntriesResponses]; export type GetV1ProblemRunsByProblemRunIdWorkspaceFileDownloadUrlData = { body?: never; path: { /** * Stable problem-run identifier (UUID). One solver attempt at one problem version. */ problemRunId: string; }; query: { /** * Path of the file to download, relative to the run's output directory. */ path: string; }; url: '/v1/problem-runs/{problemRunId}/workspace-file-download-url'; }; export type GetV1ProblemRunsByProblemRunIdWorkspaceFileDownloadUrlErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem run or workspace file not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemRunsByProblemRunIdWorkspaceFileDownloadUrlError = GetV1ProblemRunsByProblemRunIdWorkspaceFileDownloadUrlErrors[keyof GetV1ProblemRunsByProblemRunIdWorkspaceFileDownloadUrlErrors]; export type GetV1ProblemRunsByProblemRunIdWorkspaceFileDownloadUrlResponses = { /** * Signed download URL */ 200: WorkspaceFileDownloadUrlResponseDto; }; export type GetV1ProblemRunsByProblemRunIdWorkspaceFileDownloadUrlResponse = GetV1ProblemRunsByProblemRunIdWorkspaceFileDownloadUrlResponses[keyof GetV1ProblemRunsByProblemRunIdWorkspaceFileDownloadUrlResponses]; export type GetV1ProblemVersionsByProblemVersionIdFormAnswersData = { body?: never; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; }; query?: never; url: '/v1/problem-versions/{problemVersionId}/form-answers'; }; export type GetV1ProblemVersionsByProblemVersionIdFormAnswersErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Scope mismatch */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemVersionsByProblemVersionIdFormAnswersError = GetV1ProblemVersionsByProblemVersionIdFormAnswersErrors[keyof GetV1ProblemVersionsByProblemVersionIdFormAnswersErrors]; export type GetV1ProblemVersionsByProblemVersionIdFormAnswersResponses = { /** * List of answers */ 200: FormAnswerListResponseDto; }; export type GetV1ProblemVersionsByProblemVersionIdFormAnswersResponse = GetV1ProblemVersionsByProblemVersionIdFormAnswersResponses[keyof GetV1ProblemVersionsByProblemVersionIdFormAnswersResponses]; export type PutV1ProblemVersionsByProblemVersionIdFormAnswersData = { body: UpsertFormAnswerBodyDto; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; }; query?: never; url: '/v1/problem-versions/{problemVersionId}/form-answers'; }; export type PutV1ProblemVersionsByProblemVersionIdFormAnswersErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Scope mismatch */ 403: TargetApiErrorForbidden; /** * Problem version or form version not found */ 404: TargetApiErrorNotFound; /** * Form version is not yet published, or the problem version is locked */ 409: UpsertFormAnswerConflictResponseDto; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PutV1ProblemVersionsByProblemVersionIdFormAnswersError = PutV1ProblemVersionsByProblemVersionIdFormAnswersErrors[keyof PutV1ProblemVersionsByProblemVersionIdFormAnswersErrors]; export type PutV1ProblemVersionsByProblemVersionIdFormAnswersResponses = { /** * Answer upserted */ 200: FormAnswerDto; }; export type PutV1ProblemVersionsByProblemVersionIdFormAnswersResponse = PutV1ProblemVersionsByProblemVersionIdFormAnswersResponses[keyof PutV1ProblemVersionsByProblemVersionIdFormAnswersResponses]; export type DeleteV1ProblemsByProblemIdData = { body?: never; path: { /** * Stable problem identifier (UUID). */ problemId: string; }; query?: never; url: '/v1/problems/{problemId}'; }; export type DeleteV1ProblemsByProblemIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem not found */ 404: TargetApiErrorNotFound; /** * Cannot delete a template problem */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1ProblemsByProblemIdError = DeleteV1ProblemsByProblemIdErrors[keyof DeleteV1ProblemsByProblemIdErrors]; export type DeleteV1ProblemsByProblemIdResponses = { /** * Problem deleted */ 204: void; }; export type DeleteV1ProblemsByProblemIdResponse = DeleteV1ProblemsByProblemIdResponses[keyof DeleteV1ProblemsByProblemIdResponses]; export type GetV1ProblemsByProblemIdData = { body?: never; path: { /** * Stable problem identifier (UUID). */ problemId: string; }; query?: never; url: '/v1/problems/{problemId}'; }; export type GetV1ProblemsByProblemIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemsByProblemIdError = GetV1ProblemsByProblemIdErrors[keyof GetV1ProblemsByProblemIdErrors]; export type GetV1ProblemsByProblemIdResponses = { /** * Problem found */ 200: ProblemDto; }; export type GetV1ProblemsByProblemIdResponse = GetV1ProblemsByProblemIdResponses[keyof GetV1ProblemsByProblemIdResponses]; export type PatchV1ProblemsByProblemIdData = { body: UpdateProblemDto; path: { /** * Stable problem identifier (UUID). */ problemId: string; }; query?: never; url: '/v1/problems/{problemId}'; }; export type PatchV1ProblemsByProblemIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PatchV1ProblemsByProblemIdError = PatchV1ProblemsByProblemIdErrors[keyof PatchV1ProblemsByProblemIdErrors]; export type PatchV1ProblemsByProblemIdResponses = { /** * Problem updated */ 200: ProblemDto; }; export type PatchV1ProblemsByProblemIdResponse = PatchV1ProblemsByProblemIdResponses[keyof PatchV1ProblemsByProblemIdResponses]; export type DeleteV1ProblemsByProblemIdFormsData = { body?: never; path: { /** * Stable problem identifier (UUID). */ problemId: string; }; query?: never; url: '/v1/problems/{problemId}/forms'; }; export type DeleteV1ProblemsByProblemIdFormsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Missing permission */ 403: TargetApiErrorForbidden; /** * Problem not found or out of scope, or no attached override */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1ProblemsByProblemIdFormsError = DeleteV1ProblemsByProblemIdFormsErrors[keyof DeleteV1ProblemsByProblemIdFormsErrors]; export type DeleteV1ProblemsByProblemIdFormsResponses = { /** * Override detached */ 204: void; }; export type DeleteV1ProblemsByProblemIdFormsResponse = DeleteV1ProblemsByProblemIdFormsResponses[keyof DeleteV1ProblemsByProblemIdFormsResponses]; export type GetV1ProblemsByProblemIdFormsData = { body?: never; path: { /** * Stable problem identifier (UUID). */ problemId: string; }; query?: never; url: '/v1/problems/{problemId}/forms'; }; export type GetV1ProblemsByProblemIdFormsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Problem not found or out of scope */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemsByProblemIdFormsError = GetV1ProblemsByProblemIdFormsErrors[keyof GetV1ProblemsByProblemIdFormsErrors]; export type GetV1ProblemsByProblemIdFormsResponses = { /** * Resolved bundle, or null */ 200: ResolvedFormResponseDto; }; export type GetV1ProblemsByProblemIdFormsResponse = GetV1ProblemsByProblemIdFormsResponses[keyof GetV1ProblemsByProblemIdFormsResponses]; export type PostV1ProblemsByProblemIdFormsData = { body: CreateAndAttachFormBodyDto; path: { /** * Stable problem identifier (UUID). */ problemId: string; }; query?: never; url: '/v1/problems/{problemId}/forms'; }; export type PostV1ProblemsByProblemIdFormsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Missing permission */ 403: TargetApiErrorForbidden; /** * Problem not found or out of scope */ 404: TargetApiErrorNotFound; /** * Problem already has an attached form bundle override */ 409: ProblemFormAlreadyAttachedErrorDto; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1ProblemsByProblemIdFormsError = PostV1ProblemsByProblemIdFormsErrors[keyof PostV1ProblemsByProblemIdFormsErrors]; export type PostV1ProblemsByProblemIdFormsResponses = { /** * Bundle created and attached as problem override */ 201: FormWithInitialVersionResponseDto; }; export type PostV1ProblemsByProblemIdFormsResponse = PostV1ProblemsByProblemIdFormsResponses[keyof PostV1ProblemsByProblemIdFormsResponses]; export type GetV1ProblemsByProblemIdFormsOverrideData = { body?: never; path: { /** * Stable problem identifier (UUID). */ problemId: string; }; query?: never; url: '/v1/problems/{problemId}/forms/override'; }; export type GetV1ProblemsByProblemIdFormsOverrideErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Problem not found or out of scope */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemsByProblemIdFormsOverrideError = GetV1ProblemsByProblemIdFormsOverrideErrors[keyof GetV1ProblemsByProblemIdFormsOverrideErrors]; export type GetV1ProblemsByProblemIdFormsOverrideResponses = { /** * The attached override bundle, or null if none */ 200: ProblemOverrideFormResponseDto; }; export type GetV1ProblemsByProblemIdFormsOverrideResponse = GetV1ProblemsByProblemIdFormsOverrideResponses[keyof GetV1ProblemsByProblemIdFormsOverrideResponses]; export type PostV1ProblemsByProblemIdFormsByFormIdData = { body?: never; path: { /** * Stable problem identifier (UUID). */ problemId: string; /** * Stable form identifier (UUID). Forms are versioned structured-input schemas. */ formId: string; }; query?: never; url: '/v1/problems/{problemId}/forms/{formId}'; }; export type PostV1ProblemsByProblemIdFormsByFormIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Problem scope mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Bundle not found */ 404: TargetApiErrorNotFound; /** * Problem already has an attached form bundle */ 409: ProblemFormAlreadyAttachedErrorDto; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1ProblemsByProblemIdFormsByFormIdError = PostV1ProblemsByProblemIdFormsByFormIdErrors[keyof PostV1ProblemsByProblemIdFormsByFormIdErrors]; export type PostV1ProblemsByProblemIdFormsByFormIdResponses = { /** * Bundle attached */ 201: AttachExistingFormResponseDto; }; export type PostV1ProblemsByProblemIdFormsByFormIdResponse = PostV1ProblemsByProblemIdFormsByFormIdResponses[keyof PostV1ProblemsByProblemIdFormsByFormIdResponses]; export type GetV1ProblemsByProblemIdHasCompletedRunData = { body?: never; path: { /** * Stable problem identifier (UUID). */ problemId: string; }; query?: never; url: '/v1/problems/{problemId}/has-completed-run'; }; export type GetV1ProblemsByProblemIdHasCompletedRunErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemsByProblemIdHasCompletedRunError = GetV1ProblemsByProblemIdHasCompletedRunErrors[keyof GetV1ProblemsByProblemIdHasCompletedRunErrors]; export type GetV1ProblemsByProblemIdHasCompletedRunResponses = { /** * { hasCompletedRun: boolean } */ 200: HasCompletedRunResponseDto; }; export type GetV1ProblemsByProblemIdHasCompletedRunResponse = GetV1ProblemsByProblemIdHasCompletedRunResponses[keyof GetV1ProblemsByProblemIdHasCompletedRunResponses]; export type GetV1ProblemsByProblemIdIssuesData = { body?: never; path: { /** * Stable problem identifier (UUID). */ problemId: string; }; query?: never; url: '/v1/problems/{problemId}/issues'; }; export type GetV1ProblemsByProblemIdIssuesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemsByProblemIdIssuesError = GetV1ProblemsByProblemIdIssuesErrors[keyof GetV1ProblemsByProblemIdIssuesErrors]; export type GetV1ProblemsByProblemIdIssuesResponses = { /** * List of issues */ 200: IssueListDto; }; export type GetV1ProblemsByProblemIdIssuesResponse = GetV1ProblemsByProblemIdIssuesResponses[keyof GetV1ProblemsByProblemIdIssuesResponses]; export type PostV1ProblemsByProblemIdIssuesData = { body: CreateIssueBodyDto; path: { /** * Stable problem identifier (UUID). */ problemId: string; }; query?: never; url: '/v1/problems/{problemId}/issues'; }; export type PostV1ProblemsByProblemIdIssuesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1ProblemsByProblemIdIssuesError = PostV1ProblemsByProblemIdIssuesErrors[keyof PostV1ProblemsByProblemIdIssuesErrors]; export type PostV1ProblemsByProblemIdIssuesResponses = { /** * Issue created */ 201: IssueDto; }; export type PostV1ProblemsByProblemIdIssuesResponse = PostV1ProblemsByProblemIdIssuesResponses[keyof PostV1ProblemsByProblemIdIssuesResponses]; export type GetV1ProblemsByProblemIdProblemRunsData = { body?: never; path: { /** * Stable problem identifier (UUID). */ problemId: string; }; query?: never; url: '/v1/problems/{problemId}/problem-runs'; }; export type GetV1ProblemsByProblemIdProblemRunsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemsByProblemIdProblemRunsError = GetV1ProblemsByProblemIdProblemRunsErrors[keyof GetV1ProblemsByProblemIdProblemRunsErrors]; export type GetV1ProblemsByProblemIdProblemRunsResponses = { /** * List of problem runs for the problem */ 200: ProblemRunResponseListEnvelopeDto; }; export type GetV1ProblemsByProblemIdProblemRunsResponse = GetV1ProblemsByProblemIdProblemRunsResponses[keyof GetV1ProblemsByProblemIdProblemRunsResponses]; export type PostV1ProblemsByProblemIdResetData = { body?: never; path: { /** * Stable problem identifier (UUID). */ problemId: string; }; query?: never; url: '/v1/problems/{problemId}/reset'; }; export type PostV1ProblemsByProblemIdResetErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Organization scope mismatch, or missing versions:delete + problems:delete permissions */ 403: TargetApiErrorForbidden; /** * Problem not found, or scoped caller addressed a problem outside their environment scope */ 404: TargetApiErrorNotFound; /** * Cannot reset a template problem */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1ProblemsByProblemIdResetError = PostV1ProblemsByProblemIdResetErrors[keyof PostV1ProblemsByProblemIdResetErrors]; export type PostV1ProblemsByProblemIdResetResponses = { /** * Reset complete: returns kept version IDs and deleted count */ 200: ResetProblemResponseDto; }; export type PostV1ProblemsByProblemIdResetResponse = PostV1ProblemsByProblemIdResetResponses[keyof PostV1ProblemsByProblemIdResetResponses]; export type GetV1ProblemsByProblemIdRunConfigsData = { body?: never; path: { /** * Stable problem identifier (UUID). */ problemId: string; }; query?: { /** * Comma-separated tags. Returns run configs carrying ANY of the supplied tags (OR semantics). */ tags?: string; }; url: '/v1/problems/{problemId}/run-configs'; }; export type GetV1ProblemsByProblemIdRunConfigsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemsByProblemIdRunConfigsError = GetV1ProblemsByProblemIdRunConfigsErrors[keyof GetV1ProblemsByProblemIdRunConfigsErrors]; export type GetV1ProblemsByProblemIdRunConfigsResponses = { /** * Problem-scope run configs */ 200: RunConfigListItemListDto; }; export type GetV1ProblemsByProblemIdRunConfigsResponse = GetV1ProblemsByProblemIdRunConfigsResponses[keyof GetV1ProblemsByProblemIdRunConfigsResponses]; export type GetV1ProblemsByProblemIdRunConfigsReapedData = { body?: never; path: { /** * Stable problem identifier (UUID). */ problemId: string; }; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; /** * Field to sort by. Allowed values depend on the entity being listed. */ sortBy?: string; /** * Sort direction. Defaults to ascending when omitted. */ sortDirection?: 'asc' | 'desc'; /** * Free-text filter applied to the entity searchable fields. */ search?: string; }; url: '/v1/problems/{problemId}/run-configs/reaped'; }; export type GetV1ProblemsByProblemIdRunConfigsReapedErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Problem unreachable for this caller */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemsByProblemIdRunConfigsReapedError = GetV1ProblemsByProblemIdRunConfigsReapedErrors[keyof GetV1ProblemsByProblemIdRunConfigsReapedErrors]; export type GetV1ProblemsByProblemIdRunConfigsReapedResponses = { /** * Reaped problem-scope run configs */ 200: ReapedRunConfigPageDto; }; export type GetV1ProblemsByProblemIdRunConfigsReapedResponse = GetV1ProblemsByProblemIdRunConfigsReapedResponses[keyof GetV1ProblemsByProblemIdRunConfigsReapedResponses]; export type GetV1ProblemsByProblemIdRunConfigsVisibleData = { body?: never; path: { /** * Stable problem identifier (UUID). */ problemId: string; }; query?: { /** * Comma-separated tags. Returns run configs carrying ANY of the supplied tags (OR semantics). */ tags?: string; }; url: '/v1/problems/{problemId}/run-configs/visible'; }; export type GetV1ProblemsByProblemIdRunConfigsVisibleErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemsByProblemIdRunConfigsVisibleError = GetV1ProblemsByProblemIdRunConfigsVisibleErrors[keyof GetV1ProblemsByProblemIdRunConfigsVisibleErrors]; export type GetV1ProblemsByProblemIdRunConfigsVisibleResponses = { /** * Visible run configs */ 200: RunConfigListItemListDto; }; export type GetV1ProblemsByProblemIdRunConfigsVisibleResponse = GetV1ProblemsByProblemIdRunConfigsVisibleResponses[keyof GetV1ProblemsByProblemIdRunConfigsVisibleResponses]; export type GetV1ProblemsByProblemIdVersionsData = { body?: never; path: { /** * Stable problem identifier (UUID). */ problemId: string; }; query?: never; url: '/v1/problems/{problemId}/versions'; }; export type GetV1ProblemsByProblemIdVersionsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1ProblemsByProblemIdVersionsError = GetV1ProblemsByProblemIdVersionsErrors[keyof GetV1ProblemsByProblemIdVersionsErrors]; export type GetV1ProblemsByProblemIdVersionsResponses = { /** * List of problem versions */ 200: ProblemVersionListDto; }; export type GetV1ProblemsByProblemIdVersionsResponse = GetV1ProblemsByProblemIdVersionsResponses[keyof GetV1ProblemsByProblemIdVersionsResponses]; export type PostV1ProblemsByProblemIdVersionsData = { body: CreateProblemVersionDto; path: { /** * Stable problem identifier (UUID). */ problemId: string; }; query?: never; url: '/v1/problems/{problemId}/versions'; }; export type PostV1ProblemsByProblemIdVersionsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Problem not found, or source version not found on this problem */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1ProblemsByProblemIdVersionsError = PostV1ProblemsByProblemIdVersionsErrors[keyof PostV1ProblemsByProblemIdVersionsErrors]; export type PostV1ProblemsByProblemIdVersionsResponses = { /** * Version created */ 201: ProblemVersionDto; }; export type PostV1ProblemsByProblemIdVersionsResponse = PostV1ProblemsByProblemIdVersionsResponses[keyof PostV1ProblemsByProblemIdVersionsResponses]; export type DeleteV1QaConfigsByQaConfigIdData = { body?: never; path: { /** * Stable QA-config identifier (UUID). */ qaConfigId: string; }; query?: never; url: '/v1/qa-configs/{qaConfigId}'; }; export type DeleteV1QaConfigsByQaConfigIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Config not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1QaConfigsByQaConfigIdError = DeleteV1QaConfigsByQaConfigIdErrors[keyof DeleteV1QaConfigsByQaConfigIdErrors]; export type DeleteV1QaConfigsByQaConfigIdResponses = { /** * Config deleted */ 204: void; }; export type DeleteV1QaConfigsByQaConfigIdResponse = DeleteV1QaConfigsByQaConfigIdResponses[keyof DeleteV1QaConfigsByQaConfigIdResponses]; export type GetV1QaConfigsByQaConfigIdData = { body?: never; path: { /** * Stable QA-config identifier (UUID). */ qaConfigId: string; }; query?: never; url: '/v1/qa-configs/{qaConfigId}'; }; export type GetV1QaConfigsByQaConfigIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Config not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1QaConfigsByQaConfigIdError = GetV1QaConfigsByQaConfigIdErrors[keyof GetV1QaConfigsByQaConfigIdErrors]; export type GetV1QaConfigsByQaConfigIdResponses = { /** * Config found */ 200: QaConfigResponseDto; }; export type GetV1QaConfigsByQaConfigIdResponse = GetV1QaConfigsByQaConfigIdResponses[keyof GetV1QaConfigsByQaConfigIdResponses]; export type PatchV1QaConfigsByQaConfigIdData = { body: UpdateQaConfigBodyDto; path: { /** * Stable QA-config identifier (UUID). */ qaConfigId: string; }; query?: never; url: '/v1/qa-configs/{qaConfigId}'; }; export type PatchV1QaConfigsByQaConfigIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Config not found */ 404: TargetApiErrorNotFound; /** * A QA config with this name already exists in this environment */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PatchV1QaConfigsByQaConfigIdError = PatchV1QaConfigsByQaConfigIdErrors[keyof PatchV1QaConfigsByQaConfigIdErrors]; export type PatchV1QaConfigsByQaConfigIdResponses = { /** * Config updated */ 200: QaConfigResponseDto; }; export type PatchV1QaConfigsByQaConfigIdResponse = PatchV1QaConfigsByQaConfigIdResponses[keyof PatchV1QaConfigsByQaConfigIdResponses]; export type PostV1QaConfigsByQaConfigIdFilesData = { body: AttachQaConfigFileBodyDto; path: { /** * Stable QA-config identifier (UUID). */ qaConfigId: string; }; query?: never; url: '/v1/qa-configs/{qaConfigId}/files'; }; export type PostV1QaConfigsByQaConfigIdFilesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Config or file not found */ 404: TargetApiErrorNotFound; /** * Mount path already exists on this QA config */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1QaConfigsByQaConfigIdFilesError = PostV1QaConfigsByQaConfigIdFilesErrors[keyof PostV1QaConfigsByQaConfigIdFilesErrors]; export type PostV1QaConfigsByQaConfigIdFilesResponses = { /** * File attached */ 201: QaConfigFileResponseDto; }; export type PostV1QaConfigsByQaConfigIdFilesResponse = PostV1QaConfigsByQaConfigIdFilesResponses[keyof PostV1QaConfigsByQaConfigIdFilesResponses]; export type DeleteV1QaConfigsByQaConfigIdFilesByQaConfigFileIdData = { body?: never; path: { /** * Stable QA-config identifier (UUID). */ qaConfigId: string; /** * QA-config file attachment identifier (UUID). */ qaConfigFileId: string; }; query?: never; url: '/v1/qa-configs/{qaConfigId}/files/{qaConfigFileId}'; }; export type DeleteV1QaConfigsByQaConfigIdFilesByQaConfigFileIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Config or file not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1QaConfigsByQaConfigIdFilesByQaConfigFileIdError = DeleteV1QaConfigsByQaConfigIdFilesByQaConfigFileIdErrors[keyof DeleteV1QaConfigsByQaConfigIdFilesByQaConfigFileIdErrors]; export type DeleteV1QaConfigsByQaConfigIdFilesByQaConfigFileIdResponses = { /** * File detached */ 204: void; }; export type DeleteV1QaConfigsByQaConfigIdFilesByQaConfigFileIdResponse = DeleteV1QaConfigsByQaConfigIdFilesByQaConfigFileIdResponses[keyof DeleteV1QaConfigsByQaConfigIdFilesByQaConfigFileIdResponses]; export type GetV1RunConfigProbeRunsByRunConfigProbeRunIdData = { body?: never; path: { /** * Stable probe-run identifier (UUID). Probe runs validate a run-config version before locking. */ runConfigProbeRunId: string; }; query?: never; url: '/v1/run-config-probe-runs/{runConfigProbeRunId}'; }; export type GetV1RunConfigProbeRunsByRunConfigProbeRunIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Probe-run not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1RunConfigProbeRunsByRunConfigProbeRunIdError = GetV1RunConfigProbeRunsByRunConfigProbeRunIdErrors[keyof GetV1RunConfigProbeRunsByRunConfigProbeRunIdErrors]; export type GetV1RunConfigProbeRunsByRunConfigProbeRunIdResponses = { /** * Probe-run */ 200: RunConfigProbeRunDto; }; export type GetV1RunConfigProbeRunsByRunConfigProbeRunIdResponse = GetV1RunConfigProbeRunsByRunConfigProbeRunIdResponses[keyof GetV1RunConfigProbeRunsByRunConfigProbeRunIdResponses]; export type PostV1RunConfigProbeRunsByRunConfigProbeRunIdCancelData = { body?: never; path: { /** * Stable probe-run identifier (UUID). Probe runs validate a run-config version before locking. */ runConfigProbeRunId: string; }; query?: never; url: '/v1/run-config-probe-runs/{runConfigProbeRunId}/cancel'; }; export type PostV1RunConfigProbeRunsByRunConfigProbeRunIdCancelErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Probe-run not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1RunConfigProbeRunsByRunConfigProbeRunIdCancelError = PostV1RunConfigProbeRunsByRunConfigProbeRunIdCancelErrors[keyof PostV1RunConfigProbeRunsByRunConfigProbeRunIdCancelErrors]; export type PostV1RunConfigProbeRunsByRunConfigProbeRunIdCancelResponses = { /** * Probe-run cancelled (or already terminal) */ 204: void; }; export type PostV1RunConfigProbeRunsByRunConfigProbeRunIdCancelResponse = PostV1RunConfigProbeRunsByRunConfigProbeRunIdCancelResponses[keyof PostV1RunConfigProbeRunsByRunConfigProbeRunIdCancelResponses]; export type GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveData = { body?: never; path: { /** * Stable probe-run identifier (UUID). Probe runs validate a run-config version before locking. */ runConfigProbeRunId: string; }; query?: { /** * Return only events whose sequence is greater than this value. Omit to read the whole transcript. */ after?: string; /** * When true, wrap the events in an object that also carries the generation token of the run they came from. Omit for the bare event array. */ envelope?: 'true' | 'false'; }; url: '/v1/run-config-probe-runs/{runConfigProbeRunId}/transcript/live'; }; export type GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Probe-run not found or not in flight */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveError = GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveErrors[keyof GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveErrors]; export type GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveResponses = { /** * Live transcript events, or wrapped with the run generation when the envelope flag is set */ 200: AgentRunEventListDto | LiveTranscriptEnvelopeDto; }; export type GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveResponse = GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveResponses[keyof GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveResponses]; export type DeleteV1RunConfigVersionsByRunConfigVersionIdData = { body?: never; path: { /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ runConfigVersionId: string; }; query?: never; url: '/v1/run-config-versions/{runConfigVersionId}'; }; export type DeleteV1RunConfigVersionsByRunConfigVersionIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * Version is locked */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1RunConfigVersionsByRunConfigVersionIdError = DeleteV1RunConfigVersionsByRunConfigVersionIdErrors[keyof DeleteV1RunConfigVersionsByRunConfigVersionIdErrors]; export type DeleteV1RunConfigVersionsByRunConfigVersionIdResponses = { /** * Draft discarded */ 204: void; }; export type DeleteV1RunConfigVersionsByRunConfigVersionIdResponse = DeleteV1RunConfigVersionsByRunConfigVersionIdResponses[keyof DeleteV1RunConfigVersionsByRunConfigVersionIdResponses]; export type GetV1RunConfigVersionsByRunConfigVersionIdData = { body?: never; path: { /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ runConfigVersionId: string; }; query?: never; url: '/v1/run-config-versions/{runConfigVersionId}'; }; export type GetV1RunConfigVersionsByRunConfigVersionIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1RunConfigVersionsByRunConfigVersionIdError = GetV1RunConfigVersionsByRunConfigVersionIdErrors[keyof GetV1RunConfigVersionsByRunConfigVersionIdErrors]; export type GetV1RunConfigVersionsByRunConfigVersionIdResponses = { /** * Run config version */ 200: RunConfigVersionDto; }; export type GetV1RunConfigVersionsByRunConfigVersionIdResponse = GetV1RunConfigVersionsByRunConfigVersionIdResponses[keyof GetV1RunConfigVersionsByRunConfigVersionIdResponses]; export type PatchV1RunConfigVersionsByRunConfigVersionIdData = { body: UpdateRunConfigVersionDto; path: { /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ runConfigVersionId: string; }; query?: never; url: '/v1/run-config-versions/{runConfigVersionId}'; }; export type PatchV1RunConfigVersionsByRunConfigVersionIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * Version is locked and cannot be modified */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PatchV1RunConfigVersionsByRunConfigVersionIdError = PatchV1RunConfigVersionsByRunConfigVersionIdErrors[keyof PatchV1RunConfigVersionsByRunConfigVersionIdErrors]; export type PatchV1RunConfigVersionsByRunConfigVersionIdResponses = { /** * Draft updated; verified_at cleared */ 200: RunConfigVersionDto; }; export type PatchV1RunConfigVersionsByRunConfigVersionIdResponse = PatchV1RunConfigVersionsByRunConfigVersionIdResponses[keyof PatchV1RunConfigVersionsByRunConfigVersionIdResponses]; export type GetV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsData = { body?: never; path: { /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ runConfigVersionId: string; }; query?: never; url: '/v1/run-config-versions/{runConfigVersionId}/customer-secrets'; }; export type GetV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Version not found or not in scope */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsError = GetV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsErrors[keyof GetV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsErrors]; export type GetV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsResponses = { /** * Run-config-version attachments */ 200: RunConfigCustomerSecretAttachmentListDto; }; export type GetV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsResponse = GetV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsResponses[keyof GetV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsResponses]; export type DeleteV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdData = { body?: never; path: { /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ runConfigVersionId: string; /** * Stable customer-secret identifier (UUID). */ customerSecretId: string; }; query?: never; url: '/v1/run-config-versions/{runConfigVersionId}/customer-secrets/{customerSecretId}'; }; export type DeleteV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Attachment, version, or customer secret not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdError = DeleteV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdErrors[keyof DeleteV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdErrors]; export type DeleteV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdResponses = { /** * Attachment removed */ 204: void; }; export type DeleteV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdResponse = DeleteV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdResponses[keyof DeleteV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdResponses]; export type PostV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdData = { body: AttachCustomerSecretDto; path: { /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ runConfigVersionId: string; /** * Stable customer-secret identifier (UUID). */ customerSecretId: string; }; query?: never; url: '/v1/run-config-versions/{runConfigVersionId}/customer-secrets/{customerSecretId}'; }; export type PostV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdErrors = { /** * Customer secret scope incompatible with run-config scope, or injection mode incompatible with the secret */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Version or customer secret not found, or version is locked */ 404: TargetApiErrorNotFound; /** * The requested environment-variable name clashes with another attachment, or a different attached secret has the same name */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdError = PostV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdErrors[keyof PostV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdErrors]; export type PostV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdResponses = { /** * Attachment created */ 201: RunConfigCustomerSecretAttachmentDto; }; export type PostV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdResponse = PostV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdResponses[keyof PostV1RunConfigVersionsByRunConfigVersionIdCustomerSecretsByCustomerSecretIdResponses]; export type DeleteV1RunConfigVersionsByRunConfigVersionIdDefaultData = { body?: never; path: { /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ runConfigVersionId: string; }; query?: never; url: '/v1/run-config-versions/{runConfigVersionId}/default'; }; export type DeleteV1RunConfigVersionsByRunConfigVersionIdDefaultErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * This version is not the current default at its scope */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1RunConfigVersionsByRunConfigVersionIdDefaultError = DeleteV1RunConfigVersionsByRunConfigVersionIdDefaultErrors[keyof DeleteV1RunConfigVersionsByRunConfigVersionIdDefaultErrors]; export type DeleteV1RunConfigVersionsByRunConfigVersionIdDefaultResponses = { /** * Default cleared */ 204: void; }; export type DeleteV1RunConfigVersionsByRunConfigVersionIdDefaultResponse = DeleteV1RunConfigVersionsByRunConfigVersionIdDefaultResponses[keyof DeleteV1RunConfigVersionsByRunConfigVersionIdDefaultResponses]; export type PutV1RunConfigVersionsByRunConfigVersionIdDefaultData = { body?: never; path: { /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ runConfigVersionId: string; }; query?: never; url: '/v1/run-config-versions/{runConfigVersionId}/default'; }; export type PutV1RunConfigVersionsByRunConfigVersionIdDefaultErrors = { /** * Version is a draft, or identity type is not agent-harness */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * A different default already exists at this scope; clear it first */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PutV1RunConfigVersionsByRunConfigVersionIdDefaultError = PutV1RunConfigVersionsByRunConfigVersionIdDefaultErrors[keyof PutV1RunConfigVersionsByRunConfigVersionIdDefaultErrors]; export type PutV1RunConfigVersionsByRunConfigVersionIdDefaultResponses = { /** * Default set; updated run config returned */ 200: RunConfigDto; }; export type PutV1RunConfigVersionsByRunConfigVersionIdDefaultResponse = PutV1RunConfigVersionsByRunConfigVersionIdDefaultResponses[keyof PutV1RunConfigVersionsByRunConfigVersionIdDefaultResponses]; export type PostV1RunConfigVersionsByRunConfigVersionIdDiscoverMcpToolsData = { body?: never; path: { /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ runConfigVersionId: string; }; query?: never; url: '/v1/run-config-versions/{runConfigVersionId}/discover-mcp-tools'; }; export type PostV1RunConfigVersionsByRunConfigVersionIdDiscoverMcpToolsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * The draft changed since the probe that captured the catalogue; re-run the probe */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1RunConfigVersionsByRunConfigVersionIdDiscoverMcpToolsError = PostV1RunConfigVersionsByRunConfigVersionIdDiscoverMcpToolsErrors[keyof PostV1RunConfigVersionsByRunConfigVersionIdDiscoverMcpToolsErrors]; export type PostV1RunConfigVersionsByRunConfigVersionIdDiscoverMcpToolsResponses = { /** * Draft updated with the discovered MCP tools */ 200: RunConfigVersionDto; }; export type PostV1RunConfigVersionsByRunConfigVersionIdDiscoverMcpToolsResponse = PostV1RunConfigVersionsByRunConfigVersionIdDiscoverMcpToolsResponses[keyof PostV1RunConfigVersionsByRunConfigVersionIdDiscoverMcpToolsResponses]; export type PostV1RunConfigVersionsByRunConfigVersionIdLockData = { body?: never; path: { /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ runConfigVersionId: string; }; query?: never; url: '/v1/run-config-versions/{runConfigVersionId}/lock'; }; export type PostV1RunConfigVersionsByRunConfigVersionIdLockErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * Version already locked, or fails a content/clash guard */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1RunConfigVersionsByRunConfigVersionIdLockError = PostV1RunConfigVersionsByRunConfigVersionIdLockErrors[keyof PostV1RunConfigVersionsByRunConfigVersionIdLockErrors]; export type PostV1RunConfigVersionsByRunConfigVersionIdLockResponses = { /** * Version locked */ 200: RunConfigVersionDto; }; export type PostV1RunConfigVersionsByRunConfigVersionIdLockResponse = PostV1RunConfigVersionsByRunConfigVersionIdLockResponses[keyof PostV1RunConfigVersionsByRunConfigVersionIdLockResponses]; export type PostV1RunConfigVersionsByRunConfigVersionIdProbeData = { body?: never; path: { /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ runConfigVersionId: string; }; query?: never; url: '/v1/run-config-versions/{runConfigVersionId}/probe'; }; export type PostV1RunConfigVersionsByRunConfigVersionIdProbeErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * Another probe-run is already in flight for this version */ 409: RunConfigProbeAlreadyInFlightErrorDto; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1RunConfigVersionsByRunConfigVersionIdProbeError = PostV1RunConfigVersionsByRunConfigVersionIdProbeErrors[keyof PostV1RunConfigVersionsByRunConfigVersionIdProbeErrors]; export type PostV1RunConfigVersionsByRunConfigVersionIdProbeResponses = { /** * Probe submitted; poll the probe-run for completion */ 202: SubmitProbeResponseDto; }; export type PostV1RunConfigVersionsByRunConfigVersionIdProbeResponse = PostV1RunConfigVersionsByRunConfigVersionIdProbeResponses[keyof PostV1RunConfigVersionsByRunConfigVersionIdProbeResponses]; export type GetV1RunConfigVersionsByRunConfigVersionIdProbeRunsData = { body?: never; path: { /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ runConfigVersionId: string; }; query?: never; url: '/v1/run-config-versions/{runConfigVersionId}/probe-runs'; }; export type GetV1RunConfigVersionsByRunConfigVersionIdProbeRunsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1RunConfigVersionsByRunConfigVersionIdProbeRunsError = GetV1RunConfigVersionsByRunConfigVersionIdProbeRunsErrors[keyof GetV1RunConfigVersionsByRunConfigVersionIdProbeRunsErrors]; export type GetV1RunConfigVersionsByRunConfigVersionIdProbeRunsResponses = { /** * Probe-run history */ 200: RunConfigProbeRunListDto; }; export type GetV1RunConfigVersionsByRunConfigVersionIdProbeRunsResponse = GetV1RunConfigVersionsByRunConfigVersionIdProbeRunsResponses[keyof GetV1RunConfigVersionsByRunConfigVersionIdProbeRunsResponses]; export type GetV1RunConfigVersionsByRunConfigVersionIdResolveData = { body?: never; path: { /** * Stable run-config-version identifier (UUID). Points at one specific version of a run config. */ runConfigVersionId: string; }; query?: never; url: '/v1/run-config-versions/{runConfigVersionId}/resolve'; }; export type GetV1RunConfigVersionsByRunConfigVersionIdResolveErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1RunConfigVersionsByRunConfigVersionIdResolveError = GetV1RunConfigVersionsByRunConfigVersionIdResolveErrors[keyof GetV1RunConfigVersionsByRunConfigVersionIdResolveErrors]; export type GetV1RunConfigVersionsByRunConfigVersionIdResolveResponses = { /** * Resolved run config */ 200: ResolvedRunConfigDto; }; export type GetV1RunConfigVersionsByRunConfigVersionIdResolveResponse = GetV1RunConfigVersionsByRunConfigVersionIdResolveResponses[keyof GetV1RunConfigVersionsByRunConfigVersionIdResolveResponses]; export type PostV1RunConfigsData = { body: CreateRunConfigDto; path?: never; query?: never; url: '/v1/run-configs'; }; export type PostV1RunConfigsErrors = { /** * Invalid scope, parent version, or payload */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Insufficient permission for the requested scope */ 403: TargetApiErrorForbidden; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1RunConfigsError = PostV1RunConfigsErrors[keyof PostV1RunConfigsErrors]; export type PostV1RunConfigsResponses = { /** * Run config created */ 201: CreateRunConfigResponseDto; }; export type PostV1RunConfigsResponse = PostV1RunConfigsResponses[keyof PostV1RunConfigsResponses]; export type GetV1RunConfigsReapedData = { body?: never; path?: never; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; /** * Field to sort by. Allowed values depend on the entity being listed. */ sortBy?: string; /** * Sort direction. Defaults to ascending when omitted. */ sortDirection?: 'asc' | 'desc'; /** * Free-text filter applied to the entity searchable fields. */ search?: string; }; url: '/v1/run-configs/reaped'; }; export type GetV1RunConfigsReapedErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1RunConfigsReapedError = GetV1RunConfigsReapedErrors[keyof GetV1RunConfigsReapedErrors]; export type GetV1RunConfigsReapedResponses = { /** * Reaped system-scope run configs */ 200: ReapedRunConfigPageDto; }; export type GetV1RunConfigsReapedResponse = GetV1RunConfigsReapedResponses[keyof GetV1RunConfigsReapedResponses]; export type GetV1RunConfigsSystemData = { body?: never; path?: never; query?: { /** * Comma-separated tags. Returns run configs carrying ANY of the supplied tags (OR semantics). */ tags?: string; }; url: '/v1/run-configs/system'; }; export type GetV1RunConfigsSystemErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1RunConfigsSystemError = GetV1RunConfigsSystemErrors[keyof GetV1RunConfigsSystemErrors]; export type GetV1RunConfigsSystemResponses = { /** * System-scope run configs */ 200: RunConfigListItemListDto; }; export type GetV1RunConfigsSystemResponse = GetV1RunConfigsSystemResponses[keyof GetV1RunConfigsSystemResponses]; export type GetV1RunConfigsSystemVisibleData = { body?: never; path?: never; query?: { /** * Comma-separated tags. Returns run configs carrying ANY of the supplied tags (OR semantics). */ tags?: string; }; url: '/v1/run-configs/system/visible'; }; export type GetV1RunConfigsSystemVisibleErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1RunConfigsSystemVisibleError = GetV1RunConfigsSystemVisibleErrors[keyof GetV1RunConfigsSystemVisibleErrors]; export type GetV1RunConfigsSystemVisibleResponses = { /** * Visible run configs */ 200: RunConfigListItemListDto; }; export type GetV1RunConfigsSystemVisibleResponse = GetV1RunConfigsSystemVisibleResponses[keyof GetV1RunConfigsSystemVisibleResponses]; export type DeleteV1RunConfigsByRunConfigIdData = { body?: never; path: { /** * Stable run-config identifier (UUID). Versioned reusable solver / grader / QA / synthesizer config. */ runConfigId: string; }; query?: never; url: '/v1/run-configs/{runConfigId}'; }; export type DeleteV1RunConfigsByRunConfigIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Run config not found */ 404: TargetApiErrorNotFound; /** * Run config has active bindings on a version */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1RunConfigsByRunConfigIdError = DeleteV1RunConfigsByRunConfigIdErrors[keyof DeleteV1RunConfigsByRunConfigIdErrors]; export type DeleteV1RunConfigsByRunConfigIdResponses = { /** * Run config deleted */ 204: void; }; export type DeleteV1RunConfigsByRunConfigIdResponse = DeleteV1RunConfigsByRunConfigIdResponses[keyof DeleteV1RunConfigsByRunConfigIdResponses]; export type GetV1RunConfigsByRunConfigIdData = { body?: never; path: { /** * Stable run-config identifier (UUID). Versioned reusable solver / grader / QA / synthesizer config. */ runConfigId: string; }; query?: never; url: '/v1/run-configs/{runConfigId}'; }; export type GetV1RunConfigsByRunConfigIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Run config not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1RunConfigsByRunConfigIdError = GetV1RunConfigsByRunConfigIdErrors[keyof GetV1RunConfigsByRunConfigIdErrors]; export type GetV1RunConfigsByRunConfigIdResponses = { /** * Run config */ 200: RunConfigDto; }; export type GetV1RunConfigsByRunConfigIdResponse = GetV1RunConfigsByRunConfigIdResponses[keyof GetV1RunConfigsByRunConfigIdResponses]; export type PatchV1RunConfigsByRunConfigIdData = { body: UpdateRunConfigDto; path: { /** * Stable run-config identifier (UUID). Versioned reusable solver / grader / QA / synthesizer config. */ runConfigId: string; }; query?: never; url: '/v1/run-configs/{runConfigId}'; }; export type PatchV1RunConfigsByRunConfigIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Run config not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PatchV1RunConfigsByRunConfigIdError = PatchV1RunConfigsByRunConfigIdErrors[keyof PatchV1RunConfigsByRunConfigIdErrors]; export type PatchV1RunConfigsByRunConfigIdResponses = { /** * Run config updated */ 200: RunConfigDto; }; export type PatchV1RunConfigsByRunConfigIdResponse = PatchV1RunConfigsByRunConfigIdResponses[keyof PatchV1RunConfigsByRunConfigIdResponses]; export type PostV1RunConfigsByRunConfigIdRestoreData = { body?: never; path: { /** * Stable run-config identifier (UUID). Versioned reusable solver / grader / QA / synthesizer config. */ runConfigId: string; }; query?: never; url: '/v1/run-configs/{runConfigId}/restore'; }; export type PostV1RunConfigsByRunConfigIdRestoreErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Soft-deleted run config not found or out of scope */ 404: TargetApiErrorNotFound; /** * A newer draft exists for this run config; resolve it before restoring */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1RunConfigsByRunConfigIdRestoreError = PostV1RunConfigsByRunConfigIdRestoreErrors[keyof PostV1RunConfigsByRunConfigIdRestoreErrors]; export type PostV1RunConfigsByRunConfigIdRestoreResponses = { /** * Run config restored */ 200: RunConfigDto; }; export type PostV1RunConfigsByRunConfigIdRestoreResponse = PostV1RunConfigsByRunConfigIdRestoreResponses[keyof PostV1RunConfigsByRunConfigIdRestoreResponses]; export type GetV1RunConfigsByRunConfigIdVersionsData = { body?: never; path: { /** * Stable run-config identifier (UUID). Versioned reusable solver / grader / QA / synthesizer config. */ runConfigId: string; }; query?: never; url: '/v1/run-configs/{runConfigId}/versions'; }; export type GetV1RunConfigsByRunConfigIdVersionsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Run config not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1RunConfigsByRunConfigIdVersionsError = GetV1RunConfigsByRunConfigIdVersionsErrors[keyof GetV1RunConfigsByRunConfigIdVersionsErrors]; export type GetV1RunConfigsByRunConfigIdVersionsResponses = { /** * Run config versions */ 200: RunConfigVersionListDto; }; export type GetV1RunConfigsByRunConfigIdVersionsResponse = GetV1RunConfigsByRunConfigIdVersionsResponses[keyof GetV1RunConfigsByRunConfigIdVersionsResponses]; export type PostV1RunConfigsByRunConfigIdVersionsData = { body: CreateRunConfigVersionDto; path: { /** * Stable run-config identifier (UUID). Versioned reusable solver / grader / QA / synthesizer config. */ runConfigId: string; }; query?: never; url: '/v1/run-configs/{runConfigId}/versions'; }; export type PostV1RunConfigsByRunConfigIdVersionsErrors = { /** * Invalid parent or payload */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * A draft already exists for this run config */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1RunConfigsByRunConfigIdVersionsError = PostV1RunConfigsByRunConfigIdVersionsErrors[keyof PostV1RunConfigsByRunConfigIdVersionsErrors]; export type PostV1RunConfigsByRunConfigIdVersionsResponses = { /** * Draft version created */ 201: RunConfigVersionDto; }; export type PostV1RunConfigsByRunConfigIdVersionsResponse = PostV1RunConfigsByRunConfigIdVersionsResponses[keyof PostV1RunConfigsByRunConfigIdVersionsResponses]; export type DeleteV1SynthesizerJobsBySynthesizerJobIdData = { body?: never; path: { /** * Stable synthesizer-job identifier (UUID). */ synthesizerJobId: string; }; query?: never; url: '/v1/synthesizer-jobs/{synthesizerJobId}'; }; export type DeleteV1SynthesizerJobsBySynthesizerJobIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Synthesizer job not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1SynthesizerJobsBySynthesizerJobIdError = DeleteV1SynthesizerJobsBySynthesizerJobIdErrors[keyof DeleteV1SynthesizerJobsBySynthesizerJobIdErrors]; export type DeleteV1SynthesizerJobsBySynthesizerJobIdResponses = { /** * Synthesizer job deleted */ 204: void; }; export type DeleteV1SynthesizerJobsBySynthesizerJobIdResponse = DeleteV1SynthesizerJobsBySynthesizerJobIdResponses[keyof DeleteV1SynthesizerJobsBySynthesizerJobIdResponses]; export type GetV1SynthesizerJobsBySynthesizerJobIdData = { body?: never; path: { /** * Stable synthesizer-job identifier (UUID). */ synthesizerJobId: string; }; query?: never; url: '/v1/synthesizer-jobs/{synthesizerJobId}'; }; export type GetV1SynthesizerJobsBySynthesizerJobIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Synthesizer job not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1SynthesizerJobsBySynthesizerJobIdError = GetV1SynthesizerJobsBySynthesizerJobIdErrors[keyof GetV1SynthesizerJobsBySynthesizerJobIdErrors]; export type GetV1SynthesizerJobsBySynthesizerJobIdResponses = { /** * Synthesizer job found */ 200: SynthesizerJobDto; }; export type GetV1SynthesizerJobsBySynthesizerJobIdResponse = GetV1SynthesizerJobsBySynthesizerJobIdResponses[keyof GetV1SynthesizerJobsBySynthesizerJobIdResponses]; export type PatchV1SynthesizerJobsBySynthesizerJobIdData = { body: UpdateSynthesizerJobBodyDto; path: { /** * Stable synthesizer-job identifier (UUID). */ synthesizerJobId: string; }; query?: never; url: '/v1/synthesizer-jobs/{synthesizerJobId}'; }; export type PatchV1SynthesizerJobsBySynthesizerJobIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Synthesizer job not found */ 404: TargetApiErrorNotFound; /** * No synthesizer run config is available */ 422: ApiErrorStatus422; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PatchV1SynthesizerJobsBySynthesizerJobIdError = PatchV1SynthesizerJobsBySynthesizerJobIdErrors[keyof PatchV1SynthesizerJobsBySynthesizerJobIdErrors]; export type PatchV1SynthesizerJobsBySynthesizerJobIdResponses = { /** * Synthesizer job updated */ 200: SynthesizerJobDto; }; export type PatchV1SynthesizerJobsBySynthesizerJobIdResponse = PatchV1SynthesizerJobsBySynthesizerJobIdResponses[keyof PatchV1SynthesizerJobsBySynthesizerJobIdResponses]; export type PostV1SynthesizerJobsBySynthesizerJobIdFilesData = { body: AttachSynthesizerJobFileBodyDto; path: { /** * Stable synthesizer-job identifier (UUID). */ synthesizerJobId: string; }; query?: never; url: '/v1/synthesizer-jobs/{synthesizerJobId}/files'; }; export type PostV1SynthesizerJobsBySynthesizerJobIdFilesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Job or file not found */ 404: TargetApiErrorNotFound; /** * Mount path already exists on this synthesizer job */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1SynthesizerJobsBySynthesizerJobIdFilesError = PostV1SynthesizerJobsBySynthesizerJobIdFilesErrors[keyof PostV1SynthesizerJobsBySynthesizerJobIdFilesErrors]; export type PostV1SynthesizerJobsBySynthesizerJobIdFilesResponses = { /** * File attached */ 201: SynthesizerJobFileResponseDto; }; export type PostV1SynthesizerJobsBySynthesizerJobIdFilesResponse = PostV1SynthesizerJobsBySynthesizerJobIdFilesResponses[keyof PostV1SynthesizerJobsBySynthesizerJobIdFilesResponses]; export type DeleteV1SynthesizerJobsBySynthesizerJobIdFilesBySynthesizerJobFileIdData = { body?: never; path: { /** * Stable synthesizer-job identifier (UUID). */ synthesizerJobId: string; /** * Synthesizer-job file attachment identifier (UUID). */ synthesizerJobFileId: string; }; query?: never; url: '/v1/synthesizer-jobs/{synthesizerJobId}/files/{synthesizerJobFileId}'; }; export type DeleteV1SynthesizerJobsBySynthesizerJobIdFilesBySynthesizerJobFileIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Job or file not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1SynthesizerJobsBySynthesizerJobIdFilesBySynthesizerJobFileIdError = DeleteV1SynthesizerJobsBySynthesizerJobIdFilesBySynthesizerJobFileIdErrors[keyof DeleteV1SynthesizerJobsBySynthesizerJobIdFilesBySynthesizerJobFileIdErrors]; export type DeleteV1SynthesizerJobsBySynthesizerJobIdFilesBySynthesizerJobFileIdResponses = { /** * File detached */ 204: void; }; export type DeleteV1SynthesizerJobsBySynthesizerJobIdFilesBySynthesizerJobFileIdResponse = DeleteV1SynthesizerJobsBySynthesizerJobIdFilesBySynthesizerJobFileIdResponses[keyof DeleteV1SynthesizerJobsBySynthesizerJobIdFilesBySynthesizerJobFileIdResponses]; export type DeleteV1VersionsByProblemVersionIdData = { body?: never; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; }; query?: never; url: '/v1/versions/{problemVersionId}'; }; export type DeleteV1VersionsByProblemVersionIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1VersionsByProblemVersionIdError = DeleteV1VersionsByProblemVersionIdErrors[keyof DeleteV1VersionsByProblemVersionIdErrors]; export type DeleteV1VersionsByProblemVersionIdResponses = { /** * Version deleted */ 204: void; }; export type DeleteV1VersionsByProblemVersionIdResponse = DeleteV1VersionsByProblemVersionIdResponses[keyof DeleteV1VersionsByProblemVersionIdResponses]; export type GetV1VersionsByProblemVersionIdData = { body?: never; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; }; query?: never; url: '/v1/versions/{problemVersionId}'; }; export type GetV1VersionsByProblemVersionIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1VersionsByProblemVersionIdError = GetV1VersionsByProblemVersionIdErrors[keyof GetV1VersionsByProblemVersionIdErrors]; export type GetV1VersionsByProblemVersionIdResponses = { /** * Version found */ 200: ProblemVersionDto; }; export type GetV1VersionsByProblemVersionIdResponse = GetV1VersionsByProblemVersionIdResponses[keyof GetV1VersionsByProblemVersionIdResponses]; export type PatchV1VersionsByProblemVersionIdData = { body: UpdateProblemVersionDto; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; }; query?: never; url: '/v1/versions/{problemVersionId}'; }; export type PatchV1VersionsByProblemVersionIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * Version is locked */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PatchV1VersionsByProblemVersionIdError = PatchV1VersionsByProblemVersionIdErrors[keyof PatchV1VersionsByProblemVersionIdErrors]; export type PatchV1VersionsByProblemVersionIdResponses = { /** * Version updated */ 200: ProblemVersionDto; }; export type PatchV1VersionsByProblemVersionIdResponse = PatchV1VersionsByProblemVersionIdResponses[keyof PatchV1VersionsByProblemVersionIdResponses]; export type GetV1VersionsByProblemVersionIdAiOperationsByAiOperationIdData = { body?: never; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Stable AI-operation identifier (UUID). Captures a single LLM-backed action (suggestion, generation). */ aiOperationId: string; }; query?: never; url: '/v1/versions/{problemVersionId}/ai-operations/{aiOperationId}'; }; export type GetV1VersionsByProblemVersionIdAiOperationsByAiOperationIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Operation or version not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1VersionsByProblemVersionIdAiOperationsByAiOperationIdError = GetV1VersionsByProblemVersionIdAiOperationsByAiOperationIdErrors[keyof GetV1VersionsByProblemVersionIdAiOperationsByAiOperationIdErrors]; export type GetV1VersionsByProblemVersionIdAiOperationsByAiOperationIdResponses = { /** * Operation status */ 200: AiOperationDto; }; export type GetV1VersionsByProblemVersionIdAiOperationsByAiOperationIdResponse = GetV1VersionsByProblemVersionIdAiOperationsByAiOperationIdResponses[keyof GetV1VersionsByProblemVersionIdAiOperationsByAiOperationIdResponses]; export type GetV1VersionsByProblemVersionIdFilesData = { body?: never; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; }; query?: never; url: '/v1/versions/{problemVersionId}/files'; }; export type GetV1VersionsByProblemVersionIdFilesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1VersionsByProblemVersionIdFilesError = GetV1VersionsByProblemVersionIdFilesErrors[keyof GetV1VersionsByProblemVersionIdFilesErrors]; export type GetV1VersionsByProblemVersionIdFilesResponses = { /** * List of files attached to the version */ 200: ProblemVersionFileListDto; }; export type GetV1VersionsByProblemVersionIdFilesResponse = GetV1VersionsByProblemVersionIdFilesResponses[keyof GetV1VersionsByProblemVersionIdFilesResponses]; export type PostV1VersionsByProblemVersionIdFilesData = { body: AttachFileDto; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; }; query?: never; url: '/v1/versions/{problemVersionId}/files'; }; export type PostV1VersionsByProblemVersionIdFilesErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch */ 403: TargetApiErrorForbidden; /** * Version or file not found */ 404: TargetApiErrorNotFound; /** * Version is locked, or an attachment conflicts with an existing file or filename */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1VersionsByProblemVersionIdFilesError = PostV1VersionsByProblemVersionIdFilesErrors[keyof PostV1VersionsByProblemVersionIdFilesErrors]; export type PostV1VersionsByProblemVersionIdFilesResponses = { /** * File attached to the version */ 201: ProblemVersionFileDto; }; export type PostV1VersionsByProblemVersionIdFilesResponse = PostV1VersionsByProblemVersionIdFilesResponses[keyof PostV1VersionsByProblemVersionIdFilesResponses]; export type PostV1VersionsByProblemVersionIdFilesBulkData = { body: BulkAttachFilesDto; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; }; query?: never; url: '/v1/versions/{problemVersionId}/files/bulk'; }; export type PostV1VersionsByProblemVersionIdFilesBulkErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch */ 403: TargetApiErrorForbidden; /** * Version or file not found */ 404: TargetApiErrorNotFound; /** * Version is locked, or an attachment conflicts with an existing file or filename */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1VersionsByProblemVersionIdFilesBulkError = PostV1VersionsByProblemVersionIdFilesBulkErrors[keyof PostV1VersionsByProblemVersionIdFilesBulkErrors]; export type PostV1VersionsByProblemVersionIdFilesBulkResponses = { /** * Files attached to the version */ 201: ProblemVersionFileListDto; }; export type PostV1VersionsByProblemVersionIdFilesBulkResponse = PostV1VersionsByProblemVersionIdFilesBulkResponses[keyof PostV1VersionsByProblemVersionIdFilesBulkResponses]; export type DeleteV1VersionsByProblemVersionIdFilesByProblemVersionFileIdData = { body?: never; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Stable problem-version-file association identifier (UUID). */ problemVersionFileId: string; }; query?: never; url: '/v1/versions/{problemVersionId}/files/{problemVersionFileId}'; }; export type DeleteV1VersionsByProblemVersionIdFilesByProblemVersionFileIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch */ 403: TargetApiErrorForbidden; /** * Attachment not found */ 404: TargetApiErrorNotFound; /** * Version is locked */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1VersionsByProblemVersionIdFilesByProblemVersionFileIdError = DeleteV1VersionsByProblemVersionIdFilesByProblemVersionFileIdErrors[keyof DeleteV1VersionsByProblemVersionIdFilesByProblemVersionFileIdErrors]; export type DeleteV1VersionsByProblemVersionIdFilesByProblemVersionFileIdResponses = { /** * File detached */ 204: void; }; export type DeleteV1VersionsByProblemVersionIdFilesByProblemVersionFileIdResponse = DeleteV1VersionsByProblemVersionIdFilesByProblemVersionFileIdResponses[keyof DeleteV1VersionsByProblemVersionIdFilesByProblemVersionFileIdResponses]; export type PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdGoldStandardData = { body: UpdateGoldStandardDto; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Stable problem-version-file association identifier (UUID). */ problemVersionFileId: string; }; query?: never; url: '/v1/versions/{problemVersionId}/files/{problemVersionFileId}/gold-standard'; }; export type PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdGoldStandardErrors = { /** * Non-grader_support file type or reserved mount path */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch */ 403: TargetApiErrorForbidden; /** * Attachment not found */ 404: TargetApiErrorNotFound; /** * Version is locked, or a gold-standard mount path is duplicated on this version */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdGoldStandardError = PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdGoldStandardErrors[keyof PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdGoldStandardErrors]; export type PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdGoldStandardResponses = { /** * Updated file attachment */ 200: ProblemVersionFileDto; }; export type PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdGoldStandardResponse = PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdGoldStandardResponses[keyof PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdGoldStandardResponses]; export type PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdTagsData = { body: UpdateFileTagsDto; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Stable problem-version-file association identifier (UUID). */ problemVersionFileId: string; }; query?: never; url: '/v1/versions/{problemVersionId}/files/{problemVersionFileId}/tags'; }; export type PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdTagsErrors = { /** * Non-grader_support file type or invalid tags */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch */ 403: TargetApiErrorForbidden; /** * Attachment not found */ 404: TargetApiErrorNotFound; /** * Version is locked */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdTagsError = PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdTagsErrors[keyof PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdTagsErrors]; export type PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdTagsResponses = { /** * Updated file attachment */ 200: ProblemVersionFileDto; }; export type PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdTagsResponse = PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdTagsResponses[keyof PatchV1VersionsByProblemVersionIdFilesByProblemVersionFileIdTagsResponses]; export type PutV1VersionsByProblemVersionIdLockData = { body?: LockProblemVersionDto; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; }; query?: never; url: '/v1/versions/{problemVersionId}/lock'; }; export type PutV1VersionsByProblemVersionIdLockErrors = { /** * Version content invalid for locking (empty prompt, missing rubrics) */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Version not found */ 404: TargetApiErrorNotFound; /** * QA gates for the locking stage have not passed */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PutV1VersionsByProblemVersionIdLockError = PutV1VersionsByProblemVersionIdLockErrors[keyof PutV1VersionsByProblemVersionIdLockErrors]; export type PutV1VersionsByProblemVersionIdLockResponses = { /** * Version locked (or already locked) */ 200: ProblemVersionDto; }; export type PutV1VersionsByProblemVersionIdLockResponse = PutV1VersionsByProblemVersionIdLockResponses[keyof PutV1VersionsByProblemVersionIdLockResponses]; export type GetV1VersionsByProblemVersionIdRubricsData = { body?: never; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; }; query?: never; url: '/v1/versions/{problemVersionId}/rubrics'; }; export type GetV1VersionsByProblemVersionIdRubricsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1VersionsByProblemVersionIdRubricsError = GetV1VersionsByProblemVersionIdRubricsErrors[keyof GetV1VersionsByProblemVersionIdRubricsErrors]; export type GetV1VersionsByProblemVersionIdRubricsResponses = { /** * List of rubrics for the version */ 200: RubricArrayDto; }; export type GetV1VersionsByProblemVersionIdRubricsResponse = GetV1VersionsByProblemVersionIdRubricsResponses[keyof GetV1VersionsByProblemVersionIdRubricsResponses]; export type PostV1VersionsByProblemVersionIdRubricsData = { body?: never; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; }; query?: never; url: '/v1/versions/{problemVersionId}/rubrics'; }; export type PostV1VersionsByProblemVersionIdRubricsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Version is locked */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1VersionsByProblemVersionIdRubricsError = PostV1VersionsByProblemVersionIdRubricsErrors[keyof PostV1VersionsByProblemVersionIdRubricsErrors]; export type PostV1VersionsByProblemVersionIdRubricsResponses = { /** * Rubric created */ 201: RubricDto; }; export type PostV1VersionsByProblemVersionIdRubricsResponse = PostV1VersionsByProblemVersionIdRubricsResponses[keyof PostV1VersionsByProblemVersionIdRubricsResponses]; export type DeleteV1VersionsByProblemVersionIdRubricsByRubricIdData = { body?: never; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Stable rubric identifier (UUID). Rubrics are versioned grading specifications attached to a problem version. */ rubricId: string; }; query?: never; url: '/v1/versions/{problemVersionId}/rubrics/{rubricId}'; }; export type DeleteV1VersionsByProblemVersionIdRubricsByRubricIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Rubric not found */ 404: TargetApiErrorNotFound; /** * Version is locked */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type DeleteV1VersionsByProblemVersionIdRubricsByRubricIdError = DeleteV1VersionsByProblemVersionIdRubricsByRubricIdErrors[keyof DeleteV1VersionsByProblemVersionIdRubricsByRubricIdErrors]; export type DeleteV1VersionsByProblemVersionIdRubricsByRubricIdResponses = { /** * Rubric deleted */ 204: void; }; export type DeleteV1VersionsByProblemVersionIdRubricsByRubricIdResponse = DeleteV1VersionsByProblemVersionIdRubricsByRubricIdResponses[keyof DeleteV1VersionsByProblemVersionIdRubricsByRubricIdResponses]; export type PatchV1VersionsByProblemVersionIdRubricsByRubricIdData = { body: UpdateRubricBodyDto; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Stable rubric identifier (UUID). Rubrics are versioned grading specifications attached to a problem version. */ rubricId: string; }; query?: never; url: '/v1/versions/{problemVersionId}/rubrics/{rubricId}'; }; export type PatchV1VersionsByProblemVersionIdRubricsByRubricIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Environment external ID mismatch or missing permission */ 403: TargetApiErrorForbidden; /** * Rubric not found */ 404: TargetApiErrorNotFound; /** * Version is locked */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PatchV1VersionsByProblemVersionIdRubricsByRubricIdError = PatchV1VersionsByProblemVersionIdRubricsByRubricIdErrors[keyof PatchV1VersionsByProblemVersionIdRubricsByRubricIdErrors]; export type PatchV1VersionsByProblemVersionIdRubricsByRubricIdResponses = { /** * Rubric updated */ 200: RubricDto; }; export type PatchV1VersionsByProblemVersionIdRubricsByRubricIdResponse = PatchV1VersionsByProblemVersionIdRubricsByRubricIdResponses[keyof PatchV1VersionsByProblemVersionIdRubricsByRubricIdResponses]; export type GetV1VersionsByProblemVersionIdSynthesizerRunsData = { body?: never; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; }; query?: { /** * Maximum number of items to return in the page (1-100). */ limit?: number; /** * Opaque cursor returned by a previous page response. Omit to fetch the first page. */ cursor?: string; /** * Field to sort by. Allowed values depend on the entity being listed. */ sortBy?: string; /** * Sort direction. Defaults to ascending when omitted. */ sortDirection?: 'asc' | 'desc'; /** * Free-text filter applied to the entity searchable fields. */ search?: string; }; url: '/v1/versions/{problemVersionId}/synthesizer-runs'; }; export type GetV1VersionsByProblemVersionIdSynthesizerRunsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1VersionsByProblemVersionIdSynthesizerRunsError = GetV1VersionsByProblemVersionIdSynthesizerRunsErrors[keyof GetV1VersionsByProblemVersionIdSynthesizerRunsErrors]; export type GetV1VersionsByProblemVersionIdSynthesizerRunsResponses = { /** * Paginated list of synthesizer runs */ 200: SynthesizerRunPageDto; }; export type GetV1VersionsByProblemVersionIdSynthesizerRunsResponse = GetV1VersionsByProblemVersionIdSynthesizerRunsResponses[keyof GetV1VersionsByProblemVersionIdSynthesizerRunsResponses]; export type PostV1VersionsByProblemVersionIdSynthesizerRunsData = { body: TriggerSynthesizerRunBodyDto; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; }; query?: never; url: '/v1/versions/{problemVersionId}/synthesizer-runs'; }; export type PostV1VersionsByProblemVersionIdSynthesizerRunsErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1VersionsByProblemVersionIdSynthesizerRunsError = PostV1VersionsByProblemVersionIdSynthesizerRunsErrors[keyof PostV1VersionsByProblemVersionIdSynthesizerRunsErrors]; export type PostV1VersionsByProblemVersionIdSynthesizerRunsResponses = { /** * Synthesizer run started */ 202: SynthesizerRunDto; }; export type PostV1VersionsByProblemVersionIdSynthesizerRunsResponse = PostV1VersionsByProblemVersionIdSynthesizerRunsResponses[keyof PostV1VersionsByProblemVersionIdSynthesizerRunsResponses]; export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdData = { body?: never; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Stable synthesizer-run identifier (UUID). One execution of a synthesizer job. */ synthesizerRunId: string; }; query?: never; url: '/v1/versions/{problemVersionId}/synthesizer-runs/{synthesizerRunId}'; }; export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * Synthesizer run not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdError = GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdErrors[keyof GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdErrors]; export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdResponses = { /** * Synthesizer run found */ 200: SynthesizerRunDto; }; export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdResponse = GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdResponses[keyof GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdResponses]; export type PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdApplyData = { body: ApplySynthesizerRunBodyDto; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Stable synthesizer-run identifier (UUID). One execution of a synthesizer job. */ synthesizerRunId: string; }; query?: never; url: '/v1/versions/{problemVersionId}/synthesizer-runs/{synthesizerRunId}/apply'; }; export type PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdApplyErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Applying files would create duplicate filenames or gold-standard mount paths */ 409: ApiErrorStatus409; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdApplyError = PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdApplyErrors[keyof PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdApplyErrors]; export type PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdApplyResponses = { /** * Synthesizer run applied */ 200: SynthesizerRunDto; }; export type PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdApplyResponse = PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdApplyResponses[keyof PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdApplyResponses]; export type PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdCancelData = { body?: never; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Stable synthesizer-run identifier (UUID). One execution of a synthesizer job. */ synthesizerRunId: string; }; query?: never; url: '/v1/versions/{problemVersionId}/synthesizer-runs/{synthesizerRunId}/cancel'; }; export type PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdCancelErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller. */ 403: TargetApiErrorForbidden; /** * No resource exists at the requested path for the caller. */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdCancelError = PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdCancelErrors[keyof PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdCancelErrors]; export type PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdCancelResponses = { /** * Synthesizer run cancelled */ 204: void; }; export type PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdCancelResponse = PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdCancelResponses[keyof PostV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdCancelResponses]; export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptData = { body?: never; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Stable synthesizer-run identifier (UUID). One execution of a synthesizer job. */ synthesizerRunId: string; }; query?: never; url: '/v1/versions/{problemVersionId}/synthesizer-runs/{synthesizerRunId}/transcript'; }; export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is not in scope for this version */ 403: TargetApiErrorForbidden; /** * Transcript not found */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptError = GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptErrors[keyof GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptErrors]; export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptResponses = { /** * Transcript content as plain text */ 200: string; }; export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptResponse = GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptResponses[keyof GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptResponses]; export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptLiveData = { body?: never; path: { /** * Stable problem-version identifier (UUID). Each problem can have many versions; this points at one specific version. */ problemVersionId: string; /** * Stable synthesizer-run identifier (UUID). One execution of a synthesizer job. */ synthesizerRunId: string; }; query?: { /** * Return only events whose sequence is greater than this value. Omit to read the whole transcript. */ after?: string; /** * When true, wrap the events in an object that also carries the generation token of the run they came from. Omit for the bare event array. */ envelope?: 'true' | 'false'; }; url: '/v1/versions/{problemVersionId}/synthesizer-runs/{synthesizerRunId}/transcript/live'; }; export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptLiveErrors = { /** * The request is malformed or failed boundary validation. Validation issues are available under `details.issues`. */ 400: TargetApiErrorInvalidRequest; /** * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call). */ 401: TargetApiErrorUnauthorized; /** * Caller is not in scope for this version */ 403: TargetApiErrorForbidden; /** * Run not active or no external run ID */ 404: TargetApiErrorNotFound; /** * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context). */ 429: TargetApiErrorRateLimitExceeded; /** * Unexpected internal error. Internal diagnostics are never returned to the caller. */ 500: TargetApiErrorInternalError | TargetApiErrorInvariantViolation; }; export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptLiveError = GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptLiveErrors[keyof GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptLiveErrors]; export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptLiveResponses = { /** * Live transcript events as a JSON-encoded array, or a JSON-encoded object with the events and the run generation when the envelope flag is set */ 200: string; }; export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptLiveResponse = GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptLiveResponses[keyof GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptLiveResponses];