@astrofoundry/pi-astro 0.40.59 → 0.40.60

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.
@@ -1450,16 +1450,17 @@ class Bridge {
1450
1450
  await this.rest.ephemeralReply(interaction.id, interaction.token, `${host.name} is already rebooting.`);
1451
1451
  return;
1452
1452
  }
1453
- const status = await this.runEntry("proxmox", userId, [...host.prefix, "host-status"], 3 * 60_000).catch(() => null);
1454
- if (status !== null && /^reboot-needed:\s*no\s*$/m.test(status)) {
1455
- await this.rest.ephemeralReply(interaction.id, interaction.token, `${host.name} no longer needs a reboot.`);
1456
- return;
1457
- }
1453
+ // Discord drops a click not answered within three seconds, and a host's status check can take longer.
1458
1454
  await this.rest.deferUpdate(interaction.id, interaction.token);
1459
1455
  const channelId = interaction.channel_id ?? this.config.adminChannelId;
1460
1456
  const messageId = interaction.message?.id;
1461
1457
  this.rebooting.add(host.id);
1462
1458
  try {
1459
+ const status = await this.runEntry("proxmox", userId, [...host.prefix, "host-status"], 3 * 60_000).catch(() => null);
1460
+ if (status !== null && /^reboot-needed:\s*no\s*$/m.test(status)) {
1461
+ await this.rest.followUp(this.config.applicationId, interaction.token, { content: `${host.name} no longer needs a reboot.`, flags: EPHEMERAL }).catch(() => undefined);
1462
+ return;
1463
+ }
1463
1464
  log(`reboot ${host.name} by ${userId}`);
1464
1465
  await this.runEntry("proxmox", userId, [...host.prefix, "host-reboot", "--confirm"], 2 * 60_000);
1465
1466
  const note = `♻️ ${host.name} reboots in one minute, started by <@${userId}>; its guests restart with it.`;
@@ -1502,16 +1503,17 @@ class Bridge {
1502
1503
  await this.rest.ephemeralReply(interaction.id, interaction.token, "A Pomerium upgrade is already running.");
1503
1504
  return;
1504
1505
  }
1505
- const check = (await this.runEntry("identity", userId, ["dmz", "pomerium-check"], 2 * 60_000).then((out) => JSON.parse(out) as { installed?: unknown }).catch(() => null)) ?? {};
1506
- if (check.installed === tag) {
1507
- await this.rest.ephemeralReply(interaction.id, interaction.token, `Pomerium already runs ${tag}.`);
1508
- return;
1509
- }
1506
+ // Discord drops a click not answered within three seconds; the check on the DMZ can take longer.
1510
1507
  await this.rest.deferUpdate(interaction.id, interaction.token);
1511
1508
  const channelId = interaction.channel_id ?? this.config.adminChannelId;
1512
1509
  const messageId = interaction.message?.id;
1513
1510
  this.pomeriumUpgrading = true;
1514
1511
  try {
1512
+ const check = (await this.runEntry("identity", userId, ["dmz", "pomerium-check"], 2 * 60_000).then((out) => JSON.parse(out) as { installed?: unknown }).catch(() => null)) ?? {};
1513
+ if (check.installed === tag) {
1514
+ await this.rest.followUp(this.config.applicationId, interaction.token, { content: `Pomerium already runs ${tag}.`, flags: EPHEMERAL }).catch(() => undefined);
1515
+ return;
1516
+ }
1515
1517
  log(`pomerium upgrade to ${tag} by ${userId}`);
1516
1518
  if (messageId) await this.rest.editMessage(channelId, messageId, `${interaction.message?.content ?? ""}\n⏳ Pomerium ${tag} is installing, started by <@${userId}>.`.slice(0, 1900), []).catch(() => undefined);
1517
1519
  const out = await this.runEntry("identity", userId, ["dmz", "pomerium-upgrade", tag], POMERIUM_UPGRADE_MS);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrofoundry/pi-astro",
3
- "version": "0.40.59",
3
+ "version": "0.40.60",
4
4
  "description": "Personal pi customizations (extensions, subagents, skills, prompts, themes) for the pi coding agent.",
5
5
  "keywords": [
6
6
  "pi-package"