relay-codex 0.7.4 → 0.7.5

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.
@@ -8,8 +8,8 @@ Friends can run `npx relay-codex` or install it with `npm install -g relay-codex
8
8
  The GitHub repository is enough for friends to install or try Relay:
9
9
 
10
10
  ```sh
11
- npm install -g github:blackspider-ops/relay#v0.7.4
12
- npx --yes github:blackspider-ops/relay#v0.7.4 --version
11
+ npm install -g github:blackspider-ops/relay#v0.7.5
12
+ npx --yes github:blackspider-ops/relay#v0.7.5 --version
13
13
  ```
14
14
 
15
15
  `npx` runs packages; it is not a separate publishing service. Publishing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "relay-codex",
3
- "version": "0.7.4",
3
+ "version": "0.7.5",
4
4
  "description": "Keep your Codex sessions moving between your own accounts.",
5
5
  "license": "MIT",
6
6
  "author": "blackspider-ops",
package/python/router.py CHANGED
@@ -24,7 +24,7 @@ from pool import Pool, blocked, reset_time, failure_kind, file_lock
24
24
  from launch import translate, RESUME_FIELDS
25
25
  import settings
26
26
 
27
- VERSION = "0.7.4"
27
+ VERSION = "0.7.5"
28
28
  _support = Path.home() / "Library/Application Support"
29
29
  _legacy = _support / "Codex Accounts"
30
30
  _default_state = _legacy if (_legacy / "accounts").exists() else _support / "Relay"
package/python/watch.py CHANGED
@@ -11,7 +11,7 @@ def fingerprint(value):
11
11
  """Heartbeats and sample time do not represent a dashboard change."""
12
12
  value = {**value, "at": None}
13
13
  value["sessions"] = [
14
- {k: v for k, v in item.items() if k != "seen"}
14
+ {k: v for k, v in item.items() if k not in {"seen", "activity"}}
15
15
  for item in value.get("sessions", [])
16
16
  ]
17
17
  return json.dumps(value, sort_keys=True)
@@ -17,6 +17,40 @@ from test_pool import Clock
17
17
 
18
18
 
19
19
  class BoundaryTests(unittest.IsolatedAsyncioTestCase):
20
+ def test_diagnostic_tool_changes_do_not_redraw_unchanged_dashboard(self):
21
+ from watch import fingerprint
22
+
23
+ first = {
24
+ "at": 1,
25
+ "sessions": [
26
+ {
27
+ "id": "task",
28
+ "state": "working",
29
+ "account": "one",
30
+ "seen": 1,
31
+ "activity": {"items": ["tool-a"]},
32
+ }
33
+ ],
34
+ }
35
+ second = {
36
+ "at": 2,
37
+ "sessions": [
38
+ {
39
+ "id": "task",
40
+ "state": "working",
41
+ "account": "one",
42
+ "seen": 2,
43
+ "activity": {"items": ["tool-b"], "disconnected": False},
44
+ }
45
+ ],
46
+ }
47
+ self.assertEqual(fingerprint(first), fingerprint(second))
48
+ second["sessions"][0]["state"] = "waiting_for_reset"
49
+ self.assertNotEqual(fingerprint(first), fingerprint(second))
50
+ second["sessions"][0]["state"] = "working"
51
+ second["sessions"][0]["account"] = "two"
52
+ self.assertNotEqual(fingerprint(first), fingerprint(second))
53
+
20
54
  def controller(
21
55
  self,
22
56
  *,