Skip to content

agents: document Harness Runtime under /v2/harness-runtime - #1302

Open
mishraishika24-pixel wants to merge 4 commits into
mainfrom
imishra/harness-runtime-path-prefix
Open

mishraishika24-pixel wants to merge 4 commits into
mainfrom
imishra/harness-runtime-path-prefix

Conversation

@mishraishika24-pixel

@mishraishika24-pixel mishraishika24-pixel commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Harness Runtime API is now reachable at /v2/harness-runtime. The edge authorizes the new prefix and rewrites it onto /v2/agents, so no service changed and the responses are identical either way. This moves the documented surface to the new prefix.

/v2/agents keeps working for callers on an older client — it is just no longer the documented spelling. Documenting both is not an option: the two spellings would carry duplicate operationIds, which generated clients cannot express.

One exception: a trigger's webhook_url (and the create Location) still come back as /v2/agents/triggers/{id}/webhook. That example stays on the spelling the service returns. Both /v2/agents/triggers/{id}/webhook and /v2/harness-runtime/triggers/{id}/webhook are accepted and keep working; callers paste webhook_url unchanged. The URL is what gets configured in GitHub, GitLab and Slack.

The rename also makes the path match the names already in use elsewhere: the Harness Runtime tag in this spec, doctl harness-runtime, and the harness-runtime MCP service. /v2/agents was additionally the wrong noun, since /v2/gen-ai/agents is a different product and a harness: none session has no agent in it at all.

What changed

One mechanical prefix swap, 135 occurrences across 69 files, including the routes #1301 added (cancel, image messages, provider connections):

Where Count
paths: keys in DigitalOcean-public.v2.yaml 50
Curl example files 65
models/definitions.yml descriptions 4
Prose in agents_list_config_sessions.yml and agents_port_forward_session.yml 2
Harness Runtime tag description 6

The tag description is also rewrapped, because the longer prefix pushed several lines past the wrap the rest of that block uses. No wording changed there.

webhook_config.webhook_url is not part of that swap. Its example is https://api.digitalocean.com/v2/agents/triggers/b1a0.../webhook.

Unchanged: every operationId, tag, parameter and request/response schema. A generated client keeps its method names, and only the URL it builds moves.

Client lane

Heads up for the other in-flight agents PRs

#1291 and #1296 both add paths under /v2/agents. They will conflict here and should land on /v2/harness-runtime instead — new Harness Runtime routes should not be added under the old prefix from now on.

Test plan

  • make bundle: bundles clean; the new path keys appear in the bundle.
  • spectral lint on the spec and on the bundle: 0 errors, and the same 8 warnings main already reports. The one warning in a file this PR touches (agents_port_forward_session.yml, a WebSocket upgrade with only a 101 response) is pre-existing and unrelated.
  • rg '/v2/agents' specification/ matches only the webhook_url example and the receive-webhook note that both spellings stay accepted.

Made with Cursor

The Harness Runtime API is reachable at /v2/harness-runtime: the edge
authorizes the new prefix and rewrites it onto /v2/agents, with no service
change. Move the documented path keys, the prose that names them and the
curl examples over to it.

operationIds, tags, parameters and request/response shapes are unchanged, so
a generated client keeps its method names and only the URL it builds moves.
/v2/agents keeps serving identical responses for callers on an older client.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@mishraishika24-pixel
mishraishika24-pixel force-pushed the imishra/harness-runtime-path-prefix branch from 2b797bd to b36f751 Compare November 3, 2026 07:02
@sanpj2292

Copy link
Copy Markdown
Contributor

Merge gate: confirm the edge rewrite is live everywhere before this publishes

This PR documents /v2/harness-runtime on the premise that the edge rewrites it onto /v2/agents. The services still only serve /v2/agents, so if any host that serves the API is missing the rewrite, every documented URL returns 404 there.

The edge authorization for the new prefix is already merged. I couldn't verify that the rewrite is deployed on every host that carries /v2/agents (api, cloud console, the ohr-agent hosts, preview, and staging).

Could the owner of the edge rewrite confirm it is deployed on all of them? Until then I'd hold the merge.

@sanpj2292

Copy link
Copy Markdown
Contributor

webhook_config.webhook_url example doesn't match what the API returns

models/definitions.yml now shows the example as https://api.digitalocean.com/v2/harness-runtime/triggers/b1a0.../webhook. The trigger service still returns the /v2/agents/triggers/{id}/webhook form in webhook_url, and the same prefix in the Location header on create. A user comparing the docs to a real response will see a different URL.

Suggested change:

  • Keep the example as https://api.digitalocean.com/v2/agents/triggers/b1a0.../webhook, so it matches the real response.
  • In agents_receive_trigger_webhook.yml, say that both /v2/agents/triggers/{id}/webhook and /v2/harness-runtime/triggers/{id}/webhook are accepted and will keep working indefinitely. Users should paste the webhook_url they get back unchanged.

The second point matters because this URL gets pasted into GitHub, GitLab and Slack. Those can't be updated when the prefix changes, so the old spelling has to stay valid permanently, and the docs shouldn't imply it is deprecated.

@mishraishika24-pixel

Copy link
Copy Markdown
Contributor Author

Checked both.

Edge rewrite. Live on the hosts named above. Unauthenticated GET /v2/harness-runtime/sessions returns the same 401 Unable to authenticate you as GET /v2/agents/sessions on api, cloud (including the /preview lane), ohr-agent.do-ai.run, ohr-agent.do-ai-test.run, api-ric1, api-mem1, and staging api and cloud. A prefix the edge does not know returns 404 could not be routed. POST to either webhook spelling reaches the trigger service (404 trigger not found for an unknown id), so the new prefix is rewritten through, not only authorized. Not holding the merge on this.

webhook_url example. Valid. The trigger service still writes /v2/agents/triggers/{id}/webhook into webhook_url and the create Location, so the example should stay on that spelling. Both spellings are already accepted, and the /v2/agents one stays valid permanently — that URL is what gets pasted into GitHub, GitLab and Slack. Next commit puts the example back and says so on the receive-webhook operation: paste webhook_url unchanged.

The trigger service still writes /v2/agents into webhook_url, so the
example has to match that response. Both spellings of the webhook path
stay accepted, and callers paste the returned URL unchanged.
@mishraishika24-pixel

Copy link
Copy Markdown
Contributor Author

Done in 6aa3e75.

webhook_url example is back to https://api.digitalocean.com/v2/agents/triggers/b1a0.../webhook, matching what the trigger service returns. The receive-webhook operation now says both /v2/agents/triggers/{trigger_id}/webhook and /v2/harness-runtime/triggers/{trigger_id}/webhook stay accepted, and that callers paste the returned webhook_url unchanged.

amandhaw added a commit that referenced this pull request Nov 4, 2026
…g is used

Moves the path and the curl example to /v2/harness-runtime/regions. #1302
moves the documented Harness Runtime surface to that prefix and names
this PR; a new route under /v2/agents would conflict with it.

Rewrites the descriptions. They said a returned slug "is accepted as the
region a session or config is created in", which reads as a placement
choice. create_session_request.region says the opposite: the session is
always created in the region whose API host served the request, and the
body field is only a check against that host.

The slug now names the host to call, is_default names the region the
region-less host serves, and the operation says what a team outside the
regional routing rollout sees.

Reported in review by @DO-rrao.
amandhaw added a commit that referenced this pull request Nov 6, 2026
* agents: document GET /v2/agents/regions (ListRegions)

Adds the per-team region catalog the console renders as its region
picker. The default region is always listed; every other open region
is listed only when the team holds its placement grant, so the catalog
agrees slug for slug with what a create admits.

Schemas are named harness_region / harness_regions_response rather than
region, which already names the Droplet region schema; without the
prefix the bundler renames them to definitions_region and the generated
SDK types read as DefinitionsRegion.

Implemented by cthulhu #183673.

* agents: document ListRegions under /v2/harness-runtime, and how a slug is used

Moves the path and the curl example to /v2/harness-runtime/regions. #1302
moves the documented Harness Runtime surface to that prefix and names
this PR; a new route under /v2/agents would conflict with it.

Rewrites the descriptions. They said a returned slug "is accepted as the
region a session or config is created in", which reads as a placement
choice. create_session_request.region says the opposite: the session is
always created in the region whose API host served the request, and the
body field is only a check against that host.

The slug now names the host to call, is_default names the region the
region-less host serves, and the operation says what a team outside the
regional routing rollout sees.

Reported in review by @DO-rrao.

---------

Co-authored-by: RohithSangati <73009657+RohithSangati@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

3 participants