auto: 일일 백업 2026-07-02 02:00

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
hyowons
2026-07-02 02:00:02 +09:00
parent 565689df25
commit 213c0e0797
153 changed files with 2766 additions and 1988 deletions
+11 -35
View File
@@ -1,40 +1,16 @@
#!/usr/bin/env python3
\"""
Claude Code Remote Control 세션 관리 툴 (다중 세션 + 프로필 CRUD). 데이터 모델:
- profile: 이름 ↔ workdir 매핑.. ~/openclaw/state/claude_sessions.json에 저장.
- session: profile 기반으로 떠있는 클로드 데몬. plist 파일 존재 여부가 곧 세션 등록.
- ↑ ↓ ↓ 클로드 코드를 직접 조정—구현 전에 ‘빈 번호’ 개념을 명세에 추가해야합니다.
\""
import re, os, json, argparse
"""Compatibility entrypoint for the Claude Code session tool."""
from pathlib import Path
import runpy
HOME = Path.home()
OPENCLAW_ROOT = HOME / '.openclaw'
LA_DIR = HOME / 'Library' / 'LaunchAgents'
CLAIUDE_BIN = HOME / '.local' / 'bin' / 'claude'
def _write_plist(profile, n, workdir):
LA_DIR.mkdir(parents=True, exist_ok=True)
label = f'ai.claude-session.{profile}-{n}'
plist = LA_DIR / f'{label}.plist'
plist.write_text(f'''<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"" http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key><string>{label}</string>
<key>ProgramArguments</key><array>
<string>{CLAIUDE_BIN}</string>
<string>remote-control</string>
<string>--name</string>
<string>{profile}-{n}</string>
</array>
<key>WorkingDirectory</key><string>{workdir}</string>
<key>RunAtLoad</key><false/>
<key>KeepAlive</key><false/>
<key>ProcessType</key><string>Background</string>
</dict>
</plist>
''')
return plist
TOOL = (
Path(__file__).resolve().parents[1]
/ "skills"
/ "claude-code-session"
/ "scripts"
/ "session_tool.py"
)
print("session_tool.py scritto")
runpy.run_path(str(TOOL), run_name="__main__")