Skip to content

Add cloud-runtime FE-facing operations to spec#13734

Merged
MillerMedia merged 11 commits intomasterfrom
cursor/cloud-fe-endpoints-6010
May 8, 2026
Merged

Add cloud-runtime FE-facing operations to spec#13734
MillerMedia merged 11 commits intomasterfrom
cursor/cloud-fe-endpoints-6010

Conversation

@MillerMedia
Copy link
Copy Markdown
Contributor

@MillerMedia MillerMedia commented May 6, 2026

These operations are served by the cloud runtime today. Adding them to core's openapi.yaml with x-runtime: [cloud] tagging makes the spec an accurate description of the FE-observable API surface across runtimes. The local runtime continues to return 404 for these paths; FE codegen filters by tag.

What changed

Added ~67 cloud-runtime FE-facing path operations to openapi.yaml, each tagged with x-runtime: [cloud] at the operation level. Also added corresponding cloud-only component schemas, all tagged with x-runtime: [cloud].

No handler implementation in core — only the spec changes.

Domain groups

Group Paths Operations
Jobs / prompts /api/job/{job_id}, /api/job/{job_id}/outputs, /api/job/{job_id}/status, /api/jobs/{job_id}/cancel, /api/prompt/{prompt_id}, /api/history_v2, /api/history_v2/{prompt_id}, /api/logs 8
Assets extensions /api/assets/download, /api/assets/export, /api/assets/exports/{exportName}, /api/assets/from-workflow, /api/assets/import, /api/assets/remote-metadata 6
Custom nodes / hub /api/experiment/nodes, /api/experiment/nodes/{id}, /api/hub/assets/upload-url, /api/hub/labels, /api/hub/profiles, /api/hub/profiles/{username}, /api/hub/profiles/check, /api/hub/profiles/me, /api/hub/workflows, /api/hub/workflows/{share_id}, /api/hub/workflows/index 14
Workflows /api/workflows, /api/workflows/{workflow_id}, /api/workflows/{workflow_id}/content, /api/workflows/{workflow_id}/fork, /api/workflows/{workflow_id}/versions, /api/workflows/published/{share_id} 11
Auth / session /api/auth/session, /api/auth/token, /.well-known/jwks.json 3
Billing /api/billing/balance, /api/billing/events, /api/billing/ops/{id}, /api/billing/payment-portal, /api/billing/plans, /api/billing/preview-subscribe, /api/billing/status, /api/billing/subscribe, /api/billing/subscription/cancel, /api/billing/subscription/resubscribe, /api/billing/topup 11
Workspace /api/workspace/api-keys, /api/workspace/api-keys/{id}, /api/workspace/invites, /api/workspace/invites/{inviteId}, /api/workspace/leave, /api/workspace/members, /api/workspace/members/{user_id}/api-keys, /api/workspace/members/{userId}, /api/workspaces, /api/workspaces/{id} 15
User / settings / misc /api/feedback, /api/files/mask-layers, /api/internal/cloud_analytics, /api/invites/{token}/accept, /api/secrets, /api/secrets/{id}, /api/user, /api/userdata/{file}/publish, /api/vhs/queryvideo, /api/vhs/viewaudio, /api/vhs/viewvideo, /api/viewvideo 13

New component schemas (all x-runtime: [cloud])

CloudError, CloudJob, CloudJobStatus, CloudJobOutputs, CloudPrompt, HistoryV2Response, HistoryV2Entry, CloudLogsResponse, AssetDownloadRequest, AssetImportRequest, RemoteAssetMetadata, CloudNode, CloudNodeList, HubLabel, HubProfile, HubWorkflow, HubWorkflowList, HubWorkflowIndexEntry, CloudWorkflow, CloudWorkflowList, CloudWorkflowVersion, AuthSession, AuthTokenResponse, JwksResponse, BillingBalance, BillingEvent, BillingEventList, BillingOp, BillingPlan, BillingStatus, BillingSubscription, SubscriptionPreview, Workspace, WorkspaceMember, WorkspaceInvite, WorkspaceApiKey, WorkspaceApiKeyCreated, CloudUser, SecretMeta

New tags

  • auth — Authentication and session management
  • billing — Billing, subscriptions, and payment management
  • workspace — Workspace and team management
  • hub — ComfyUI Hub: profiles, shared workflows, and labels
  • workflows — Cloud workflow management and versioning

Validation

  • Spectral lint passes under the existing .spectral.yaml ruleset with zero new errors or warnings
  • All $ref references resolve correctly
  • YAML syntax is valid
Open in Web Open in Cursor 

@MillerMedia MillerMedia marked this pull request as ready for review May 6, 2026 18:53
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • openapi.yaml
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b8b56a80-0234-4296-9eb0-20b083d0fa69

📥 Commits

Reviewing files that changed from the base of the PR and between c5ecd23 and b556d4a.

📒 Files selected for processing (1)
  • openapi.yaml

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands and usage tips.

cursoragent and others added 5 commits May 6, 2026 14:33
Add ~67 cloud-runtime FE-facing path operations to the core OpenAPI spec,
each tagged with x-runtime: [cloud] at the operation level. These operations
are served by the cloud runtime; the local runtime returns 404 for all of
these paths.

Domain groups added:
- Jobs / prompts: /api/job/*, /api/jobs/*/cancel, /api/prompt/*, etc.
- History v2: /api/history_v2, /api/history_v2/{prompt_id}
- Cloud logs: /api/logs
- Asset extensions: /api/assets/download, export, import, etc.
- Custom nodes: /api/experiment/nodes (cloud install/uninstall)
- Hub: /api/hub/profiles, /api/hub/workflows, /api/hub/labels, etc.
- Workflows: /api/workflows CRUD, versioning, fork, publish
- Auth/session: /api/auth/session, /api/auth/token, /.well-known/jwks.json
- Billing: /api/billing/balance, plans, subscribe, topup, etc.
- Workspace: /api/workspace/*, /api/workspaces/*
- User/settings/misc: /api/user, /api/secrets, /api/feedback, etc.

Also adds corresponding cloud-only component schemas (CloudJob, CloudWorkflow,
BillingPlan, Workspace, HubProfile, AuthSession, etc.), all tagged with
x-runtime: [cloud].

Spectral lint passes under the existing ruleset with zero new warnings.
- Add job_id as a nullable UUID field to the Asset schema
- Mark prompt_id as deprecated with note pointing to job_id
- No x-runtime tag needed as both runtimes populate the field
- Add 'hash' as a nullable string field to Asset and AssetUpdated schemas
- Mark 'asset_hash' as deprecated with a note pointing to 'hash'
- AssetCreated inherits 'hash' via allOf from Asset
- Spectral lint clean (no new warnings)
Three PUT operations were added that should be PATCH (cloud serves
PATCH for partial updates):

- /api/workflows/{workflow_id}
- /api/workspaces/{id}
- /api/workspace/members/{userId}

Two POST operations were added that should be GET (cloud serves GET
with query params):

- /api/assets/remote-metadata (url moves to query param)
- /api/files/mask-layers (response shape replaced — operation queries
  related mask layer filenames, not file uploads)
PR review surfaced operations the cloud runtime serves that weren't
covered by the initial spec push, plus one path family missed entirely.

New methods on existing paths:

- /api/auth/session: add POST (create session cookie) and DELETE (logout)
- /api/secrets/{id}: add GET (read metadata) and PATCH (update)
- /api/hub/profiles: add POST (create profile)
- /api/hub/workflows: add POST (publish to hub)
- /api/hub/workflows/{share_id}: add DELETE (unpublish)
- /api/workspaces/{id}: add DELETE (soft-delete workspace)
- /api/workspace/members/{user_id}/api-keys: add DELETE (bulk revoke)
- /api/workflows/{workflow_id}/versions: add POST (create new version)
- /api/userdata/{file}/publish: add GET (read publish info)

New path family:

- /api/tasks (GET list) and /api/tasks/{task_id} (GET detail) for the
  background task framework

New component schemas (all tagged x-runtime: [cloud]):

CreateSessionResponse, DeleteSessionResponse, UpdateSecretRequest,
BulkRevokeAPIKeysResponse, CreateHubProfileRequest, PublishHubWorkflowRequest,
HubWorkflowDetail, AssetInfo, CreateWorkflowVersionRequest,
WorkflowVersionResponse, WorkflowPublishInfo, TaskEntry, TaskResponse,
TasksListResponse. Existing SecretMeta extended with provider and
last_used_at fields the cloud runtime actually returns.

New tag: task. Spectral lint passes with zero errors.
@MillerMedia MillerMedia force-pushed the cursor/cloud-fe-endpoints-6010 branch from 5629e57 to d25d49d Compare May 6, 2026 21:34
Mirrors the Asset schema's deprecation pattern: prompt_id is marked
deprecated with a description pointing to job_id; job_id is the new
preferred field. PUT /api/assets/{id} responses can now carry both fields
consistent with the other Asset-returning endpoints.
MillerMedia added a commit that referenced this pull request May 6, 2026
Adds assert_job_id_prompt_id_match() helper and uses it across
test_crud.py, test_list_filter.py, and test_uploads.py to verify both
fields are present and carry the same value on every Asset response.

The spec change introducing job_id lives in the parent PR (#13734).
Add nullable integer fields 'width' and 'height' to the Asset schema
in openapi.yaml. These expose original image dimensions in pixels for
clients that need pre-thumbnail size info. Both fields are null for
non-image assets or assets ingested before dimension extraction.

Co-authored-by: Matt Miller <MillerMedia@users.noreply.github.com>
@MillerMedia MillerMedia force-pushed the cursor/cloud-fe-endpoints-6010 branch from a9ef24c to 3c9c376 Compare May 7, 2026 03:44
alexisrolland
alexisrolland previously approved these changes May 7, 2026
These two paths are not actually served by the cloud runtime — they
return 404 with a redirect message pointing callers to the canonical
`/api/jobs/{job_id}` (plural). Declaring them with `x-runtime: [cloud]`
and a 200 response schema is incorrect.

`/api/job/{job_id}/status` stays — it is a real cloud-served endpoint.

Also drops the now-orphaned `CloudJob` and `CloudJobOutputs` component
schemas. `CloudJobStatus` is retained.
@MillerMedia MillerMedia force-pushed the cursor/cloud-fe-endpoints-6010 branch from 57c015e to d1c5ef4 Compare May 7, 2026 18:09
@MillerMedia MillerMedia merged commit 87878f3 into master May 8, 2026
17 checks passed
MillerMedia added a commit that referenced this pull request May 8, 2026
Adds assert_job_id_prompt_id_match() helper and uses it across
test_crud.py, test_list_filter.py, and test_uploads.py to verify both
fields are present and carry the same value on every Asset response.

The spec change introducing job_id lives in the parent PR (#13734).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants