Phase 7: Separate ControlScripts from server core + CLI isolation + manifest
- Moved server/ControlScripts/ → automation/ in repo root.
  Updated composer.json autoload classmap (../automation/).
  Common.php keeps correct sync-map.json path via __DIR__.

- Removed RequiredControlScriptsScope; 'app:online' handler moved
  directly into EventsHandlers.php as core system behaviour.

- Replaced scandir() with scopes-manifest.json in App::control_scripts_init().
  New scopes require explicit manifest entry; no auto-discovery.

- Removed /api/v1/scripts/scopes/update route and scope_update() method.
  Remote scope editing via API is no longer available.

- Added ControlScripts::run_regular_script(alias) — unified entry point
  with state check and try/catch.

- CronController::run_regular_cron_scripts() now runs each script via
  CLI process (php console.php run-regular-script <alias>).
  Added 'run-regular-script' command to console.php.

- Updated tests:
  + CronControllerTest — verifies CLI dispatch and disabled skip.
  + ControlScriptsRegularTest — tests run_regular_script():
    missing alias, disabled state, exception catch, success path.

Server: 141 tests, 339 assertions — all pass.
Client: 167 tests — all pass.
1 parent 8a945d0 commit 84f03456cfb68420c3e531a7843dfa5c93f2038b
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 2 days ago
Showing 25 changed files
View
automation/Common.php 0 → 100644
View
automation/Scopes/LightHubScope.php 0 → 100644
View
automation/Scopes/OfficeRoomScope.php 0 → 100644
View
automation/Scopes/SpotlightsScope.php 0 → 100644
View
automation/Scopes/TestScriptsScope.php 0 → 100644
View
automation/scopes-manifest.json 0 → 100644
View
automation/sync-map.json 0 → 100644
View
server/ControlScripts/Common.php 100644 → 0
View
server/ControlScripts/Scopes/LightHubScope.php 100644 → 0
View
server/ControlScripts/Scopes/OfficeRoomScope.php 100644 → 0
View
server/ControlScripts/Scopes/SpotlightsScope.php 100644 → 0
View
server/ControlScripts/Scopes/TestScriptsScope.php 100644 → 0
View
server/ControlScripts/sync-map.json 100644 → 0
View
server/SHServ/App.php
View
server/SHServ/Controllers/CronController.php
View
server/SHServ/Controllers/ScriptsRESTAPIController.php
View
server/SHServ/EventsHandlers.php
View
server/SHServ/Middleware/ControlScripts.php
View
server/SHServ/RequiredControlScriptsScope.php 100644 → 0
View
server/SHServ/Routes/ScriptsRESTAPI_v1.php
View
server/composer.json
View
server/console.php
View
server/index.php
View
server/tests/ControlScriptsRegularTest.php 0 → 100644
View
server/tests/CronControllerTest.php