Skip to content

hosted agents: use the /v2/harness-runtime path prefix - #1189

Merged
sanpj2292 merged 1 commit into
mainfrom
imishra/harness-runtime-route-prefix
Oct 23, 2026
Merged

sanpj2292 merged 1 commit into
mainfrom
imishra/harness-runtime-route-prefix

Conversation

@mishraishika24-pixel

Copy link
Copy Markdown
Collaborator

Summary

Move the hosted agents (Harness Runtime) client from the /v2/agents path prefix to /v2/harness-runtime.

The prefix is now defined once, as hostedAgentsAPIPrefix, and the sessions, workspaces, templates, configs, triggers, webhook-providers and auth base paths are derived from it instead of each repeating /v2/agents. Doc comments and test URLs follow.

  • Method names and request/response types are unchanged.
  • /v2/agents keeps working server-side with identical behaviour, so callers on an older godo are not affected.

Do not merge or release yet

This sends /v2/harness-runtime, which the API edge does not serve until the matching edge rewrite is deployed. Merging and releasing before then would break every hosted-agents call from this client. Opened as a draft until that is confirmed live; I will mark it ready then.

Test plan

  • go test ./...: passes.
  • Added TestHostedAgentsAPIPrefix, which pins the prefix and asserts every derived base path sits under it and none contains /v2/agents.
  • The existing handler tests assert the request URL for each operation, so a request to the old prefix fails them.

🤖 Generated with Claude Code

The Harness Runtime API is served under /v2/harness-runtime. Define the
prefix once (hostedAgentsAPIPrefix) and derive the sessions, workspaces,
templates, configs, triggers, webhook-providers and auth base paths from it,
instead of repeating /v2/agents in each.

Method names, request and response types are unchanged. /v2/agents keeps
working at the edge, so callers on an older godo are not affected.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@mishraishika24-pixel
mishraishika24-pixel marked this pull request as ready for review October 23, 2026 10:16
@SSharma-10

Copy link
Copy Markdown
Contributor

Approving the change, but holding off on merging until the edge rollout is done

@sanpj2292
sanpj2292 merged commit 760d53c into main Oct 23, 2026
8 checks passed
@sanpj2292
sanpj2292 deleted the imishra/harness-runtime-route-prefix branch October 23, 2026 13:35
@SSharma-10 SSharma-10 mentioned this pull request Oct 26, 2026
kishlay-singh-DO added a commit to digitalocean/doctl that referenced this pull request Oct 26, 2026
godo v1.233.0 sends the new prefix (digitalocean/godo#1189); the fake API
in the pause-reason suite only matched /v2/agents/sessions, so list/show
hit the unknown-request branch and timed out.

Co-authored-by: Cursor <cursoragent@cursor.com>
SSharma-10 pushed a commit to digitalocean/doctl that referenced this pull request Oct 26, 2026
* Update godo to v1.233.0 and add microvm upload/download commands

Wraps the new MicroVMs.UploadFile/DownloadFile endpoints:

  doctl compute microvm upload <id> --local-file F --path /remote [--mode 0600 --uid N --gid N]
  doctl compute microvm download <id> --path /remote --save-to F

Upload sends the local SHA-256 so the API verifies before replacing the
target. Download streams into a temp file and renames on success; godo's
body checks the announced digest at EOF, so a mismatch leaves nothing at
--save-to.

Co-authored-by: Cursor <cursoragent@cursor.com>

* agentproxytest: serve sessions under /v2/harness-runtime too

godo v1.233.0 moved hosted-agents routes from /v2/agents to
/v2/harness-runtime. The fake harness only registered the old prefix, so
every StreamSession in internal/agentproxy/opencode got a 404 and the
proxy answered 502. Register both prefixes, as the edge does.

Co-authored-by: Cursor <cursoragent@cursor.com>

* integration: harness-runtime fake serves /v2/harness-runtime/sessions

godo v1.233.0 sends the new prefix (digitalocean/godo#1189); the fake API
in the pause-reason suite only matched /v2/agents/sessions, so list/show
hit the unknown-request branch and timed out.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
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

⌂ 换网址