@poolzin/pool-bot 2026.4.46 → 2026.4.48
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/build-info.json +3 -3
- package/dist/cli/program/command-registry.d.ts.map +1 -1
- package/dist/cli/program/command-registry.js +1 -0
- package/dist/cli/program/register.status-health-sessions.d.ts +1 -0
- package/dist/cli/program/register.status-health-sessions.d.ts.map +1 -1
- package/dist/cli/program/register.status-health-sessions.js +95 -1
- package/dist/cli/program/register.subclis.d.ts.map +1 -1
- package/dist/cli/program/register.subclis.js +0 -9
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
|
@@ -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;
|
|
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;AA+RF,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"}
|
|
@@ -185,6 +185,7 @@ const coreEntries = [
|
|
|
185
185
|
register: async ({ program }) => {
|
|
186
186
|
const mod = await import("./register.status-health-sessions.js");
|
|
187
187
|
mod.registerStatusHealthSessionsCommands(program);
|
|
188
|
+
mod.registerSessionCheckpointsCommands(program);
|
|
188
189
|
},
|
|
189
190
|
},
|
|
190
191
|
{
|
|
@@ -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;
|
|
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
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.subclis.d.ts","sourceRoot":"","sources":["../../../src/cli/program/register.subclis.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC,KAAK,eAAe,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAElE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;
|
|
1
|
+
{"version":3,"file":"register.subclis.d.ts","sourceRoot":"","sources":["../../../src/cli/program/register.subclis.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC,KAAK,eAAe,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAElE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AAyTF,wBAAgB,gBAAgB,IAAI,WAAW,EAAE,CAEhD;AAED,wBAAgB,gCAAgC,IAAI,MAAM,EAAE,CAE3D;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQ3F;AAaD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,GAAE,MAAM,EAAiB,QAkBrF"}
|
|
@@ -290,15 +290,6 @@ const entries = [
|
|
|
290
290
|
mod.registerInferCli(program);
|
|
291
291
|
},
|
|
292
292
|
},
|
|
293
|
-
{
|
|
294
|
-
name: "webhooks",
|
|
295
|
-
description: "Manage webhook ingress routes (TaskFlows via HTTP)",
|
|
296
|
-
hasSubcommands: true,
|
|
297
|
-
register: async (program) => {
|
|
298
|
-
const mod = await import("../webhooks-cli.js");
|
|
299
|
-
mod.registerWebhooksCli(program);
|
|
300
|
-
},
|
|
301
|
-
},
|
|
302
293
|
{
|
|
303
294
|
name: "completion",
|
|
304
295
|
description: "Generate shell completion script",
|