feat(jobs): artifact download + object artifact-refs (run402:// retired)#421
Merged
Conversation
Gateway (run402-private #448) added GET /jobs/v1/runs/:job_id/artifacts/:filename
and changed the managed-jobs `artifacts` response from bare run402:// ref strings
to { url, content_type, sha256, size_bytes } objects (sha256/size_bytes omitted
for pre-change jobs). Surface the new endpoint + shape across every interface.
- SDK: ManagedJobArtifact type; artifacts is Record<string, ManagedJobArtifact>;
jobs.downloadArtifact(projectId, jobId, filename) -> Response; scoped wrapper.
- MCP: jobs_download_artifact tool (writes bytes to output_path).
- CLI/OpenClaw: run402 jobs artifacts get <job_id> <file> --output <path>.
- Tests: SDK + MCP unit tests, sync SURFACE/SDK map + nested-action parser,
cli-help nested-group coverage.
- Docs: cli/llms-cli.txt, SKILL.md, openclaw/SKILL.md.
Closes #420
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #420 (gateway side: run402-private #448).
What changed
The gateway added
GET /jobs/v1/runs/:job_id/artifacts/:filenameand changed the managed-jobsartifactsresponse from barerun402://ref strings to objects{ url, content_type, sha256, size_bytes }(sha256/size_bytesomitted for pre-change jobs;urlstill serves). The never-resolvablerun402://storage/...scheme is retired. This PR surfaces both across every interface.sdk/src/namespaces/jobs.ts): newManagedJobArtifacttype;ManagedJobResponse.artifactsis nowRecord<string, ManagedJobArtifact>;jobs.downloadArtifact(projectId, jobId, filename) → Response(service-key auth;ApiErroron 404). Scoped wrapperr.project(id).jobs.downloadArtifact(jobId, filename).src/tools/jobs.ts,src/index.ts):jobs_download_artifacttool — writes bytes tooutput_path(mirrorsassets_get).cli/lib/jobs.mjs):run402 jobs artifacts get <job_id> <file> --output <path>(nested group, mirroringdeploy release).cli/llms-cli.txt,SKILL.md,openclaw/SKILL.md.Since the MCP/CLI echo gateway JSON, "stop printing
run402://" is automatic — the repo never parsed the scheme; the type change is the contract update.Tests / verification
npm test→ 613 pass, 0 fail; doc snippets compile.sync.test.tsSURFACE +SDK_BY_CAPABILITY+ nested-action parser;cli-help.test.mjsnested-group coverage;scoped.test.tsdrift wrapper.{ job_id, filename, project_id, output, content_type, size_bytes }with correctBearerauth on the right path; 404 returns a structured error envelope.Closes #420
🤖 Generated with Claude Code