verstak/internal/core
mirivlad d83c8c80e1 fix: второй стабилизационный проход Lua plugin lifecycle
1. Enabled/Active state separation:
   - Enable() sets Enabled=true (persisted in config), does NOT create runtime
   - ActivatePlugin() checks Enabled && !Active, creates VM + scheduler
   - DeactivatePlugin() stops runtime, keeps Enabled=true
   - InitRuntimes() iterates Enabled plugins, sets Active=true after creation
   - SyncConfig() restores Enabled from config, does NOT touch Active

2. ActivatePlugin: добавлен vm.SetServices(m.Services)

3. Discover: атомарная замена списка (newPlugins slice), нет дублирования

4. CallPluginFunction: thread-safe через LuaVM.CallFunction (vm.mu + callWithTimeout)

5. Uninstall активного плагина: полная деактивация (StopScheduler → on_shutdown → CloseVM → Active=false)

6. GetPluginPanelHTML: валидация panel path (no absolute, no .., must be .html, must be within plugin dir)

7. PluginPage: убран hardcoded 'calendar-plugin', используется funcPrefix из pluginName

Тесты:
- security_test.go: +8 тестов (FullLifecycle, ActivatePlugin_Services, Discover_Idempotent,
  ReloadPlugins_NoDuplicates, CallPluginFunction_Timeout, Uninstall_ActivePlugin,
  GetPluginPanelHTML_PathTraversal, FullLifecycle_EndToEnd)
- manager_test.go: обновлены тесты под новую семантику Enabled/Active
2026-06-07 20:49:43 +08:00
..
actions stabilization: server.go split + i18n templates + frontend localization 2026-06-02 11:08:29 +08:00
activity feat: ШАГ 1 — Bridge HTTP-сервер для браузерного расширения 2026-06-06 18:23:47 +08:00
bridge feat: плагин-система Lua + Calendar reference plugin 2026-06-07 14:59:46 +08:00
browser feat: ШАГ 2 — Staging-таблица browser_events + Store 2026-06-06 18:27:00 +08:00
config feat: plugin install/uninstall lifecycle + UI buttons 2026-06-07 15:28:37 +08:00
files feat: ШАГ 1 — Bridge HTTP-сервер для браузерного расширения 2026-06-06 18:23:47 +08:00
nodes feat: ШАГ 1 — Bridge HTTP-сервер для браузерного расширения 2026-06-06 18:23:47 +08:00
notes fix: complete vault layout transition — fs_path everywhere, no more spaces/ 2026-06-02 15:43:40 +08:00
plugins fix: второй стабилизационный проход Lua plugin lifecycle 2026-06-07 20:49:43 +08:00
search feat: restore global search in app header 2026-06-06 02:39:29 +08:00
storage feat: ШАГ 2 — Staging-таблица browser_events + Store 2026-06-06 18:27:00 +08:00
sync test: comprehensive sync package unit tests (37 new tests) 2026-06-03 09:16:38 +08:00
templates refactor: implement template-driven node tree and human-readable vault layout 2026-06-02 12:47:06 +08:00
util step 2: init command + SQLite storage + migrations + config 2026-05-30 18:58:47 +08:00
vault step 2: init command + SQLite storage + migrations + config 2026-05-30 18:58:47 +08:00
watcher feat: плагин-система Lua + Calendar reference plugin 2026-06-07 14:59:46 +08:00
worklog feat: edit and delete worklog entries 2026-06-05 00:48:12 +08:00
doc.go step 1: skeleton - go module, CLI stub with --version, structure 2026-05-30 18:42:19 +08:00
smoke_test.go fix: third stabilization pass — template children as nodes, atomicity, fs_path validation, sync_apply compat, smoke test 2026-06-03 02:05:53 +08:00