# 前台 / 计划任务启动本机 Agent（Windows）
$RepoRoot = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent
$env:NIANNIAN_MODE = "windows"
$env:NIANNIAN_HOME = Join-Path $env:LOCALAPPDATA "NianNian"
$env:NIANNIAN_CLIENT_ENV = Join-Path $RepoRoot "client\config\client-agent.env"

Set-Location $RepoRoot
& bash (Join-Path $RepoRoot "client\scripts\start-local-agent.sh")
