refactor(actions): type consolidated MCP tools - #3398
Draft
SamMorrowDrums wants to merge 6 commits into
Draft
SamMorrowDrums wants to merge 6 commits into
SamMorrowDrums wants to merge 6 commits into
Conversation
SamMorrowDrums
added this pull request to stack #3385
October 2, 2026 15:28
6 tasks done
SamMorrowDrums
force-pushed
the
sammorrowdrums-typed-actions-tools
branch
from
October 2, 2026 20:50
ce71882 to
20bfc4d
Compare
Preserve legacy Actions payloads, validation ordering, coercions, IFC labels, and scope annotations while exposing concrete method-specific output unions to supported clients. Reject unrecognized versions in the shared structured-output capability gate without changing tool availability rules. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
SamMorrowDrums
force-pushed
the
sammorrowdrums-typed-actions-tools
branch
from
October 2, 2026 20:59
20bfc4d to
4d1a88f
Compare
Auto-generated by license-check workflow
…rums-typed-actions-tools Content-free merge so GitHub recomputes mergeability against the current parent head. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Auto-generated by license-check workflow
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Auto-generated by license-check workflow
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Pagination validation regresses legacy behavior, documentation conflicts with the protocol gate, and generated license links are broken.
Review effort: Balanced
Findings: 1
Open (5)
Preserve pagination bounds behavior for legacy protocols · New Align version gating with the documented typed-output contract · New Fix generated license URL to reference the repository root · New Fix generated license URL to reference the repository root · New Fix generated license URL to reference the repository root · New
What changed in this PR
Adds typed inputs and method-specific structured outputs for consolidated GitHub Actions tools while preserving legacy responses.
Changes:
- Adds typed Actions DTOs, schemas, normalization, and protocol-aware outputs.
- Restricts typed outputs to protocol
2026-07-28. - Adds wire tests, snapshots, generated documentation, and license-report updates.
| File | Description |
|---|---|
README.md |
Updates generated Actions parameter documentation. |
third-party-licenses.darwin.md |
Updates Darwin license report. |
third-party-licenses.linux.md |
Updates Linux license report. |
third-party-licenses.windows.md |
Updates Windows license report. |
pkg/inventory/typed_output.go |
Tightens typed-output protocol gating. |
pkg/inventory/typed_output_test.go |
Tests unknown and future protocol versions. |
pkg/github/actions.go |
Migrates Actions handlers to typed inputs and outputs. |
pkg/github/actions_types.go |
Defines Actions DTOs, schemas, and normalizers. |
pkg/github/typed_actions_outputs_test.go |
Adds comprehensive typed Actions wire tests. |
pkg/github/__toolsnaps__/actions_get.snap |
Updates actions_get schema snapshot. |
pkg/github/__toolsnaps__/actions_get_typed.snap |
Adds typed actions_get snapshot. |
pkg/github/__toolsnaps__/actions_list.snap |
Updates actions_list schema snapshot. |
pkg/github/__toolsnaps__/actions_list_typed.snap |
Adds typed actions_list snapshot. |
pkg/github/__toolsnaps__/actions_run_trigger.snap |
Updates trigger schema snapshot. |
pkg/github/__toolsnaps__/actions_run_trigger_typed.snap |
Adds typed trigger snapshot. |
pkg/github/__toolsnaps__/get_job_logs_typed.snap |
Adds typed job-log snapshot. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+66
to
+70
| func actionsInputSchema(tool inventory.ServerTool) inventory.ServerTool { | ||
| schema := tool.Tool.InputSchema.(*jsonschema.Schema) | ||
| // These enums were descriptive on the raw registration path. Keep the | ||
| // supported values discoverable without replacing legacy handler errors. | ||
| for _, field := range []string{"method", "workflow_runs_filter", "workflow_jobs_filter"} { |
Comment on lines
+153
to
+155
| func typedOutputProtocolSupported(version string) bool { | ||
| // Unknown versions must not acquire capabilities through lexical ordering. | ||
| return version == ProtocolVersionMultiRoundTrip |
| - [github.com/google/jsonschema-go/jsonschema](https://pkg.go.dev/github.com/google/jsonschema-go/jsonschema) ([MIT](https://github.com/google/jsonschema-go/blob/v0.4.3/LICENSE)) | ||
| - [github.com/gorilla/css/scanner](https://pkg.go.dev/github.com/gorilla/css/scanner) ([BSD-3-Clause](https://github.com/gorilla/css/blob/v1.0.1/LICENSE)) | ||
| - [github.com/josephburnett/jd/v2](https://pkg.go.dev/github.com/josephburnett/jd/v2) ([MIT](https://github.com/josephburnett/jd/blob/v2.5.0/LICENSE)) | ||
| - [github.com/josephburnett/jd/v2](https://pkg.go.dev/github.com/josephburnett/jd/v2) ([MIT](https://github.com/josephburnett/jd/blob/v2.5.0/v2/LICENSE)) |
| - [github.com/google/jsonschema-go/jsonschema](https://pkg.go.dev/github.com/google/jsonschema-go/jsonschema) ([MIT](https://github.com/google/jsonschema-go/blob/v0.4.3/LICENSE)) | ||
| - [github.com/gorilla/css/scanner](https://pkg.go.dev/github.com/gorilla/css/scanner) ([BSD-3-Clause](https://github.com/gorilla/css/blob/v1.0.1/LICENSE)) | ||
| - [github.com/josephburnett/jd/v2](https://pkg.go.dev/github.com/josephburnett/jd/v2) ([MIT](https://github.com/josephburnett/jd/blob/v2.5.0/LICENSE)) | ||
| - [github.com/josephburnett/jd/v2](https://pkg.go.dev/github.com/josephburnett/jd/v2) ([MIT](https://github.com/josephburnett/jd/blob/v2.5.0/v2/LICENSE)) |
| - [github.com/gorilla/css/scanner](https://pkg.go.dev/github.com/gorilla/css/scanner) ([BSD-3-Clause](https://github.com/gorilla/css/blob/v1.0.1/LICENSE)) | ||
| - [github.com/inconshreveable/mousetrap](https://pkg.go.dev/github.com/inconshreveable/mousetrap) ([Apache-2.0](https://github.com/inconshreveable/mousetrap/blob/v1.1.0/LICENSE)) | ||
| - [github.com/josephburnett/jd/v2](https://pkg.go.dev/github.com/josephburnett/jd/v2) ([MIT](https://github.com/josephburnett/jd/blob/v2.5.0/LICENSE)) | ||
| - [github.com/josephburnett/jd/v2](https://pkg.go.dev/github.com/josephburnett/jd/v2) ([MIT](https://github.com/josephburnett/jd/blob/v2.5.0/v2/LICENSE)) |
7 of 13 tasks
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
Add concrete typed inputs and method-specific output unions to
actions_list,actions_get,actions_run_trigger, andget_job_logs, with structured outputs advertised only for the recognized 2026-07-28 capability protocol.Why
Part of #3385, stacked directly on #3397 at
4db5f54f982aa7c99c73321e99892f07f5f6445b. Actions tools need honest output contracts without changing legacy payloads or validation messages.What changed
json.RawMessage; runner billing maps retain their upstream typed values.anyOfwhere method shapes overlap.MCP impact
Modern clients receive concrete output schemas and matching structured content. Legacy and unrecognized versions do not; descriptive input enum values remain documented rather than overriding legacy validation. As in the existing typed layers, SDK registration presents returned client-acquisition Go errors as
IsErrortool results with the same message; direct handler errors remain unchanged.Prompts tested (tool changes only)
Security / limits
Existing read/write OAuth scopes, destructive annotations, repository-visibility IFC labels, log tail defaults, and content-window behavior are preserved. Public/private IFC labels and disabled-label behavior are tested. Unknown protocol versions no longer expose typed output capabilities.
Tool renaming
deprecated_tool_aliases.goNote: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.
Lint & tests
./script/lint./script/testRequired final sequence, all passed in this order:
UPDATE_TOOLSNAPS=true go test ./...— passed all packages.script/lint— passed, 0 issues.script/test— passed the complete race suite (pkg/github: 191.485s).script/generate-docs— passed.git diff --check— passed.Additional verification: focused Actions/shared-gate tests passed;
ACTIONS_LEGACY_BASELINE=true go test -overlay <exact-parent-actions-overlay.json> ./pkg/github -run TestTypedActions -count=1passed against the Actions handlers extracted from the exact parent SHA. Live PAT-dependent E2E tests were not run. GitHub CI remains to be confirmed after publication.Docs
Generated README Actions parameter documentation; other generated documentation files were unchanged.