@theronap/cortex-mcp 0.9.6 → 0.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,13 @@
17
17
  * Get your token from the Cortex console → Connect your AI.
18
18
  */
19
19
 
20
- const VERSION = '0.9.5'
20
+ import { readFileSync } from 'node:fs'
21
+ import { fileURLToPath } from 'node:url'
22
+ import { dirname, join } from 'node:path'
23
+ // VERSION = package.json, the single source of truth. NEVER hardcode it: a stale constant here is
24
+ // exactly what shipped 0.9.6 as "0.9.5", so `setup` pinned the wrong version into every config and
25
+ // no amount of cache-clearing/@version could fix an install. Derive it so it can never drift again.
26
+ const VERSION = JSON.parse(readFileSync(join(dirname(fileURLToPath(import.meta.url)), '..', 'package.json'), 'utf8')).version
21
27
  const cmd = process.argv[2]
22
28
  const rest = process.argv.slice(3)
23
29
 
package/lib/setup.mjs CHANGED
@@ -70,9 +70,12 @@ export async function runSetup(argv, version) {
70
70
  )
71
71
  process.exit(1)
72
72
  }
73
- // Pin the wired commands to the installed version so the config can't later run a stale
74
- // cached build (npx may reuse a cached older version for an unpinned spec).
75
- const spec = version ? `${PKG}@${version}` : PKG
73
+ // Wire the moving `stable` dist-tag NOT a frozen version. A bare spec lets npx reuse a stale
74
+ // cached build; a frozen `@x.y.z` freezes the machine on that version forever (the 0.9.5→0.9.6
75
+ // freeze that stranded a pilot install). A tag is re-resolved by npx against the registry, so
76
+ // machines pick up promoted releases on next launch without re-running setup. Promote a
77
+ // validated build with: npm dist-tag add @theronap/cortex-mcp@<version> stable
78
+ const spec = `${PKG}@stable`
76
79
  const base = resolveBase(process.env.CORTEX_URL)
77
80
  const home = homedir()
78
81
  const claudeJson = join(home, '.claude.json')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theronap/cortex-mcp",
3
- "version": "0.9.6",
3
+ "version": "0.9.7",
4
4
  "description": "Connect your AI assistant to Cortex — your org's projects, activity, gaps, and directives, scoped to you.",
5
5
  "type": "module",
6
6
  "bin": {