@honcho-ai/claude-honcho 0.3.3 → 0.3.4

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.
@@ -15566,7 +15566,7 @@ var import_sdk = __toESM(require_dist(), 1);
15566
15566
  import { homedir as homedir2 } from "os";
15567
15567
  import { join as join3, basename, dirname, resolve, sep } from "path";
15568
15568
  import { fileURLToPath } from "url";
15569
- import { existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, statSync, writeFileSync as writeFileSync2 } from "fs";
15569
+ import { chmodSync, existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, statSync, writeFileSync as writeFileSync2 } from "fs";
15570
15570
 
15571
15571
  // src/git.ts
15572
15572
  import { execSync } from "child_process";
@@ -15904,6 +15904,9 @@ function mergeWithEnvVars(config) {
15904
15904
  if (process.env.HONCHO_LOGGING === "false") {
15905
15905
  config.logging = false;
15906
15906
  }
15907
+ if (process.env.HONCHO_SAVE_MESSAGES === "false") {
15908
+ config.saveMessages = false;
15909
+ }
15907
15910
  if (process.env.HONCHO_SAVE_TOOL_USE !== undefined) {
15908
15911
  config.saveToolUse = process.env.HONCHO_SAVE_TOOL_USE === "true";
15909
15912
  }
@@ -15912,6 +15915,11 @@ function mergeWithEnvVars(config) {
15912
15915
  }
15913
15916
  return config;
15914
15917
  }
15918
+ function writeConfigFile(data) {
15919
+ if (existsSync3(CONFIG_FILE))
15920
+ chmodSync(CONFIG_FILE, 384);
15921
+ writeFileSync2(CONFIG_FILE, JSON.stringify(data, null, 2), { mode: 384 });
15922
+ }
15915
15923
  function saveConfig(config) {
15916
15924
  if (!existsSync3(CONFIG_DIR)) {
15917
15925
  mkdirSync2(CONFIG_DIR, { recursive: true });
@@ -15942,9 +15950,10 @@ function saveConfig(config) {
15942
15950
  setHostIfExplicit("aiPeer", config.aiPeer, existing.aiPeer ?? DEFAULT_AI_PEER[host]);
15943
15951
  const enabledForSave = process.env.HONCHO_ENABLED === "false" && config.enabled === false ? existingHost.enabled : config.enabled;
15944
15952
  const loggingForSave = process.env.HONCHO_LOGGING === "false" && config.logging === false ? existingHost.logging : config.logging;
15953
+ const saveMessagesForSave = process.env.HONCHO_SAVE_MESSAGES === "false" && config.saveMessages === false ? existingHost.saveMessages : config.saveMessages;
15945
15954
  setHostIfExplicit("enabled", enabledForSave, existing.enabled);
15946
15955
  setHostIfExplicit("logging", loggingForSave, existing.logging);
15947
- setHostIfExplicit("saveMessages", config.saveMessages, existing.saveMessages);
15956
+ setHostIfExplicit("saveMessages", saveMessagesForSave, existing.saveMessages);
15948
15957
  setHostIfExplicit("sessionStrategy", config.sessionStrategy, existing.sessionStrategy);
15949
15958
  setHostIfExplicit("sessionPeerPrefix", config.sessionPeerPrefix, existing.sessionPeerPrefix);
15950
15959
  setHostIfExplicit("reasoningLevel", config.reasoningLevel, existing.reasoningLevel);
@@ -15959,7 +15968,7 @@ function saveConfig(config) {
15959
15968
  hostEntry.apiKey = existingHost.apiKey;
15960
15969
  }
15961
15970
  existing.hosts[host] = hostEntry;
15962
- writeFileSync2(CONFIG_FILE, JSON.stringify(existing, null, 2));
15971
+ writeConfigFile(existing);
15963
15972
  }
15964
15973
  function saveRootField(field, value) {
15965
15974
  if (!existsSync3(CONFIG_DIR)) {
@@ -15972,7 +15981,7 @@ function saveRootField(field, value) {
15972
15981
  } catch {}
15973
15982
  }
15974
15983
  existing[field] = value;
15975
- writeFileSync2(CONFIG_FILE, JSON.stringify(existing, null, 2));
15984
+ writeConfigFile(existing);
15976
15985
  }
15977
15986
  function getClaudeSettingsPath() {
15978
15987
  return join3(homedir2(), ".claude", "settings.json");
@@ -16245,5 +16254,5 @@ async function status() {
16245
16254
  // src/skills/status-runner.ts
16246
16255
  await status();
16247
16256
 
16248
- //# debugId=9CBD3F13AE93C1C564756E2164756E21
16257
+ //# debugId=9C517394911C838964756E2164756E21
16249
16258
  //# sourceMappingURL=status-runner.js.map