Skip to content

Commit c3e54d2

Browse files
Revert "Merge pull request #821 from Tony363/feat/dashboard-api-rust-rewrite"
This reverts commit 15a88b7, reversing changes made to 54e713a.
1 parent 96345ab commit c3e54d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+11235
-12608
lines changed

.github/workflows/claude-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ jobs:
172172
"dream-server/installers/"
173173
"dream-server/dream-cli"
174174
"dream-server/config/"
175-
"dream-server/extensions/services/dashboard-api/crates/dashboard-api/src/middleware.rs"
175+
"dream-server/extensions/services/dashboard-api/security.py"
176176
".github/workflows/"
177177
".env"
178178
"docker-compose"

.github/workflows/dashboard.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,18 @@ jobs:
4343
- name: Checkout
4444
uses: actions/checkout@v4
4545

46-
- name: Install Rust toolchain
47-
uses: dtolnay/rust-toolchain@stable
48-
49-
- name: Cache cargo registry and build
50-
uses: actions/cache@v4
46+
- name: Setup Python
47+
uses: actions/setup-python@v5
5148
with:
52-
path: |
53-
~/.cargo/registry
54-
~/.cargo/git
55-
dream-server/extensions/services/dashboard-api/target
56-
key: ${{ runner.os }}-cargo-${{ hashFiles('dream-server/extensions/services/dashboard-api/Cargo.lock') }}
57-
restore-keys: ${{ runner.os }}-cargo-
49+
python-version: "3.11"
5850

5951
- name: API Syntax Check
60-
run: cargo check --workspace
52+
run: python -m py_compile main.py agent_monitor.py
53+
54+
- name: Install Dependencies
55+
run: |
56+
pip install -r requirements.txt
57+
pip install -r tests/requirements-test.txt
6158
6259
- name: Run Unit Tests
63-
run: cargo test --workspace -- --test-threads=1
60+
run: pytest tests/ -v --cov=. --cov-report=term --cov-report=lcov:coverage.lcov

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ dream-server/models/
5353
dream-server/config/openclaw/workspace/
5454
dream-server/**/node_modules/
5555
dream-server/**/dist/
56-
dream-server/**/target/
5756
dream-server/**/.coverage
5857
dream-server/preflight-*.log
5958
dream-server/.current-mode

dream-server/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ help: ## Show this help
1212
lint: ## Syntax check all shell scripts + Python compile check
1313
@echo "=== Shell syntax ==="
1414
@fail=0; for f in $(SHELL_FILES); do bash -n "$$f" || fail=1; done; [ $$fail -eq 0 ]
15-
@echo "=== Dashboard API (Rust) ==="
16-
@cd extensions/services/dashboard-api && cargo check --workspace 2>&1 | tail -1
15+
@echo "=== Python compile ==="
16+
@python3 -m py_compile extensions/services/dashboard-api/main.py extensions/services/dashboard-api/agent_monitor.py
1717
@echo "All lint checks passed."
1818

1919
test: ## Run unit and contract tests

dream-server/docs/COMPOSABILITY-EXECUTION-BOARD.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@ Effort: 3-5 days
134134
Files:
135135
- `extensions/schema/service-manifest.v1.json` (new)
136136
- `extensions/services/*.yaml` (new examples)
137-
- [`dashboard-api/crates/dashboard-api/src/config.rs`](../extensions/services/dashboard-api/crates/dashboard-api/src/config.rs)
137+
- [`dashboard-api/main.py`](../extensions/services/dashboard-api/main.py)
138138
Acceptance:
139139
- API can load service definitions from manifests.
140140
- Health checks and feature cards reference manifest data, not hardcoded lists.
141141
Progress notes:
142142
- Added `extensions/schema/service-manifest.v1.json`.
143143
- Added example manifests in `extensions/services/` for inference, voice, workflows, vector DB, and image generation services.
144-
- `dashboard-api` (Rust/Axum rewrite) loads and merges service/feature definitions from manifests with safe fallback defaults.
144+
- `dashboard-api/main.py` now loads and merges service/feature definitions from manifests with safe fallback defaults.
145145

146146
Milestone W4-M2 (PR-7): Environment schema and validation
147147
Status: `IN_PROGRESS`
@@ -189,7 +189,7 @@ Owner: Frontend + API
189189
Effort: 2-3 days
190190
Files:
191191
- [`dashboard/src/pages/Dashboard.jsx`](../extensions/services/dashboard/src/pages/Dashboard.jsx)
192-
- [`dashboard-api/crates/dashboard-api/src/main.rs`](../extensions/services/dashboard-api/crates/dashboard-api/src/main.rs)
192+
- [`dashboard-api/main.py`](../extensions/services/dashboard-api/main.py)
193193
Acceptance:
194194
- Feature tiles derive from API metadata.
195195
- Ports/URLs are not hardcoded in JSX.
@@ -207,13 +207,13 @@ Owner: API + Docs
207207
Effort: 1-2 days
208208
Files:
209209
- `config/n8n/catalog.json` (planned; not yet created)
210-
- [`dashboard-api/crates/dashboard-api/src/routes/workflows.rs`](../extensions/services/dashboard-api/crates/dashboard-api/src/routes/workflows.rs)
210+
- [`dashboard-api/main.py`](../extensions/services/dashboard-api/main.py)
211211
- [INTEGRATION-GUIDE.md](INTEGRATION-GUIDE.md)
212212
Acceptance:
213213
- One canonical workflow path in code/docs.
214214
- Catalog supports both templates and metadata cleanly.
215215
Progress notes:
216-
- `dashboard-api` (Rust) resolves workflows from canonical `config/n8n` with legacy `workflows/` fallback.
216+
- `dashboard-api/main.py` now resolves workflows from canonical `config/n8n` with legacy `workflows/` fallback.
217217
- Workflow catalog loading now validates structure and returns normalized fallback data on malformed input.
218218
- `docs/INTEGRATION-GUIDE.md` updated to reference `config/n8n/*.json` and `config/n8n/catalog.json`.
219219

@@ -285,7 +285,7 @@ Owner: Release
285285
Effort: 2-3 days
286286
Files:
287287
- `manifest.json` (new)
288-
- [`dashboard-api/crates/dashboard-api/src/main.rs`](../extensions/services/dashboard-api/crates/dashboard-api/src/main.rs)
288+
- [`dashboard-api/main.py`](../extensions/services/dashboard-api/main.py)
289289
- [`dream-update.sh`](../dream-update.sh)
290290
Acceptance:
291291
- Update path validates version compatibility and rollback point.

dream-server/docs/EXTENSIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ AMD ROCm requires additional container configuration compared to NVIDIA:
349349
## Testing Checklist (PR Gate)
350350

351351
- `bash -n` on changed shell files
352-
- `cargo check --workspace` (in `extensions/services/dashboard-api/`)
352+
- `python3 -m py_compile dashboard-api/main.py`
353353
- `bash tests/integration-test.sh`
354354
- relevant smoke scripts in `tests/smoke/`
355355
- if dashboard code changed and Node is available:

dream-server/docs/HOST-AGENT-API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,6 @@ Protections in place:
148148

149149
## How the Dashboard API Calls It
150150

151-
The Dashboard API (Rust binary at `extensions/services/dashboard-api/`) communicates with the host agent via the `DREAM_AGENT_URL` environment variable (constructed from `DREAM_AGENT_HOST` and `DREAM_AGENT_PORT`). It uses `DREAM_AGENT_KEY` for authentication. The connection flows through Docker's `host.docker.internal` DNS name by default, allowing the containerized API to reach the host-bound agent.
151+
The Dashboard API (`extensions/services/dashboard-api/routers/extensions.py`) communicates with the host agent via the `AGENT_URL` environment variable (constructed from `DREAM_AGENT_HOST` and `DREAM_AGENT_PORT` in `config.py`). It uses `DREAM_AGENT_KEY` for authentication. The connection flows through Docker's `host.docker.internal` DNS name by default, allowing the containerized API to reach the host-bound agent.
152152

153153
If the host agent is unreachable, mutation operations (install, enable, disable) still succeed at the file level but return `"restart_required": true` to signal that `dream restart` is needed.

dream-server/extensions/services/dashboard-api/.dockerignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# Rust
2-
target/
3-
41
# Python
52
__pycache__/
63
*.py[cod]

0 commit comments

Comments
 (0)