@danielblomma/cortex-mcp 1.2.0 → 1.2.1
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.mjs
CHANGED
|
@@ -145,6 +145,10 @@ function ensureScaffoldExists() {
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
// Files that should never be overwritten if they already exist in the target.
|
|
149
|
+
// These contain user-specific configuration that would be lost on re-init.
|
|
150
|
+
const PRESERVE_FILES = new Set(["config.yaml", "enterprise.yml", "enterprise.yaml"]);
|
|
151
|
+
|
|
148
152
|
function copyDirectory(sourceDir, targetDir) {
|
|
149
153
|
fs.mkdirSync(targetDir, { recursive: true });
|
|
150
154
|
const entries = fs.readdirSync(sourceDir, { withFileTypes: true });
|
|
@@ -158,6 +162,11 @@ function copyDirectory(sourceDir, targetDir) {
|
|
|
158
162
|
continue;
|
|
159
163
|
}
|
|
160
164
|
|
|
165
|
+
// Skip user-config files that already exist to avoid overwriting custom settings
|
|
166
|
+
if (PRESERVE_FILES.has(entry.name) && fs.existsSync(targetPath)) {
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
|
|
161
170
|
fs.mkdirSync(path.dirname(targetPath), { recursive: true });
|
|
162
171
|
fs.copyFileSync(sourcePath, targetPath);
|
|
163
172
|
const sourceMode = fs.statSync(sourcePath).mode;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danielblomma/cortex-mcp",
|
|
3
3
|
"mcpName": "io.github.DanielBlomma/cortex",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.1",
|
|
5
5
|
"description": "Local, repo-scoped context platform for coding assistants. Semantic search, graph relationships, and architectural rule context.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": "Daniel Blomma",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Shared enterprise plugin detection and installation.
|
|
3
|
+
# Sourced by both scripts/bootstrap.sh and scaffold/scripts/bootstrap.sh.
|
|
4
|
+
#
|
|
5
|
+
# Expects: REPO_ROOT, MCP_DIR, step(), info() to be defined by the caller.
|
|
6
|
+
|
|
7
|
+
step "Checking for enterprise plugin"
|
|
8
|
+
ENTERPRISE_CONFIG="$REPO_ROOT/.context/enterprise.yml"
|
|
9
|
+
if [[ ! -f "$ENTERPRISE_CONFIG" ]]; then
|
|
10
|
+
ENTERPRISE_CONFIG="$REPO_ROOT/.context/enterprise.yaml"
|
|
11
|
+
fi
|
|
12
|
+
if [[ -f "$ENTERPRISE_CONFIG" ]]; then
|
|
13
|
+
info "detected enterprise config; installing @danielblomma/cortex-enterprise"
|
|
14
|
+
if NPM_CONFIG_CACHE="$MCP_DIR/.npm-cache" npm --prefix "$MCP_DIR" install --no-fund --no-update-notifier --loglevel=warn "@danielblomma/cortex-enterprise@latest"; then
|
|
15
|
+
info "enterprise plugin installed"
|
|
16
|
+
else
|
|
17
|
+
info "warning: failed to install enterprise plugin; continuing in community mode"
|
|
18
|
+
fi
|
|
19
|
+
else
|
|
20
|
+
info "no enterprise config found; community mode"
|
|
21
|
+
fi
|