feat(gateway): add artifact RPCs#74898
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded. This PR is useful source work, but it has unresolved artifact scoping and download-source issues, and the open maintainer hardening PR #74926 contains this PR's exact commits plus the follow-up fixes, SDK wiring, docs, tests, and changelog coverage needed for the linked artifact API request. So I’m closing this here and keeping the remaining discussion on the canonical linked item. Review detailsBest possible solution: Use #74926 as the canonical path: preserve credit for this source contribution, review the maintainer hardening branch, and let #74706 close only after the hardened Gateway/SDK/docs implementation lands. Do we have a high-confidence way to reproduce the issue? Yes. A source-level reproduction is clear: current main lacks Is this the best way to solve the issue? No for this PR as written. The safer solution is the open #74926 superset, which requires explicit provenance for run/task-scoped artifacts, rejects unsafe/local URL downloads, and wires the App SDK/docs surface. Security review: Security review needs attention: The diff adds a read/download artifact surface with concrete data-scoping and URL-source policy issues; the open maintainer superseding PR tracks the hardening.
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 914287642de5. |
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
@openclaw/sdkhas artifact helpers, but Gateway did not expose SDK-facing artifact ledger/download RPCs.artifacts.list,artifacts.get, andartifacts.downloadGateway RPCs, protocol schemas/types, method discovery/scopes, handler tests, and generated Swift protocol models.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.tsand protocol generation checks.User-visible / Behavior Changes
Gateway now advertises and handles
artifacts.list,artifacts.get, andartifacts.downloadfor session/run/task-scoped artifact discovery and retrieval.Diagram (if applicable)
Security Impact (required)
Yes/No) YesYes/No) NoYes/No) NoYes/No) NoYes/No) YesYes, explain risk + mitigation: Artifact read/download methods requireoperator.readand only expose artifacts discoverable from existing session transcript content for the requested session/run/task scope.Repro + Verification
Environment
Steps
Expected
Actual
Evidence
Local verification:
pnpm protocol:checkpnpm tsgo:prodpnpm check:test-typespnpm lint --threads=8node scripts/test-projects.mjs src/gateway/server-methods/artifacts.test.tsOPENCLAW_OPENGREP_BASE_REF=upstream/main...HEAD scripts/run-opengrep.sh --changed --json --errorHuman Verification (required)
upstream/main, pushed once before local tests per request, then fixed generated protocol output, schema validation, test fixture types, and lint issues.Review Conversations
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations