vexp-cli 2.0.32 → 2.1.0
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/dist/license.js +26 -0
- package/package.json +6 -6
package/dist/license.js
CHANGED
|
@@ -183,6 +183,22 @@ export async function tryOnlineRefresh(longJwt) {
|
|
|
183
183
|
// Only save if the freshToken itself verifies locally
|
|
184
184
|
if (verifyAndDecode(data.freshToken)) {
|
|
185
185
|
saveFreshToken(data.freshToken);
|
|
186
|
+
// The server re-issued a 30-day long token (entitlement changed:
|
|
187
|
+
// AppSumo tier up/downgrade, or a Stripe resub migration). Overwrite
|
|
188
|
+
// the on-disk long JWT so the new entitlement survives even fully
|
|
189
|
+
// offline and the previous one stops working — without the user
|
|
190
|
+
// re-pasting a key. Only persist if it verifies locally.
|
|
191
|
+
if (data.newLongToken && verifyAndDecode(data.newLongToken)) {
|
|
192
|
+
try {
|
|
193
|
+
const licensePath = getLicensePath();
|
|
194
|
+
fs.mkdirSync(path.dirname(licensePath), { recursive: true });
|
|
195
|
+
fs.writeFileSync(licensePath, data.newLongToken, "utf-8");
|
|
196
|
+
}
|
|
197
|
+
catch {
|
|
198
|
+
// read-only FS: the freshToken still carries the new entitlement
|
|
199
|
+
// for this session; we just can't persist the long JWT.
|
|
200
|
+
}
|
|
201
|
+
}
|
|
186
202
|
writeLastCheck(Date.now());
|
|
187
203
|
// Any previous device-blocked state is stale once the server issues
|
|
188
204
|
// a freshToken for us — we are back in a good state.
|
|
@@ -257,6 +273,12 @@ export function activateLicense(jwt) {
|
|
|
257
273
|
const licensePath = getLicensePath();
|
|
258
274
|
fs.mkdirSync(path.dirname(licensePath), { recursive: true });
|
|
259
275
|
fs.writeFileSync(licensePath, jwt, "utf-8");
|
|
276
|
+
// The freshly activated long JWT is authoritative. Drop any cached
|
|
277
|
+
// freshToken: it may be a 7-day token minted at the PREVIOUS tier, and both
|
|
278
|
+
// readLicenseLimits() and the Rust daemon prefer fresh.jwt over license.jwt —
|
|
279
|
+
// leaving it would shadow the just-activated tier until it expired. The next
|
|
280
|
+
// online refresh re-creates fresh.jwt at the new tier.
|
|
281
|
+
removeFreshToken();
|
|
260
282
|
return claims;
|
|
261
283
|
}
|
|
262
284
|
/** Remove the current license file (and any cached freshToken) */
|
|
@@ -297,6 +319,10 @@ function claimsToLimits(claims) {
|
|
|
297
319
|
return { maxNodes: 100_000, maxRepos: 0, allTools: true, plan: "tier3", email: claims.sub, renewsAt };
|
|
298
320
|
case "tier4":
|
|
299
321
|
return { maxNodes: 0, maxRepos: 0, allTools: true, plan: "tier4", email: claims.sub, renewsAt };
|
|
322
|
+
// WS-H H5 forward-compat: capacity plans (ent_500/ent_2000/ent_unlimited)
|
|
323
|
+
// are SERVER-ONLY (the self-hosted SDK gateway). A capacity JWT presented to
|
|
324
|
+
// the cli/vscode falls through here and fails-closed to FREE — never crashes,
|
|
325
|
+
// never grants entitlements meant for the server.
|
|
300
326
|
default:
|
|
301
327
|
return FREE_LIMITS;
|
|
302
328
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vexp-cli",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Vexp — Context Engine for AI Coding Agents. Pre-indexes your codebase into a dependency graph and delivers ranked context to any MCP-compatible agent. 58% lower cost per task, 90% fewer tool calls (SWE-bench Verified). Works with Claude Code, Cursor, Copilot, Windsurf, Codex, Cline, Aider, and 12+ agents. Local-first. Your code never leaves your machine.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -100,10 +100,10 @@
|
|
|
100
100
|
"node": ">=20.0.0"
|
|
101
101
|
},
|
|
102
102
|
"optionalDependencies": {
|
|
103
|
-
"@vexp/core-linux-x64": "2.0
|
|
104
|
-
"@vexp/core-linux-arm64": "2.0
|
|
105
|
-
"@vexp/core-darwin-x64": "2.0
|
|
106
|
-
"@vexp/core-darwin-arm64": "2.0
|
|
107
|
-
"@vexp/core-win32-x64": "2.0
|
|
103
|
+
"@vexp/core-linux-x64": "2.1.0",
|
|
104
|
+
"@vexp/core-linux-arm64": "2.1.0",
|
|
105
|
+
"@vexp/core-darwin-x64": "2.1.0",
|
|
106
|
+
"@vexp/core-darwin-arm64": "2.1.0",
|
|
107
|
+
"@vexp/core-win32-x64": "2.1.0"
|
|
108
108
|
}
|
|
109
109
|
}
|