@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.
- package/bin/cortex-mcp.mjs +7 -1
- package/lib/setup.mjs +6 -3
- package/package.json +1 -1
package/bin/cortex-mcp.mjs
CHANGED
|
@@ -17,7 +17,13 @@
|
|
|
17
17
|
* Get your token from the Cortex console → Connect your AI.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
|
|
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
|
-
//
|
|
74
|
-
// cached build
|
|
75
|
-
|
|
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')
|