@minhpnq1807/contextos 0.5.19 → 0.5.20
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/CHANGELOG.md +5 -0
- package/bin/ctx.js +15 -10
- package/package.json +1 -1
- package/plugins/ctx/lib/ruler-sync.js +10 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.20
|
|
4
|
+
|
|
5
|
+
- Refreshes stale `ctx-mcp` Ruler entries that point at temporary paths such as `/tmp/contextos/...`.
|
|
6
|
+
- Keeps `ctx install` fast by skipping large skill/workflow discovery embedding warmup unless `CONTEXTOS_INSTALL_WARM_DISCOVERY=1` is set.
|
|
7
|
+
|
|
3
8
|
## 0.5.19
|
|
4
9
|
|
|
5
10
|
- Makes `ctx-mcp` startup non-mutating: the MCP server now verifies the local embedding model without warming or rewriting `embeddings.db` during agent initialization.
|
package/bin/ctx.js
CHANGED
|
@@ -299,16 +299,21 @@ async function warmInstallEmbeddings() {
|
|
|
299
299
|
dataDir,
|
|
300
300
|
allowRemote: !modelReady
|
|
301
301
|
});
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
302
|
+
const warmDiscovery = process.env.CONTEXTOS_INSTALL_WARM_DISCOVERY === "1";
|
|
303
|
+
const skillResult = warmDiscovery
|
|
304
|
+
? await warmSkillEmbeddings({
|
|
305
|
+
cwd: process.cwd(),
|
|
306
|
+
dataDir,
|
|
307
|
+
allowRemote: !modelReady
|
|
308
|
+
})
|
|
309
|
+
: { count: 0 };
|
|
310
|
+
const workflowResult = warmDiscovery
|
|
311
|
+
? await warmWorkflowEmbeddings({
|
|
312
|
+
cwd: process.cwd(),
|
|
313
|
+
dataDir,
|
|
314
|
+
allowRemote: !modelReady
|
|
315
|
+
})
|
|
316
|
+
: { count: 0 };
|
|
312
317
|
return { ...result, modelAlreadyCached: modelReady, fileCount: fileResult.count, skillCount: skillResult.count, workflowCount: workflowResult.count };
|
|
313
318
|
}
|
|
314
319
|
|
package/package.json
CHANGED
|
@@ -268,6 +268,10 @@ function readRulerMcpServers({ tomlPath } = {}) {
|
|
|
268
268
|
return servers;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
+
function readRulerMcpServer({ tomlPath, name } = {}) {
|
|
272
|
+
return readRulerMcpServers({ tomlPath }).find((server) => server.name === name) || null;
|
|
273
|
+
}
|
|
274
|
+
|
|
271
275
|
function antigravityMcpConfigPaths() {
|
|
272
276
|
const home = process.env.HOME || process.cwd();
|
|
273
277
|
return [
|
|
@@ -415,7 +419,12 @@ export function injectCtxMcp({ tomlPath, mcpServerPath, agents = DEFAULT_AGENTS,
|
|
|
415
419
|
|
|
416
420
|
let content = fs.readFileSync(tomlPath, "utf8");
|
|
417
421
|
const sectionExists = hasTomlSection(content, `mcp_servers.${CTX_MCP_NAME}`);
|
|
418
|
-
if (sectionExists && !force)
|
|
422
|
+
if (sectionExists && !force) {
|
|
423
|
+
const existingServer = readRulerMcpServer({ tomlPath, name: CTX_MCP_NAME });
|
|
424
|
+
const existingPath = existingServer?.command === "node" ? existingServer.args?.[0] : existingServer?.command;
|
|
425
|
+
if (existingPath && isRunnableMcpCommand(existingPath)) return { changed: false, existed: true };
|
|
426
|
+
force = true;
|
|
427
|
+
}
|
|
419
428
|
|
|
420
429
|
if (force) {
|
|
421
430
|
content = removeTomlSection(content, "mcp");
|