feat(runtime): add report artifact contract#18
Merged
Conversation
4a7fc82 to
06f38c5
Compare
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.
Summary
error=false,truncated=true,partial=true,warningReason=output_truncated) while keeping real tool failures as errorsHERMES_ARTIFACT_DIR; files explicitly written there by report skills/tools are discovered and surfaced as safe artifact metadata (artifactId,fileName,sizeBytes,mimeType,sha256,kind,source,summary,canBrowse,canDownload) without exposing local paths or file bodies in eventsGET /agent/sessions/{session_id}/artifacts/{artifact_id}?user_id=...&run_id=..., returning the controlled file as an attachment for Cloud to wrap with org/conversation/turn/action authorizationtools/terminal_tool.pychange and no automatic stdout-to-artifact fallback; complete reports must be explicitly written by the report skill/tool intoHERMES_ARTIFACT_DIR.artifactsdirectories through both Runtime Manager and genericSessionDB.delete_session(..., sessions_dir=...), and allow Hermes file tool paths to use$HERMES_ARTIFACT_DIR/...Verification
uv run --extra dev pytest tests/runtime_manager tests/tools/test_terminal_output_transform_hook.py -quv run --extra dev pytest tests/runtime_manager/test_report_artifacts.py::test_file_tool_paths_can_use_hermes_artifact_dir_env -quv run --extra dev ruff check runtime_manager tools/file_tools.py tools/terminal_tool.py hermes_state.py tests/runtime_manager/test_report_artifacts.py tests/runtime_manager/test_registry.py tests/tools/test_terminal_output_transform_hook.pypython3 -m py_compile runtime_manager/artifacts.py runtime_manager/app.py runtime_manager/manager.py runtime_manager/worker_main.py tools/file_tools.py tools/terminal_tool.py hermes_state.pygit diff --check && git diff --check origin/apecloud-base...HEADNotes