claude-launchpad 1.15.0 → 1.17.0

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.
Files changed (44) hide show
  1. package/dist/{chunk-IPGNXDJF.js → chunk-IIOY56ZE.js} +2 -2
  2. package/dist/{chunk-DLDVXHI3.js → chunk-JKDFOKHD.js} +2 -2
  3. package/dist/{chunk-U2TFIUGE.js → chunk-KYGWNN5F.js} +38 -7
  4. package/dist/chunk-KYGWNN5F.js.map +1 -0
  5. package/dist/{chunk-IDH3M4EI.js → chunk-MRW63LDL.js} +6 -1
  6. package/dist/chunk-MRW63LDL.js.map +1 -0
  7. package/dist/{chunk-LCKV24Q3.js → chunk-ROQI7RKM.js} +4 -4
  8. package/dist/{chunk-MX3T2VEX.js → chunk-ULECXQFX.js} +3 -3
  9. package/dist/{chunk-7KB5YGQZ.js → chunk-YLIV5WBW.js} +2 -2
  10. package/dist/cli.js +69 -29
  11. package/dist/cli.js.map +1 -1
  12. package/dist/commands/memory/server.js +5 -5
  13. package/dist/{context-3GHG7KW6.js → context-K5B43NEI.js} +7 -7
  14. package/dist/{doctor-EKGJ2YAO.js → doctor-ESIQYNE4.js} +5 -5
  15. package/dist/{install-543ZKMXX.js → install-VREFJNLF.js} +9 -7
  16. package/dist/install-VREFJNLF.js.map +1 -0
  17. package/dist/{pull-ULSZEVCR.js → pull-H6ARY6DG.js} +9 -9
  18. package/dist/{push-JXCWX4NY.js → push-JDHT6AMD.js} +9 -9
  19. package/dist/{require-deps-AEDO5YRM.js → require-deps-GVBWF5PB.js} +3 -3
  20. package/dist/{stats-63L7C24W.js → stats-TWIVFA4I.js} +8 -8
  21. package/dist/{sync-QTJ6BXQ4.js → sync-WG7OOWOX.js} +5 -5
  22. package/dist/{sync-clean-OJEK4XH4.js → sync-clean-GQUFTYG2.js} +3 -3
  23. package/dist/{sync-status-EAX527SC.js → sync-status-B3DKLET4.js} +9 -9
  24. package/dist/{tui-3KITZCNS.js → tui-ZINEA7TI.js} +240 -74
  25. package/dist/tui-ZINEA7TI.js.map +1 -0
  26. package/package.json +2 -1
  27. package/dist/chunk-IDH3M4EI.js.map +0 -1
  28. package/dist/chunk-U2TFIUGE.js.map +0 -1
  29. package/dist/install-543ZKMXX.js.map +0 -1
  30. package/dist/tui-3KITZCNS.js.map +0 -1
  31. /package/dist/{chunk-IPGNXDJF.js.map → chunk-IIOY56ZE.js.map} +0 -0
  32. /package/dist/{chunk-DLDVXHI3.js.map → chunk-JKDFOKHD.js.map} +0 -0
  33. /package/dist/{chunk-LCKV24Q3.js.map → chunk-ROQI7RKM.js.map} +0 -0
  34. /package/dist/{chunk-MX3T2VEX.js.map → chunk-ULECXQFX.js.map} +0 -0
  35. /package/dist/{chunk-7KB5YGQZ.js.map → chunk-YLIV5WBW.js.map} +0 -0
  36. /package/dist/{context-3GHG7KW6.js.map → context-K5B43NEI.js.map} +0 -0
  37. /package/dist/{doctor-EKGJ2YAO.js.map → doctor-ESIQYNE4.js.map} +0 -0
  38. /package/dist/{pull-ULSZEVCR.js.map → pull-H6ARY6DG.js.map} +0 -0
  39. /package/dist/{push-JXCWX4NY.js.map → push-JDHT6AMD.js.map} +0 -0
  40. /package/dist/{require-deps-AEDO5YRM.js.map → require-deps-GVBWF5PB.js.map} +0 -0
  41. /package/dist/{stats-63L7C24W.js.map → stats-TWIVFA4I.js.map} +0 -0
  42. /package/dist/{sync-QTJ6BXQ4.js.map → sync-WG7OOWOX.js.map} +0 -0
  43. /package/dist/{sync-clean-OJEK4XH4.js.map → sync-clean-GQUFTYG2.js.map} +0 -0
  44. /package/dist/{sync-status-EAX527SC.js.map → sync-status-B3DKLET4.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  log
4
- } from "./chunk-U2TFIUGE.js";
4
+ } from "./chunk-KYGWNN5F.js";
5
5
 
6
6
  // src/commands/memory/utils/gist-transport.ts
7
7
  import { execSync } from "child_process";
@@ -205,4 +205,4 @@ export {
205
205
  deleteGistFile,
206
206
  updateGistFiles
207
207
  };
208
- //# sourceMappingURL=chunk-IPGNXDJF.js.map
208
+ //# sourceMappingURL=chunk-IIOY56ZE.js.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  cwdRequire
4
- } from "./chunk-7KB5YGQZ.js";
4
+ } from "./chunk-YLIV5WBW.js";
5
5
 
6
6
  // src/commands/memory/config.ts
7
7
  import { z } from "zod";
@@ -181,4 +181,4 @@ export {
181
181
  createDatabase,
182
182
  closeDatabase
183
183
  };
184
- //# sourceMappingURL=chunk-DLDVXHI3.js.map
184
+ //# sourceMappingURL=chunk-JKDFOKHD.js.map
@@ -1173,7 +1173,7 @@ These rules apply whenever editing \`BACKLOG.md\` or \`TASKS.md\`. The workflow
1173
1173
  }
1174
1174
 
1175
1175
  // src/commands/init/generators/hooks-rule.ts
1176
- var HOOKS_RULE_VERSION = 1;
1176
+ var HOOKS_RULE_VERSION = 2;
1177
1177
  function generateHooksRule() {
1178
1178
  return `---
1179
1179
  paths: [".claude/settings.json", ".claude/settings.local.json"]
@@ -1208,6 +1208,17 @@ Reference: https://code.claude.com/docs/en/hooks
1208
1208
  - \`matcher\`: a regex-style string matching tool names (e.g. \`Bash\`, \`Read|Write|Edit\`). Empty string matches all tools for the event. For SessionStart use \`startup\`, \`resume\`, \`clear\`, or \`compact\`.
1209
1209
  - \`hooks\` array: every entry runs in parallel when the matcher fires. Identical command strings are deduplicated automatically.
1210
1210
 
1211
+ ## The \`if\` field \u2014 when to use it
1212
+
1213
+ - \`if\` (PreToolUse/PostToolUse/PostToolUseFailure/PermissionRequest) filters a hook with a SINGLE permission rule (e.g. \`"if": "Bash(terraform *)"\`) before your command ever spawns \u2014 cheaper than jq+grep for hooks targeting one narrow rule.
1214
+ - The generated guards intentionally do NOT use it: they match multiple patterns in one hook (rm -rf, DROP TABLE, force-push) and need exclusions (.env but not .env.example) that permission-rule syntax cannot express. Splitting them into per-rule entries would grow the config without changing behavior \u2014 the jq+stdin grep stays the single source of truth.
1215
+ - For your own single-pattern hooks, prefer \`if\` over an inline grep.
1216
+
1217
+ ## Long-running SessionEnd work \u2014 use \`async: true\`
1218
+
1219
+ - Plain SessionEnd hooks are killed when Claude Code exits \u2014 a ~3s network push never completes (verified empirically). Mark the hook \`{"type": "command", "command": "...", "async": true}\` and it survives; output is logged without touching the conversation.
1220
+ - The old workaround was a \`nohup ... & exit 0\` wrapper \u2014 still works, but the native field is canonical now.
1221
+
1211
1222
  ## Input \u2014 JSON on stdin, NOT env vars
1212
1223
 
1213
1224
  The hook receives a JSON payload on stdin. **There are no \`TOOL_INPUT_*\` environment variables in current Claude Code.** A hook that does \`cmd="$TOOL_INPUT_COMMAND"\` reads an empty string and silently no-ops. This is the single most common authoring bug.
@@ -1512,6 +1523,15 @@ async function createHooksRule(root) {
1512
1523
  );
1513
1524
  return true;
1514
1525
  }
1526
+ async function updateHooksRule(root) {
1527
+ const hooksPath = join4(root, ".claude", "rules", "hooks.md");
1528
+ const content = await readFile3(hooksPath, "utf-8").catch(() => null);
1529
+ if (content === null) return false;
1530
+ if (!/<!-- lp-hooks-version: \d+ -->/.test(content)) return false;
1531
+ await writeFile3(hooksPath, generateHooksRule());
1532
+ log.success("Updated .claude/rules/hooks.md to the latest version");
1533
+ return true;
1534
+ }
1515
1535
  async function createVerificationRule(root) {
1516
1536
  const rulesDir = join4(root, ".claude", "rules");
1517
1537
  const verificationPath = join4(rulesDir, "verification.md");
@@ -1879,7 +1899,7 @@ async function addSessionStartPullHook(root, placement) {
1879
1899
  async function addSessionEndPushHook(root, placement) {
1880
1900
  const target = placement === "local" ? "settings.local.json" : "settings.json";
1881
1901
  return addPlacementHook(root, placement, "SessionEnd", "memory push", {
1882
- hooks: [{ type: "command", command: "nohup npx claude-launchpad memory push -y </dev/null >/dev/null 2>&1 & exit 0" }]
1902
+ hooks: [{ type: "command", command: "npx claude-launchpad memory push -y", async: true }]
1883
1903
  }, false, `Added SessionEnd hook for memory sync to ${target}`);
1884
1904
  }
1885
1905
  async function upgradeStaleSessionEndPushHook(root) {
@@ -1898,9 +1918,9 @@ async function upgradeStaleSessionEndPushHook(root) {
1898
1918
  if (!inner) return group;
1899
1919
  const rewritten = inner.map((h) => {
1900
1920
  const cmd = typeof h.command === "string" ? h.command : "";
1901
- if (!cmd.includes("memory push") || cmd.includes("nohup")) return h;
1921
+ if (!cmd.includes("memory push") || h.async === true) return h;
1902
1922
  changed = true;
1903
- return { ...h, command: "nohup npx claude-launchpad memory push -y </dev/null >/dev/null 2>&1 & exit 0" };
1923
+ return { ...h, type: "command", command: "npx claude-launchpad memory push -y", async: true };
1904
1924
  });
1905
1925
  return { ...group, hooks: rewritten };
1906
1926
  });
@@ -1908,7 +1928,7 @@ async function upgradeStaleSessionEndPushHook(root) {
1908
1928
  const updated = { ...settings, hooks: { ...hooks, SessionEnd: upgraded } };
1909
1929
  await write(root, updated);
1910
1930
  const target = placement === "local" ? "settings.local.json" : "settings.json";
1911
- log.success(`Upgraded SessionEnd push hook in ${target} (now nohup-wrapped)`);
1931
+ log.success(`Upgraded SessionEnd push hook in ${target} (native async: true)`);
1912
1932
  changedAny = true;
1913
1933
  }
1914
1934
  return changedAny;
@@ -2150,6 +2170,11 @@ var FIX_TABLE = [
2150
2170
  match: "workflow.md rule is outdated",
2151
2171
  fix: (root) => updateWorkflowRule(root)
2152
2172
  },
2173
+ {
2174
+ analyzer: "Rules",
2175
+ match: "hooks.md rule is outdated",
2176
+ fix: (root) => updateHooksRule(root)
2177
+ },
2153
2178
  {
2154
2179
  analyzer: "Rules",
2155
2180
  match: "verification.md rule is outdated",
@@ -2337,7 +2362,12 @@ var FIX_TABLE = [
2337
2362
  },
2338
2363
  {
2339
2364
  analyzer: "Memory",
2340
- match: "SessionEnd push hook is not nohup-wrapped",
2365
+ match: "SessionEnd push hook is neither async nor detached",
2366
+ fix: (root) => upgradeStaleSessionEndPushHook(root)
2367
+ },
2368
+ {
2369
+ analyzer: "Memory",
2370
+ match: "SessionEnd push hook is uses the legacy nohup wrapper",
2341
2371
  fix: (root) => upgradeStaleSessionEndPushHook(root)
2342
2372
  },
2343
2373
  {
@@ -2724,6 +2754,7 @@ export {
2724
2754
  writeWorkflowCheckScript,
2725
2755
  WORKFLOW_RULE_VERSION,
2726
2756
  generateWorkflowRule,
2757
+ HOOKS_RULE_VERSION,
2727
2758
  generateHooksRule,
2728
2759
  VERIFICATION_RULE_VERSION,
2729
2760
  generateVerificationRule,
@@ -2734,4 +2765,4 @@ export {
2734
2765
  printScoreCard,
2735
2766
  renderDoctorReport
2736
2767
  };
2737
- //# sourceMappingURL=chunk-U2TFIUGE.js.map
2768
+ //# sourceMappingURL=chunk-KYGWNN5F.js.map