56 lines
1.7 KiB
Markdown
56 lines
1.7 KiB
Markdown
# OTO Client
|
|
|
|
Flutter host application for the OTO console.
|
|
|
|
The embeddable UI surface lives in `packages/flutter/oto_console` so other
|
|
workspace apps, such as `../nomadcode/apps/client`, can mount OTO as a modular
|
|
Flutter widget instead of depending on this host application's `main.dart`.
|
|
|
|
## Structure
|
|
|
|
- `lib/main.dart` only starts the OTO client host.
|
|
- `lib/src/app/bootstrap.dart` owns app startup concerns such as fullscreen
|
|
system UI setup.
|
|
- `lib/src/app/oto_client_app.dart` wires the host `MaterialApp` to
|
|
`OtoConsoleShell`.
|
|
- `../../packages/flutter/oto_console` exports the product-owned embeddable
|
|
widgets. That package consumes the workspace shared `agent-shell` package.
|
|
|
|
## Embedding
|
|
|
|
Add the package from another workspace Flutter app:
|
|
|
|
```yaml
|
|
dependencies:
|
|
oto_console:
|
|
path: ../../../oto/packages/flutter/oto_console
|
|
```
|
|
|
|
Then mount any exported widget, for example `OtoConsoleShell` or
|
|
`OtoAgentPanel`, inside the host application's own workbench shell.
|
|
|
|
## Local Preview
|
|
|
|
The workspace frontend preview port candidate is `13020`:
|
|
|
|
```bash
|
|
flutter run -d chrome --web-port=13020
|
|
```
|
|
|
|
The preview port is separate from the OTO Core server URL. When the client
|
|
needs to talk to a host-published Core server, pass the server URL with a
|
|
compile-time define:
|
|
|
|
```bash
|
|
flutter run -d chrome --web-port=13020 --dart-define=OTO_SERVER_HTTP_URL=http://localhost:18020
|
|
```
|
|
|
|
Remote runner evidence uses the same preview port. When the Core server is
|
|
host-published from `/Users/toki/agent-work/oto`, pass the remote host URL:
|
|
|
|
```bash
|
|
make client-run-web OTO_SERVER_HTTP_URL=http://toki-labs.com:18020
|
|
```
|
|
|
|
The current app-level fallback `http://localhost:8080` remains a local
|
|
compatibility default until the runtime default is intentionally migrated.
|