chore: sync Cursor rules from CursorRules (version bump RDP/SSH split)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5,6 +5,9 @@ globs: *
|
||||
|
||||
# Global Optimization & Cost Control
|
||||
|
||||
## ?? Answers
|
||||
-Always answer briefly and only to the point, otherwise only if it is stated in the question or when it is not possible to answer briefly.
|
||||
|
||||
## ?? Context & Local Data
|
||||
- **Strict file targeting:** Work ONLY with files explicitly provided via `@` or open in the active editor tab. Do not use global codebase search unless requested.
|
||||
- **Local assets only:** Always work with local copies of repositories and dependencies. Never request external web resources or re-download packages without a explicit build error.
|
||||
@@ -26,3 +29,4 @@ globs: *
|
||||
- Simple questions, explanations, docs ? Use lightweight models (e.g., `gpt-4o-mini`, `claude-3-haiku`).
|
||||
- Complex code generation, refactoring, and debugging ? Use advanced models (e.g., `claude-3.5-sonnet`).
|
||||
- Do not switch models without an explicit reason.
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
description: При правках агентских скриптов (RDP/SSH) всегда bump версии — иначе ПК не обновятся
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
# Версии агентов: обязательный bump
|
||||
|
||||
Workspace **security-monitors** (RDP + SSH + SAC). Любая **существенная правка агентских скриптов** без bump версии **не доедет до компьютеров**.
|
||||
|
||||
## RDP-login-monitor
|
||||
|
||||
| Файл | Поле |
|
||||
|------|------|
|
||||
| `Login_Monitor.ps1` | `$ScriptVersion` |
|
||||
| `version.txt` | та же строка |
|
||||
|
||||
Триггер деплоя на Windows: **`Deploy-LoginMonitor.ps1`** сравнивает `version.txt` на шаре с `C:\ProgramData\RDP-login-monitor\deployed_version.txt`.
|
||||
|
||||
## ssh-monitor
|
||||
|
||||
| Файл | Поле |
|
||||
|------|------|
|
||||
| `ssh-monitor` | `SSH_MONITOR_VERSION` |
|
||||
| `version.txt` | та же строка |
|
||||
|
||||
Обновление на Linux: **`update_ssh_monitor.sh`** (sha256 + перезапуск сервиса).
|
||||
|
||||
## Правило для агента
|
||||
|
||||
При изменении `Login_Monitor.ps1`, `Deploy-LoginMonitor.ps1`, `Sac-Client.ps1`, `ssh-monitor`, `sac-client.sh`, `update_ssh_monitor.sh`:
|
||||
|
||||
1. Поднять **patch** версии (`2.0.6-SAC` → `2.0.7-SAC`) в **обоих** местах репозитория
|
||||
2. Включить bump в **тот же коммит**, что и правку (или сразу следом `chore: bump release to …`)
|
||||
3. Напомнить: опубликовать RDP на NETLOGON / на SSH-хостах выполнить update
|
||||
|
||||
## SAC (backend)
|
||||
|
||||
Версия UI/API — `backend/app/version.py` (`APP_VERSION`). Bump при релизе SAC на сервер; на автообновление **агентов на ПК** не влияет.
|
||||
@@ -0,0 +1,30 @@
|
||||
---
|
||||
description: Запрет упоминаний Cursor IDE/Agent в git-репозиториях (файлы и коммиты)
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
# Не оставлять следов Cursor в репозиториях
|
||||
|
||||
В **коммитах и файлах**, которые попадают в git (включая публичный GitHub), **запрещено** добавлять что-либо, связанное с Cursor как инструментом разработки.
|
||||
|
||||
## Запрещено
|
||||
|
||||
- Упоминания **Cursor**, **Cursor IDE**, **Cursor Agent**, **cursoragent**, **cursor.com**, **cursor.sh** в README, docs, комментариях, конфигах.
|
||||
- Trailers в сообщениях коммитов: `Co-authored-by: Cursor …`, `Made-with: Cursor`, email `cursoragent@cursor.com`.
|
||||
- Каталог **`.cursor/`**, файлы только для IDE (**`AGENTS.md`**, **`CURSOR.md`**) — **не коммитить** в публичные репозитории (должны быть в `.gitignore`, если репо public).
|
||||
- Ссылки на Cursor в runbook, deploy-доках, issue templates.
|
||||
|
||||
## Разрешено (не путать с IDE)
|
||||
|
||||
- CSS: **`cursor: pointer`** (и аналоги).
|
||||
- Предметный код: **poll cursor**, **CurrentCursor**, **Update-MonitorPollCursor**, **Console.CursorLeft**, **DB cursor** (sqlite/psycopg2), **MOEX `analytics.cursor`** и т.п.
|
||||
|
||||
## Git / GitHub
|
||||
|
||||
- **Author и committer** — только владелец проекта (**Andrey Lutsenko**, email, привязанный к GitHub), **без** co-author Cursor.
|
||||
- Перед push в public remote: нет `cursoragent`, `Co-authored-by: Cursor` в истории и дереве (`git log --format=fuller`, поиск по репо).
|
||||
|
||||
## При работе агента
|
||||
|
||||
- Не добавлять «Powered by Cursor», бейджи, секции про Cursor в документацию продукта.
|
||||
- Правила Cursor (`.cursor/rules/`) — локально или только в **приватном** remote; в публичный GitHub не попадают.
|
||||
@@ -0,0 +1,28 @@
|
||||
---
|
||||
description: При правке ssh-monitor обязательно поднимать version.txt и SSH_MONITOR_VERSION
|
||||
globs: ssh-monitor,sac-client.sh,update_ssh_monitor.sh,version.txt
|
||||
alwaysApply: false
|
||||
---
|
||||
|
||||
# Bump версии ssh-monitor
|
||||
|
||||
Без bump **`update_ssh_monitor.sh` не скопирует новый скрипт** на хост (сравнение sha256; версия нужна для отчётов, SAC и диагностики).
|
||||
|
||||
## Что менять в одном коммите с правкой
|
||||
|
||||
1. **`ssh-monitor`** — `SSH_MONITOR_VERSION="X.Y.Z-SAC"` (первая строка блока версии)
|
||||
2. **`version.txt`** — **та же строка**
|
||||
|
||||
Строки должны **совпадать**.
|
||||
|
||||
## Как поднимать
|
||||
|
||||
- Обычная правка → **patch**: `2.0.0-SAC` → `2.0.1-SAC`
|
||||
- Крупный релиз → **minor** по смыслу
|
||||
|
||||
`sac-client.sh` отдельный номер **не** задаёт — берёт `SSH_MONITOR_VERSION` из установленного `ssh-monitor`.
|
||||
|
||||
## Чеклист перед push
|
||||
|
||||
- [ ] `SSH_MONITOR_VERSION` и `version.txt` совпадают
|
||||
- [ ] На хостах: `git pull` и запуск `update_ssh_monitor.sh` (или `--deploy`)
|
||||
Reference in New Issue
Block a user