Skip to content

[RUN-4806] Add User-Agent header to api_call requests - #84

Merged
fdevans merged 3 commits into
mainfrom
custom-agent-header
Aug 20, 2026
Merged

fdevans merged 3 commits into
mainfrom
custom-agent-header

Conversation

@smartinellibenedetti

Copy link
Copy Markdown
Contributor

Summary

  • Send rundeck-mcp/<version> as the User-Agent header on every api_call request (also covers runner_create/acl_manage, which call through it).
  • The version is baked into src/tools/api.ts's USER_AGENT constant at CI build time by a new step in .circleci/config.yml's build job, guarded by a strict vX.Y.Z tag-format check before use (CIRCLE_TAG is otherwise interpolated unsanitized into a shell command, which git's permissive ref-name rules make a theoretical injection vector). Branch/PR builds keep the SNAPSHOT default.

Note: base is set to sdk-update (#83) since that PR should merge first.

Test plan

  • npm run build
  • npm test (320/320 passing)
  • Verified the sed target pattern (rundeck-mcp/SNAPSHOT) is unique in the codebase

🤖 Generated with Claude Code

smartinellibenedetti and others added 3 commits August 19, 2026 18:25
Sends "rundeck-mcp/<version>" on every outbound API call. The version is
baked into src/tools/api.ts's USER_AGENT constant at build time by a new
CI step (guarded by a strict vX.Y.Z tag format check to avoid shell
injection via CIRCLE_TAG), so branch/PR builds keep the SNAPSHOT default.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sets server.json's version fields to "SNAPSHOT" as the placeholder,
matching src/tools/api.ts's USER_AGENT, and extends the CI build step's
sed replacement to patch both so server.json doesn't drift from the
actual release version.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@smartinellibenedetti smartinellibenedetti changed the title Add User-Agent header to api_call requests [RUN-4806] Add User-Agent header to api_call requests Aug 20, 2026
Base automatically changed from sdk-update to main August 20, 2026 14:16
@fdevans
fdevans merged commit 5baed47 into main Aug 20, 2026
4 checks passed
@fdevans
fdevans deleted the custom-agent-header branch August 20, 2026 14:16
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