@khalilgharbaoui/opencode-claude-code-plugin 0.54.1 → 0.54.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/index.js CHANGED
@@ -3564,6 +3564,10 @@ function cliHygieneEnv(inherited = process.env) {
3564
3564
  }
3565
3565
  return filled;
3566
3566
  }
3567
+ var SPAWN_MCP_TIMEOUT_MS = 12e4;
3568
+ function spawnMcpTimeoutEnv(inherited = process.env) {
3569
+ return inherited.MCP_TIMEOUT === void 0 ? { MCP_TIMEOUT: String(SPAWN_MCP_TIMEOUT_MS) } : {};
3570
+ }
3567
3571
  function detectCliVersion(cliPath) {
3568
3572
  const cached = cache.get(cliPath);
3569
3573
  if (cached) return cached;
@@ -7014,7 +7018,10 @@ function claudeSpawnEnv(opts) {
7014
7018
  // Pin the child to the binary whose version we detected, and keep it off
7015
7019
  // non-essential network calls. Fills gaps only, so an explicit shell value
7016
7020
  // survives: see `cliHygieneEnv` for why the version has to hold still.
7017
- ...cliHygieneEnv()
7021
+ ...cliHygieneEnv(),
7022
+ // 120 s for MCP servers to start, so a subagent outlasts an opencode
7023
+ // stall instead of running without the proxy: see `spawnMcpTimeoutEnv`.
7024
+ ...spawnMcpTimeoutEnv()
7018
7025
  };
7019
7026
  if (opts?.effort) {
7020
7027
  env.CLAUDE_CODE_EFFORT_LEVEL = cliEffortLevel(opts.effort);
@@ -10668,6 +10675,7 @@ function interactiveSpawnEnv(opts) {
10668
10675
  // detected version the flag gates read, and skip non-essential traffic.
10669
10676
  // Fills gaps only, so a var the user exported survives untouched.
10670
10677
  ...cliHygieneEnv(),
10678
+ ...spawnMcpTimeoutEnv(),
10671
10679
  ...opts.ignoreAnthropicApiKey ? { ANTHROPIC_API_KEY: void 0, ANTHROPIC_AUTH_TOKEN: void 0 } : {},
10672
10680
  ...opts.effort ? { CLAUDE_CODE_EFFORT_LEVEL: opts.effort } : {}
10673
10681
  };