Skip to content

Send the real plugin version during login - #96

Merged
ishaanxgupta merged 1 commit into
supermemoryai:mainfrom
Chebaleomkar:fix/auth-cli-version
Sep 27, 2026
Merged

ishaanxgupta merged 1 commit into
supermemoryai:mainfrom
Chebaleomkar:fix/auth-cli-version

Conversation

@Chebaleomkar

Copy link
Copy Markdown
Contributor

Fixes #95

Problem

login sends cli_version to Supermemory, but it was hardcoded as "2.0.10" in src/services/auth.ts, so every release since then reports itself as 2.0.10. The correct version was already available: since #65, scripts/sync-version.mjs generates PLUGIN_VERSION from package.json on every build, and the update check and sm_plugin_version already use it. This was the one spot left over, added in #60 just before #65 landed.

Fix

Use the synced constant instead of the literal:

+import { PLUGIN_VERSION } from "../version.js";
 ...
-        cli_version: "2.0.10",
+        cli_version: PLUGIN_VERSION,

cli_version now always matches package.json, including future releases, with no manual edit needed. It's imported from ../version.js directly (not via config.ts) to keep auth.ts free of config side effects.

Before / after

package.json is 2.0.15. login was pointed at a dead local auth URL with a 3 s timeout, so nothing reached Supermemory:

# main
If it doesn't open, visit: http://127.0.0.1:9/auth?callback=...&os=win32-x64&cwd=...&cli_version=2.0.10

# this branch
If it doesn't open, visit: http://127.0.0.1:9/auth?callback=...&os=win32-x64&cwd=...&cli_version=2.0.15

Testing

  • Ran the built CLI's login on Windows 11 on both branches (output above).
  • Confirmed the built dist/cli.js on main contains PLUGIN_VERSION = "2.0.15" alongside the literal cli_version: "2.0.10". This branch uses cli_version: PLUGIN_VERSION.
  • bun run typecheck is clean and bun test passes (33 tests).
  • Touches a different hunk of auth.ts than Keep login waiting when the browser cannot be opened #90, so the two merge independently.

The auth URL hardcoded cli_version=2.0.10, so every release reported
itself as 2.0.10. Use PLUGIN_VERSION, which is synced from package.json.
ishaanxgupta added a commit that referenced this pull request Sep 27, 2026
Fixes #97.

- Describe what the plugin does today: profile-only first-message context,
  direct recall by default, the real `[SUPERMEMORY]` and
  `<supermemory-context>` blocks, `search` scope and `limit` semantics,
  container tag precedence, `filterPrompt`, capture defaults, and
  `SUPERMEMORY_DEBUG`.
- Document the installer steps once, including the config-directory and
  in-place config handling from #92 and #94.
- The generated /supermemory-login command no longer claims a fixed port, and
  the tool's help lists `limit` for search.
- Add a CI workflow running typecheck, tests, and build on pull requests and
  pushes to main.
- Bump to 2.0.16 so the CLI fixes in #92, #94, and #96 publish together.
@ishaanxgupta
ishaanxgupta merged commit 4271adf into supermemoryai:main Sep 27, 2026
3 checks passed
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.

Login always reports cli_version=2.0.10 regardless of the installed version

2 participants