@songsid/agend 2.2.0-beta.11 → 2.2.0-beta.13

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 (43) hide show
  1. package/dist/agent-whats-new.js +4 -0
  2. package/dist/agent-whats-new.js.map +1 -1
  3. package/dist/cli.js +12 -6
  4. package/dist/cli.js.map +1 -1
  5. package/dist/config.d.ts +1 -0
  6. package/dist/config.js +2 -1
  7. package/dist/config.js.map +1 -1
  8. package/dist/daemon.js +21 -2
  9. package/dist/daemon.js.map +1 -1
  10. package/dist/fleet-manager.d.ts +0 -1
  11. package/dist/fleet-manager.js +20 -36
  12. package/dist/fleet-manager.js.map +1 -1
  13. package/dist/locale.js +48 -22
  14. package/dist/locale.js.map +1 -1
  15. package/dist/restart-progress.d.ts +0 -2
  16. package/dist/restart-progress.js +0 -2
  17. package/dist/restart-progress.js.map +1 -1
  18. package/dist/topic-commands.d.ts +4 -0
  19. package/dist/topic-commands.js +9 -2
  20. package/dist/topic-commands.js.map +1 -1
  21. package/dist/transcript-sources.js +6 -1
  22. package/dist/transcript-sources.js.map +1 -1
  23. package/dist/ui/chat-strings.js +10 -10
  24. package/dist/ui/chat-tour.js +17 -14
  25. package/dist/ui/panel-chat.js +9 -9
  26. package/dist/ui/panel-fleet.js +15 -2
  27. package/dist/ui/panel-log.js +4 -4
  28. package/dist/ui/panel-needs.js +10 -7
  29. package/dist/ui/panel-settings.js +9 -5
  30. package/dist/ui/settings-dialogs.js +2 -2
  31. package/dist/ui/settings-model.js +3 -1
  32. package/dist/ui/settings-strings.js +8 -8
  33. package/dist/ui/shared/app-i18n.js +1 -1
  34. package/dist/ui/shared/app.css +23 -7
  35. package/dist/ui/shared/header-tools.js +17 -8
  36. package/dist/ui/shared/instance-switch.js +5 -2
  37. package/dist/ui/shared/signin.js +15 -9
  38. package/dist/ui/shared/ui-icons.js +1 -0
  39. package/dist/ui/shared/view-strings.js +2 -2
  40. package/dist/ui/signin.html +8 -3
  41. package/dist/update-launch.js +12 -6
  42. package/dist/update-launch.js.map +1 -1
  43. package/package.json +1 -1
@@ -439,7 +439,6 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
439
439
  private updateProgressTimer;
440
440
  private updateProgressEditRunning;
441
441
  private lastUpdateProgressText;
442
- private updateCompletionTipText;
443
442
  /**
444
443
  * #1660: an adopted update whose retire outcome is still owed. The
445
444
  * completion summary was (or will be) posted; this watch appends the
@@ -178,7 +178,7 @@ import { assertExplicitInstanceRemoval } from "./instance-removal.js";
178
178
  import { KNOWN_BACKENDS, validateFleetConfig } from "./config-validator.js";
179
179
  import { isRemovedBackend, removedBackendMessage } from "./backend/removed.js";
180
180
  import { presentationState, interactionSummary, sameInteractionOwner } from "./interaction-observation.js";
181
- import { readLastInboundAt } from "./daemon.js";
181
+ import { DEFAULT_STUCK_TIMEOUT_MS, readLastInboundAt } from "./daemon.js";
182
182
  import { clearPausedMarker, readPausedAt, readPauseReason, writePausedMarker } from "./pause-marker.js";
183
183
  import { readBackgroundWorkEndedMarker } from "./background-work-ended.js";
184
184
  import { DEFAULT_WARM_OVERFLOW, WakeCoordinator } from "./wake-coordinator.js";
@@ -189,7 +189,7 @@ import { isSetupComplete, markSetupComplete } from "./setup-marker.js";
189
189
  import { manualCleanupMessage, reapStaleTunnel } from "./tunnel/lease.js";
190
190
  import { buildToolPermissionsNotice } from "./tool-permissions-notice.js";
191
191
  import { NeedsYouHub } from "./needs-you-hub.js";
192
- import { WEB_CHAT_NOTICE, WEB_REMOTE_DOCS_URL, claimNotice, hasWebChat, releaseNotice, upgradeNoticesPath } from "./upgrade-notices.js";
192
+ import { WEB_CHAT_NOTICE, claimNotice, hasWebChat, releaseNotice, upgradeNoticesPath } from "./upgrade-notices.js";
193
193
  import { GENERAL_PAUSE_ERROR, isGeneralInstance } from "./general-instance.js";
194
194
  import { buildOrgChart } from "./web-org.js";
195
195
  import { CacheService, WINDOWS } from "./cache-service.js";
@@ -762,7 +762,6 @@ export class FleetManager {
762
762
  updateProgressTimer = null;
763
763
  updateProgressEditRunning = false;
764
764
  lastUpdateProgressText = null;
765
- updateCompletionTipText = null;
766
765
  /**
767
766
  * #1660: an adopted update whose retire outcome is still owed. The
768
767
  * completion summary was (or will be) posted; this watch appends the
@@ -1662,6 +1661,7 @@ export class FleetManager {
1662
1661
  content: payload.content,
1663
1662
  delivery_id: claimed.deliveryId,
1664
1663
  delivery_attempt: String(claimed.attemptNo),
1664
+ ...(isSilentScheduleDelivery(claimed) ? { silent_schedule: true } : {}),
1665
1665
  }, { waitForIdle: false, noInlineWake: this.deliveryWorkerMode(target) !== "off" });
1666
1666
  }
1667
1667
  else {
@@ -2316,14 +2316,14 @@ export class FleetManager {
2316
2316
  // "not a beta" and sent a beta install to @latest. #1450 C5: the INSTALLED agend, verified, by absolute path.
2317
2317
  const installed = await resolveInstalledAgend();
2318
2318
  if (!installed.ok) {
2319
- this.failUpdateProgress(`/update cannot verify the installed AgEnD (${installed.reason}). Run \`agend update\` from a shell.`);
2319
+ this.failUpdateProgress(`${t("update.failure.shell")} ${t("update.failure.installed", installed.reason)}`);
2320
2320
  return;
2321
2321
  }
2322
2322
  const origin = `slash /update by ${adapterId}:${data.userId}`;
2323
2323
  recordInternalRequest(this.dataDir, "update", origin);
2324
2324
  const launch = await resolveUpdateLaunch(installed.agend);
2325
2325
  if (!launch.ok) {
2326
- this.failUpdateProgress(`/update cannot prepare an independent updater (${launch.reason}). Run ` + "`agend update` from a host shell.");
2326
+ this.failUpdateProgress(`${t("update.failure.shell")} ${t("update.failure.independent", launch.reason)}`);
2327
2327
  return;
2328
2328
  }
2329
2329
  if (this.fleetAdminGate(data.userId, adapterId) !== "ok" || this.shuttingDown) {
@@ -5398,13 +5398,12 @@ export class FleetManager {
5398
5398
  const adapter = owner.binding;
5399
5399
  const status = this.getPublicWebStatus();
5400
5400
  const publicAllowed = publicLinkSettings(this.fleetConfig?.web).allowed;
5401
- const tgHint = adapter.type === "telegram" && dmChatId === undefined ? this.tgStartWebUrl(owner.adapterId) : null;
5402
- const menuText = this.topicCommands.getDashboardText(false, !publicAllowed)
5403
- + (publicAllowed ? "\n\n" + t("dashboard.public_risk") : "")
5404
- + "\n" + t("dashboard.public_status", status.state, status.remainingSeconds ?? 0)
5405
- + (status.expiresAt ? t("dashboard.public_until", formatFleetTime(status.expiresAt)) : "")
5406
- + (tgHint ? "\n" + t("dashboard.menu_tg_hint", tgHint) : "");
5407
- const choices = [{ action: "local", label: t("dashboard.local") },
5401
+ // Show the action before any link exists. TG's Start instructions belong to confirmed DM refusal below.
5402
+ const menuText = this.topicCommands.getDashboardMenuText()
5403
+ + (publicAllowed ? "\n" + t("dashboard.public_risk") : "")
5404
+ + (status.state !== "closed" ? "\n" + t("dashboard.public_status", status.state, status.remainingSeconds ?? 0)
5405
+ + (status.expiresAt ? t("dashboard.public_until", formatFleetTime(status.expiresAt)) : "") : "");
5406
+ const choices = [{ action: "local", label: t("dashboard.local_signin") },
5408
5407
  ...(publicLinkSettings(this.fleetConfig?.web).allowed ? [{ action: "public", label: t("dashboard.public_open") }] : []),
5409
5408
  ...(status.state !== "closed" ? [{ action: "close", label: t("dashboard.public_close") }] : [])];
5410
5409
  const posted = await this.postNonceButtonPrompt({
@@ -5480,9 +5479,11 @@ export class FleetManager {
5480
5479
  return false;
5481
5480
  this.initializeWebSessions();
5482
5481
  const issued = this.webLoginCodes.issue({ epoch: tokenEpoch(token), audience: exposureId, owner });
5483
- // #1586: the expiry in the fleet's zone with its offset, never a bare UTC ISO string.
5484
- const text = t("dashboard.private_link", url, issued.display, Math.round(LOGIN_CODE_TTL_MS / 60_000), expiresAt ? formatFleetTime(expiresAt) : t("dashboard.local"))
5485
- + "\n" + t("dashboard.code_next");
5482
+ // Only a public link has a link expiry; the code's five-minute lifetime applies to either packet.
5483
+ const minutes = Math.round(LOGIN_CODE_TTL_MS / 60_000);
5484
+ const text = expiresAt !== undefined
5485
+ ? t("dashboard.private_public", url, issued.display, minutes, formatFleetTime(expiresAt))
5486
+ : t("dashboard.private_local", url, issued.display, minutes);
5486
5487
  const deadline = performance.now() + 10_000;
5487
5488
  const direct = owner.binding;
5488
5489
  // The route the sign-in message took: the code-only follow-up takes the same one (#1586).
@@ -5671,7 +5672,6 @@ export class FleetManager {
5671
5672
  messageId,
5672
5673
  });
5673
5674
  this.lastUpdateProgressText = null;
5674
- this.updateCompletionTipText = null;
5675
5675
  this.startUpdateProgressMonitor(adapter);
5676
5676
  }
5677
5677
  /** Persist the public response, wait for idle, then start the canonical service restart. */
@@ -5702,7 +5702,6 @@ export class FleetManager {
5702
5702
  return false;
5703
5703
  }
5704
5704
  this.lastUpdateProgressText = null;
5705
- this.updateCompletionTipText = null;
5706
5705
  this.startUpdateProgressMonitor(adapter);
5707
5706
  await this.waitForFullRestartIdleGrace();
5708
5707
  // An update can begin while the idle wait yields. Never launch a second
@@ -5942,17 +5941,8 @@ export class FleetManager {
5942
5941
  const adapter = this.adapters.get(target.adapterId) ?? (initialAdapter?.id === target.adapterId ? initialAdapter : undefined);
5943
5942
  if (!adapter)
5944
5943
  return;
5945
- let text = formatUpdateProgress(marker);
5946
- // No-restart updates complete in the old fleet process, so they never
5947
- // reach RestartProgress.finish(). Append the same optional tip here.
5948
- if (marker.progress.stage === "complete" && this.tipsEnabled()) {
5949
- if (this.updateCompletionTipText === null) {
5950
- const tip = this.pickAvailableTip();
5951
- this.updateCompletionTipText = tip ? this.formatTip(tip) : "";
5952
- }
5953
- if (this.updateCompletionTipText)
5954
- text += `\n\n${this.updateCompletionTipText}`;
5955
- }
5944
+ // #1854: no tip on an update's completion (either path); tips come on their own schedule and from /tips.
5945
+ const text = formatUpdateProgress(marker);
5956
5946
  if (text === this.lastUpdateProgressText)
5957
5947
  return;
5958
5948
  this.updateProgressEditRunning = true;
@@ -6456,12 +6446,6 @@ export class FleetManager {
6456
6446
  pausedNames,
6457
6447
  failedNames,
6458
6448
  backgroundWorkEndedNames,
6459
- tipText: pendingProgressOperation === "update" && this.tipsEnabled()
6460
- ? (() => {
6461
- const tip = this.pickAvailableTip();
6462
- return tip ? this.formatTip(tip) : undefined;
6463
- })()
6464
- : undefined,
6465
6449
  ...(cleanupOutcome && "render" in cleanupOutcome
6466
6450
  ? { warningText: cleanupOutcome.render.warning, warningCommand: cleanupOutcome.render.cleanupCommand }
6467
6451
  : {}),
@@ -8462,7 +8446,7 @@ export class FleetManager {
8462
8446
  if (!claimNotice(path, WEB_CHAT_NOTICE, adapterId))
8463
8447
  continue;
8464
8448
  try {
8465
- await world.adapter.sendText(target.chatId, t("upgrade.web_chat", WEB_REMOTE_DOCS_URL), target.opts);
8449
+ await world.adapter.sendText(target.chatId, t("upgrade.web_chat"), target.opts);
8466
8450
  this.logger.info({ adapterId, notice: WEB_CHAT_NOTICE }, "Announced web chat in General");
8467
8451
  }
8468
8452
  catch (err) {
@@ -14579,7 +14563,7 @@ export class FleetManager {
14579
14563
  const instanceHangConfig = this.fleetConfig?.instances[instanceName]?.hang_detector;
14580
14564
  const configuredMinutes = instanceHangConfig?.timeout_minutes
14581
14565
  ?? this.fleetConfig?.defaults?.hang_detector?.timeout_minutes
14582
- ?? 15;
14566
+ ?? DEFAULT_STUCK_TIMEOUT_MS / 60_000; // #1854: the detector's own default (10 min), not a stale 15
14583
14567
  const unchangedMinutes = unchangedForMs == null
14584
14568
  ? configuredMinutes
14585
14569
  : Math.max(1, Math.floor(unchangedForMs / 60_000));