@volter/supercode-teams 0.3.14 → 0.3.16

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.
@@ -90,8 +90,13 @@ export async function calendarCommand(sub, { flags, rest, output, client, contex
90
90
  let revised = 0;
91
91
  for (const card of projection.cards) {
92
92
  const before = kept.get(card.id);
93
- const hours = (iso) => Math.round(Date.parse(iso) / 3_600_000);
94
- if (before && hours(before['volter:p85']) === Math.round(card.p85 / 3_600_000) && hours(before['volter:p50']) === Math.round(card.p50 / 3_600_000)) continue;
93
+ // Moved means more than the projection's own jitter: two hours, or a tenth of the time left to that date. A card
94
+ // set or a clock that shifts the draws moved most forecasts by an hour each run, and every one was a write on
95
+ // the board's shared credential, a burst of them every five minutes (t_616a0486).
96
+ const now = Date.now();
97
+ const moved = (iso, next) => Math.abs(Date.parse(iso) - next) > Math.max(2 * 3_600_000, 0.1 * Math.max(0, next - now));
98
+ const changed = !before || card.changes > (before['volter:changes'] ?? 0) || (before['volter:lane'] && before['volter:lane'] !== card.lane);
99
+ if (!changed && !moved(before['volter:p85'], card.p85) && !moved(before['volter:p50'], card.p50)) continue;
95
100
  // Why it moved, from the card's own record: a review asking for changes, a move of lane, else the base rate.
96
101
  const cause = !before ? 'first forecast'
97
102
  : card.changes > (before['volter:changes'] ?? 0) ? `a review asked for changes (round ${card.changes})`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-teams",
3
- "version": "0.3.14",
3
+ "version": "0.3.16",
4
4
  "type": "module",
5
5
  "description": "A machine daemon serving this machine's doors, and a local or remote Teams server for shared session discovery, OpenTelemetry ingestion and access to enrolled machines.",
6
6
  "license": "MIT",
@@ -66,7 +66,7 @@
66
66
  "@volter/supercode-health": "^0.1.0",
67
67
  "@volter/supercode-terminal": "^0.2.54",
68
68
  "@volter/supercode-trace": "^0.1.0",
69
- "@volter/teams": "0.2.7",
69
+ "@volter/teams": "0.2.8",
70
70
  "@xterm/addon-serialize": "^0.14.0",
71
71
  "@xterm/headless": "^6.0.0",
72
72
  "protobufjs": "8.8.0",