@prom.codes/context-mcp 0.4.1 → 0.4.2
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/bin.js +10 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -8336,7 +8336,10 @@ async function composeFromEnv(opts) {
|
|
|
8336
8336
|
const workspaceName = (env.PROMETHEUS_WORKSPACE_NAME ?? "") !== "" ? env.PROMETHEUS_WORKSPACE_NAME : basename5(workspaceRoot) || workspaceRoot;
|
|
8337
8337
|
const { id: providerId, provider: embedder, regionMode } = discoverEmbeddingProvider(env, opts.fetch);
|
|
8338
8338
|
const apiKeyPresent = (env.PROMETHEUS_API_KEY ?? "") !== "";
|
|
8339
|
-
const storageOptions =
|
|
8339
|
+
const storageOptions = {
|
|
8340
|
+
writable: true,
|
|
8341
|
+
defaultDbPath: getStableDbPath(workspaceRoot)
|
|
8342
|
+
};
|
|
8340
8343
|
const { id: storageBackend, adapter: storage, dbPath } = discoverStorageBackend(env, regionMode, storageOptions);
|
|
8341
8344
|
await storage.init();
|
|
8342
8345
|
const retriever = new HybridRetriever({ storage, embedder });
|
|
@@ -8951,6 +8954,10 @@ var SERVER_IDENTITY = {
|
|
|
8951
8954
|
function errMessage(err) {
|
|
8952
8955
|
return err instanceof Error ? err.message : String(err);
|
|
8953
8956
|
}
|
|
8957
|
+
function looksLikeMissingNativeBinding(msg) {
|
|
8958
|
+
return /bindings file|better_sqlite3\.node|could not locate the bindings|node_module_version|was compiled against a different|invalid elf|\.node['"\s]/i.test(msg);
|
|
8959
|
+
}
|
|
8960
|
+
var NATIVE_BINDING_HINT = '\nThis looks like the native `better-sqlite3` module failed to load \u2014 usually\nbecause npm `ignore-scripts=true` (corporate hardening) made `npx` skip the\nnative build, so the binary was never produced. Fix it once, keeping your\nhardening intact:\n npm install -g @prom.codes/context-mcp --ignore-scripts=false --foreground-scripts\nthen point Claude Code at the built binary instead of npx:\n claude mcp add context -- node "$(npm root -g)/@prom.codes/context-mcp/dist/bin.js"\nDocs: https://prom.codes/docs/mcp/claude-code\n';
|
|
8954
8961
|
function startManagedIndexing(composed) {
|
|
8955
8962
|
const indexer = new WorkspaceIndexer({
|
|
8956
8963
|
root: composed.workspaceRoot,
|
|
@@ -9054,5 +9061,7 @@ main().catch((err) => {
|
|
|
9054
9061
|
const message = err instanceof Error ? err.message : String(err);
|
|
9055
9062
|
process.stderr.write(`prometheus-context-mcp: fatal: ${message}
|
|
9056
9063
|
`);
|
|
9064
|
+
if (looksLikeMissingNativeBinding(message))
|
|
9065
|
+
process.stderr.write(NATIVE_BINDING_HINT);
|
|
9057
9066
|
process.exit(1);
|
|
9058
9067
|
});
|