diff --git a/control/AGENTS.md b/control/AGENTS.md index 629e705..ec0ba67 100644 --- a/control/AGENTS.md +++ b/control/AGENTS.md @@ -112,7 +112,7 @@ The config preview rendering pipeline: merge template + profile + overlays → r - **No tabs**: use spaces for indentation in all source files. - **No `fetch()` in templates** for page data — all API calls must go through Go server-side handlers. JS is only for UI interactivity (modals, carousels, confirm dialogs). - **No inline `onclick` with complex quoting** — use `data-*` attributes + event delegation instead. -- **Use `pwsh`** for PowerShell commands (v7.6.1 in PATH, not `powershell.exe`). +- **Use `pwsh`** for PowerShell commands (v7.6.4 in PATH — `C:\Program Files\PowerShell\7`, not `powershell.exe`). - **重启服务**:统一用 `pwsh -File scripts/safesightd.ps1 restart`,它会先编译、停旧进程、再启动新进程并做健康检查。不要手动 kill + build + start。 - **如无必要,不使用数据库事务**:SQLite 只允许一个写者,事务会阻塞所有其他写操作。单个 `Exec` 已是原子操作,绝大多数场景不需要包裹事务。仅模板重命名等必须原子完成的多步操作才用事务。 - **调试时只加日志,不改代码**:遇到 bug 先用 `fmt.Printf` 全量打印关键路径的状态和数据流,定位根因后再动手修。不要猜测、不要加 workaround(重试、超时、锁之类)。 diff --git a/edge/AGENTS.md b/edge/AGENTS.md index 39e05c6..b5b6a3d 100644 --- a/edge/AGENTS.md +++ b/edge/AGENTS.md @@ -24,8 +24,8 @@ This repository is a plugin-based C++ video analytics system for RK3588. Develop ## Shell Environment Rules -- For agent-run shell commands on this workstation, use PowerShell 7.6 instead of Windows PowerShell 5.1. -- Prefer explicit invocation via `C:\Program Files\WindowsApps\Microsoft.PowerShell_7.6.0.0_x64__8wekyb3d8bbwe\pwsh.exe` when running commands. +- For agent-run shell commands on this workstation, use PowerShell 7.6 (current: 7.6.4, installed at `C:\Program Files\PowerShell\7\pwsh.exe`, first in user PATH) instead of Windows PowerShell 5.1. +- Prefer invoking `pwsh` from PATH (resolves to 7.6.4); do not hardcode old WindowsApps MSIX paths (`Microsoft.PowerShell_7.6.0.0` is obsolete). - Do not rely on the system-default `powershell.exe` resolving to the desired version. ## Plugin and Architecture Rules