@songsid/agend 2.4.0-beta.32 → 2.4.0-beta.34

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 (55) hide show
  1. package/dist/build-provenance.json +1 -1
  2. package/dist/fleet-manager.d.ts +9 -0
  3. package/dist/fleet-manager.js +26 -2
  4. package/dist/fleet-manager.js.map +1 -1
  5. package/dist/general-knowledge/skills/hub/SKILL.md +10 -4
  6. package/dist/hub/client.js +16 -6
  7. package/dist/hub/client.js.map +1 -1
  8. package/dist/hub/compose/member.js +3 -2
  9. package/dist/hub/compose/member.js.map +1 -1
  10. package/dist/hub/compose/server.js +2 -1
  11. package/dist/hub/compose/server.js.map +1 -1
  12. package/dist/hub/group-policy/resources.d.ts +1 -1
  13. package/dist/hub/http/compose.d.ts +2 -0
  14. package/dist/hub/http/compose.js +45 -6
  15. package/dist/hub/http/compose.js.map +1 -1
  16. package/dist/hub/member-reconciliation.d.ts +2 -0
  17. package/dist/hub/member-reconciliation.js +3 -1
  18. package/dist/hub/member-reconciliation.js.map +1 -1
  19. package/dist/hub/protocol.d.ts +8 -8
  20. package/dist/hub/protocol.js +7 -2
  21. package/dist/hub/protocol.js.map +1 -1
  22. package/dist/hub/receipt-reason.d.ts +6 -0
  23. package/dist/hub/receipt-reason.js +12 -0
  24. package/dist/hub/receipt-reason.js.map +1 -0
  25. package/dist/hub/representative.d.ts +2 -0
  26. package/dist/hub/representative.js +7 -3
  27. package/dist/hub/representative.js.map +1 -1
  28. package/dist/hub/rooms/direct-view.js +2 -0
  29. package/dist/hub/rooms/direct-view.js.map +1 -1
  30. package/dist/hub/rooms/types.d.ts +2 -0
  31. package/dist/hub/rooms.d.ts +12 -0
  32. package/dist/hub/rooms.js +14 -3
  33. package/dist/hub/rooms.js.map +1 -1
  34. package/dist/hub/server.js +4 -1
  35. package/dist/hub/server.js.map +1 -1
  36. package/dist/hub/settings-member-address-decision.js +1 -1
  37. package/dist/hub/settings-member-address-decision.js.map +1 -1
  38. package/dist/hub/settings-web-address-decision.js +2 -2
  39. package/dist/hub/settings-web-address-decision.js.map +1 -1
  40. package/dist/instance-lifecycle.d.ts +2 -0
  41. package/dist/instance-lifecycle.js +4 -0
  42. package/dist/instance-lifecycle.js.map +1 -1
  43. package/dist/turn-reply-guard.js +4 -1
  44. package/dist/turn-reply-guard.js.map +1 -1
  45. package/dist/ui/hub-assistant-admin.js +10 -3
  46. package/dist/ui/hub-assistant-usage-strings.js +8 -0
  47. package/dist/ui/hub-owner-strings.js +2 -2
  48. package/dist/ui/hub-room-composer.js +9 -2
  49. package/dist/ui/hub-room-strings.js +2 -2
  50. package/dist/ui/hub-room-thread.js +37 -9
  51. package/dist/ui/panel-hub.js +1 -1
  52. package/dist/ui/shared/chat-msg-actions.js +1 -1
  53. package/dist/ui/shared/chat-thread.js +1 -1
  54. package/dist/ui/shared/hub-owner.css +12 -0
  55. package/package.json +1 -1
@@ -1 +1 @@
1
- {"format":1,"commit":"ce1ecddd7575d81764b2667db9eb65aac4f34a24","ref":"v2.4.0-beta.32","channel":"release","modified":false,"from":"git"}
1
+ {"format":1,"commit":"9cb83e415aab0380c5518ac4de84da8bb1187e26","ref":"v2.4.0-beta.34","channel":"release","modified":false,"from":"git"}
@@ -843,6 +843,15 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
843
843
  hubFleetUpdates(): import("./hub/member/updates.js").HubMemberUpdates | null;
844
844
  /** `ownClaim` is this caller's launch, so that launch does not look busy to itself. The Hub queue passes its claim; the local card passes its own. */
845
845
  private hubUpdateIdle;
846
+ /**
847
+ * M-3960: a paused instance that is doing no work, for both idle checks (the Hub-requested update and Update when idle).
848
+ * A pause persisted across a restart starts no daemon at all ("Persisted paused instance — skipping startup"): before,
849
+ * that read as an unknown process, counted as busy and held every idle update until it expired. A live daemon is
850
+ * asleep only once its process has stopped. A wake on its way is checked first, by wakeOnItsWay().
851
+ */
852
+ private pausedAndAsleep;
853
+ /** M-3960: a wake of `name` is under way: its lifecycle flight, or the wake coordinator's admission. Busy for both idle checks. */
854
+ private wakeOnItsWay;
846
855
  private hubUpdateCanInstall;
847
856
  private launchHubUpdate;
848
857
  /**
@@ -3347,10 +3347,14 @@ export class FleetManager {
3347
3347
  const worker = this.queueWorkers.get(name);
3348
3348
  if (worker?.busy || worker?.inFlight)
3349
3349
  return false;
3350
+ // M-3960 (Prism #4634): a wake on its way is busy whatever the status reads; a cold wake clears the pause marker
3351
+ // before its daemon exists, so the status reads stopped for that window.
3352
+ if (this.wakeOnItsWay(name))
3353
+ return false;
3350
3354
  const process = this.getInstanceStatus(name);
3351
3355
  if (process === "stopped" || process === "crashed")
3352
3356
  continue;
3353
- if (process === "paused" && ["stopped", "crashed"].includes(this.daemons.get(name)?.getProcessStatus?.() ?? "unknown"))
3357
+ if (process === "paused" && this.pausedAndAsleep(name))
3354
3358
  continue;
3355
3359
  if (process !== "running" || this.getInstanceExecutionState(name) !== "idle")
3356
3360
  return false;
@@ -3359,6 +3363,22 @@ export class FleetManager {
3359
3363
  }
3360
3364
  return true;
3361
3365
  }
3366
+ /**
3367
+ * M-3960: a paused instance that is doing no work, for both idle checks (the Hub-requested update and Update when idle).
3368
+ * A pause persisted across a restart starts no daemon at all ("Persisted paused instance — skipping startup"): before,
3369
+ * that read as an unknown process, counted as busy and held every idle update until it expired. A live daemon is
3370
+ * asleep only once its process has stopped. A wake on its way is checked first, by wakeOnItsWay().
3371
+ */
3372
+ pausedAndAsleep(name) {
3373
+ const daemon = this.daemons.get(name);
3374
+ if (!daemon)
3375
+ return true;
3376
+ return ["stopped", "crashed"].includes(daemon.getProcessStatus?.() ?? "unknown");
3377
+ }
3378
+ /** M-3960: a wake of `name` is under way: its lifecycle flight, or the wake coordinator's admission. Busy for both idle checks. */
3379
+ wakeOnItsWay(name) {
3380
+ return this.lifecycle.wakeInFlight(name) || this.wakeCoordinator?.isWaking(name) === true;
3381
+ }
3362
3382
  async hubUpdateCanInstall() {
3363
3383
  const found = await npmForRunningInstall();
3364
3384
  if ("reason" in found)
@@ -37229,10 +37249,14 @@ export class FleetManager {
37229
37249
  out.push(this.shownInstanceName(name));
37230
37250
  continue;
37231
37251
  }
37252
+ if (this.wakeOnItsWay(name)) {
37253
+ out.push(this.shownInstanceName(name));
37254
+ continue;
37255
+ } // M-3960: before any status skip
37232
37256
  const process = this.getInstanceStatus(name);
37233
37257
  if (process === "stopped" || process === "crashed")
37234
37258
  continue;
37235
- if (process === "paused" && ["stopped", "crashed"].includes(this.daemons.get(name)?.getProcessStatus?.() ?? "unknown"))
37259
+ if (process === "paused" && this.pausedAndAsleep(name))
37236
37260
  continue;
37237
37261
  if (process !== "running" || this.getInstanceExecutionState(name) !== "idle" || this.getInstanceInteraction(name)?.phase === "waiting") {
37238
37262
  out.push(this.shownInstanceName(name));