@dmsdc-ai/aterm-darwin-arm64 0.1.49 → 0.1.50
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
|
|
@@ -20,6 +20,7 @@ export ATERM_UI_LANG
|
|
|
20
20
|
|
|
21
21
|
# State directory for task board and lessons
|
|
22
22
|
STATE_DIR="${PWD}/state"
|
|
23
|
+
SETTINGS_FILE="${HOME}/.aigentry/config/aterm.json"
|
|
23
24
|
|
|
24
25
|
tasks_file() { echo "${STATE_DIR}/task-queue.json"; }
|
|
25
26
|
lessons_file() { echo "${STATE_DIR}/lessons.json"; }
|
|
@@ -70,6 +71,8 @@ show_help() {
|
|
|
70
71
|
| `aterm status` | 번들된 에코시스템 상태 표시 |
|
|
71
72
|
| `aterm status <workspace>` | 워크스페이스 상태 확인 |
|
|
72
73
|
| `aterm focus <workspace>` | 워크스페이스 탭으로 포커스 이동 |
|
|
74
|
+
| `aterm rename <old> <new>` | 워크스페이스 이름 변경 |
|
|
75
|
+
| `aterm clear <workspace>` | 워크스페이스 터미널 화면 초기화 |
|
|
73
76
|
| `aterm create <name> --cli <cli> --cwd <path>` | 새 워크스페이스 생성 |
|
|
74
77
|
| `aterm restart <workspace>` | 죽은 세션 재시작 |
|
|
75
78
|
| `aterm kill <workspace>` | 워크스페이스 종료 |
|
|
@@ -82,6 +85,13 @@ show_help() {
|
|
|
82
85
|
| `aterm lessons add '<lesson>' --type failed` | 실패 패턴 추가 |
|
|
83
86
|
| `aterm dispatch <task-id>` | 태스크 분해 → 서브세션 생성 → 실행 → 수집 → 정리 |
|
|
84
87
|
| `aterm dispatch --plan '<desc>'` | 자유 텍스트 태스크 → 동일한 dispatch 흐름 |
|
|
88
|
+
| `aterm log <workspace> [--lines N]` | 워크스페이스 화면 텍스트 읽기 (기본 100줄) |
|
|
89
|
+
| `aterm export <workspace> [--format md\|txt]` | 세션 출력을 파일로 저장 |
|
|
90
|
+
| `aterm settings get <key>` | 설정 값 읽기 (~/.aigentry/config/aterm.json) |
|
|
91
|
+
| `aterm settings set <key> <value>` | 설정 값 변경 |
|
|
92
|
+
| `aterm theme <name>` | 테마 변경 (colorScheme 설정 단축키) |
|
|
93
|
+
| `aterm attach <external-id>` | 외부 세션 연결 |
|
|
94
|
+
| `aterm send-key <workspace> <key>` | 키 전송 (ctrl+c, enter, tab, esc 등) |
|
|
85
95
|
| `aterm help` | 이 도움말 표시 |
|
|
86
96
|
|
|
87
97
|
## 에코시스템
|
|
@@ -104,6 +114,12 @@ show_help() {
|
|
|
104
114
|
| `task 42 done` | `태스크 42 완료` | `aterm tasks done 42` |
|
|
105
115
|
| `show lessons` | `레슨 보여줘` | `aterm lessons` |
|
|
106
116
|
| `add lesson: this pattern failed` | `레슨 추가` | `aterm lessons add 'this pattern failed'` |
|
|
117
|
+
| `show session log` | `세션 로그 보여줘` | `aterm log myworkspace` |
|
|
118
|
+
| `export session output` | `세션 출력 저장해줘` | `aterm export myworkspace --format md` |
|
|
119
|
+
| `change theme` | `테마 변경해줘` | `aterm theme solarized` |
|
|
120
|
+
| `read setting` | `설정 확인해줘` | `aterm settings get colorScheme` |
|
|
121
|
+
| `attach external session` | `외부 세션 연결해줘` | `aterm attach ext-session-1` |
|
|
122
|
+
| `send ctrl+c` | `ctrl+c 보내줘` | `aterm send-key myworkspace ctrl+c` |
|
|
107
123
|
|
|
108
124
|
### 외부 세션 (다른 터미널/머신, `$ATERM_IPC_SOCKET` 미설정)
|
|
109
125
|
| English request | 한국어 요청 | 명령어 |
|
|
@@ -134,6 +150,8 @@ HELP
|
|
|
134
150
|
| `aterm status` | Show bundled ecosystem health |
|
|
135
151
|
| `aterm status <workspace>` | Check workspace status |
|
|
136
152
|
| `aterm focus <workspace>` | Focus a workspace tab |
|
|
153
|
+
| `aterm rename <old> <new>` | Rename a workspace |
|
|
154
|
+
| `aterm clear <workspace>` | Clear workspace terminal screen |
|
|
137
155
|
| `aterm create <name> --cli <cli> --cwd <path>` | Create a new workspace |
|
|
138
156
|
| `aterm restart <workspace>` | Restart a dead session |
|
|
139
157
|
| `aterm kill <workspace>` | Close a workspace |
|
|
@@ -146,6 +164,13 @@ HELP
|
|
|
146
164
|
| `aterm lessons add '<lesson>' --type failed` | Add a failed pattern |
|
|
147
165
|
| `aterm dispatch <task-id>` | Break down task -> create sub-sessions -> execute -> collect -> cleanup |
|
|
148
166
|
| `aterm dispatch --plan '<desc>'` | Free-text task -> same dispatch flow |
|
|
167
|
+
| `aterm log <workspace> [--lines N]` | Read workspace screen text (default 100 lines) |
|
|
168
|
+
| `aterm export <workspace> [--format md\|txt]` | Save session output to file |
|
|
169
|
+
| `aterm settings get <key>` | Read setting from ~/.aigentry/config/aterm.json |
|
|
170
|
+
| `aterm settings set <key> <value>` | Write setting to aterm.json |
|
|
171
|
+
| `aterm theme <name>` | Change theme (shortcut for settings set colorScheme) |
|
|
172
|
+
| `aterm attach <external-id>` | Attach an external session |
|
|
173
|
+
| `aterm send-key <workspace> <key>` | Send key to workspace (ctrl+c, enter, tab, esc, etc.) |
|
|
149
174
|
| `aterm help` | Show this help |
|
|
150
175
|
|
|
151
176
|
## Ecosystem
|
|
@@ -168,6 +193,12 @@ HELP
|
|
|
168
193
|
| `task 42 done` | `태스크 42 완료` | `aterm tasks done 42` |
|
|
169
194
|
| `show lessons` | `레슨 보여줘` | `aterm lessons` |
|
|
170
195
|
| `add lesson: this pattern failed` | `레슨 추가` | `aterm lessons add 'this pattern failed'` |
|
|
196
|
+
| `show session log` | `세션 로그 보여줘` | `aterm log myworkspace` |
|
|
197
|
+
| `export session output` | `세션 출력 저장해줘` | `aterm export myworkspace --format md` |
|
|
198
|
+
| `change theme` | `테마 변경해줘` | `aterm theme solarized` |
|
|
199
|
+
| `read setting` | `설정 확인해줘` | `aterm settings get colorScheme` |
|
|
200
|
+
| `attach external session` | `외부 세션 연결해줘` | `aterm attach ext-session-1` |
|
|
201
|
+
| `send ctrl+c` | `ctrl+c 보내줘` | `aterm send-key myworkspace ctrl+c` |
|
|
171
202
|
|
|
172
203
|
### External sessions (other terminal or machine, `$ATERM_IPC_SOCKET` unset)
|
|
173
204
|
| English request | Korean request | Command |
|
|
@@ -204,10 +235,17 @@ payloads = {
|
|
|
204
235
|
"from": __import__("os").environ.get("ATERM_WORKSPACE_NAME")},
|
|
205
236
|
"status": lambda: {"action": "WorkspaceStatus", "workspace": args[0]},
|
|
206
237
|
"focus": lambda: {"action": "FocusWorkspace", "workspace": args[0]},
|
|
238
|
+
"rename": lambda: {"action": "RenameWorkspace", "old_name": args[0], "new_name": args[1]},
|
|
239
|
+
"clear": lambda: {"action": "ClearWorkspace", "workspace": args[0]},
|
|
207
240
|
"create": lambda: {"action": "CreateWorkspace", "name": args[0], "cli": args[1], "cwd": args[2]},
|
|
208
241
|
"kill": lambda: {"action": "CloseWorkspace", "workspace": args[0]},
|
|
209
242
|
"restart": lambda: {"action": "RestartWorkspace", "workspace": args[0]},
|
|
210
243
|
"restart-all": lambda: {"action": "RestartAllWorkspaces"},
|
|
244
|
+
"reload-settings": lambda: {"action": "ReloadSettings"},
|
|
245
|
+
"read-screen": lambda: {"action": "ReadScreenText", "workspace": args[0],
|
|
246
|
+
"lines": int(args[1]) if len(args) > 1 else 100},
|
|
247
|
+
"attach-external": lambda: {"action": "AttachExternal", "session_id": args[0]},
|
|
248
|
+
"send-key": lambda: {"action": "SendKey", "workspace": args[0], "key": args[1]},
|
|
211
249
|
}
|
|
212
250
|
|
|
213
251
|
payload = json.dumps(payloads[action]()) + "\n"
|
|
@@ -256,6 +294,12 @@ try:
|
|
|
256
294
|
print(fmt.format(*r))
|
|
257
295
|
elif action == "status":
|
|
258
296
|
print(json.dumps(resp.get("data", {})))
|
|
297
|
+
elif action == "read-screen":
|
|
298
|
+
text = resp.get("data", {}).get("text", "") if isinstance(resp.get("data"), dict) else ""
|
|
299
|
+
if text:
|
|
300
|
+
print(text)
|
|
301
|
+
else:
|
|
302
|
+
print("(비어있음)" if lang == "ko" else "(empty)")
|
|
259
303
|
else:
|
|
260
304
|
print(json.dumps({"status": "ok"}))
|
|
261
305
|
except Exception as e:
|
|
@@ -392,6 +436,14 @@ else:
|
|
|
392
436
|
[[ -z "$ATERM_IPC_SOCKET" ]] && { echo '{"error":"focus requires aterm (ATERM_IPC_SOCKET not set)"}' >&2; exit 1; }
|
|
393
437
|
[[ $# -lt 2 ]] && { echo '{"error":"usage: aterm focus <workspace>"}' >&2; exit 1; }
|
|
394
438
|
aterm_ipc focus "$2" ;;
|
|
439
|
+
rename)
|
|
440
|
+
[[ -z "$ATERM_IPC_SOCKET" ]] && { echo '{"error":"rename requires aterm (ATERM_IPC_SOCKET not set)"}' >&2; exit 1; }
|
|
441
|
+
[[ $# -lt 3 ]] && { echo '{"error":"usage: aterm rename <old> <new>"}' >&2; exit 1; }
|
|
442
|
+
aterm_ipc rename "$2" "$3" ;;
|
|
443
|
+
clear)
|
|
444
|
+
[[ -z "$ATERM_IPC_SOCKET" ]] && { echo '{"error":"clear requires aterm (ATERM_IPC_SOCKET not set)"}' >&2; exit 1; }
|
|
445
|
+
[[ $# -lt 2 ]] && { echo '{"error":"usage: aterm clear <workspace>"}' >&2; exit 1; }
|
|
446
|
+
aterm_ipc clear "$2" ;;
|
|
395
447
|
create)
|
|
396
448
|
[[ -z "$ATERM_IPC_SOCKET" ]] && { echo '{"error":"create requires aterm (ATERM_IPC_SOCKET not set)"}' >&2; exit 1; }
|
|
397
449
|
# Parse: aterm create <name> --cli <cli> --cwd <path>
|
|
@@ -746,6 +798,138 @@ def main():
|
|
|
746
798
|
main()
|
|
747
799
|
' "$ATERM_IPC_SOCKET" "$(tasks_file)" "${@:2}"
|
|
748
800
|
;;
|
|
801
|
+
settings)
|
|
802
|
+
case "${2:-}" in
|
|
803
|
+
get)
|
|
804
|
+
[[ $# -lt 3 ]] && { echo '{"error":"usage: aterm settings get <key>"}' >&2; exit 1; }
|
|
805
|
+
python3 -c '
|
|
806
|
+
import json, sys, os
|
|
807
|
+
f = os.path.expanduser("~/.aigentry/config/aterm.json")
|
|
808
|
+
if not os.path.isfile(f):
|
|
809
|
+
print("null")
|
|
810
|
+
sys.exit(0)
|
|
811
|
+
with open(f) as fh:
|
|
812
|
+
data = json.load(fh)
|
|
813
|
+
key = sys.argv[1]
|
|
814
|
+
parts = key.split(".")
|
|
815
|
+
val = data
|
|
816
|
+
for p in parts:
|
|
817
|
+
if isinstance(val, dict) and p in val:
|
|
818
|
+
val = val[p]
|
|
819
|
+
else:
|
|
820
|
+
print("null")
|
|
821
|
+
sys.exit(0)
|
|
822
|
+
if isinstance(val, (dict, list)):
|
|
823
|
+
print(json.dumps(val, indent=2, ensure_ascii=False))
|
|
824
|
+
else:
|
|
825
|
+
print(json.dumps(val))
|
|
826
|
+
' "$3" ;;
|
|
827
|
+
set)
|
|
828
|
+
[[ $# -lt 4 ]] && { echo '{"error":"usage: aterm settings set <key> <value>"}' >&2; exit 1; }
|
|
829
|
+
python3 -c '
|
|
830
|
+
import json, sys, os
|
|
831
|
+
f = os.path.expanduser("~/.aigentry/config/aterm.json")
|
|
832
|
+
os.makedirs(os.path.dirname(f), exist_ok=True)
|
|
833
|
+
data = {}
|
|
834
|
+
if os.path.isfile(f):
|
|
835
|
+
with open(f) as fh:
|
|
836
|
+
data = json.load(fh)
|
|
837
|
+
key = sys.argv[1]
|
|
838
|
+
raw = sys.argv[2]
|
|
839
|
+
try:
|
|
840
|
+
val = json.loads(raw)
|
|
841
|
+
except (json.JSONDecodeError, ValueError):
|
|
842
|
+
val = raw
|
|
843
|
+
parts = key.split(".")
|
|
844
|
+
obj = data
|
|
845
|
+
for p in parts[:-1]:
|
|
846
|
+
obj = obj.setdefault(p, {})
|
|
847
|
+
obj[parts[-1]] = val
|
|
848
|
+
with open(f, "w") as fh:
|
|
849
|
+
json.dump(data, fh, indent=2, ensure_ascii=False)
|
|
850
|
+
fh.write("\n")
|
|
851
|
+
print(json.dumps({"status": "ok", "key": key, "value": val}))
|
|
852
|
+
' "$3" "$4"
|
|
853
|
+
if [[ -n "$ATERM_IPC_SOCKET" ]]; then
|
|
854
|
+
aterm_ipc reload-settings 2>/dev/null || true
|
|
855
|
+
fi ;;
|
|
856
|
+
*) echo '{"error":"usage: aterm settings [get|set]"}' >&2; exit 1 ;;
|
|
857
|
+
esac ;;
|
|
858
|
+
theme)
|
|
859
|
+
[[ $# -lt 2 ]] && { echo '{"error":"usage: aterm theme <name>"}' >&2; exit 1; }
|
|
860
|
+
python3 -c '
|
|
861
|
+
import json, sys, os
|
|
862
|
+
f = os.path.expanduser("~/.aigentry/config/aterm.json")
|
|
863
|
+
os.makedirs(os.path.dirname(f), exist_ok=True)
|
|
864
|
+
data = {}
|
|
865
|
+
if os.path.isfile(f):
|
|
866
|
+
with open(f) as fh:
|
|
867
|
+
data = json.load(fh)
|
|
868
|
+
data["colorScheme"] = sys.argv[1]
|
|
869
|
+
with open(f, "w") as fh:
|
|
870
|
+
json.dump(data, fh, indent=2, ensure_ascii=False)
|
|
871
|
+
fh.write("\n")
|
|
872
|
+
print(json.dumps({"status": "ok", "key": "colorScheme", "value": sys.argv[1]}))
|
|
873
|
+
' "$2"
|
|
874
|
+
if [[ -n "$ATERM_IPC_SOCKET" ]]; then
|
|
875
|
+
aterm_ipc reload-settings 2>/dev/null || true
|
|
876
|
+
fi ;;
|
|
877
|
+
log)
|
|
878
|
+
[[ -z "$ATERM_IPC_SOCKET" ]] && { echo '{"error":"log requires aterm (ATERM_IPC_SOCKET not set)"}' >&2; exit 1; }
|
|
879
|
+
[[ $# -lt 2 ]] && { echo '{"error":"usage: aterm log <workspace> [--lines N]"}' >&2; exit 1; }
|
|
880
|
+
_ws="$2"; _lines=100
|
|
881
|
+
if [[ "${3:-}" == "--lines" && -n "${4:-}" ]]; then _lines="$4"; fi
|
|
882
|
+
aterm_ipc read-screen "$_ws" "$_lines" ;;
|
|
883
|
+
export)
|
|
884
|
+
[[ -z "$ATERM_IPC_SOCKET" ]] && { echo '{"error":"export requires aterm (ATERM_IPC_SOCKET not set)"}' >&2; exit 1; }
|
|
885
|
+
[[ $# -lt 2 ]] && { echo '{"error":"usage: aterm export <workspace> [--format md|txt]"}' >&2; exit 1; }
|
|
886
|
+
_ws="$2"; _fmt="txt"
|
|
887
|
+
if [[ "${3:-}" == "--format" && -n "${4:-}" ]]; then _fmt="$4"; fi
|
|
888
|
+
python3 -c '
|
|
889
|
+
import os, socket, sys, json, time
|
|
890
|
+
|
|
891
|
+
sock_path = sys.argv[1]
|
|
892
|
+
workspace = sys.argv[2]
|
|
893
|
+
fmt = sys.argv[3]
|
|
894
|
+
|
|
895
|
+
payload = json.dumps({"action": "ReadScreenText", "workspace": workspace, "lines": 10000}) + "\n"
|
|
896
|
+
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
|
897
|
+
try:
|
|
898
|
+
sock.settimeout(5)
|
|
899
|
+
sock.connect(sock_path)
|
|
900
|
+
sock.sendall(payload.encode())
|
|
901
|
+
sock.shutdown(socket.SHUT_WR)
|
|
902
|
+
data = b""
|
|
903
|
+
while True:
|
|
904
|
+
chunk = sock.recv(4096)
|
|
905
|
+
if not chunk: break
|
|
906
|
+
data += chunk
|
|
907
|
+
if b"\n" in data: break
|
|
908
|
+
resp = json.loads(data.decode().strip().split("\n")[0])
|
|
909
|
+
finally:
|
|
910
|
+
sock.close()
|
|
911
|
+
|
|
912
|
+
text = resp.get("data", {}).get("text", "") if isinstance(resp.get("data"), dict) else ""
|
|
913
|
+
ts = time.strftime("%Y%m%d-%H%M%S")
|
|
914
|
+
filename = f"{workspace}-{ts}.{fmt}"
|
|
915
|
+
|
|
916
|
+
if fmt == "md":
|
|
917
|
+
content = f"# Session Export: {workspace}\n\n```\n{text}\n```\n"
|
|
918
|
+
else:
|
|
919
|
+
content = text
|
|
920
|
+
|
|
921
|
+
with open(filename, "w") as f:
|
|
922
|
+
f.write(content)
|
|
923
|
+
print(json.dumps({"status": "ok", "file": os.path.abspath(filename)}))
|
|
924
|
+
' "$ATERM_IPC_SOCKET" "$_ws" "$_fmt" ;;
|
|
925
|
+
attach)
|
|
926
|
+
[[ -z "$ATERM_IPC_SOCKET" ]] && { echo '{"error":"attach requires aterm (ATERM_IPC_SOCKET not set)"}' >&2; exit 1; }
|
|
927
|
+
[[ $# -lt 2 ]] && { echo '{"error":"usage: aterm attach <external-id>"}' >&2; exit 1; }
|
|
928
|
+
aterm_ipc attach-external "$2" ;;
|
|
929
|
+
send-key)
|
|
930
|
+
[[ -z "$ATERM_IPC_SOCKET" ]] && { echo '{"error":"send-key requires aterm (ATERM_IPC_SOCKET not set)"}' >&2; exit 1; }
|
|
931
|
+
[[ $# -lt 3 ]] && { echo '{"error":"usage: aterm send-key <workspace> <key>"}' >&2; exit 1; }
|
|
932
|
+
aterm_ipc send-key "$2" "$3" ;;
|
|
749
933
|
help|--help|-h)
|
|
750
934
|
show_help
|
|
751
935
|
;;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Resources/bin/aterm</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
i2hlQ0H8m/iG4PV7blPDAFsXFfE=
|
|
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
|
+
MPZlPibUNSrAPVYXiSaJYpi1/Xs=
|
|
19
19
|
</data>
|
|
20
20
|
<key>requirement</key>
|
|
21
|
-
<string>cdhash H"
|
|
21
|
+
<string>cdhash H"30f6653e26d4352ac03d56178926896298b5fd7b"</string>
|
|
22
22
|
</dict>
|
|
23
23
|
<key>Resources/bin/aterm</key>
|
|
24
24
|
<dict>
|
|
25
25
|
<key>hash2</key>
|
|
26
26
|
<data>
|
|
27
|
-
|
|
27
|
+
uzdbvs4rORXxogXVjWU4YSGdhoC0qGoBtZ+LGOH/Csc=
|
|
28
28
|
</data>
|
|
29
29
|
</dict>
|
|
30
30
|
</dict>
|