Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,14 @@ Copy `MultiImageClient/settings - Fill this in and rename it.json` to `MultiImag

## Structured Generation Archive
Every image/video attempt is archived by default in local SQLite at `{ImageDownloadBaseFolder}/generation-history.sqlite3` (override with `GenerationArchiveDbPath`; disable with `EnableGenerationArchive=false`). The archive records prompts and transformation steps, redacted generator configuration, provider requests/responses and nested fields, success/failure/exception details, timings, costs, and hashes/pointers for files on disk. It never stores API keys, cookies, authorization headers, base64 image bodies, or image/video BLOBs. See [docs/generation-archive.md](docs/generation-archive.md).

## Cursor Cloud specific instructions

This section is for future cloud agents. The VM startup update script already runs `dotnet restore MultiImageClient.sln`; the .NET 9 SDK is baked into the VM image. Only the non-obvious caveats below are worth remembering.

- **.NET SDK provenance.** Ubuntu 24.04's apt repos ship `dotnet-sdk-8.0` and `dotnet-sdk-10.0` but NOT `9.0`, and Microsoft's `packages.microsoft.com` feed also omits 9.0 for Noble. The SDK is therefore installed via the official `dotnet-install.sh` to `/usr/share/dotnet` with a symlink at `/usr/bin/dotnet` (on PATH for every shell). `dotnet --version` should report 9.0.x. If a future agent finds `dotnet` missing, re-run: `curl -fsSL https://dot.net/v1/dotnet-install.sh | bash -s -- --channel 9.0 --install-dir /usr/share/dotnet && sudo ln -sf /usr/share/dotnet/dotnet /usr/bin/dotnet`.
- **settings.json is required to run anything** and is `.gitignore`d, so it is NOT restored by pulling the repo — a fresh VM will not have it. `Settings.Validate()` only hard-requires `LogFilePath` and `ImageDownloadBaseFolder` (readme's claim that the Google Cloud trio is required is stale). Copy `MultiImageClient/settings - Fill this in and rename it.json` → `MultiImageClient/settings.json` and set those two fields (the dev copy used here points them at `/workspace/MultiImageClient/logs/...` and `/workspace/MultiImageClient/saves`). If `settings.json` is absent the app throws a clear "Settings file not found" error at startup.
- **API keys live in `settings.json`, not environment variables.** Every image provider needs a paid third-party key/cookie; none are present in the cloud VM by default, so every generator shows `available:false` with an exact per-provider reason and the `--ui` chooser hard-disables it. Build/test/`--ui` all work fully without keys, but a real generation requires at least one key (cheapest smoke path: `OpenAIApiKey` → the `gpt2` target, or `--fast --auto` on the CLI). Add the key to `settings.json`; do not expect env-var pickup.
- **Build/test on Linux.** `dotnet restore MultiImageClient.sln`, `dotnet build MultiImageClient.sln`, and `dotnet test MultiImageClient.Tests/MultiImageClient.Tests.csproj` all succeed on this Linux VM (21 tests pass). The ~90 `NU190x`/`CS86xx` warnings are pre-existing and harmless. `MultiImageClient.Web` targets `net9.0-windows`: it compiles on Linux but cannot be `dotnet run` here — it is a secondary/experimental surface. The primary web UI is the console's own `--ui` mode, not `MultiImageClient.Web`.
- **Running the web UI.** `dotnet run --project MultiImageClient/MultiImageClient.csproj -- --ui --ui-no-open` (binds `127.0.0.1:5960`). Always pass `--ui-no-open` on a headless VM: without it the app launches the system default browser (Chrome), spamming dbus errors into the log and leaving a stray browser. Verify readiness with `curl -s http://127.0.0.1:5960/api/config` rather than parsing the noisy stdout. The frontend is served from the source tree (`MultiImageClient/Ui/wwwroot/`), so editing `app.js`/CSS + refreshing the browser works without a rebuild.
- **Playwright/Chromium is only for `grok-web` video and `meta-web`** (`--playwright-install`). It is not needed for build, test, or the normal image-generation `--ui`/CLI flows, so skip it unless specifically testing those two transports.