@wbern/cc-ping 1.10.0 → 1.10.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.
- package/README.md +4 -0
- package/dist/cli.js +13 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
[](https://github.com/wbern/cc-ping/actions/workflows/ci.yml)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
+
<p align="center">
|
|
9
|
+
<img src="docs/daemon-status.png" alt="cc-ping daemon status" width="520" />
|
|
10
|
+
</p>
|
|
11
|
+
|
|
8
12
|
**Ping Claude Code sessions to trigger quota windows early across multiple accounts.**
|
|
9
13
|
|
|
10
14
|
Claude Code has a 5-hour quota window that starts on your first message. If you rotate between accounts, your idle accounts sit there with full quota doing nothing. cc-ping pings them so their windows start ticking — when you need them, they've already reset.
|
package/dist/cli.js
CHANGED
|
@@ -2020,19 +2020,16 @@ function getDeferredHandles() {
|
|
|
2020
2020
|
}
|
|
2021
2021
|
return deferred;
|
|
2022
2022
|
}
|
|
2023
|
-
var program = new Command().name("cc-ping").description("Ping Claude Code sessions to trigger quota windows early").version("1.10.
|
|
2023
|
+
var program = new Command().name("cc-ping").description("Ping Claude Code sessions to trigger quota windows early").version("1.10.1").option(
|
|
2024
2024
|
"--config <path>",
|
|
2025
2025
|
"Path to config directory (default: ~/.config/cc-ping, env: CC_PING_CONFIG)"
|
|
2026
|
-
).
|
|
2026
|
+
).hook("preAction", (thisCommand) => {
|
|
2027
2027
|
const opts = thisCommand.opts();
|
|
2028
2028
|
if (opts.config) {
|
|
2029
2029
|
setConfigDir(opts.config);
|
|
2030
2030
|
}
|
|
2031
2031
|
}).action(() => {
|
|
2032
|
-
|
|
2033
|
-
showDefault(console.log, /* @__PURE__ */ new Date(), getDeferredHandles(), {
|
|
2034
|
-
censor: opts.censor
|
|
2035
|
-
});
|
|
2032
|
+
showDefault(console.log, /* @__PURE__ */ new Date(), getDeferredHandles());
|
|
2036
2033
|
});
|
|
2037
2034
|
program.command("ping").description("Ping configured accounts to start quota windows").argument(
|
|
2038
2035
|
"[handles...]",
|
|
@@ -2145,7 +2142,7 @@ program.command("list").description("List configured accounts").option("--json",
|
|
|
2145
2142
|
console.log(` ${a.handle} -> ${a.configDir}`);
|
|
2146
2143
|
}
|
|
2147
2144
|
});
|
|
2148
|
-
program.command("status").description("Show status of all accounts with window information").option("--json", "Output as JSON", false).action((opts) => {
|
|
2145
|
+
program.command("status").description("Show status of all accounts with window information").option("--json", "Output as JSON", false).option("--censor", "Mask account handles in output (for screenshots)").action((opts) => {
|
|
2149
2146
|
const deferred = getDeferredHandles();
|
|
2150
2147
|
if (opts.json) {
|
|
2151
2148
|
const accounts = listAccounts();
|
|
@@ -2160,7 +2157,7 @@ program.command("status").description("Show status of all accounts with window i
|
|
|
2160
2157
|
return;
|
|
2161
2158
|
}
|
|
2162
2159
|
printAccountTable(console.log, /* @__PURE__ */ new Date(), deferred, {
|
|
2163
|
-
censor:
|
|
2160
|
+
censor: opts.censor
|
|
2164
2161
|
});
|
|
2165
2162
|
});
|
|
2166
2163
|
program.command("next-reset").description("Show which account has its quota window resetting soonest").option("--json", "Output as JSON", false).action((opts) => {
|
|
@@ -2241,7 +2238,7 @@ daemon.command("start").description("Start the daemon process").option(
|
|
|
2241
2238
|
).option("-q, --quiet", "Suppress ping output", false).option("--bell", "Ring terminal bell on ping failure", false).option("--notify", "Send desktop notification on ping failure", false).option(
|
|
2242
2239
|
"--smart-schedule <on|off>",
|
|
2243
2240
|
"Time pings based on usage patterns (default: on)"
|
|
2244
|
-
).action(async (opts) => {
|
|
2241
|
+
).option("--censor", "Mask account handles in output (for screenshots)").action(async (opts) => {
|
|
2245
2242
|
let smartSchedule;
|
|
2246
2243
|
if (opts.smartSchedule !== void 0) {
|
|
2247
2244
|
smartSchedule = parseSmartSchedule(opts.smartSchedule);
|
|
@@ -2252,7 +2249,7 @@ daemon.command("start").description("Start the daemon process").option(
|
|
|
2252
2249
|
bell: opts.bell,
|
|
2253
2250
|
notify: opts.notify,
|
|
2254
2251
|
smartSchedule,
|
|
2255
|
-
version: "1.10.
|
|
2252
|
+
version: "1.10.1"
|
|
2256
2253
|
});
|
|
2257
2254
|
if (!result.success) {
|
|
2258
2255
|
console.error(result.error);
|
|
@@ -2267,7 +2264,7 @@ daemon.command("start").description("Start the daemon process").option(
|
|
|
2267
2264
|
);
|
|
2268
2265
|
}
|
|
2269
2266
|
printAccountTable(console.log, /* @__PURE__ */ new Date(), getDeferredHandles(), {
|
|
2270
|
-
censor:
|
|
2267
|
+
censor: opts.censor
|
|
2271
2268
|
});
|
|
2272
2269
|
});
|
|
2273
2270
|
daemon.command("stop").description("Stop the daemon process").action(async () => {
|
|
@@ -2285,10 +2282,10 @@ daemon.command("stop").description("Stop the daemon process").action(async () =>
|
|
|
2285
2282
|
);
|
|
2286
2283
|
}
|
|
2287
2284
|
});
|
|
2288
|
-
daemon.command("status").description("Show daemon status").option("--json", "Output as JSON", false).action(async (opts) => {
|
|
2285
|
+
daemon.command("status").description("Show daemon status").option("--json", "Output as JSON", false).option("--censor", "Mask account handles in output (for screenshots)").action(async (opts) => {
|
|
2289
2286
|
const { getServiceStatus: getServiceStatus2 } = await Promise.resolve().then(() => (init_service(), service_exports));
|
|
2290
2287
|
const svc = getServiceStatus2();
|
|
2291
|
-
const status = getDaemonStatus({ currentVersion: "1.10.
|
|
2288
|
+
const status = getDaemonStatus({ currentVersion: "1.10.1" });
|
|
2292
2289
|
if (opts.json) {
|
|
2293
2290
|
const serviceInfo = svc.installed ? {
|
|
2294
2291
|
service: {
|
|
@@ -2349,7 +2346,7 @@ daemon.command("status").description("Show daemon status").option("--json", "Out
|
|
|
2349
2346
|
if (status.versionMismatch) {
|
|
2350
2347
|
console.log(
|
|
2351
2348
|
yellow(
|
|
2352
|
-
` Warning: daemon is running v${status.daemonVersion} but v${"1.10.
|
|
2349
|
+
` Warning: daemon is running v${status.daemonVersion} but v${"1.10.1"} is installed.`
|
|
2353
2350
|
)
|
|
2354
2351
|
);
|
|
2355
2352
|
console.log(
|
|
@@ -2360,7 +2357,7 @@ daemon.command("status").description("Show daemon status").option("--json", "Out
|
|
|
2360
2357
|
}
|
|
2361
2358
|
console.log("");
|
|
2362
2359
|
printAccountTable(console.log, /* @__PURE__ */ new Date(), getDeferredHandles(), {
|
|
2363
|
-
censor:
|
|
2360
|
+
censor: opts.censor
|
|
2364
2361
|
});
|
|
2365
2362
|
});
|
|
2366
2363
|
daemon.command("install").description("Install daemon as a system service (launchd/systemd)").option(
|
|
@@ -2417,7 +2414,7 @@ daemon.command("_run", { hidden: true }).option("--interval-ms <ms>", "Ping inte
|
|
|
2417
2414
|
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2418
2415
|
intervalMs,
|
|
2419
2416
|
configDir: resolveConfigDir2(),
|
|
2420
|
-
version: "1.10.
|
|
2417
|
+
version: "1.10.1"
|
|
2421
2418
|
});
|
|
2422
2419
|
}
|
|
2423
2420
|
await runDaemonWithDefaults(intervalMs, {
|