mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-29 14:02:19 +00:00
iremove (#1432)
This commit is contained in:
@@ -1,80 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- **Orchestrator (Issue #930)**: Dedicated worker threads for long, complex
|
||||
delegated sub-tasks
|
||||
- Extended `spawn_subagent` with an opt-in `dedicated_thread: boolean` flag.
|
||||
When true, the sub-agent's prompt and final summary land in a fresh
|
||||
`worker`-labeled conversation thread the user can open from the thread
|
||||
list, and the parent thread receives a compact `[worker_thread_ref]`
|
||||
envelope instead of the full sub-agent transcript.
|
||||
- Added `WorkerThreadRefCard` to render the envelope as a clickable card in
|
||||
the parent thread's tool timeline; the card swaps the active thread on
|
||||
click so the user can read the full sub-agent transcript without losing
|
||||
the parent conversation.
|
||||
- Worker threads are one level deep by construction — sub-agents never see
|
||||
`spawn_subagent`, so a worker cannot itself spawn another worker.
|
||||
- Updated the orchestrator system prompt with guidance on when to opt in to
|
||||
`dedicated_thread` (multi-step research, multi-file refactors, batch
|
||||
integration work) vs. the default inline path.
|
||||
- Unit tests cover the schema flag, the worker thread title builder, the
|
||||
parent-visible `[worker_thread_ref]` envelope, the thread/message
|
||||
persistence shape, and the TypeScript envelope parser.
|
||||
|
||||
- **Config (Issue #933)**: Bootstrap from config.toml RPC URL with runtime derivation
|
||||
- Added "Configure RPC URL" option on Welcome screen for self-hosted/internal deployments
|
||||
- Users can now set core JSON-RPC URL on login screen without build-time configuration
|
||||
- RPC URL persisted to localStorage and restored on next launch
|
||||
- Added "Test Connection" button to validate RPC endpoint before saving
|
||||
- Core now exposes `openhuman.config_get_client` RPC method returning safe client fields
|
||||
- Frontend `coreRpcClient` respects user-configured URL over build-time defaults
|
||||
- Unit tests added for URL persistence and validation utilities
|
||||
- Added `useBackendUrl` hook so React components resolve the API URL from
|
||||
the core's `openhuman.config_resolve_api_url` instead of importing the
|
||||
build-time `BACKEND_URL` constant. Migrated `WebhooksDebugPanel` and
|
||||
`TunnelList` off the synchronous fallback, removing the hardcoded
|
||||
`https://api.tinyhumans.ai` short-circuit
|
||||
- Documented the runtime URL precedence in `app/.env.example`,
|
||||
`docs/src/01-architecture.md`, and `docs/src/08-hooks-utils.md`
|
||||
- Added `services/__tests__/backendUrl.test.ts` (resolver happy path,
|
||||
caching, `apiUrl` alias, empty-response refusal) and
|
||||
`hooks/useBackendUrl.test.ts` (resolve, failure, and unmount-safety)
|
||||
|
||||
- **DevOps**: Added Sentry debug symbol upload to CI/CD pipeline
|
||||
- Rust debug symbols from Tauri build are now automatically uploaded to Sentry on every main branch push
|
||||
- Creates and finalizes Sentry releases with proper version tagging (`openhuman@{version}`)
|
||||
- Enables accurate stack trace symbolication for production releases
|
||||
- Added `scripts/upload_sentry_symbols.sh` helper script for local symbol uploads
|
||||
|
||||
### Changed
|
||||
|
||||
- **CI**: Updated `build.yml` workflow to upload debug symbols after successful builds
|
||||
- Symbol upload only triggers on main branch pushes (not PRs)
|
||||
- Added `actions: read` permission for Sentry commit association
|
||||
|
||||
### Dependencies
|
||||
|
||||
- None
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Webview Accounts**: Verified loading overlay implementation (Issue #867)
|
||||
- Webviews now display a loading spinner while CEF initializes provider pages
|
||||
- Three independent signals trigger reveal: native `on_page_load`, CDP `Page.loadEventFired`, and 15s watchdog
|
||||
- Webview spawns at 1x1 size (off-screen) to prevent blank coverage during load
|
||||
- Rust backend resizes/repositions webview and emits `webview-account:load` event
|
||||
- Frontend dispatches status='open' to hide spinner once page is painted
|
||||
|
||||
---
|
||||
|
||||
## [0.52.28] - 2026-04-18
|
||||
|
||||
See [release notes](https://github.com/tinyhumansai/openhuman/releases/tag/v0.52.28) for details.
|
||||
@@ -1,139 +0,0 @@
|
||||
# Backend Overhaul — Controller Registry Consolidation
|
||||
|
||||
Branch: `feat/backend-overhaul`
|
||||
Base: `main` @ 515c4f4b
|
||||
|
||||
## Why
|
||||
|
||||
Project rule (CLAUDE.md): domain functionality exposed to CLI + JSON-RPC **only** via the controller registry (`schemas.rs` per domain + `src/core/all.rs`). Current state is 90% there — 34 domains fully migrated — but six CLI adapters and one JSON-RPC fallback still live in the transport layer. Finishing this lets us delete ~95KB of adapter code and enforce the rule with a lint/grep check.
|
||||
|
||||
## Goals
|
||||
|
||||
1. Zero domain-specific code in `src/core/cli.rs`, `src/core/jsonrpc.rs`, `src/rpc/dispatch.rs`.
|
||||
2. Every CLI command and JSON-RPC method dispatched through the shared registry.
|
||||
3. No behavior change — all existing CLI flags and RPC methods preserve names, params, outputs.
|
||||
4. Unregistered infrastructure modules documented as intentionally transport-agnostic.
|
||||
|
||||
## Non-goals
|
||||
|
||||
- No new domain functionality.
|
||||
- No changes to skills QuickJS runtime exposure (stays runtime-only).
|
||||
- No renames of existing CLI flags or RPC method names.
|
||||
- No touching memory-tree domain (sanil-23 has in-flight PRs #732 #733).
|
||||
|
||||
## Current leakage
|
||||
|
||||
| File | LOC | What's there | Target |
|
||||
|---|---|---|---|
|
||||
| `src/core/agent_cli.rs` | 21.4K | agent CLI adapter | `openhuman/agent/schemas.rs` |
|
||||
| `src/core/memory_cli.rs` | 15.3K | memory CLI adapter | `openhuman/memory/schemas.rs` |
|
||||
| `src/core/text_input_cli.rs` | 12.4K | text_input CLI adapter | `openhuman/text_input/schemas.rs` |
|
||||
| `src/core/screen_intelligence_cli.rs` | 26.5K | screen_intelligence CLI adapter | `openhuman/screen_intelligence/schemas.rs` |
|
||||
| `src/core/tree_summarizer_cli.rs` | 13.2K | tree_summarizer CLI adapter | `openhuman/tree_summarizer/schemas.rs` |
|
||||
| `src/core/cli.rs` (voice block) | ~2K | `run_voice_server_command()` | `openhuman/voice/schemas.rs` |
|
||||
| `src/rpc/dispatch.rs` | 76 | `openhuman.security_policy_info` fallback | `openhuman/security/schemas.rs` (or about_app) |
|
||||
|
||||
Total: ~95KB of adapter code to fold into registry.
|
||||
|
||||
## Exposure rule (decision tree)
|
||||
|
||||
Two legitimate shapes for exposing a domain capability. Pick by command shape, not by convenience:
|
||||
|
||||
1. **Controller registry** (`src/openhuman/<domain>/schemas.rs` + `src/core/all.rs`).
|
||||
Use for **request/response RPC-style capabilities** — take params, do work, return JSON, done. The vast majority of domain methods. CLI access is free via the generic namespace dispatcher (`openhuman <domain> <verb> --args`).
|
||||
|
||||
2. **Domain-owned CLI adapter** (`src/openhuman/<domain>/cli.rs`).
|
||||
Use only for **standalone long-running / blocking operational commands** — e.g. `openhuman voice` runs a hotkey listener forever, holds the process, logs to stderr. These don't fit the registry's fire-and-return JSON contract. The adapter lives *inside* the domain (not in `src/core/cli.rs`) so transport layer stays generic.
|
||||
|
||||
Hard rule: no domain-specific imports or logic in `src/core/cli.rs`, `src/core/jsonrpc.rs`, or `src/rpc/dispatch.rs`. The only allowed reference is the dispatch line that routes `args[0]` to the domain's CLI function. Everything else lives in the domain.
|
||||
|
||||
Don't invent a third shape. If a capability feels like it needs one, it probably belongs in one of the two above with a thin adjustment.
|
||||
|
||||
## Approach
|
||||
|
||||
Each migration is a self-contained diff:
|
||||
|
||||
1. Confirm domain already has `schemas.rs` with `all_<domain>_registered_controllers()`.
|
||||
2. For each CLI subcommand in `<domain>_cli.rs`:
|
||||
- Identify the underlying domain function it calls.
|
||||
- Add a `handle_<verb>` fn in `schemas.rs` that takes `Map<String, Value>` and returns `ControllerFuture`.
|
||||
- Register it in `all_<domain>_registered_controllers()`.
|
||||
3. Delete the `<domain>_cli.rs` file.
|
||||
4. Remove its import from `src/core/cli.rs` / `mod.rs`.
|
||||
5. Verify CLI flags still work via generic dispatcher — the registry already exposes them by method name.
|
||||
6. `cargo check` + `cargo test -p openhuman` per step.
|
||||
|
||||
The generic CLI adapter in `cli.rs` already knows how to route `<domain> <verb> --key value` to registry method `openhuman.<domain>_<verb>`. Migration is mostly deletion once handlers exist.
|
||||
|
||||
## Phases
|
||||
|
||||
### Phase 1 — Smallest adapter first (shakedown)
|
||||
|
||||
**voice** (~2K inline in `cli.rs`). Lowest risk: one server command, confirms the approach end-to-end before touching bigger files.
|
||||
|
||||
- Commit: `refactor(voice): move CLI adapter to controller registry`
|
||||
|
||||
### Phase 2 — Mechanical migrations (one PR each)
|
||||
|
||||
Order = smallest file first, so each PR is reviewable and CI catches issues early.
|
||||
|
||||
1. `text_input` (12.4K) — likely thin wrappers.
|
||||
2. `tree_summarizer` (13.2K).
|
||||
3. `memory_cli` (15.3K) — **coordinate with sanil-23 memory-tree PRs**; rebase after #732/#733 merge or pair-review.
|
||||
4. `agent_cli` (21.4K).
|
||||
5. `screen_intelligence` (26.5K) — largest, leave for last.
|
||||
|
||||
Each: one commit, one PR, self-contained. No bundling.
|
||||
|
||||
### Phase 3 — JSON-RPC dispatch fallback
|
||||
|
||||
Move `openhuman.security_policy_info` from `src/rpc/dispatch.rs` into whichever domain owns security policy (likely `about_app` or a new `security` module). Delete `rpc/dispatch.rs` if it becomes empty, else leave as a thin generic dispatch shim.
|
||||
|
||||
### Phase 4 — Enforce the rule
|
||||
|
||||
Add a build-time check or CI grep. The rule must forbid domain **imports/types** in the transport layer while still allowing the dispatcher to call the generic `::cli::run_*` entrypoints that live inside each domain:
|
||||
|
||||
```bash
|
||||
# Forbid `use crate::openhuman::<domain>::…` imports in transport files.
|
||||
! grep -rE '^\s*use\s+crate::openhuman::[a-z_]+::' \
|
||||
src/core/cli.rs src/core/jsonrpc.rs src/rpc/dispatch.rs
|
||||
|
||||
# Forbid any other domain reference that is NOT a call into ::cli::run_*(…).
|
||||
# (The dispatcher is allowed to invoke `crate::openhuman::<domain>::cli::run_<x>(...)`.)
|
||||
! grep -rE 'crate::openhuman::[a-z_]+::' \
|
||||
src/core/cli.rs src/core/jsonrpc.rs src/rpc/dispatch.rs \
|
||||
| grep -vE 'crate::openhuman::[a-z_]+::cli::run_[a-z_]+\('
|
||||
```
|
||||
|
||||
Fails if any domain-specific import or non-dispatcher reference creeps back in. Commit as `chore(core): fence domain imports out of transport layer`.
|
||||
|
||||
### Phase 5 — Document unregistered modules
|
||||
|
||||
Add a short table to `CLAUDE.md` listing intentionally-unregistered infra modules (accessibility, approval, context, embeddings, integrations, node_runtime, overlay, providers, routing, tokenjuice, tool_timeout) with one-liner "why not in registry" for each. Also document skills as runtime-only.
|
||||
|
||||
## Risks
|
||||
|
||||
- **agent_cli / screen_intelligence size** — large files may hide subtle flag-parsing logic not obvious from a first read. Mitigation: test-drive each CLI subcommand manually after migration; add CLI smoke tests to the registry dispatcher if missing.
|
||||
- **memory_cli collision with sanil-23** — memory-tree PRs touch adjacent paths. Mitigation: do phase 2.3 last, rebase on top of merged PRs.
|
||||
- **CLI flag drift** — generic adapter parses flags by schema. If current `_cli.rs` does custom parsing (e.g. positional args, subcommand nesting), need to extend schema before deleting. Mitigation: read each CLI file top-to-bottom before writing handler.
|
||||
- **Behavior diff at registry boundary** — registry handlers return `ControllerFuture` with JSON; `_cli.rs` may print formatted text. Mitigation: keep a thin formatter in the generic CLI path, not per-domain.
|
||||
|
||||
## Verification per step
|
||||
|
||||
```bash
|
||||
cargo check --manifest-path Cargo.toml
|
||||
cargo test -p openhuman --test json_rpc_e2e
|
||||
# Manual CLI smoke for migrated domain:
|
||||
./target/debug/openhuman <domain> <verb> --args...
|
||||
```
|
||||
|
||||
Plus `pnpm test:rust` for the full mock-backed integration suite before each PR.
|
||||
|
||||
## Milestones
|
||||
|
||||
- M1: Phase 1 done, shakedown merged.
|
||||
- M2: Phases 2.1–2.5 done, all `*_cli.rs` deleted.
|
||||
- M3: Phase 3 done, `rpc/dispatch.rs` cleaned.
|
||||
- M4: Phase 4+5 done, rule enforced, docs updated.
|
||||
|
||||
Estimate: M1 = 0.5d, M2 = 3–4d (one domain/day), M3 = 0.5d, M4 = 0.5d. Total ~1 week of focused work.
|
||||
Reference in New Issue
Block a user