clavarium 0.2.519-next.1 → 0.2.520-next.1

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.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.519-next.1",
3
+ "version": "0.2.520-next.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.2.519-next.1",
9
+ "version": "0.2.520-next.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.519-next.1",
3
+ "version": "0.2.520-next.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "A conversation is a VM with a terminal in it. Everything else is a folder.",
package/server/revive.mjs CHANGED
@@ -45,7 +45,7 @@ export class Revive {
45
45
  }
46
46
 
47
47
  wanted(name) { return this.#wanted.get(name)?.why ?? null; }
48
- forget(name) { this.#wanted.delete(name); this.#lastAt.delete(name); }
48
+ forget(name) { this.#wanted.delete(name); this.#lastAt.delete(name); this.#lastAt.delete(`${name}\0machine`); }
49
49
 
50
50
  /* One pass: each one wanted, restarted when it may be. Resolves with the names restarted. */
51
51
  async tick() {
@@ -55,8 +55,11 @@ export class Revive {
55
55
  const busy = (() => { try { return this.#busy(name); } catch { return false; } })();
56
56
  if (busy && !(why !== 'asked' && this.#now() - since >= WAIT_MS)) continue;
57
57
  this.#wanted.delete(name);
58
- if (this.#now() - (this.#lastAt.get(name) ?? -Infinity) < AGAIN_MS) continue;
59
- this.#lastAt.set(name, this.#now());
58
+ /* Its tool and its machine each have their own « not again » (23-11, on a real machine: a restart of its tool
59
+ held back for 30 min the restart of its machine, the only thing that could bring its folders back). */
60
+ const key = why === 'stuck' ? `${name}\0machine` : name;
61
+ if (this.#now() - (this.#lastAt.get(key) ?? -Infinity) < AGAIN_MS) continue;
62
+ this.#lastAt.set(key, this.#now());
60
63
  this.#going.add(name);
61
64
  try {
62
65
  try { this.#tell(name, why, 'before'); } catch { /* told, nothing more */ }