Skip to content

feat(actions): add Phase 3 read tools — list_workflow_run_artifacts & get_artifact#89

Merged
nemolize merged 2 commits into
mainfrom
feat/actions-phase3-artifacts
Jun 10, 2026
Merged

feat(actions): add Phase 3 read tools — list_workflow_run_artifacts & get_artifact#89
nemolize merged 2 commits into
mainfrom
feat/actions-phase3-artifacts

Conversation

@nemolize

Copy link
Copy Markdown
Owner

Phase 3 of the Actions tool suite (#8), adding build-output visibility:

  • list_workflow_run_artifacts — artifacts produced by a run (ID, name, size, expiry), with an optional exact-name filter.
  • get_artifact — single artifact metadata: size, expiry, producing run, and the archive download URL.

This settles the issue's artifact binary-handling concern as URL + metadata only: artifacts are zip archives, and unpacking them in Workers would require a zip-decode dependency that the Phase 2 log decision already avoided — so neither tool downloads or unzips anything. get_artifact surfaces the archive_download_url (an authenticated API endpoint) instead.

Test plan

  • Live smoke test (handler-capture + live Octokit, per the repo's E2E convention): list rendering against a real run with artifacts (actions/upload-artifact), the empty case against this repo's latest run, and get_artifact detail output — all rendered as designed. Throwaway spec deleted after the run.

Remaining phases (rerun / cancel / dispatch) tracked in #8.

… get_artifact (#8)

Phase 3 of the Actions tool suite (#8), adding build-output visibility:

- list_workflow_run_artifacts (listWorkflowRunArtifacts): artifacts of a
  run (ID, name, size, expiry), with an optional exact-name filter.
- get_artifact (getArtifact): single artifact metadata — size, expiry,
  producing run, archive download URL.

Settles the issue's artifact binary-handling concern as "URL + metadata
only": artifacts are zip archives, and unpacking them in Workers would
need a zip-decode dependency the Phase 2 log decision already avoided —
so neither tool downloads or unzips; get_artifact surfaces the
archive_download_url (an authenticated API endpoint) instead.

Adds a formatBytes helper so artifact sizes render readably at any scale.
Copilot AI review requested due to automatic review settings June 10, 2026 06:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds Phase 3 of the Actions tool suite (per issue #8): build-output visibility through two new read-only tools. Both tools surface metadata only (no binary download/unzip), consistent with the project's design decision for handling zip archives in a Workers environment.

Changes:

  • Added list_workflow_run_artifacts tool to list artifacts produced by a workflow run (ID, name, size, expiry) with optional name filter and pagination
  • Added get_artifact tool to fetch single artifact metadata including size, expiry, producing workflow run, and the authenticated archive download URL
  • Updated README comparison table and tool table to reflect the new tools

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/tools/actions.ts Adds formatBytes helper and registers two new tools (list_workflow_run_artifacts, get_artifact) following existing patterns
test/actions.test.js Adds tests covering happy path rendering, empty results, edge cases (null workflow_run, expired artifacts), and parameter forwarding
README.md Updates both the feature comparison table (adds "artifacts" mention) and the tool table (adds two new tool entries)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

workflow_run and its id are both optional in the API schema, but only
the block itself was null-guarded — a partial block would render a
literal `undefined` in the "from run" line. Guard the id too so it
falls back to "(unknown)", matching the existing head_branch / head_sha
fallbacks. Flagged independently by both review layers on PR #89.
@nemolize nemolize merged commit 7e2e3e8 into main Jun 10, 2026
4 checks passed
@nemolize nemolize deleted the feat/actions-phase3-artifacts branch June 10, 2026 11:14
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.

2 participants