@prom.codes/context-mcp 0.4.0 → 0.4.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/dist/bin.js +6 -3
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -8330,7 +8330,8 @@ async function composeFromEnv(opts) {
|
|
|
8330
8330
|
const env = opts.env;
|
|
8331
8331
|
const override = (opts.workspaceRootOverride ?? "").trim();
|
|
8332
8332
|
const envRoot = (env.PROMETHEUS_WORKSPACE_ROOT ?? "").trim();
|
|
8333
|
-
const
|
|
8333
|
+
const claudeRoot = (env.CLAUDE_PROJECT_DIR ?? "").trim();
|
|
8334
|
+
const workspaceRoot = override !== "" ? override : envRoot !== "" ? envRoot : claudeRoot !== "" ? claudeRoot : process.cwd();
|
|
8334
8335
|
const workspaceId = (env.PROMETHEUS_WORKSPACE_ID ?? "") !== "" ? env.PROMETHEUS_WORKSPACE_ID : workspaceRoot;
|
|
8335
8336
|
const workspaceName = (env.PROMETHEUS_WORKSPACE_NAME ?? "") !== "" ? env.PROMETHEUS_WORKSPACE_NAME : basename5(workspaceRoot) || workspaceRoot;
|
|
8336
8337
|
const { id: providerId, provider: embedder, regionMode } = discoverEmbeddingProvider(env, opts.fetch);
|
|
@@ -8984,6 +8985,8 @@ function startManagedIndexing(composed) {
|
|
|
8984
8985
|
async function main() {
|
|
8985
8986
|
const env = process.env;
|
|
8986
8987
|
const explicitRoot = (env.PROMETHEUS_WORKSPACE_ROOT ?? "").trim();
|
|
8988
|
+
const claudeRoot = (env.CLAUDE_PROJECT_DIR ?? "").trim();
|
|
8989
|
+
const eagerVia = explicitRoot !== "" ? "PROMETHEUS_WORKSPACE_ROOT" : claudeRoot !== "" ? "CLAUDE_PROJECT_DIR" : null;
|
|
8987
8990
|
const transport = new StdioServerTransport();
|
|
8988
8991
|
const server = new McpServer2(SERVER_IDENTITY, { capabilities: { tools: {} } });
|
|
8989
8992
|
let composed = null;
|
|
@@ -9018,8 +9021,8 @@ async function main() {
|
|
|
9018
9021
|
if (composed.managed)
|
|
9019
9022
|
managedIndexer = startManagedIndexing(composed);
|
|
9020
9023
|
};
|
|
9021
|
-
if (
|
|
9022
|
-
await boot(void 0,
|
|
9024
|
+
if (eagerVia !== null) {
|
|
9025
|
+
await boot(void 0, eagerVia);
|
|
9023
9026
|
await server.connect(transport);
|
|
9024
9027
|
return;
|
|
9025
9028
|
}
|