@infinitedusky/indusk-mcp 1.5.11 → 1.5.13

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.
@@ -81,6 +81,21 @@ export async function extensionsEnable(projectRoot, names) {
81
81
  printMcpSetup(projectRoot, name);
82
82
  continue;
83
83
  }
84
+ // Check if extension requires auth — if so, .env must exist before enabling
85
+ const builtinManifest = join(builtinDir, name, "manifest.json");
86
+ if (existsSync(builtinManifest)) {
87
+ const manifest = loadExtension(builtinManifest);
88
+ if (manifest?.mcp_server?.headers && Object.keys(manifest.mcp_server.headers).length > 0) {
89
+ const envVars = readExtensionEnv(name);
90
+ if (Object.keys(envVars).length === 0) {
91
+ console.info(`\n ${name}: cannot enable — no credentials found.`);
92
+ console.info(` Create .indusk/extensions/${name}/.env with the required credentials first.`);
93
+ console.info(` If using composable.env: run 'pnpm ce env:build' to generate it from your contract.`);
94
+ console.info(` Then run 'extensions enable ${name}' again.\n`);
95
+ continue;
96
+ }
97
+ }
98
+ }
84
99
  // Try to move from disabled
85
100
  if (enableExtension(projectRoot, name)) {
86
101
  console.info(` ${name}: enabled (was disabled)`);
@@ -90,7 +105,6 @@ export async function extensionsEnable(projectRoot, names) {
90
105
  continue;
91
106
  }
92
107
  // Try to copy from built-in
93
- const builtinManifest = join(builtinDir, name, "manifest.json");
94
108
  if (existsSync(builtinManifest)) {
95
109
  const targetDir = extensionConfigDir(projectRoot, name);
96
110
  mkdirSync(targetDir, { recursive: true });
@@ -571,31 +585,42 @@ function printMcpInstructions(name, manifest) {
571
585
  headerArgs.push(`--header "${key}: ${resolved}"`);
572
586
  }
573
587
  if (allResolved) {
574
- const cmd = `claude mcp add -t http ${headerArgs.join(" ")} -s project -- ${name} "${url}"`;
588
+ const args = [
589
+ "mcp", "add", "-t", "http",
590
+ ...headerArgs.flatMap(h => {
591
+ const match = h.match(/--header "(.+): (.+)"/);
592
+ if (match)
593
+ return ["--header", `${match[1]}: ${match[2]}`];
594
+ return [];
595
+ }),
596
+ "-s", "project", "--", name, url,
597
+ ];
598
+ const cmd = `claude ${args.map(a => a.includes(" ") ? `"${a}"` : a).join(" ")}`;
575
599
  console.info(`\n ${name}: adding MCP server with credentials from .env...`);
576
600
  try {
577
601
  execSync(cmd, { cwd: process.cwd(), timeout: 15000, stdio: ["ignore", "pipe", "pipe"] });
578
602
  console.info(` ${name}: MCP server added (restart Claude Code to load)`);
579
603
  return;
580
604
  }
581
- catch {
582
- console.info(` ${name}: auto-add failed.`);
605
+ catch (e) {
606
+ const err = e;
607
+ console.info(` ${name}: auto-add failed. ${err.stderr?.trim() || err.message || ""}`);
608
+ console.info(` command was: ${cmd}`);
583
609
  }
584
610
  }
585
611
  }
586
612
  }
587
- // Fallback: print setup instructions
613
+ // Fallback: no .env found or credentials incomplete
614
+ console.info(`\n ${name}: no credentials found at .indusk/extensions/${name}/.env`);
615
+ console.info(` To set up automatically:`);
616
+ console.info(` 1. Create .indusk/extensions/${name}/.env with the required credentials`);
617
+ console.info(` 2. Run 'extensions enable ${name}' again`);
588
618
  if (server.setup_instructions?.length) {
589
- console.info(`\n ${name} MCP setup:`);
590
- console.info(` Create .indusk/extensions/${name}/.env with credentials, or set up manually:`);
619
+ console.info(` Or set up manually:`);
591
620
  for (const instruction of server.setup_instructions) {
592
- console.info(` ${instruction}`);
621
+ console.info(` ${instruction}`);
593
622
  }
594
623
  }
595
- else if (server.type === "http" && server.url) {
596
- console.info(`\n ${name} MCP setup:`);
597
- console.info(` claude mcp add -t http -- ${name} ${server.url}`);
598
- }
599
624
  console.info("");
600
625
  }
601
626
  function installSkill(projectRoot, name) {
@@ -21,11 +21,11 @@
21
21
  "Authorization": "Bearer DASH0_AUTH_TOKEN"
22
22
  },
23
23
  "setup_instructions": [
24
- "1. Log into Dash0 > Organization Settings > Endpoints > MCP to get your endpoint URL",
25
- "2. Create an auth token at Organization Settings > Auth Tokens",
26
- "3. Edit .mcp.json: replace DASH0_ENDPOINT_MCP with your regional endpoint URL",
27
- "4. Edit .mcp.json: replace DASH0_AUTH_TOKEN with your token",
28
- "5. Optional: install CLI with 'brew install dash0hq/dash0-cli/dash0'"
24
+ "1. Create .indusk/extensions/dash0/.env with:",
25
+ " DASH0_AUTH_TOKEN=<your auth token from Dash0 > Organization Settings > Auth Tokens>",
26
+ " DASH0_ENDPOINT_MCP=https://api.<your-region>.gcp.dash0.com/mcp",
27
+ "2. Run 'extensions enable dash0' again",
28
+ "3. Optional: install CLI with 'brew install dash0hq/dash0-cli/dash0'"
29
29
  ]
30
30
  },
31
31
  "hooks": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infinitedusky/indusk-mcp",
3
- "version": "1.5.11",
3
+ "version": "1.5.13",
4
4
  "description": "InDusk development system — skills, MCP tools, and CLI for structured AI-assisted development",
5
5
  "type": "module",
6
6
  "files": [