@4pm/cli 1.10.2-c → 1.11.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 (2) hide show
  1. package/dist/index.js +8 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -32581,10 +32581,10 @@ async function updateViaDownload(tarballUrl, checksum, signature) {
32581
32581
  throw new Error(`Failed to extract the update tarball into ${installRoot}: ${String(err)}`);
32582
32582
  }
32583
32583
  }
32584
- async function updateToLatest(serverUrl) {
32584
+ async function updateToLatest(serverUrl, force = false) {
32585
32585
  if (CLI_VERSION.startsWith("0.0.0")) return { action: "dev-build", version: CLI_VERSION };
32586
32586
  const meta = await fetchCliVersion(serverUrl);
32587
- if (!shouldUpdateTo(CLI_VERSION, meta.latest)) {
32587
+ if (!force && !shouldUpdateTo(CLI_VERSION, meta.latest)) {
32588
32588
  return { action: "already-latest", version: CLI_VERSION };
32589
32589
  }
32590
32590
  console.log(t("update.updating", { from: CLI_VERSION, to: meta.latest }));
@@ -38614,7 +38614,7 @@ var UpdateScheduler = class {
38614
38614
  if (this.forcedPending) {
38615
38615
  if (this.bus.busy !== null) return;
38616
38616
  this.forcedPending = false;
38617
- await this.runUpdate();
38617
+ await this.runUpdate(true);
38618
38618
  return;
38619
38619
  }
38620
38620
  const p2 = this.policy;
@@ -38630,15 +38630,16 @@ var UpdateScheduler = class {
38630
38630
  if (this.bus.busy !== null) return;
38631
38631
  this.lastDoneDateKey = clock.dateKey;
38632
38632
  this.pendingDateKey = null;
38633
- await this.runUpdate();
38633
+ await this.runUpdate(false);
38634
38634
  }
38635
- /** Check + update, then re-exec the new binary on success (keeps `.cre`/profile). */
38636
- async runUpdate() {
38635
+ /** Check + update, then re-exec the new binary on success (keeps `.cre`/profile). `force` installs the
38636
+ * server's latest unconditionally (an operator push) vs. the conditional daily-scheduled update. */
38637
+ async runUpdate(force) {
38637
38638
  this.updating = true;
38638
38639
  try {
38639
38640
  await this.updateFlaggedTools();
38640
38641
  this.bus.log(t("update.scheduledChecking"));
38641
- const result = await updateToLatest(this.serverUrl);
38642
+ const result = await updateToLatest(this.serverUrl, force);
38642
38643
  if (result.action === "already-latest") {
38643
38644
  logger.info("update.scheduled.latest", { version: result.version });
38644
38645
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@4pm/cli",
3
- "version": "1.10.2c",
3
+ "version": "1.11.0",
4
4
  "private": false,
5
5
  "description": "4PM CLI — drives Claude/Codex CLIs on AI worker machines (Node + TypeScript)",
6
6
  "license": "LicenseRef-4PM-Source-Available",