Skip to content
Open
Show file tree
Hide file tree
Changes from 9 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
25 changes: 22 additions & 3 deletions .github/workflows/dashboard-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
with:
persist-credentials: false

- name: Isolate the future root from legacy checks
run: mv greenfield "${RUNNER_TEMP}/mira-dashboard-greenfield"

- name: Set up Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
Expand Down Expand Up @@ -78,6 +81,9 @@ jobs:
with:
persist-credentials: false

- name: Isolate the future root from legacy checks
run: mv greenfield "${RUNNER_TEMP}/mira-dashboard-greenfield"

- name: Set up Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
Expand Down Expand Up @@ -159,19 +165,32 @@ jobs:
working-directory: ${{ runner.temp }}/mira-dashboard-greenfield
run: bun run format:check

- name: Build isolated browser bundle
working-directory: ${{ runner.temp }}/mira-dashboard-greenfield
run: bun run build:browser

- name: Build isolated process bundles
working-directory: ${{ runner.temp }}/mira-dashboard-greenfield
run: bun run build:processes

- name: Test isolated future root with coverage
working-directory: ${{ runner.temp }}/mira-dashboard-greenfield
run: bun run test:coverage

- name: Prefix isolated LCOV paths for the coexistence checkout
run: |
lcov_path="${RUNNER_TEMP}/mira-dashboard-greenfield/coverage/lcov.info"
perl -0pi -e 's{^SF:(?:\./)?src/}{SF:greenfield/src/}mg' "${lcov_path}"
if grep '^SF:' "${lcov_path}" | grep --quiet --invert-match '^SF:greenfield/src/'; then
echo "LCOV contains a source path outside greenfield/src" >&2
perl -0pi -e 's{^SF:(?:\./)?(scripts|src)/}{SF:greenfield/$1/}mg' "${lcov_path}"
perl -0pi -e 's{^SF:(?:\./)?drizzle\.config\.ts$}{SF:greenfield/drizzle.config.ts}mg' "${lcov_path}"
perl -0pi -e 's{^SF:(?:\./)?tailwind\.config\.ts$}{SF:greenfield/tailwind.config.ts}mg' "${lcov_path}"
if grep '^SF:' "${lcov_path}" | grep --quiet --invert-match --extended-regexp '^SF:greenfield/((scripts|src)/|(drizzle|tailwind)\.config\.ts$)'; then
echo "LCOV contains a source path outside the exact greenfield production inventory" >&2
exit 1
fi
grep --quiet '^SF:greenfield/scripts/' "${lcov_path}"
grep --quiet '^SF:greenfield/src/' "${lcov_path}"
grep --quiet '^SF:greenfield/drizzle\.config\.ts$' "${lcov_path}"
grep --quiet '^SF:greenfield/tailwind\.config\.ts$' "${lcov_path}"

- name: Upload isolated coverage artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand Down
5 changes: 1 addition & 4 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@
"**/coverage/**",
"**/data/**",
"**/dist/**",
"docs/generated/**",
"migrations/**",
"**/node_modules/**",
"**/*.min.css",
"**/*.min.js",
"greenfield/**"
"**/*.min.js"
],
"printWidth": 90,
"semi": true,
Expand Down
3 changes: 1 addition & 2 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
"**/*.tsbuildinfo",
".git/**",
".vscode/**",
"build/**",
"greenfield/**"
"build/**"
],
"options": {
"denyWarnings": true,
Expand Down
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,16 @@ dist/ Bun production frontend build output

## Local development

The repository selects Bun Canary through `.bun-version`. Install or update that channel before
installing dependencies:

```bash
bun upgrade --canary
```

Then install all frontend, backend, and tooling dependencies from the repo root:
Install all frontend, backend, and tooling dependencies from the repo root:

```bash
bun install --frozen-lockfile
```

The application targets the Bun 1.4 runtime API. Immutable release manifests still record the
exact Bun revision used for each build. The committed Bun config keeps the runtime-only
`bun-plugin-tailwind` peer from installing a second, stale Bun executable into `node_modules`.
The repository tracks Bun's moving Canary channel in `.bun-version`. Install or
upgrade that runtime before working in the repository; the committed Bun config
keeps the runtime-only `bun-plugin-tailwind` peer from installing a second,
stale Bun executable into `node_modules`.

Run the complete local dev stack:

Expand Down
14 changes: 7 additions & 7 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bunfig.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ coveragePathIgnorePatterns = [
]

[serve.static]
plugins = ["./scripts/reactCompilerPlugin.ts", "bun-plugin-tailwind"]
plugins = ["bun-plugin-tailwind", "./scripts/reactCompilerPlugin.ts"]
environment = "PUBLIC_*"
9 changes: 9 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ coverage:
flags:
- dashboard
paths:
- greenfield/scripts/
- greenfield/src/
- greenfield/drizzle.config.ts
- greenfield/tailwind.config.ts
backend:
target: 85%
threshold: 0%
Expand Down Expand Up @@ -42,7 +45,10 @@ coverage:
flags:
- dashboard
paths:
- greenfield/scripts/
- greenfield/src/
- greenfield/drizzle.config.ts
- greenfield/tailwind.config.ts
backend:
target: 85%
threshold: 0%
Expand Down Expand Up @@ -70,7 +76,10 @@ comment:
flags:
dashboard:
paths:
- greenfield/scripts/
- greenfield/src/
- greenfield/drizzle.config.ts
- greenfield/tailwind.config.ts
frontend:
paths:
- frontend/src/
Expand Down
59 changes: 21 additions & 38 deletions docs/api/endpoints.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Endpoint Reference

> **Current-production parity input — not the greenfield API contract.** This route inventory
> describes the legacy backend and exists so the rewrite does not lose operator-visible behavior.
> Greenfield contracts are defined by their explicit tRPC/raw-HTTP registries and current generated
> references; legacy route names and payloads are not compatibility requirements.

This page lists the backend route table. It is intentionally concise: use the
route files under `backend/src/routes/` for exact validation details.

Expand All @@ -13,9 +8,7 @@ route files under `backend/src/routes/` for exact validation details.
| Method | Path | Purpose |
| ------ | ------------------------- | ------------------------------------------------------ |
| `GET` | `/api/health/live` | Public web-process liveness. |
| `HEAD` | `/api/health/live` | Bodyless public web-process liveness probe. |
| `GET` | `/api/health/ready` | Public activation readiness; `503` when not ready. |
| `HEAD` | `/api/health/ready` | Bodyless readiness probe with the same status as GET. |
| `GET` | `/api/health/diagnostics` | Authenticated readiness details and dependency status. |
| `GET` | `/api/sessions` | Normalized session snapshot from Gateway. |

Expand Down Expand Up @@ -202,13 +195,6 @@ already-running execution finishes cooperatively.
| `POST` | `/api/backup` | Creates config backup. |
| `POST` | `/api/restart` | Queues an OpenClaw Gateway restart and waits for its persisted result. |

## Dashboard Settings

| Method | Path | Purpose |
| ------ | --------------- | ------------------------------------------------------------- |
| `GET` | `/api/settings` | Reads Dashboard preferences plus current Gateway connection. |
| `PUT` | `/api/settings` | Updates the validated Dashboard preference subset atomically. |

## Files, Config Files, Logs, Media

| Method | Path | Purpose |
Expand All @@ -219,9 +205,8 @@ already-running execution finishes cooperatively.
| `GET` | `/api/config-files` | Lists OpenClaw config files. |
| `GET` | `/api/config-files/*` | Reads a config file under OpenClaw root. |
| `PUT` | `/api/config-files/*` | Writes a config file under OpenClaw root. |
| `GET` | `/api/logs/dashboard` | Reads the bounded Dashboard service log tail. |
| `GET` | `/api/logs/openclaw/files` | Lists readable OpenClaw log files and metadata. |
| `GET` | `/api/logs/openclaw/content` | Reads a bounded tail from one allowlisted OpenClaw log file. |
| `GET` | `/api/logs/info` | Lists log files/metadata. |
| `GET` | `/api/logs/content` | Reads log content. |
| `GET` | `/api/media` | Serves or safely previews media bytes from OpenClaw media roots. |
| `GET` | `/api/chat/media/outgoing/*` | Proxies an exact managed Gateway media path with backend-held auth. |

Expand All @@ -242,33 +227,31 @@ upstream download metadata.

## Docker

| Method | Path | Purpose |
| -------- | ------------------------------------------------ | ------------------------------------------- |
| `GET` | `/api/docker/containers` | Lists containers. |
| `GET` | `/api/docker/containers/stats` | Reads the current container stats snapshot. |
| `GET` | `/api/docker/containers/:containerId` | Reads container details. |
| `POST` | `/api/docker/containers/:containerId/action` | Queues a container start/stop/restart. |
| `GET` | `/api/docker/containers/:containerId/logs` | Reads container logs. |
| `POST` | `/api/docker/exec/start` | Queues a worker-owned container exec job. |
| `GET` | `/api/docker/exec/:jobId` | Reads persisted exec output/state. |
| `POST` | `/api/docker/exec/:jobId/stop` | Requests exec cancellation. |
| `GET` | `/api/docker/images` | Lists images. |
| `DELETE` | `/api/docker/images/:imageId` | Queues image deletion. |
| `GET` | `/api/docker/volumes` | Lists volumes. |
| `DELETE` | `/api/docker/volumes/:volumeName` | Queues volume deletion. |
| `POST` | `/api/docker/prune` | Queues a Docker prune target. |
| `POST` | `/api/docker/stack/action` | Queues a Compose stack action. |
| `GET` | `/api/docker/updater/services` | Lists managed update services. |
| `GET` | `/api/docker/updater/events` | Lists update events. |
| `POST` | `/api/docker/updater/run` | Queues an updater scan. |
| `POST` | `/api/docker/updater/services/:serviceId/update` | Queues one managed service update. |
| Method | Path | Purpose |
| -------- | ------------------------------------------------ | ----------------------------------------- |
| `GET` | `/api/docker/containers` | Lists containers. |
| `GET` | `/api/docker/containers/:containerId` | Reads container details. |
| `POST` | `/api/docker/containers/:containerId/action` | Queues a container start/stop/restart. |
| `GET` | `/api/docker/containers/:containerId/logs` | Reads container logs. |
| `POST` | `/api/docker/exec/start` | Queues a worker-owned container exec job. |
| `GET` | `/api/docker/exec/:jobId` | Reads persisted exec output/state. |
| `POST` | `/api/docker/exec/:jobId/stop` | Requests exec cancellation. |
| `GET` | `/api/docker/images` | Lists images. |
| `DELETE` | `/api/docker/images/:imageId` | Queues image deletion. |
| `GET` | `/api/docker/volumes` | Lists volumes. |
| `DELETE` | `/api/docker/volumes/:volumeName` | Queues volume deletion. |
| `POST` | `/api/docker/prune` | Queues a Docker prune target. |
| `POST` | `/api/docker/stack/action` | Queues a Compose stack action. |
| `GET` | `/api/docker/updater/services` | Lists managed update services. |
| `GET` | `/api/docker/updater/events` | Lists update events. |
| `POST` | `/api/docker/updater/run` | Queues an updater scan. |
| `POST` | `/api/docker/updater/services/:serviceId/update` | Queues one managed service update. |

## Pull Requests And Deployments

| Method | Path | Purpose |
| ------ | -------------------------------------------- | ---------------------------------------------------------- |
| `GET` | `/api/pull-requests` | Lists Dashboard PRs. |
| `POST` | `/api/pull-requests/stacks` | Creates one reviewed native GitHub PR stack. |
| `POST` | `/api/pull-requests/:number/approve` | Queues merge, optionally followed by deploy. |
| `POST` | `/api/pull-requests/:number/reject` | Queues reject/close. |
| `POST` | `/api/pull-requests/:number/review-approval` | Queues review approval. |
Expand Down
7 changes: 0 additions & 7 deletions docs/architecture/gateway-and-chat.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# Gateway And Chat Runtime

> **Current-production parity input — not the greenfield protocol specification.** This document
> describes the legacy Dashboard implementation that must be accounted for during parity work.
> Before any greenfield OpenClaw integration, inspect the source and protocol of the OpenClaw
> version currently installed; that installed behavior is authoritative and this implementation
> may be replaced. The Phase 2 greenfield slice qualifies only a one-shot bootstrap credential
> verifier, not the persistent Gateway/chat runtime described below.

Dashboard has two WebSocket layers:

```text
Expand Down
Loading
Loading