sleepcode 1.4.3 → 1.4.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sleepcode",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "AI codes while you sleep — Claude AI 야간 자동화 세팅 CLI",
5
5
  "bin": {
6
6
  "sleepcode": "./bin/index.js"
@@ -15,9 +15,11 @@ $tasks = Get-Content .sleepcode/tasks.md -Raw -Encoding UTF8
15
15
 
16
16
  $prompt = "$baseRules`n`n---`n`n$rules`n`n---`n`n$tasks"
17
17
 
18
- # stream-json + verbose: 토큰 단위 실시간 출력
19
- $prompt | claude -p --dangerously-skip-permissions --output-format stream-json --verbose 2>&1 |
20
- python .sleepcode/scripts/log_filter.py
18
+ # 프롬프트를 임시 파일에 저장 cmd 네이티브 파이프로 실시간 스트리밍
19
+ $tempFile = [System.IO.Path]::GetTempFileName()
20
+ [System.IO.File]::WriteAllText($tempFile, $prompt, [System.Text.Encoding]::UTF8)
21
+ cmd /c "type `"$tempFile`" | claude -p --dangerously-skip-permissions --output-format stream-json --verbose 2>&1 | python -u .sleepcode/scripts/log_filter.py"
22
+ Remove-Item $tempFile -ErrorAction SilentlyContinue
21
23
 
22
24
  $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
23
25
  Write-Host "[$timestamp] AI 단일 실행 종료"
@@ -6,7 +6,7 @@ Usage: claude ... --output-format stream-json | python3 .sleepcode/log_filter.py
6
6
  import sys
7
7
  import json
8
8
 
9
- for line in sys.stdin:
9
+ for line in iter(sys.stdin.readline, ''):
10
10
  line = line.strip()
11
11
  if not line:
12
12
  continue
@@ -44,11 +44,13 @@ while ($true) {
44
44
  $prompt = "$baseRules`n`n---`n`n$rules`n`n---`n`n$tasks"
45
45
 
46
46
  Log "claude 실행 중..."
47
- # stream-json -> log_filter.py 핵심 메시지만 추출
48
- $prompt | claude -p --dangerously-skip-permissions --output-format stream-json --verbose 2>&1 |
49
- python .sleepcode/scripts/log_filter.py |
47
+ # 프롬프트를 임시 파일에 저장 cmd 네이티브 파이프로 실시간 스트리밍
48
+ $tempFile = [System.IO.Path]::GetTempFileName()
49
+ [System.IO.File]::WriteAllText($tempFile, $prompt, [System.Text.Encoding]::UTF8)
50
+ cmd /c "type `"$tempFile`" | claude -p --dangerously-skip-permissions --output-format stream-json --verbose 2>&1 | python -u .sleepcode/scripts/log_filter.py" 2>&1 |
50
51
  Tee-Object -Append $logFile
51
52
  $exitCode = $LASTEXITCODE
53
+ Remove-Item $tempFile -ErrorAction SilentlyContinue
52
54
  Log "claude 종료 (exit code: $exitCode)"
53
55
 
54
56
  # 미커밋 변경사항 체크