@dmsdc-ai/aterm-darwin-arm64 0.1.64 → 0.1.66
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
|
|
Binary file
|
|
@@ -762,23 +762,39 @@ def select_cli(description):
|
|
|
762
762
|
return "gemini"
|
|
763
763
|
return "claude"
|
|
764
764
|
|
|
765
|
-
# ──
|
|
766
|
-
|
|
767
|
-
def
|
|
768
|
-
"""
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
state
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
765
|
+
# ── Wait for state (event-driven IPC) ──────────────────────
|
|
766
|
+
|
|
767
|
+
def ipc_wait_until(sock_path, workspace, state="idle", timeout_ms=300000):
|
|
768
|
+
"""Send WaitUntil IPC — blocks server-side until state reached or timeout."""
|
|
769
|
+
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
|
770
|
+
try:
|
|
771
|
+
s.settimeout(timeout_ms / 1000 + 10) # server timeout + margin
|
|
772
|
+
s.connect(sock_path)
|
|
773
|
+
payload = json.dumps({
|
|
774
|
+
"action": "WaitUntil",
|
|
775
|
+
"workspace": workspace,
|
|
776
|
+
"state": state,
|
|
777
|
+
"timeout_ms": timeout_ms
|
|
778
|
+
})
|
|
779
|
+
s.sendall((payload + "\n").encode())
|
|
780
|
+
s.shutdown(socket.SHUT_WR)
|
|
781
|
+
data = b""
|
|
782
|
+
while True:
|
|
783
|
+
chunk = s.recv(4096)
|
|
784
|
+
if not chunk:
|
|
785
|
+
break
|
|
786
|
+
data += chunk
|
|
787
|
+
if b"\n" in data:
|
|
788
|
+
break
|
|
789
|
+
resp = json.loads(data.decode().strip().split("\n")[0])
|
|
790
|
+
resp_data = resp.get("data", resp)
|
|
791
|
+
if resp_data.get("reached", False):
|
|
792
|
+
return "complete"
|
|
793
|
+
return "timeout"
|
|
794
|
+
except Exception:
|
|
795
|
+
return "error"
|
|
796
|
+
finally:
|
|
797
|
+
s.close()
|
|
782
798
|
|
|
783
799
|
# ── Main ────────────────────────────────────────────────────
|
|
784
800
|
|
|
@@ -864,8 +880,7 @@ def main():
|
|
|
864
880
|
reports.append({"name": name, "status": "create_failed", "cli": cli, "error": str(e)})
|
|
865
881
|
continue
|
|
866
882
|
|
|
867
|
-
#
|
|
868
|
-
time.sleep(2)
|
|
883
|
+
# CreateWorkspace IPC waits for shell ready internally — no sleep needed
|
|
869
884
|
|
|
870
885
|
# Inject task description
|
|
871
886
|
try:
|
|
@@ -885,7 +900,7 @@ def main():
|
|
|
885
900
|
desc = st.get("description", st) if isinstance(st, dict) else str(st)
|
|
886
901
|
cli = select_cli(desc)
|
|
887
902
|
break
|
|
888
|
-
status =
|
|
903
|
+
status = ipc_wait_until(sock_path, name, "idle", 300000)
|
|
889
904
|
reports.append({"name": name, "status": status, "cli": cli})
|
|
890
905
|
|
|
891
906
|
# Kill all sub-sessions
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Resources/bin/aterm</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
a7xcdscixnWkjqJmTUbe/vKkTTI=
|
|
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
|
-
|
|
18
|
+
gGYPlZwoykeKlKpPtY0kcAyfBQ8=
|
|
19
19
|
</data>
|
|
20
20
|
<key>requirement</key>
|
|
21
|
-
<string>cdhash H"
|
|
21
|
+
<string>cdhash H"80660f959c28ca478a94aa4fb58d24700c9f050f"</string>
|
|
22
22
|
</dict>
|
|
23
23
|
<key>Resources/bin/aterm</key>
|
|
24
24
|
<dict>
|
|
25
25
|
<key>hash2</key>
|
|
26
26
|
<data>
|
|
27
|
-
|
|
27
|
+
qCrRT1jDYVBPcBz2wRCSkP41ElzmAjSDGwizxkMlV9Y=
|
|
28
28
|
</data>
|
|
29
29
|
</dict>
|
|
30
30
|
</dict>
|