{"openapi":"3.1.0","info":{"title":"Unisphere Control Server","version":"0.1.0"},"paths":{"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Healthz Healthz Get"}}}}}}},"/agent/install.sh":{"get":{"summary":"Agent Install Sh","description":"Serve the real agent installer (Sprint 3), templated with this server's URL.","operationId":"agent_install_sh_agent_install_sh_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/install.sh":{"get":{"summary":"Install Sh","description":"Backward-compatible alias for /agent/install.sh.","operationId":"install_sh_install_sh_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/agent/uni":{"get":{"summary":"Agent Uni","description":"Serve the thin `uni` CLI script (installed to /usr/local/bin/uni).","operationId":"agent_uni_agent_uni_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/register":{"post":{"summary":"Register","operationId":"register_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environment":{"get":{"summary":"Environment","operationId":"environment_environment_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/broker/probe/roundtrip":{"post":{"summary":"Broker Probe Roundtrip","description":"Ops-only: presign a PUT + GET under `_probe/`, run the round-trip server-side, delete, and report.\n\nReturns what was actually observed — the host the URL named, the HTTP codes, whether the bytes came back\nidentical, and whether the object is gone. Nothing here is inferred.","operationId":"broker_probe_roundtrip_broker_probe_roundtrip_post","parameters":[{"name":"x-unisphere-ops-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Unisphere-Ops-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environment-config":{"get":{"summary":"Environment Config","description":"Storage Engine view of an environment: layout prefixes + S3 connection info.\n\nRead-only status/info (Sprint 2.6). No upload/download here — that is Sprint 3.","operationId":"environment_config_environment_config_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/storage/healthz":{"get":{"summary":"Storage Healthz","description":"Report whether the Storage Engine is configured and its bucket is reachable.","operationId":"storage_healthz_storage_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageHealthOut"}}}}}}},"/heartbeat":{"post":{"summary":"Heartbeat","operationId":"heartbeat_heartbeat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent/event":{"post":{"summary":"Agent Event","description":"Record that an agent operation (restore/sync/snapshot) completed on the pod.\n\nBest-effort signal the agent sends after ``uni restore|sync|snapshot`` so the customer's\nGuided Setup wizard completes those steps from a REAL event — mirroring the heartbeat that\ndrives the connect step. No byte movement here; the Storage Engine already did the work.","operationId":"agent_event_agent_event_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentEventRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/telemetry":{"post":{"summary":"Telemetry","description":"Record live GPU/VRAM/RAM/disk utilization for the token's environment (from nvidia-smi + /proc +\ndf on the pod). Best-effort; drives right-sizing + idle/active for Safe Migration.","operationId":"telemetry_telemetry_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Telemetry Telemetry Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/advisor/fact":{"post":{"summary":"Advisor Fact","description":"Record one REAL measured fact (e.g. restore_seconds, cache_attach_seconds). The Advisor explains\nthese numbers; it never invents recommendations from them. Best-effort, append-only.","operationId":"advisor_fact_advisor_fact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvisorFactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Advisor Fact Advisor Fact Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cache/manifest":{"get":{"summary":"Cache Manifest","description":"Attach manifest for the token's environment (ready entries only, org-scoped). Read-only.\nReturns empty if the token has no platform environment — attach is a soft accelerator.","operationId":"cache_manifest_cache_manifest_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"all","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"All"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CacheManifestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cache/publish":{"post":{"summary":"Cache Publish","description":"Register a content-addressed env-tier cache entry (pending) and return the upload target.\nThe agent uploads the bytes to (bucket,key) then calls /cache/commit. org/env are derived\nfrom the token — the agent never supplies them.","operationId":"cache_publish_cache_publish_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CachePublishRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CacheEntrySummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cache/preflight":{"post":{"summary":"Cache Preflight","description":"CONNECT_MODEL slice 1 — read-only storage headroom check, BEFORE a long download begins. Runs the\nEXACT same gate the publish path uses (storage_quota, action=cache_publish) with the declared size, so\nthe agent can refuse to download a model that would not fit instead of 402-ing after 20 minutes. Reveals\nonly figures already on the Storage card; org/env are derived from the token, never supplied.","operationId":"cache_preflight_cache_preflight_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CachePreflightRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Cache Preflight Cache Preflight Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cache/commit":{"post":{"summary":"Cache Commit","description":"Commit a scoped cache entry pending -> ready after its bytes are uploaded.","operationId":"cache_commit_cache_commit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CacheCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CacheEntrySummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cache/requested":{"get":{"summary":"Cache Requested","description":"In-flight connect rows the agent should fetch for its environment. Stalled downloads (machine died\nmid-pull) are reverted to `requested` here, server-side, so the next machine takes them over.","operationId":"cache_requested_cache_requested_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Cache Requested Cache Requested Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cache/progress":{"post":{"summary":"Cache Progress","description":"Agent progress write. 404 → the row was cancelled/gone; the agent MUST discard its download and clean\nits scratch (no bytes published after a Cancel).","operationId":"cache_progress_cache_progress_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CacheProgressRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Cache Progress Cache Progress Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cache/resolve":{"post":{"summary":"Cache Resolve","description":"Real bytes published → delete the todo row. Idempotent: gone already ⇒ resolved=false, still 200.","operationId":"cache_resolve_cache_resolve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CacheResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Cache Resolve Cache Resolve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/broker/workspace/upload-urls":{"post":{"summary":"Broker Workspace Upload Urls","description":"Sign one PUT per workspace file, scoped to this env's current/ prefix. No creds leave the server.","operationId":"broker_workspace_upload_urls_broker_workspace_upload_urls_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerUploadReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/broker/workspace/sync-diff":{"post":{"summary":"Broker Workspace Sync Diff","description":"Incremental-sync diff: given the agent's workspace manifest, return which paths are NEW or CHANGED\nvs current/ so the agent uploads only those. Env is derived from the token — the request never names it.\n\nA path is STALE when it is absent from current/, its size differs, or its md5 != the object's ETag. A\nsingle-PUT object's ETag IS its md5 hex (workspace files are always single-PUT — put_object at\n_presign_put; multipart is cache-only), so the comparison is free. A multipart ETag (contains '-') is\nnot a content hash and is treated as unknown → re-upload (never happens for workspace objects).","operationId":"broker_workspace_sync_diff_broker_workspace_sync_diff_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerSyncDiffReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/broker/workspace/download-urls":{"get":{"summary":"Broker Workspace Download Urls","description":"Manifest of presigned GETs for restore.\n\nRestore semantics (Runtime Architecture: \"the customer must never lose the ability to continue\nworking\"): `current/` is updated by EVERY `uni sync` and is therefore always the freshest saved\nstate, so `source=latest` restores from **current/** — the most recent sync always comes back. It\nfalls back to the newest snapshot ONLY when current/ is empty (e.g. an Environment that has snapshots\nbut no synced working state). `source=current` forces current/; `source=snapshot` / `snapshot:<id>`\nrestore a specific immutable version (rollback).","operationId":"broker_workspace_download_urls_broker_workspace_download_urls_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}},{"name":"source","in":"query","required":false,"schema":{"type":"string","default":"latest","title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/broker/workspace/snapshot":{"post":{"summary":"Broker Workspace Snapshot","description":"Server-side snapshot: the control plane copies current/ -> snapshots/<ts> with S3 server-side\ncopy_object (no bytes touch any pod). Snapshot id is a sortable UTC timestamp = chronological latest.\nBody is {\"token\": ...} (BrokerTokenReq) — the env is derived from the token, never named by the agent.","operationId":"broker_workspace_snapshot_broker_workspace_snapshot_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerTokenReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/broker/cache/upload-url":{"post":{"summary":"Broker Cache Upload Url","description":"Sign a PUT for a content-addressed cache blob (dedup: exists=true → skip the upload).","operationId":"broker_cache_upload_url_broker_cache_upload_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerCacheUploadReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/broker/cache/download-url":{"get":{"summary":"Broker Cache Download Url","description":"Sign a GET for a content-addressed cache blob (attach). A single presigned GET streams any size,\nso DOWNLOAD needs no multipart — only upload does.","operationId":"broker_cache_download_url_broker_cache_download_url_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}},{"name":"type","in":"query","required":true,"schema":{"type":"string","title":"Type"}},{"name":"digest","in":"query","required":true,"schema":{"type":"string","title":"Digest"}},{"name":"relative_path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relative Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/broker/cache/multipart/create":{"post":{"summary":"Broker Cache Mp Create","description":"Begin (or dedup-skip) a multipart upload for a content-addressed blob.","operationId":"broker_cache_mp_create_broker_cache_multipart_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerMPCreateReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/broker/cache/multipart/sign-parts":{"post":{"summary":"Broker Cache Mp Sign","description":"Presigned UploadPart URLs for the requested part numbers (machine PUTs each part directly).","operationId":"broker_cache_mp_sign_broker_cache_multipart_sign_parts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerMPSignReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/broker/cache/multipart/complete":{"post":{"summary":"Broker Cache Mp Complete","description":"Finalize the object from its uploaded parts (control-plane call; the blob becomes readable).","operationId":"broker_cache_mp_complete_broker_cache_multipart_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerMPCompleteReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/broker/cache/multipart/abort":{"post":{"summary":"Broker Cache Mp Abort","description":"Abort an in-progress multipart upload (cleanup on failure — no orphaned parts billed).","operationId":"broker_cache_mp_abort_broker_cache_multipart_abort_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerMPAbortReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/data/reference":{"post":{"summary":"Data Reference","description":"Register/re-point a dataset reference (metadata only — nothing is fetched or copied).","operationId":"data_reference_data_reference_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataReferenceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedDataSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/data/list":{"get":{"summary":"Data List","description":"List dataset references visible to the token's environment (empty if no platform env).","operationId":"data_list_data_list_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedDataListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/data/verify":{"post":{"summary":"Data Verify","description":"Record an agent-reported existence-verification result for a reference.","operationId":"data_verify_data_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedDataSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environment/summary":{"get":{"summary":"Environment Summary","operationId":"environment_summary_environment_summary_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Environment Summary Environment Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compute/recommend":{"post":{"summary":"Compute Recommend","description":"Rank customer-safe compute options for an intent. Review only — no launch, no supplier names.","operationId":"compute_recommend_compute_recommend_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Compute Recommend Compute Recommend Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compute/move-plan":{"post":{"summary":"Compute Move Plan","description":"Plan moving an Environment to different compute. Preserves Phase 1 continuation semantics.\nNo execution, no launch, no provider mutation.","operationId":"compute_move_plan_compute_move_plan_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Compute Move Plan Compute Move Plan Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compute/managed-plan":{"post":{"summary":"Compute Managed Plan","description":"Managed-compute planning abstraction (v1). No real launch/billing. Returns a customer-safe\npayload (supplier hidden) AND a platform payload (supplier visible).","operationId":"compute_managed_plan_compute_managed_plan_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Compute Managed Plan Compute Managed Plan Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compute/execute":{"post":{"summary":"Compute Execute","description":"Create + approve + run a compute execution (DRY-RUN by default). No provider mutation.","operationId":"compute_execute_compute_execute_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Compute Execute Compute Execute Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compute/gateways":{"get":{"summary":"Compute Gateways","description":"List execution gateways + capabilities. Customer-safe: no secrets, no provider/cloud names.","operationId":"compute_gateways_compute_gateways_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Compute Gateways Compute Gateways Get"}}}}}}},"/compute/gateways/{key}/status":{"get":{"summary":"Compute Gateway Status","description":"Masked gateway status (no secret material). Internal/dev — supplier stays out of /app UI.","operationId":"compute_gateway_status_compute_gateways__key__status_get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Compute Gateway Status Compute Gateways  Key  Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compute/gateways/{key}/offers":{"get":{"summary":"Compute Gateway Offers","description":"Customer-safe gateway inventory (marked-up price, supplier hidden). Review only — no launch.","operationId":"compute_gateway_offers_compute_gateways__key__offers_get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"gpu","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu"}},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Compute Gateway Offers Compute Gateways  Key  Offers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environment/wallet-guard":{"get":{"summary":"Environment Wallet Guard","description":"Customer-facing wallet status for the token's Environment: Healthy / Recharge soon /\nRecharge required / Environment parked. Never exposes Shadeform, provider, or cloud.","operationId":"environment_wallet_guard_environment_wallet_guard_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Environment Wallet Guard Environment Wallet Guard Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compute/executions":{"get":{"summary":"Compute Executions","operationId":"compute_executions_compute_executions_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Compute Executions Compute Executions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compute/optimize":{"post":{"summary":"Compute Optimize","description":"Evaluate current compute vs available options and (on match) create a finding + DRAFT\nexecution. Never approves/runs/launches/switches.","operationId":"compute_optimize_compute_optimize_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Compute Optimize Compute Optimize Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/compute/optimize/findings":{"get":{"summary":"Compute Optimize Findings","operationId":"compute_optimize_findings_compute_optimize_findings_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Compute Optimize Findings Compute Optimize Findings Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AdvisorFactRequest":{"properties":{"token":{"type":"string","title":"Token"},"key":{"type":"string","title":"Key"},"value_num":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value Num"},"value_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Text"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["token","key"],"title":"AdvisorFactRequest"},"AgentEventRequest":{"properties":{"token":{"type":"string","title":"Token"},"event":{"type":"string","title":"Event"}},"type":"object","required":["token","event"],"title":"AgentEventRequest"},"AgentEventResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"environment_id":{"type":"string","title":"Environment Id"},"event":{"type":"string","title":"Event"},"at":{"type":"string","title":"At"}},"type":"object","required":["ok","environment_id","event","at"],"title":"AgentEventResponse"},"BrokerCacheUploadReq":{"properties":{"token":{"type":"string","title":"Token"},"type":{"type":"string","title":"Type"},"digest_sha256":{"type":"string","title":"Digest Sha256"},"relative_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relative Path"}},"type":"object","required":["token","type","digest_sha256"],"title":"BrokerCacheUploadReq"},"BrokerMPAbortReq":{"properties":{"token":{"type":"string","title":"Token"},"key":{"type":"string","title":"Key"},"upload_id":{"type":"string","title":"Upload Id"}},"type":"object","required":["token","key","upload_id"],"title":"BrokerMPAbortReq"},"BrokerMPCompleteReq":{"properties":{"token":{"type":"string","title":"Token"},"key":{"type":"string","title":"Key"},"upload_id":{"type":"string","title":"Upload Id"},"parts":{"items":{},"type":"array","title":"Parts"}},"type":"object","required":["token","key","upload_id","parts"],"title":"BrokerMPCompleteReq"},"BrokerMPCreateReq":{"properties":{"token":{"type":"string","title":"Token"},"type":{"type":"string","title":"Type"},"digest_sha256":{"type":"string","title":"Digest Sha256"},"relative_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relative Path"}},"type":"object","required":["token","type","digest_sha256"],"title":"BrokerMPCreateReq"},"BrokerMPSignReq":{"properties":{"token":{"type":"string","title":"Token"},"key":{"type":"string","title":"Key"},"upload_id":{"type":"string","title":"Upload Id"},"part_numbers":{"items":{},"type":"array","title":"Part Numbers"}},"type":"object","required":["token","key","upload_id","part_numbers"],"title":"BrokerMPSignReq"},"BrokerSyncDiffReq":{"properties":{"token":{"type":"string","title":"Token"},"files":{"items":{},"type":"array","title":"Files"}},"type":"object","required":["token","files"],"title":"BrokerSyncDiffReq"},"BrokerTokenReq":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"BrokerTokenReq"},"BrokerUploadReq":{"properties":{"token":{"type":"string","title":"Token"},"files":{"items":{},"type":"array","title":"Files"}},"type":"object","required":["token","files"],"title":"BrokerUploadReq"},"CacheCommitRequest":{"properties":{"token":{"type":"string","title":"Token"},"entry_id":{"type":"string","title":"Entry Id"}},"type":"object","required":["token","entry_id"],"title":"CacheCommitRequest"},"CacheEntrySummary":{"properties":{"entry_id":{"type":"string","title":"Entry Id"},"type":{"type":"string","title":"Type"},"tier":{"type":"string","title":"Tier"},"logical_name":{"type":"string","title":"Logical Name"},"source_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Path"},"digest_sha256":{"type":"string","title":"Digest Sha256"},"size_bytes":{"type":"integer","title":"Size Bytes"},"state":{"type":"string","title":"State"},"asset_kind":{"type":"string","title":"Asset Kind","default":"file"},"file_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Count"},"backend":{"type":"string","title":"Backend"},"bucket":{"type":"string","title":"Bucket"},"key":{"type":"string","title":"Key"},"region":{"type":"string","title":"Region"}},"type":"object","required":["entry_id","type","tier","logical_name","digest_sha256","size_bytes","state","backend","bucket","key","region"],"title":"CacheEntrySummary"},"CacheManifestEntry":{"properties":{"entry_id":{"type":"string","title":"Entry Id"},"type":{"type":"string","title":"Type"},"tier":{"type":"string","title":"Tier"},"logical_name":{"type":"string","title":"Logical Name"},"source_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Path"},"digest_sha256":{"type":"string","title":"Digest Sha256"},"size_bytes":{"type":"integer","title":"Size Bytes"},"state":{"type":"string","title":"State"},"asset_kind":{"type":"string","title":"Asset Kind","default":"file"},"file_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Count"},"backend":{"type":"string","title":"Backend"},"bucket":{"type":"string","title":"Bucket"},"key":{"type":"string","title":"Key"},"region":{"type":"string","title":"Region"},"relative_target":{"type":"string","title":"Relative Target"}},"type":"object","required":["entry_id","type","tier","logical_name","digest_sha256","size_bytes","state","backend","bucket","key","region","relative_target"],"title":"CacheManifestEntry"},"CacheManifestOut":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/CacheManifestEntry"},"type":"array","title":"Entries","default":[]}},"type":"object","title":"CacheManifestOut"},"CachePreflightRequest":{"properties":{"token":{"type":"string","title":"Token"},"size_bytes":{"type":"integer","title":"Size Bytes"}},"type":"object","required":["token","size_bytes"],"title":"CachePreflightRequest","description":"CONNECT_MODEL slice 1: a read-only headroom check BEFORE a long download. Returns only the same\nstorage figures the customer already sees on the Storage card; org/env derived from the token."},"CacheProgressRequest":{"properties":{"token":{"type":"string","title":"Token"},"entry_id":{"type":"string","title":"Entry Id"},"phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phase"},"bytes_done":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bytes Done"},"bytes_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bytes Total"}},"type":"object","required":["token","entry_id"],"title":"CacheProgressRequest","description":"CONNECT_MODEL slice 2: the agent reports download progress on a `requested`/`downloading` row. WYSIWYG\n— the GUI polls the row, so these are the only numbers it ever shows. org/env derived from the token."},"CachePublishRequest":{"properties":{"token":{"type":"string","title":"Token"},"type":{"type":"string","title":"Type"},"logical_name":{"type":"string","title":"Logical Name"},"digest_sha256":{"type":"string","title":"Digest Sha256"},"size_bytes":{"type":"integer","title":"Size Bytes"},"asset_kind":{"type":"string","title":"Asset Kind","default":"file"},"file_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Count"},"source_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Path"},"source_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Uri"}},"type":"object","required":["token","type","logical_name","digest_sha256","size_bytes"],"title":"CachePublishRequest"},"CacheResolveRequest":{"properties":{"token":{"type":"string","title":"Token"},"entry_id":{"type":"string","title":"Entry Id"}},"type":"object","required":["token","entry_id"],"title":"CacheResolveRequest","description":"The agent published the real bytes for a connect → delete the todo row (idempotent)."},"ConnectedDataListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ConnectedDataSummary"},"type":"array","title":"Items","default":[]}},"type":"object","title":"ConnectedDataListOut"},"ConnectedDataSummary":{"properties":{"id":{"type":"string","title":"Id"},"org_id":{"type":"string","title":"Org Id"},"environment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Id"},"name":{"type":"string","title":"Name"},"uri":{"type":"string","title":"Uri"},"kind":{"type":"string","title":"Kind"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"},"tier":{"type":"string","title":"Tier"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"manifest_digest":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manifest Digest"},"verification_state":{"type":"string","title":"Verification State"},"verification_depth":{"type":"string","title":"Verification Depth"},"access_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Hint"}},"type":"object","required":["id","org_id","name","uri","kind","tier","verification_state","verification_depth"],"title":"ConnectedDataSummary"},"DataReferenceRequest":{"properties":{"token":{"type":"string","title":"Token"},"name":{"type":"string","title":"Name"},"uri":{"type":"string","title":"Uri"},"kind":{"type":"string","title":"Kind","default":"dataset"},"tier":{"type":"string","title":"Tier","default":"env"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"manifest_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manifest Json"},"access_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Hint"}},"type":"object","required":["token","name","uri"],"title":"DataReferenceRequest"},"DataVerifyRequest":{"properties":{"token":{"type":"string","title":"Token"},"id":{"type":"string","title":"Id"},"verification_state":{"type":"string","title":"Verification State"},"verification_depth":{"type":"string","title":"Verification Depth","default":"existence"}},"type":"object","required":["token","id","verification_state"],"title":"DataVerifyRequest"},"EnvironmentConfigOut":{"properties":{"environment_id":{"type":"string","title":"Environment Id"},"workspace_path":{"type":"string","title":"Workspace Path"},"storage":{"$ref":"#/components/schemas/StorageInfo"},"restorable":{"anyOf":[{"$ref":"#/components/schemas/RestorableInfo"},{"type":"null"}]}},"type":"object","required":["environment_id","workspace_path","storage"],"title":"EnvironmentConfigOut"},"EnvironmentOut":{"properties":{"environment_id":{"type":"string","title":"Environment Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"},"bucket":{"type":"string","title":"Bucket"},"prefix":{"type":"string","title":"Prefix"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["environment_id","bucket","prefix","created_at"],"title":"EnvironmentOut"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HeartbeatRequest":{"properties":{"token":{"type":"string","title":"Token"},"pod_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pod Id","default":""},"agent_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Version"},"machine_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Machine Id"},"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostname"},"os":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"gpu_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Name"},"gpu_vram":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Vram"},"gpu_count":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Count"},"cpu_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cpu Model"},"cpu_count":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cpu Count"},"ram":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ram"},"cuda":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cuda"},"driver":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Driver"},"workspace_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Path"}},"type":"object","required":["token"],"title":"HeartbeatRequest"},"HeartbeatResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"environment_id":{"type":"string","title":"Environment Id"},"last_seen_at":{"type":"string","title":"Last Seen At"}},"type":"object","required":["ok","environment_id","last_seen_at"],"title":"HeartbeatResponse"},"RegisterRequest":{"properties":{"token":{"type":"string","title":"Token"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"}},"type":"object","required":["token"],"title":"RegisterRequest","description":"Register (or look up) an environment for a token."},"RestorableInfo":{"properties":{"snapshot_exists":{"type":"boolean","title":"Snapshot Exists","default":false},"snapshot_files":{"type":"integer","title":"Snapshot Files","default":0},"snapshot_bytes":{"type":"integer","title":"Snapshot Bytes","default":0},"snapshot_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot At"},"asset_count":{"type":"integer","title":"Asset Count","default":0},"asset_bytes":{"type":"integer","title":"Asset Bytes","default":0}},"type":"object","title":"RestorableInfo","description":"What this environment could bring back onto a NEW machine, so install.sh can OFFER it.\n\nBRIEF_KILLER_FEATURE §2: managed pods auto-run `uni restore` + `uni cache attach --all` at boot\n(gateways/startup_script.py:59-60). A BYOC install ran NEITHER, so \"your environment follows you\" was\nsilently false on the exact path every new customer lands in — he had to somehow know to type two\ncommands nobody showed him.\n\nWe do NOT auto-restore. Option (a) — the agent detecting a \"fresh\" machine — was REJECTED and the\nrejection is locked: \"fresh\" is undecidable. An empty workspace and a missing state file are both ALSO\ntrue on a machine where the customer already started working in a directory we do not own yet, and\n`uni restore` OVERWRITES the workspace. Guessing wrong destroys real work that was never backed up.\nNever overwrite a customer's files to make a promise true.\n\nSo: at install time — before any work exists on the box — we state what is available and ask. Consent,\nnot inference. These are counts, not credentials; the caller already holds the env's token."},"StorageHealthOut":{"properties":{"configured":{"type":"boolean","title":"Configured"},"bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bucket"},"reachable":{"type":"boolean","title":"Reachable"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["configured","reachable"],"title":"StorageHealthOut"},"StorageInfo":{"properties":{"bucket":{"type":"string","title":"Bucket"},"current_prefix":{"type":"string","title":"Current Prefix"},"snapshots_prefix":{"type":"string","title":"Snapshots Prefix"},"latest_snapshot_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Snapshot Prefix"},"endpoint":{"type":"string","title":"Endpoint"},"region":{"type":"string","title":"Region","default":"us-east-1"},"provider":{"type":"string","title":"Provider","default":"Minio"}},"type":"object","required":["bucket","current_prefix","snapshots_prefix","endpoint"],"title":"StorageInfo","description":"Storage Engine view of an environment's object-storage layout (Sprint 2.6).\n\nNO CREDENTIALS HERE. `access_key`/`secret_key` were removed 2026-07-15 (P0_STORAGE_CONFIG_LEAK): this\nmodel is returned by GET /environment-config, which is UNAUTHENTICATED and which every BYOC install\nfetches (agent/install.sh:47) — so it was handing the master bucket key pair to anyone who asked.\n\nThe endpoint must SURVIVE (unlike /storage-config it has live consumers), but its consumers only ever\nread identity + layout: install.sh takes workspace_path, environment_id and storage.bucket (the NAME,\nwhich is not a secret); the CLI takes environment_id, workspace_path and latest_snapshot_prefix\n(agent/uni:110, 2232). Neither has ever read a key. A bucket name and a prefix are not access — the\nbroker signs each URL server-side."},"TelemetryRequest":{"properties":{"token":{"type":"string","title":"Token"},"gpu_util_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gpu Util Pct"},"vram_used_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vram Used Mb"},"vram_total_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vram Total Mb"},"ram_used_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ram Used Mb"},"ram_total_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ram Total Mb"},"disk_used_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Disk Used Gb"},"disk_total_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Disk Total Gb"},"gpu_procs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gpu Procs"}},"type":"object","required":["token"],"title":"TelemetryRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}