@keepgoingdev/cli 1.3.0 → 1.3.1

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 (2) hide show
  1. package/dist/index.js +28 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -297,7 +297,8 @@ function generateEnrichedBriefing(opts) {
297
297
  timestamp: s.timestamp,
298
298
  summary: s.summary || "",
299
299
  nextStep: s.nextStep || "",
300
- branch: s.gitBranch
300
+ branch: s.gitBranch,
301
+ sessionPhase: s.sessionPhase
301
302
  }));
302
303
  }
303
304
  if (opts.recentCommits && opts.recentCommits.length > 0) {
@@ -330,10 +331,13 @@ function buildCurrentFocus(lastSession, projectState, gitBranch) {
330
331
  function buildRecentActivity(lastSession, recentSessions, recentCommitMessages) {
331
332
  const parts = [];
332
333
  const sessionCount = recentSessions.length;
334
+ const planCount = recentSessions.filter((s) => s.sessionPhase === "planning").length;
333
335
  if (sessionCount > 1) {
334
- parts.push(`${sessionCount} recent sessions`);
336
+ const planSuffix = planCount > 0 ? ` (${planCount} plan-only)` : "";
337
+ parts.push(`${sessionCount} recent sessions${planSuffix}`);
335
338
  } else if (sessionCount === 1) {
336
- parts.push("1 recent session");
339
+ const planSuffix = planCount === 1 ? " (plan-only)" : "";
340
+ parts.push(`1 recent session${planSuffix}`);
337
341
  }
338
342
  if (lastSession.summary) {
339
343
  const brief = lastSession.summary.length > 120 ? lastSession.summary.slice(0, 117) + "..." : lastSession.summary;
@@ -1693,6 +1697,15 @@ var POST_TOOL_USE_HOOK = {
1693
1697
  }
1694
1698
  ]
1695
1699
  };
1700
+ var PLAN_MODE_HOOK = {
1701
+ matcher: "Read|Grep|Glob|Bash|WebSearch",
1702
+ hooks: [
1703
+ {
1704
+ type: "command",
1705
+ command: "npx -y @keepgoingdev/mcp-server --heartbeat"
1706
+ }
1707
+ ]
1708
+ };
1696
1709
  var SESSION_END_HOOK = {
1697
1710
  matcher: "",
1698
1711
  hooks: [
@@ -1702,7 +1715,7 @@ var SESSION_END_HOOK = {
1702
1715
  }
1703
1716
  ]
1704
1717
  };
1705
- var KEEPGOING_RULES_VERSION = 2;
1718
+ var KEEPGOING_RULES_VERSION = 3;
1706
1719
  var KEEPGOING_RULES_CONTENT = `<!-- @keepgoingdev/mcp-server v${KEEPGOING_RULES_VERSION} -->
1707
1720
  ## KeepGoing
1708
1721
 
@@ -1712,6 +1725,8 @@ After completing a task or meaningful piece of work, call the \`save_checkpoint\
1712
1725
  - \`summary\`: 1-2 sentences. What changed and why, no file paths, no implementation details (those are captured from git).
1713
1726
  - \`nextStep\`: What to do next
1714
1727
  - \`blocker\`: Any blocker (if applicable)
1728
+
1729
+ When working in plan mode (investigating, designing, iterating on an approach before any edits), call \`save_checkpoint\` when you reach a significant milestone or conclusion. Use the summary to capture what was investigated and decided. This preserves planning context for future sessions.
1715
1730
  `;
1716
1731
  function getRulesFileVersion(content) {
1717
1732
  const match = content.match(/<!-- @keepgoingdev\/mcp-server v(\d+) -->/);
@@ -1772,6 +1787,13 @@ function writeHooksToSettings(settings) {
1772
1787
  settings.hooks.PostToolUse.push(POST_TOOL_USE_HOOK);
1773
1788
  changed = true;
1774
1789
  }
1790
+ const hasHeartbeat = settings.hooks.PostToolUse.some(
1791
+ (entry) => entry?.hooks?.some((h) => typeof h?.command === "string" && h.command.includes("--heartbeat"))
1792
+ );
1793
+ if (!hasHeartbeat) {
1794
+ settings.hooks.PostToolUse.push(PLAN_MODE_HOOK);
1795
+ changed = true;
1796
+ }
1775
1797
  if (!Array.isArray(settings.hooks.SessionEnd)) {
1776
1798
  settings.hooks.SessionEnd = [];
1777
1799
  }
@@ -2377,7 +2399,7 @@ import { spawn } from "child_process";
2377
2399
  import { readFileSync, existsSync } from "fs";
2378
2400
  import path10 from "path";
2379
2401
  import os4 from "os";
2380
- var CLI_VERSION = "1.3.0";
2402
+ var CLI_VERSION = "1.3.1";
2381
2403
  var NPM_REGISTRY_URL = "https://registry.npmjs.org/@keepgoingdev/cli/latest";
2382
2404
  var FETCH_TIMEOUT_MS = 5e3;
2383
2405
  var CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
@@ -3918,7 +3940,7 @@ async function main() {
3918
3940
  }
3919
3941
  break;
3920
3942
  case "version":
3921
- console.log(`keepgoing v${"1.3.0"}`);
3943
+ console.log(`keepgoing v${"1.3.1"}`);
3922
3944
  break;
3923
3945
  case "activate":
3924
3946
  await activateCommand({ licenseKey: subcommand });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keepgoingdev/cli",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Terminal CLI for KeepGoing. Resume side projects without the mental friction.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",