@dmsdc-ai/aterm-darwin-arm64 0.1.40 → 0.1.42

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.
Binary file
@@ -64,7 +64,28 @@ try:
64
64
  print(json.dumps({"error": resp["message"]}), file=sys.stderr)
65
65
  sys.exit(1)
66
66
  elif action == "list":
67
- print(json.dumps({"sessions": resp.get("data", [])}))
67
+ if __import__("os").environ.get("ATERM_LIST_JSON"):
68
+ print(json.dumps({"sessions": resp.get("data", [])}))
69
+ else:
70
+ sessions = resp.get("data", [])
71
+ if not sessions:
72
+ print("(no workspaces)")
73
+ else:
74
+ import os.path
75
+ rows = []
76
+ for s in sessions:
77
+ name = s.get("name") or os.path.basename(s.get("cwd", "")) or s.get("id", "?")
78
+ cli = s.get("cli", "")
79
+ cwd = s.get("cwd", "")
80
+ status = s.get("status", "")
81
+ rows.append((name, cli, cwd, status))
82
+ cols = ["NAME", "CLI", "CWD", "STATUS"]
83
+ widths = [max(len(c), *(len(r[i]) for r in rows)) for i, c in enumerate(cols)]
84
+ fmt = " ".join(f"{{:<{w}}}" for w in widths)
85
+ print(fmt.format(*cols))
86
+ print(" ".join("\u2500" * w for w in widths))
87
+ for r in rows:
88
+ print(fmt.format(*r))
68
89
  elif action == "status":
69
90
  print(json.dumps(resp.get("data", {})))
70
91
  else:
@@ -80,7 +101,11 @@ finally:
80
101
  case "${1:-help}" in
81
102
  list)
82
103
  if [[ -z "$ATERM_IPC_SOCKET" ]]; then exec telepty list "${@:2}"; fi
83
- aterm_ipc list ;;
104
+ if [[ "${2:-}" == "--json" ]]; then
105
+ ATERM_LIST_JSON=1 aterm_ipc list
106
+ else
107
+ aterm_ipc list
108
+ fi ;;
84
109
  inject)
85
110
  if [[ -z "$ATERM_IPC_SOCKET" ]]; then exec telepty inject "${@:2}"; fi
86
111
  [[ $# -lt 3 ]] && { echo '{"error":"usage: aterm inject <workspace> <text>"}' >&2; exit 1; }
@@ -6,7 +6,7 @@
6
6
  <dict>
7
7
  <key>Resources/bin/aterm</key>
8
8
  <data>
9
- gFvuG9DaXYDL7UTWZL/Tq5PcKnc=
9
+ gCSvUlukYdFw7e5CEaiBmwTblYQ=
10
10
  </data>
11
11
  </dict>
12
12
  <key>files2</key>
@@ -15,16 +15,16 @@
15
15
  <dict>
16
16
  <key>cdhash</key>
17
17
  <data>
18
- uYvXBprRTfl+0wtcioq+d1tWf6U=
18
+ 8gJg6YBgIxIudeTA+itvRdqpKhk=
19
19
  </data>
20
20
  <key>requirement</key>
21
- <string>cdhash H"b98bd7069ad14df97ed30b5c8a8abe775b567fa5"</string>
21
+ <string>cdhash H"f20260e9806023122e75e4c0fa2b6f45daa92a19"</string>
22
22
  </dict>
23
23
  <key>Resources/bin/aterm</key>
24
24
  <dict>
25
25
  <key>hash2</key>
26
26
  <data>
27
- MK+VFroryYcLv27zSIhkens5mXnx7gSJjhf90/iwmdQ=
27
+ GC8l6O6WnDcgzRItQVXGDO4R0YvrkuR70RugB4H7NRs=
28
28
  </data>
29
29
  </dict>
30
30
  </dict>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dmsdc-ai/aterm-darwin-arm64",
3
- "version": "0.1.40",
3
+ "version": "0.1.42",
4
4
  "description": "darwin-arm64 native bundle for @dmsdc-ai/aterm",
5
5
  "type": "module",
6
6
  "files": [