Remove outdated edge gateway object classes, add new agent implementation

Transitioned from obsolete gateway object classes (`edge_gateway_shell_action_jobs_o`, `edge_gateway_shell_events_o`, `edge_gateway_shell_sessions_o`, `edge_gateway_update_jobs_o`) to the new agent implementation (`edge-gateway-agent/agent.php`).
This commit is contained in:
Jeppe Bundgaard
2026-04-21 14:13:17 +02:00
parent d30a006457
commit 7d450e285e
90 changed files with 11811 additions and 2760 deletions
+223
View File
@@ -0,0 +1,223 @@
{
"version": 1,
"snapshot_of": "backend-php",
"projects": {
"backend-php": {
"display_name": "Copenhagen Truck Wash API",
"relative_root": ".",
"commands": {
"setup": {
"default": "./scripts/setup.sh",
"win32": "powershell -ExecutionPolicy Bypass -File .\\scripts\\setup.ps1"
},
"run": {
"default": "docker compose up -d traefik redis mysql-debug php1 caddy"
},
"test_unit": {
"default": "docker compose exec -T php1 sh -lc \"cd /var/www/html && composer test:unit\""
},
"test_e2e": {
"default": ""
},
"test_full": {
"default": ""
},
"debug": {
"default": "docker compose logs -f --tail=200 php1"
}
},
"codex_environment": {
"name": "api",
"actions": [
{
"name": "Start API",
"icon": "run",
"command_id": "run"
},
{
"name": "Stop API",
"icon": "run",
"literal_command": {
"default": "docker compose down"
}
},
{
"name": "PHP logs",
"icon": "debug",
"command_id": "debug"
},
{
"name": "PHP unit tests",
"icon": "test",
"command_id": "test_unit"
},
{
"name": "AI workflow check",
"icon": "debug",
"literal_command": {
"default": "node scripts/sync-ai-workflow.mjs --check"
}
}
]
},
"generated_content": {
"aiassistant_tests_lines": [
"# Backend PHP Testing Rules",
"",
"These rules apply to `services/nginx/app/tests` and any backend change that needs verification.",
"",
"1. Add or update tests for every new feature, bug fix, API contract change, or search or authentication workflow change.",
"2. Run backend verification in the `php1` container. Do not use host-side PHP for the supported workflow.",
"3. Use `docker compose exec -T php1 sh -lc \"cd /var/www/html && composer test:unit\"` for unit coverage.",
"4. Use `docker compose exec -T php1 sh -lc \"cd /var/www/html && composer test:integration\"` when code depends on Redis, MySQL, or environment-backed configuration.",
"5. Use `docker compose exec -T php1 sh -lc \"cd /var/www/html && composer test:api\"` when route behavior, envelopes, or request parsing changes.",
"6. Keep tests deterministic: no live third-party calls, no shared Redis keys, no broad database cleanup, and no sleeps unless time behavior is the thing under test.",
"7. Prefer narrow fixtures, explicit cleanup, and behavior-level assertions over implementation checks.",
"8. When public routes, schemas, or permissions change, update `openapi.yaml` together with the tests.",
"9. Run the narrowest relevant suite first, then the broader suite that matches the risk before you finish the task.",
"",
"Canonical workflow reference: `.ai-workflow/workflow.md`."
],
"aiassistant_routes_lines": [
"# Backend Route Rules",
"",
"These rules apply to files under `services/nginx/app/routes` and the classes they call.",
"",
"1. Keep route handlers thin: validate input, enforce permissions, call domain code, and write the response.",
"2. Default to protected endpoints. Use the existing authentication and permission helpers instead of ad hoc access checks.",
"3. Add or update backend tests in the `php1` container whenever route behavior changes.",
"4. Update `openapi.yaml` whenever paths, parameters, request bodies, response envelopes, or permissions change.",
"5. Prefer deterministic route tests and avoid live external integrations in route coverage.",
"6. Use concise API errors and keep sensitive implementation details out of the response body.",
"7. When a change touches department, order, or subuser authorization, cover both the allow path and the deny path.",
"",
"Canonical workflow reference: `.ai-workflow/workflow.md`."
],
"junie_lines": [
"# Copenhagen Truck Wash API Development Guidelines",
"",
"This file is generated from the canonical AI workflow and is the supported Junie-facing reference for the backend repository.",
"",
"## Build And Run",
"",
"- Project root: `services/nginx/app` is the effective PHP application root.",
"- Setup: use `./scripts/setup.sh` on POSIX or `powershell -ExecutionPolicy Bypass -File .\\scripts\\setup.ps1` on Windows.",
"- Start local API stack: `docker compose up -d traefik redis mysql-debug php1 caddy`.",
"- Tail logs with `docker compose logs -f --tail=200 php1`.",
"",
"## Testing",
"",
"- Supported backend validation runs in `php1`.",
"- Unit tests: `docker compose exec -T php1 sh -lc \"cd /var/www/html && composer test:unit\"`.",
"- Integration tests: `docker compose exec -T php1 sh -lc \"cd /var/www/html && composer test:integration\"`.",
"- API tests: `docker compose exec -T php1 sh -lc \"cd /var/www/html && composer test:api\"`.",
"- Prefer the narrowest suite that proves the change, then run the broader suite that matches the risk.",
"",
"## Workflow Notes",
"",
"- Generated assistant metadata is checked with `node scripts/sync-ai-workflow.mjs --check`.",
"- Route and schema changes require matching updates to `openapi.yaml`.",
"- Runtime OpenAI product behavior is out of scope for this workflow bundle unless a task explicitly changes product code.",
"",
"Canonical workflow reference: `.ai-workflow/workflow.md`."
]
}
}
},
"assistants": {
"codex": {
"description": "Codex environment files and actions."
},
"aiassistant": {
"description": "Project-specific AI Assistant rules."
},
"junie": {
"description": "Project-specific Junie guidance."
},
"copilot": {
"description": "Standardized Copilot task dispatch workflow."
}
},
"commands": {
"setup": {
"description": "Install dependencies and prepare the supported local environment."
},
"run": {
"description": "Start the primary local development entrypoint for the project."
},
"test_unit": {
"description": "Run the project's narrow unit-style verification command."
},
"test_e2e": {
"description": "Run the project's targeted browser or end-to-end verification command."
},
"test_full": {
"description": "Run the broader high-confidence verification command when the project defines one."
},
"debug": {
"description": "Run the supported debug entrypoint."
}
},
"generated_outputs": [
{
"id": "backend_codex_environment",
"template": "codex_project_environment",
"project": "backend-php",
"path": ".codex/environments/environment.toml"
},
{
"id": "backend_aiassistant_tests",
"template": "aiassistant_backend_tests_rule",
"project": "backend-php",
"path": ".aiassistant/rules/Creating and maintaining tests.md"
},
{
"id": "backend_aiassistant_routes",
"template": "aiassistant_backend_routes_rule",
"project": "backend-php",
"path": ".aiassistant/rules/Creating and securing routes.md"
},
{
"id": "backend_junie_guidelines",
"template": "junie_backend_guidelines",
"project": "backend-php",
"path": ".junie/guidelines.md"
},
{
"id": "backend_copilot_workflow",
"template": "copilot_dispatcher_workflow",
"project": "backend-php",
"path": ".github/workflows/copilot.yml"
}
],
"sync_targets": {
"backend-php": {
"source_root": ".",
"destination": "C:\\Users\\2jepp\\PhpstormProjects\\api",
"supported_metadata_dirs": [
".codex",
".aiassistant",
".junie",
".github",
".ai-workflow",
"scripts"
]
}
},
"copilot": {
"workflow_name": "Copilot Task Dispatcher",
"input_description": "The task description for Copilot",
"issue_label": "copilot-task",
"title_prefix": "Copilot Task:",
"body_lines": [
"Assigned to Copilot by @{{ACTOR}}.",
"",
"Task",
"{{TASK}}",
"",
"AI workflow notes",
"- Generated assistant metadata is synchronized from the canonical AI workflow bundle.",
"- Run `node scripts/sync-ai-workflow.mjs --check` if assistant metadata changed."
]
}
}
+74
View File
@@ -0,0 +1,74 @@
<!-- AUTOGENERATED SNAPSHOT for backend-php: refresh from the canonical workspace with `node scripts/sync-ai-workflow.mjs --write`. -->
# Developer AI Workflow
This directory is the canonical source of truth for the repository's developer-facing AI workflow.
## Goals
- Keep Codex, AI Assistant, Junie, and Copilot aligned from one maintained source.
- Make assistant metadata deterministic so the generated files can be rewritten safely and checked in CI.
- Preserve the current mirror-repo workflow for `backend-php` and `front-end-vue`.
- Keep all changes in this workflow scoped to developer tooling and documentation. Runtime OpenAI features stay out of scope.
## Supported Assistants
- `Codex`: local environments and actions under `.codex/environments`.
- `AI Assistant`: generated guidance under `.aiassistant/rules`.
- `Junie`: generated project guidance under `.junie/guidelines.md`.
- `Copilot`: standardized issue-dispatch workflow content under `.github/workflows/copilot.yml`.
## Global Rules
1. Change only `.ai-workflow/workflow.md` and `.ai-workflow/manifest.json` when updating the developer AI workflow.
2. Regenerate all derived files with `node scripts/sync-ai-workflow.mjs --write`.
3. Validate drift with `node scripts/sync-ai-workflow.mjs --check`.
4. Generated assistant files are not hand-edited.
5. Unsupported surfaces stay unsupported until they have a real owner and a real config.
6. `front-end-vue/.ai/mcp/mcp.json` is intentionally unsupported and should not be recreated until there is an actual MCP integration to maintain.
## Command Matrix
### `backend-php`
- Setup: use the existing setup scripts in `backend-php/scripts`.
- Run: start the API stack with `traefik`, `redis`, `mysql-debug`, `php1`, and `caddy`.
- Debug: tail `php1` logs.
- PHP verification: always run backend validation in the `php1` container.
- Unit tests: `docker compose exec -T php1 sh -lc "cd /var/www/html && composer test:unit"`.
- Integration tests: `docker compose exec -T php1 sh -lc "cd /var/www/html && composer test:integration"`.
- API tests: `docker compose exec -T php1 sh -lc "cd /var/www/html && composer test:api"`.
### `front-end-vue`
- Setup: `npm ci` and `npx playwright install`.
- Run: `npm run dev`.
- Unit tests: `npm run test:unit` with Vitest.
- Browser smoke: `npm run test:e2e:smoke`.
- Browser full suite: `npm run test:e2e:ci`.
- Debug: `npx playwright test --debug`.
- Browser validation is Playwright-first. WebdriverIO and Appium are not part of the supported workflow.
### `automation`
- Setup: `npm ci` and `npx playwright install`.
- Run: `npx playwright test --ui`.
- Browser tests: `npx playwright test`.
- Debug: `npx playwright test --debug`.
## Mirror Repos And Sync
- `backend-php` mirrors to `C:\Users\2jepp\PhpstormProjects\api`.
- `front-end-vue` mirrors to `C:\Users\2jepp\WebstormProjects\pleno-vue`.
- Supported metadata directories that must stay mirrored are `.codex`, `.aiassistant`, `.junie`, `.github`, generated `.ai-workflow`, and `scripts/sync-ai-workflow.mjs`.
- Cache and build directories remain excluded from the watcher.
- The mirror repos receive generated snapshots of `.ai-workflow` and `scripts/sync-ai-workflow.mjs` so their local CI can run `--check` without depending on the combined workspace root.
## Generated Outputs
- Root Codex environment for combined backend and frontend entrypoints.
- Backend and frontend Codex environments.
- Backend and frontend AI Assistant guidance.
- Backend and frontend Junie guidance.
- Backend Copilot dispatcher workflow.
- Backend and frontend snapshot copies of `.ai-workflow` plus `scripts/sync-ai-workflow.mjs` for mirrored repositories.