- 누적 작업트리 커밋: 회기 평가 복구·durable 저장, 라이브 코치 이력/근거, 교수자 학생분석, 음성 비언어 메타, PII 마스킹, 운영 티켓/헬스 등 - 문서: 완료 기록 docs/archive/ 냉동 보관, docs/ 단일 인덱스(docs/README.md)+통합 TODO(docs/TODO.md)로 정리 - 리팩터(행위 보존): Stage enum SSOT(taxonomy 소유·state_machine re-export), store recent/masked_turns 중복 제거, speaker_ko_label 단일 헬퍼, _list_sessions N+1 제거(state/turns 배치 + 턴평가 하이드레이션 배치) - 검증: 백엔드 pytest 352 passed, _list_sessions E2E chromium-single-run 2 passed
55 lines
2.1 KiB
PowerShell
55 lines
2.1 KiB
PowerShell
# register-boot-task.ps1
|
|
# Registers the VignettePublicRuntime scheduled task to run at user logon
|
|
# (hidden window). The boot script (scripts/boot-public-runtime.ps1) does the
|
|
# actual recovery. Re-run to refresh (-Force). Remove with:
|
|
# Unregister-ScheduledTask -TaskName VignettePublicRuntime -Confirm:$false
|
|
#
|
|
# powershell -NoProfile -ExecutionPolicy Bypass -File scripts\register-boot-task.ps1
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
$TaskName = "VignettePublicRuntime"
|
|
$BootScript = "D:\workspace\vignette\scripts\boot-public-runtime.ps1"
|
|
$UserName = "$env:USERDOMAIN\$env:USERNAME"
|
|
|
|
if (-not (Test-Path -LiteralPath $BootScript)) {
|
|
throw "boot script not found: $BootScript"
|
|
}
|
|
|
|
$action = New-ScheduledTaskAction `
|
|
-Execute "powershell.exe" `
|
|
-Argument ("-NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File `"" + $BootScript + "`"")
|
|
|
|
$trigger = New-ScheduledTaskTrigger -AtLogOn -User $UserName
|
|
|
|
# Interactive: runs in the user session (Start-Process hidden window / Docker Desktop GUI work).
|
|
# Limited: no admin rights needed.
|
|
$principal = New-ScheduledTaskPrincipal `
|
|
-UserId $env:USERNAME `
|
|
-LogonType Interactive `
|
|
-RunLevel Limited
|
|
|
|
$settings = New-ScheduledTaskSettingsSet `
|
|
-AllowStartIfOnBatteries `
|
|
-DontStopIfGoingOnBatteries `
|
|
-StartWhenAvailable `
|
|
-ExecutionTimeLimit (New-TimeSpan -Minutes 15)
|
|
|
|
Register-ScheduledTask `
|
|
-TaskName $TaskName `
|
|
-Action $action `
|
|
-Trigger $trigger `
|
|
-Principal $principal `
|
|
-Settings $settings `
|
|
-Description "Vignette public runtime auto-recovery (Docker + postgres + engine/api + cloudflared) at logon" `
|
|
-Force | Out-Null
|
|
|
|
$task = Get-ScheduledTask -TaskName $TaskName
|
|
Write-Output ("Registered : " + $TaskName)
|
|
Write-Output ("State : " + $task.State)
|
|
Write-Output ("User : " + $principal.UserId)
|
|
Write-Output ("Trigger : AtLogOn (" + $UserName + ")")
|
|
Write-Output ("Command : " + $action.Execute + " " + $action.Argument)
|
|
Write-Output ""
|
|
Write-Output ("Run now : powershell -NoProfile -ExecutionPolicy Bypass -File " + $BootScript)
|
|
Write-Output ("Unregister : Unregister-ScheduledTask -TaskName " + $TaskName + " -Confirm:`$false")
|