cleargate 0.11.1 → 0.11.3

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/cli.js CHANGED
@@ -21,7 +21,7 @@ import { Command } from "commander";
21
21
  // package.json
22
22
  var package_default = {
23
23
  name: "cleargate",
24
- version: "0.11.1",
24
+ version: "0.11.3",
25
25
  private: false,
26
26
  type: "module",
27
27
  description: "Planning framework for Claude Code agents \u2014 sprint/epic/story protocol, five-role agent team (architect/developer/qa/devops/reporter), Karpathy-style awareness wiki.",
@@ -2607,7 +2607,7 @@ async function initHandler(opts = {}) {
2607
2607
  const mergedSettings = mergeSettings(existingSettings, HOOK_ADDITION);
2608
2608
  fs15.mkdirSync(path15.dirname(settingsPath), { recursive: true });
2609
2609
  writeAtomic(settingsPath, JSON.stringify(mergedSettings, null, 2) + "\n");
2610
- stdout(`[cleargate init] Updated .claude/settings.json: merged PostToolUse hook
2610
+ stdout(`[cleargate init] Updated .claude/settings.json: merged PostToolUse hook \u2014 restart Claude Code if already open.
2611
2611
  `);
2612
2612
  const claudeMdPath = path15.join(cwd, "CLAUDE.md");
2613
2613
  const claudeMdSrcPath = path15.join(payloadDir, "CLAUDE.md");
@@ -7845,6 +7845,9 @@ async function writeAtomic2(filePath, content) {
7845
7845
  const tmpPath = filePath + ".tmp." + Date.now();
7846
7846
  await fsp.writeFile(tmpPath, content, "utf-8");
7847
7847
  await fsp.rename(tmpPath, filePath);
7848
+ if (filePath.endsWith(".sh")) {
7849
+ await fsp.chmod(filePath, 493);
7850
+ }
7848
7851
  }
7849
7852
  async function updateSnapshotEntry(projectRoot, filePath, newSha) {
7850
7853
  const snapshotPath = path36.join(projectRoot, ".cleargate", ".install-manifest.json");
@@ -8075,6 +8078,8 @@ async function upgradeHandler(flags, cli) {
8075
8078
  }
8076
8079
  const packageRoot = cli?.packageRoot ?? cwd;
8077
8080
  const driftMap = {};
8081
+ const SESSION_LOAD_PATHS = /* @__PURE__ */ new Set([".claude/settings.json", ".mcp.json"]);
8082
+ const sessionRestartFiles = [];
8078
8083
  for (const item of workItems) {
8079
8084
  const { entry, currentSha, installSha, action } = item;
8080
8085
  switch (action) {
@@ -8107,9 +8112,19 @@ async function upgradeHandler(flags, cli) {
8107
8112
  current_sha: postSha,
8108
8113
  package_sha: entry.sha256
8109
8114
  };
8115
+ if (SESSION_LOAD_PATHS.has(entry.path) && postSha !== currentSha) {
8116
+ sessionRestartFiles.push(entry.path);
8117
+ }
8110
8118
  }
8111
8119
  await writeDriftState(cwd, driftMap, { lastRefreshed: now.toISOString() });
8112
8120
  stdout("[upgrade] complete.");
8121
+ if (sessionRestartFiles.length > 0) {
8122
+ stdout("");
8123
+ stdout(`\u26A0 Restart Claude Code in this repo to load the new ${sessionRestartFiles.length === 1 ? "config" : "configs"}:`);
8124
+ for (const f of sessionRestartFiles) {
8125
+ stdout(` ${f} (loaded once at session start)`);
8126
+ }
8127
+ }
8113
8128
  }
8114
8129
 
8115
8130
  // src/commands/uninstall.ts