← Commit history

hd -> hydrogen prose; rename docs/adom-hydrogen.md

Kyle Bergstedt ·71b9a28d31 ·2mo ago ·parent dec5bc0
1 file changed +7−7
DIRECT_API.md+7−7
@@ -100,7 +100,7 @@ Every error carries an actionable `_hint` and (for non-400s) a stable `errorCode  ## What the user sees in the GUI Activity Log -Each `POST /command` call shows up in adom-desktop's Activity Log panel with a `direct:8770` badge (the port-explicit "server name" the dispatcher attaches to direct-API calls) plus the verb's normal event tag (`desktop`, `kicad`, `hd`, etc.). This is visually distinct from the `localhost` badge attached to WS-relay traffic going through the localhost dev server at `ws://localhost:8865`.+Each `POST /command` call shows up in adom-desktop's Activity Log panel with a `direct:8770` badge (the port-explicit "server name" the dispatcher attaches to direct-API calls) plus the verb's normal event tag (`desktop`, `kicad`, `hydrogen`, etc.). This is visually distinct from the `localhost` badge attached to WS-relay traffic going through the localhost dev server at `ws://localhost:8865`.  At startup, a single `direct-api` event-tagged entry says "direct-api listening on http://127.0.0.1:8770 (loopback-only). Sibling apps can POST /command without spawning the CLI." If the bind ever fails (port taken), the user sees a corresponding error entry — no silent failure. @@ -112,9 +112,9 @@ At startup, a single `direct-api` event-tagged entry says "direct-api listening  ## Reference integration: Adom Hydrogen startup -This is the canonical pattern HD uses to register its container relay with adom-desktop at boot.+This is the canonical pattern Hydrogen uses to register its container relay with adom-desktop at boot. -### Rust (HD's `src-tauri/src/lib.rs` or equivalent)+### Rust (Hydrogen's `src-tauri/src/lib.rs` or equivalent)  ```rust use serde_json::json;@@ -141,7 +141,7 @@ async fn register_with_adom_desktop(workspace_name: &str, relay_url: &str) -> Re     if !healthy {         // adom-desktop not running. Either tell the user to launch it,         // or shell out to the CLI as the legacy fallback. Don't block-        // HD startup.+        // Hydrogen startup.         log::warn!("adom-desktop not reachable on 127.0.0.1:8770 — relay will not be auto-registered");         return Ok(());     }@@ -177,7 +177,7 @@ async fn register_with_adom_desktop(workspace_name: &str, relay_url: &str) -> Re } ``` -### TypeScript (HD's frontend, if it ever calls directly)+### TypeScript (Hydrogen's frontend, if it ever calls directly)  ```typescript async function registerWithAdomDesktop(name: string, url: string): Promise<boolean> {@@ -226,7 +226,7 @@ The `cliRequired` array in `GET /status` lists the verbs that need the CLI binar | `kicad` | **stripped** — drop the `kicad_` prefix | `kicad_open_board` → `{app:"kicad", command:"open_board"}` | | `fusion360` | **stripped** — drop the `fusion_` prefix | `fusion_start` → `{app:"fusion360", command:"launch"}` (note: also the verb name shifts internally) | | `browser` | **kept** — pup bridge dispatches on the full name | `browser_open_window` → `{app:"browser", command:"browser_open_window"}` |-| `hd` | **stripped** — drop the `hd_` prefix | `hd_status` → `{app:"hd", command:"status"}` |+| `hydrogen` | **stripped** — drop the `hd_` prefix | `hd_status` → `{app:"hydrogen", command:"status"}` | | `dynamic` | full verb name with third-party bridge prefix preserved | (dispatcher routes by prefix) |  Common direct-safe verb groups:@@ -234,7 +234,7 @@ Common direct-safe verb groups: | Namespace | Examples | Notes | |---|---|---| | `desktop` | `server_add`, `server_remove`, `server_list`, `bridge_list`, `bridge_install`, `bridge_pause`, `bridge_resume`, `desktop_list_windows`, `desktop_screenshot_window`, `desktop_open_url`, `set_shell_auto_approve` | All sync, no prefix stripping. |-| `hd` | `status`, `eval`, `log`, `screenshot`, `build`, `build_frontend`, `build_rust`, `build_status`, `build_log`, `build_tail`, `launch`, `stop`, `restart` | `build*` returns instantly with `{pid, logPath}`; poll `build_status` or `build_tail` for progress. |+| `hydrogen` | `status`, `eval`, `log`, `screenshot`, `build`, `build_frontend`, `build_rust`, `build_status`, `build_log`, `build_tail`, `launch`, `stop`, `restart` | `build*` returns instantly with `{pid, logPath}`; poll `build_status` or `build_tail` for progress. | | `kicad` | `list_versions`, `open_board`, `open_schematic`, `run_drc`, `lint_board`, `install_symbol`, ... | Multi-version-aware. | | `fusion360` | `launch`, `export_step`, `walk_cloud_tree`, `window_info`, `get_app_state`, ... | 50+ verbs. | | `browser` | `browser_open_window`, `browser_navigate`, `browser_screenshot`, `browser_eval`, `browser_click`, `browser_record_start` | Per-tab. **Keep the prefix.** |