@poolzin/pool-bot 2026.4.47 → 2026.4.49

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2026.4.47",
3
- "commit": "ec268e52a52b5717bb045639f4e49082129b6ff9",
4
- "builtAt": "2026-04-08T13:26:54.269Z"
2
+ "version": "2026.4.49",
3
+ "commit": "a3146d9d52a8c0550f5688122fd839a7c1d8a0e6",
4
+ "builtAt": "2026-04-08T15:43:14.420Z"
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"command-registry.d.ts","sourceRoot":"","sources":["../../../src/cli/program/command-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGnD,KAAK,qBAAqB,GAAG;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,cAAc,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,MAAM,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACnD,CAAC;AA8RF,wBAAgB,sBAAsB,IAAI,MAAM,EAAE,CAEjD;AAED,wBAAgB,iCAAiC,IAAI,MAAM,EAAE,CAE5D;AA0BD,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,MAAM,EAAiB,GAC5B,OAAO,CAAC,OAAO,CAAC,CAWlB;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,QAoB5F;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,cAAc,EACnB,IAAI,GAAE,MAAM,EAAiB,QAI9B"}
1
+ {"version":3,"file":"command-registry.d.ts","sourceRoot":"","sources":["../../../src/cli/program/command-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGnD,KAAK,qBAAqB,GAAG;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,cAAc,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,MAAM,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACnD,CAAC;AAoSF,wBAAgB,sBAAsB,IAAI,MAAM,EAAE,CAEjD;AAED,wBAAgB,iCAAiC,IAAI,MAAM,EAAE,CAE5D;AA0BD,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,MAAM,EAAiB,GAC5B,OAAO,CAAC,OAAO,CAAC,CAWlB;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,QAoB5F;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,cAAc,EACnB,IAAI,GAAE,MAAM,EAAiB,QAI9B"}
@@ -181,10 +181,16 @@ const coreEntries = [
181
181
  description: "List stored conversation sessions",
182
182
  hasSubcommands: false,
183
183
  },
184
+ {
185
+ name: "checkpoints",
186
+ description: "Manage session checkpoints",
187
+ hasSubcommands: true,
188
+ },
184
189
  ],
185
190
  register: async ({ program }) => {
186
191
  const mod = await import("./register.status-health-sessions.js");
187
192
  mod.registerStatusHealthSessionsCommands(program);
193
+ mod.registerSessionCheckpointsCommands(program);
188
194
  },
189
195
  },
190
196
  {
@@ -1,3 +1,4 @@
1
1
  import type { Command } from "commander";
2
2
  export declare function registerStatusHealthSessionsCommands(program: Command): void;
3
+ export declare function registerSessionCheckpointsCommands(program: Command): void;
3
4
  //# sourceMappingURL=register.status-health-sessions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"register.status-health-sessions.d.ts","sourceRoot":"","sources":["../../../src/cli/program/register.status-health-sessions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyCzC,wBAAgB,oCAAoC,CAAC,OAAO,EAAE,OAAO,QA2GpE"}
1
+ {"version":3,"file":"register.status-health-sessions.d.ts","sourceRoot":"","sources":["../../../src/cli/program/register.status-health-sessions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2CzC,wBAAgB,oCAAoC,CAAC,OAAO,EAAE,OAAO,QA2GpE;AAGD,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,OAAO,QA8ElE"}
@@ -1,13 +1,15 @@
1
1
  import { healthCommand } from "../../commands/health.js";
2
2
  import { sessionsCommand } from "../../commands/sessions.js";
3
3
  import { statusCommand } from "../../commands/status.js";
4
- import { setVerbose } from "../../globals.js";
4
+ import { setVerbose, danger, info, success } from "../../globals.js";
5
5
  import { defaultRuntime } from "../../runtime.js";
6
6
  import { formatDocsLink } from "../../terminal/links.js";
7
7
  import { theme } from "../../terminal/theme.js";
8
8
  import { runCommandWithRuntime } from "../cli-utils.js";
9
9
  import { formatHelpExamples } from "../help-format.js";
10
10
  import { parsePositiveIntOrUndefined } from "./helpers.js";
11
+ import { loadConfig } from "../../config/config.js";
12
+ import { resolveAgentWorkspaceDir } from "../../agents/agent-scope.js";
11
13
  function resolveVerbose(opts) {
12
14
  return Boolean(opts.verbose || opts.debug);
13
15
  }
@@ -106,3 +108,95 @@ export function registerStatusHealthSessionsCommands(program) {
106
108
  }, defaultRuntime);
107
109
  });
108
110
  }
111
+ // Session checkpoints commands
112
+ export function registerSessionCheckpointsCommands(program) {
113
+ const checkpoints = program
114
+ .command("checkpoints")
115
+ .description("Manage session checkpoints")
116
+ .addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/sessions/checkpoints", "docs.molt.bot/sessions/checkpoints")}\n`);
117
+ checkpoints
118
+ .command("list")
119
+ .description("List session checkpoints")
120
+ .option("--json", "Output JSON", false)
121
+ .option("--session <key>", "Filter by session key")
122
+ .option("--limit <n>", "Maximum checkpoints", "50")
123
+ .action(async (opts) => {
124
+ const config = loadConfig();
125
+ const workspaceDir = resolveAgentWorkspaceDir(config, "main");
126
+ const { listAllCheckpoints, listSessionCheckpoints, getCheckpointStats } = await import("../../sessions/checkpoints.js");
127
+ const checkpointsList = opts.session
128
+ ? listSessionCheckpoints(workspaceDir, opts.session)
129
+ : listAllCheckpoints(workspaceDir, Number.parseInt(opts.limit || "50", 10));
130
+ if (opts.json) {
131
+ defaultRuntime.log(JSON.stringify(checkpointsList, null, 2));
132
+ return;
133
+ }
134
+ defaultRuntime.log("");
135
+ defaultRuntime.log(theme.heading("Session Checkpoints"));
136
+ for (const cp of checkpointsList) {
137
+ const date = new Date(cp.createdAt).toLocaleString();
138
+ const reason = cp.reason === "auto-compaction" ? "🔄 auto" : `📌 ${cp.reason}`;
139
+ defaultRuntime.log(` ${theme.success("●")} ${cp.id.substring(0, 12)}... | ${reason} | ${date}`);
140
+ if (cp.metadata?.model)
141
+ defaultRuntime.log(theme.muted(` Model: ${cp.metadata.model}`));
142
+ }
143
+ const stats = getCheckpointStats(workspaceDir);
144
+ defaultRuntime.log(theme.muted(`Total: ${stats.total} checkpoints`));
145
+ });
146
+ checkpoints
147
+ .command("show <id>")
148
+ .description("Show checkpoint details")
149
+ .option("--json", "Output JSON", false)
150
+ .action(async (id, opts) => {
151
+ const config = loadConfig();
152
+ const workspaceDir = resolveAgentWorkspaceDir(config, "main");
153
+ const { getCheckpoint } = await import("../../sessions/checkpoints.js");
154
+ const checkpoint = getCheckpoint(workspaceDir, id);
155
+ if (!checkpoint) {
156
+ defaultRuntime.log(danger(`Checkpoint "${id}" not found.`));
157
+ defaultRuntime.exit(1);
158
+ return;
159
+ }
160
+ if (opts.json) {
161
+ defaultRuntime.log(JSON.stringify(checkpoint, null, 2));
162
+ return;
163
+ }
164
+ defaultRuntime.log("");
165
+ defaultRuntime.log(theme.heading(`Checkpoint: ${checkpoint.id}`));
166
+ defaultRuntime.log(theme.muted("─────────────────────────────────────────"));
167
+ defaultRuntime.log(` Session: ${checkpoint.sessionKey}`);
168
+ defaultRuntime.log(` Reason: ${checkpoint.reason}`);
169
+ defaultRuntime.log(` Created: ${new Date(checkpoint.createdAt).toLocaleString()}`);
170
+ if (checkpoint.metadata?.model)
171
+ defaultRuntime.log(` Model: ${checkpoint.metadata.model}`);
172
+ if (checkpoint.metadata?.note)
173
+ defaultRuntime.log(` Note: ${checkpoint.metadata.note}`);
174
+ });
175
+ checkpoints
176
+ .command("prune")
177
+ .description("Prune old checkpoints")
178
+ .option("--age <days>", "Prune checkpoints older than N days", "30")
179
+ .option("--yes", "Skip confirmation", false)
180
+ .action(async (opts) => {
181
+ const config = loadConfig();
182
+ const workspaceDir = resolveAgentWorkspaceDir(config, "main");
183
+ const { pruneOldCheckpoints, getCheckpointStats } = await import("../../sessions/checkpoints.js");
184
+ const ageDays = Number.parseInt(opts.age || "30", 10);
185
+ const maxAgeMs = ageDays * 24 * 60 * 60 * 1000;
186
+ if (!opts.yes) {
187
+ const stats = getCheckpointStats(workspaceDir);
188
+ defaultRuntime.log("");
189
+ defaultRuntime.log(danger(`⚠️ This will prune checkpoints older than ${ageDays} days`));
190
+ defaultRuntime.log(`Current checkpoints: ${stats.total}`);
191
+ if (stats.oldest)
192
+ defaultRuntime.log(`Oldest: ${new Date(stats.oldest).toLocaleDateString()}`);
193
+ defaultRuntime.log("");
194
+ defaultRuntime.log(info("Use --yes to skip this confirmation."));
195
+ defaultRuntime.exit(1);
196
+ return;
197
+ }
198
+ const pruned = pruneOldCheckpoints(workspaceDir, maxAgeMs);
199
+ defaultRuntime.log("");
200
+ defaultRuntime.log(success(`Pruned ${pruned} old checkpoint(s).`));
201
+ });
202
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poolzin/pool-bot",
3
- "version": "2026.4.47",
3
+ "version": "2026.4.49",
4
4
  "description": "🎱 Pool Bot - AI assistant with PLCODE integrations",
5
5
  "keywords": [],
6
6
  "license": "MIT",