@tarcisiopgs/lisa 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -389,6 +389,29 @@ validation:
389
389
 
390
390
  > **Note:** The `needs-spec` label must exist in your issue tracker before Lisa can apply it. Create it manually if it does not exist — Lisa will log a warning if the label is missing.
391
391
 
392
+ ### Infrastructure Auto-Discovery
393
+
394
+ Lisa auto-discovers Docker Compose services in each repository and starts them before handing control to the agent. If a `docker-compose.yml` / `compose.yml` is present, Lisa reads port mappings and starts the services, waiting for each port to become ready.
395
+
396
+ **Dynamic port allocation** prevents collisions when multiple Lisa instances run in parallel. Add `port_range` and `port_env_var` to any discovered or manually configured resource:
397
+
398
+ ```yaml
399
+ repos:
400
+ - path: api
401
+ # lifecycle config is resolved by auto-discovery (docker-compose.yml)
402
+ # port_range and port_env_var can be set via manual config override
403
+ ```
404
+
405
+ When `port_range` is set, Lisa scans ports `check_port` through `check_port + port_range - 1` and picks the first free one. The chosen port is injected into the resource process via `port_env_var` and is available to `setup` commands and the agent environment.
406
+
407
+ | Field | Type | Description |
408
+ |---|---|---|
409
+ | `check_port` | `number` | Preferred (base) port |
410
+ | `port_range` | `number` (optional) | How many ports to scan from `check_port` |
411
+ | `port_env_var` | `string` (optional) | Env var name to inject the allocated port (e.g. `DATABASE_PORT`) |
412
+
413
+ If no free port is found within the range, Lisa logs a clear error and aborts the session.
414
+
392
415
  ### Auto-Detection
393
416
 
394
417
  Lisa auto-detects `vitest` or `jest` from `package.json` dependencies and injects the correct test command into the agent prompt. It also detects the package manager from lockfiles (`bun.lockb`/`bun.lock` → `bun`, `pnpm-lock.yaml` → `pnpm`, `yarn.lock` → `yarn`, otherwise `npm`).