feat(gateway): add artifact RPCs#74769
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded. The artifact RPC feature is still valid and not implemented on current main, but this draft branch has blocking protocol, coverage, generated-client, test-shape, and download-source issues, and the same remaining work is now tracked by the newer open replacement PR #74898. So I’m closing this here and keeping the remaining discussion on the canonical linked item. Review detailsBest possible solution: Continue the artifact RPC work on the canonical replacement branch or another maintainer-selected branch, fold in the remaining protocol/security fixes, and land it with Gateway, SDK, generated-client, and docs coverage aligned. Do we have a high-confidence way to reproduce the issue? Yes. Current main reproduces the missing feature by checking that the SDK artifact helpers throw unsupported errors and Gateway method discovery lacks artifacts.* methods; the PR-specific failures are source-verifiable through the TypeBox schema composition and existing input_image/image_url transcript blocks. Is this the best way to solve the issue? No. The direction is right, but this exact draft is not the best merge vehicle because it is superseded by #74898 and still has blocking validator, media-shape, generated-client, test type, and URL-source issues. Security review: Security review needs attention: The PR adds a read-scoped artifact download surface and currently treats any non-data URL-like transcript value as downloadable.
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against c4a4c189f11e. |
Add Gateway artifact RPCs and SDK helpers for list/get/download, with transcript provenance checks, safer download source handling, task/run/session coverage, generated protocol models, docs, and the refreshed generated config schema baseline. Closes openclaw#74706. Refs openclaw#74898, openclaw#74769, openclaw#74804, openclaw#74786.
Add Gateway artifact RPCs and SDK helpers for list/get/download, with transcript provenance checks, safer download source handling, task/run/session coverage, generated protocol models, docs, and the refreshed generated config schema baseline. Closes openclaw#74706. Refs openclaw#74898, openclaw#74769, openclaw#74804, openclaw#74786.
Summary
Describe the problem and fix in 2–5 bullets:
artifacts.list,artifacts.get, andartifacts.downloadgateway RPCs over session transcript artifact blocks, with protocol schemas, method discovery, read-scope authorization, and typed unsupported/not-found errors.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
Regression Test Plan (if applicable)
src/gateway/server-methods/artifacts.test.tsUser-visible / Behavior Changes
SDK and app clients can call
artifacts.list,artifacts.get, andartifacts.downloadwithsessionKey,runId, ortaskIdquery context. Inline transcript artifacts download as base64 bytes; URL-backed artifacts return a URL; unsupported sources return a typed error.Diagram (if applicable)
Security Impact (required)
No)No)No)No)Yes)Yes, explain risk + mitigation: Artifact RPCs expose only artifacts already present in authorized chat/session transcript data and are gated by existingoperator.readscope. They do not read arbitrary local file paths.Repro + Verification
Environment
Steps
artifacts.listwith the session key.artifacts.getandartifacts.downloadwith the returned artifact ID.Expected
artifacts.downloadreturns base64 bytes or URL depending on source.Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
artifacts.list,artifacts.get,artifacts.download, runId-to-session lookup, missing query scope, missing artifact ID, protocol schema compilation, method-scope discovery.Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes)No)No)Risks and Mitigations
artifact_download_unsupportedfor transcript blocks that reference local-only paths.