Skip to content

fix: use artifacts route for daemon downloads#434

Merged
thymikee merged 1 commit intomainfrom
codex/artifact-download-route
Apr 24, 2026
Merged

fix: use artifacts route for daemon downloads#434
thymikee merged 1 commit intomainfrom
codex/artifact-download-route

Conversation

@thymikee
Copy link
Copy Markdown
Contributor

@thymikee thymikee commented Apr 24, 2026

Summary

Change daemon artifact download URLs from /upload/:artifactId to /artifacts/:artifactId so bridge routing can keep artifact downloads separate from upload endpoints.

Updated the daemon HTTP download route and remote artifact download tests to use /artifacts/:artifactId; no /upload/:artifactId download route or test coverage remains. Upload endpoints (POST /upload, /upload/preflight, /upload/finalize) are unchanged.

Touched files: 4. Scope stayed within daemon artifact download behavior. Docs/skills were not updated because this is an internal route shape, not a CLI or workflow surface change.

Validation

  • pnpm format
  • pnpm check:quick
  • pnpm check:unit
  • rg -n "startsWith\('/upload/'\)|slice\('/upload/'|includes\('/upload/'\)|/agent-device/upload/|callGet\([^\n]*upload|GET.*upload|/upload/\$\{artifactId\}" src test

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 24, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstackincubator.github.io/agent-device/pr-preview/pr-434/

Built to branch gh-pages at 2026-04-24 21:49 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dbfdda369c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/daemon-client.ts
function buildDaemonArtifactUrl(baseUrl: string, artifactId: string): string {
const normalizedBase = baseUrl.endsWith('/') ? baseUrl : `${baseUrl}/`;
return new URL(`upload/${encodeURIComponent(artifactId)}`, normalizedBase).toString();
return new URL(`artifacts/${encodeURIComponent(artifactId)}`, normalizedBase).toString();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve daemon artifact download route compatibility

This change makes remote artifact downloads call /artifacts/:id, but the built-in daemon HTTP server still only serves artifact downloads on GET /upload/:id (see src/daemon/http-server.ts route checks around lines 409-410). For clients using --daemon-base-url against a direct daemon endpoint (as documented for remote HTTP daemon usage), commands that return artifacts (e.g., screenshots/recordings) will now fail with 404 during materialization.

Useful? React with 👍 / 👎.

@thymikee thymikee force-pushed the codex/artifact-download-route branch from dbfdda3 to 288707d Compare April 24, 2026 21:48
@thymikee thymikee merged commit 22936fd into main Apr 24, 2026
15 checks passed
@thymikee thymikee deleted the codex/artifact-download-route branch April 24, 2026 21:52
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.

1 participant