Skip to content

chore: bump MCP to 1.1.0; include CLI core version in User-Agent - #37

Merged
joalves merged 1 commit into
mainfrom
chore/user-agent-versions
Jun 17, 2026
Merged

chore: bump MCP to 1.1.0; include CLI core version in User-Agent#37
joalves merged 1 commit into
mainfrom
chore/user-agent-versions

Conversation

@joalves

@joalves joalves commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Why

Outbound API requests now report both versions in the User-Agent:

```
ABsmartly-MCP-Server/1.1.0 (CLI-core/1.7.0)
```

The MCP and CLI core ship on different cadences. Pinning both in the UA makes "which version regressed this?" answerable from backend request logs alone — previously the UA only carried the MCP version, so when a payload-shape question came up there was no way to know which CLI core (and therefore which `experimentToInput` / `buildPayloadFromTemplate` behavior) produced it.

How

  • `scripts/sync-version.js` (the prebuild/predev/predeploy hook) now reads the installed `@absmartly/cli`'s `package.json` at build time and writes a `CLI_CORE_VERSION` constant into `src/version.ts` alongside `MCP_VERSION`. If `node_modules` hasn't been installed yet (fresh checkout, only happens before `npm ci`), the constant becomes `"unknown"` rather than crashing the build.
  • `src/fetch-adapter.ts` imports both constants and includes them in the UA string.
  • `package.json` and `manifest.json` bumped `1.0.0 → 1.1.0` (minor). PR test(integration): fix runner, sweep stale prompts/assertions (Phase 2) #29 added param validation to `execute_command` which is an observable behavior change, and the catalog gained new params on transition commands (`note`, `unarchive`, required `reason`). Both are additive — no breaking changes — hence minor not major.

Verification

```
$ ./scripts/ensure-dxt-bundle.sh && npm run typecheck
Updated src/version.ts to MCP=1.1.0, CLI core=1.7.0

tsc --noEmit
$ npm run test:unit
[tests] 3245 passed, 0 failed
```

Test plan

  • CI `test` job passes
  • After merge, Deploy workflow ships v1.1.0 to production
  • `curl -s https://test-1.absmartly.com/v1/something -H "X-Probe: from-mcp" -v` from a deployed MCP returns logs showing the new UA (or equivalent observation against prod-1)

Summary by CodeRabbit

  • Chores
    • Version bumped to 1.1.0
    • Version reporting mechanism improved to track and communicate both the package and CLI core version numbers for enhanced system diagnostics

User-Agent on outbound API requests now reports both the MCP server
version and the resolved @absmartly/cli core version:

  ABsmartly-MCP-Server/1.1.0 (CLI-core/1.7.0)

Why bother:
- Backend logs / dashboards can now tell which MCP version is calling
  and which CLI core it shipped with. Previously the UA only carried
  the MCP version, so when a payload-shape question came up, there
  was no way to know which CLI core (and therefore which
  experimentToInput/build-from-template behavior) produced it.
- The MCP and CLI core ship on different cadences. Pinning both in
  the UA makes "which version regressed this?" answerable from
  request logs alone.

scripts/sync-version.js (the prebuild/predev/predeploy hook) now
reads the installed @absmartly/cli's package.json at build time and
writes a CLI_CORE_VERSION constant into src/version.ts alongside
MCP_VERSION. If node_modules hasn't been installed yet (fresh
checkout, only happens before npm ci), the constant becomes
"unknown" — better than crashing the build.

Version bump from 1.0.0 → 1.1.0 (minor). Earlier PR #29 added
param validation to execute_command which is an observable change
to MCP tool behavior (rejects unknown params with "did you mean"
suggestions instead of silently no-op'ing), and the catalog gained
new params on the experiment-transition commands (note, unarchive,
required reason). Both are additive — no breaking changes — hence
minor not major.

manifest.json (the DXT extension manifest) bumped to match.
package-lock.json picks up the new top-level version automatically.
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5cf8a125-b070-48cb-920b-b8ee181d9d34

📥 Commits

Reviewing files that changed from the base of the PR and between 6dc6a70 and 6ae9147.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • manifest.json
  • package.json
  • scripts/sync-version.js
  • src/fetch-adapter.ts
  • src/version.ts

Walkthrough

The package version is bumped from 1.0.0 to 1.1.0 in both package.json and manifest.json. A new exported constant CLI_CORE_VERSION ("1.7.0") is added to src/version.ts alongside the updated MCP_VERSION. The scripts/sync-version.js code generation script is extended to resolve the installed @absmartly/cli version from node_modules (defaulting to "unknown") and write both constants into src/version.ts. The HTTP User-Agent header in src/fetch-adapter.ts is updated to include both values in the format ABsmartly-MCP-Server/<MCP_VERSION> (CLI-core/<CLI_CORE_VERSION>).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Possibly related PRs

  • absmartly/mcp#26: Both PRs relate to aligning the User-Agent header and version constants with @absmartly/cli at version 1.7.0.

Suggested reviewers

  • bmsilva

Poem

🐇 Hop, hop, the version has grown,
From one-oh to one-one it's flown!
The User-Agent now tells the tale,
Of CLI core on every trail.
Two constants synced, the script is neat —
A tidy bump, oh what a treat! 🎉

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/user-agent-versions

Comment @coderabbitai help to get the list of available commands and usage tips.

@joalves
joalves merged commit f4bc317 into main Jun 17, 2026
1 of 2 checks passed
@joalves
joalves deleted the chore/user-agent-versions branch June 17, 2026 12:36
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.

1 participant