@agentchatme/claude-code 0.0.13941141111111 → 0.0.139411411111111

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
@@ -8031,10 +8031,12 @@ function serviceInstalled(opts) {
8031
8031
  // src/host.ts
8032
8032
  import * as os2 from "os";
8033
8033
  import * as path5 from "path";
8034
- function claudeHome() {
8034
+ function claudeConfigOverride() {
8035
8035
  const override = process.env["CLAUDE_CONFIG_DIR"];
8036
- if (override !== void 0 && override.trim().length > 0) return path5.resolve(override);
8037
- return path5.join(os2.homedir(), ".claude");
8036
+ return override !== void 0 && override.trim().length > 0 ? path5.resolve(override) : void 0;
8037
+ }
8038
+ function claudeHome() {
8039
+ return claudeConfigOverride() ?? path5.join(os2.homedir(), ".claude");
8038
8040
  }
8039
8041
  function identityHome() {
8040
8042
  return path5.join(claudeHome(), "agentchat");
@@ -8054,26 +8056,25 @@ function hostCopy() {
8054
8056
  }
8055
8057
  function serviceEnv() {
8056
8058
  const env = {};
8057
- const configDir = process.env["CLAUDE_CONFIG_DIR"];
8058
- if (configDir !== void 0 && configDir.trim().length > 0) {
8059
- env["CLAUDE_CONFIG_DIR"] = path5.resolve(configDir);
8060
- }
8059
+ const configDir = claudeConfigOverride();
8060
+ if (configDir !== void 0) env["CLAUDE_CONFIG_DIR"] = configDir;
8061
8061
  return env;
8062
8062
  }
8063
8063
 
8064
8064
  // src/wiring.ts
8065
8065
  import * as fs6 from "fs";
8066
- import * as os3 from "os";
8066
+ import * as os4 from "os";
8067
8067
  import * as path7 from "path";
8068
8068
  import { fileURLToPath } from "url";
8069
8069
 
8070
8070
  // src/adapter.ts
8071
8071
  import * as fs5 from "fs";
8072
+ import * as os3 from "os";
8072
8073
  import * as path6 from "path";
8073
8074
  import * as crypto from "crypto";
8074
8075
 
8075
8076
  // src/version.ts
8076
- var VERSION3 = "0.0.13941141111111";
8077
+ var VERSION3 = "0.0.139411411111111";
8077
8078
 
8078
8079
  // src/runtime-version.ts
8079
8080
  var MIN_CLAUDE_CODE_VERSION = "2.1.219";
@@ -8094,13 +8095,20 @@ function semverAtLeast(actual, minimum) {
8094
8095
  // src/adapter.ts
8095
8096
  var MAX_EVENT_TAIL_CHARS = 1024 * 1024;
8096
8097
  var AGENTCHAT_MCP_PACKAGE = "@agentchatme/mcp@0.1.1121411";
8097
- function claudeIsLoggedIn(configDir) {
8098
+ function claudeProcessEnv(configDirOverride, source = process.env) {
8099
+ const env = { ...source };
8100
+ if (configDirOverride === void 0) delete env["CLAUDE_CONFIG_DIR"];
8101
+ else env["CLAUDE_CONFIG_DIR"] = configDirOverride;
8102
+ return env;
8103
+ }
8104
+ function claudeIsLoggedIn(configDirOverride) {
8098
8105
  const status = spawnCommandSync("claude", ["auth", "status"], {
8099
8106
  encoding: "utf-8",
8100
8107
  timeout: 1e4,
8101
- env: { ...process.env, CLAUDE_CONFIG_DIR: configDir }
8108
+ env: claudeProcessEnv(configDirOverride)
8102
8109
  });
8103
8110
  if (!status.error && status.status === 0) return true;
8111
+ const configDir = configDirOverride ?? path6.join(os3.homedir(), ".claude");
8104
8112
  if (fs5.existsSync(path6.join(configDir, ".credentials.json"))) return true;
8105
8113
  if (process.platform !== "darwin") return false;
8106
8114
  const keychain = spawnCommandSync(
@@ -8130,7 +8138,7 @@ function stableDaemonPath() {
8130
8138
  }
8131
8139
  function claudeUserStatePath() {
8132
8140
  const override = process.env["CLAUDE_CONFIG_DIR"];
8133
- return override !== void 0 && override.trim().length > 0 ? path7.join(path7.resolve(override), ".claude.json") : path7.join(os3.homedir(), ".claude.json");
8141
+ return override !== void 0 && override.trim().length > 0 ? path7.join(path7.resolve(override), ".claude.json") : path7.join(os4.homedir(), ".claude.json");
8134
8142
  }
8135
8143
  function shippedDaemonPath() {
8136
8144
  return path7.join(path7.dirname(fileURLToPath(import.meta.url)), "daemon-main.js");
@@ -8631,6 +8639,9 @@ function installClaude(handle) {
8631
8639
  warnings.push(`direct wiring could not be verified after installation (${mcp2.detail})`);
8632
8640
  }
8633
8641
  if (complete) {
8642
+ const misplacedMcp = removeMisplacedDefaultMcp();
8643
+ if (misplacedMcp.removed) actions.push("misplaced AgentChat MCP server removed");
8644
+ if (misplacedMcp.warning) warnings.push(misplacedMcp.warning);
8634
8645
  if (handle !== null) {
8635
8646
  writeAnchor(anchorFile(), renderClaudeAgents(handle), handle);
8636
8647
  actions.push(`CLAUDE.md \u2190 identity + etiquette (@${handle})`);
@@ -8777,7 +8788,7 @@ function runtimeChecks() {
8777
8788
  mcpRunner
8778
8789
  ];
8779
8790
  }
8780
- const authenticated = claudeIsLoggedIn(claudeHome());
8791
+ const authenticated = claudeIsLoggedIn(claudeConfigOverride());
8781
8792
  return [
8782
8793
  {
8783
8794
  name: "claude-cli",