Skip to content

Commit 1b3af84

Browse files
authored
refactor: rename navigator- crate prefix to openshell- (#277)
1 parent d98c928 commit 1b3af84

210 files changed

Lines changed: 2136 additions & 2111 deletions

File tree

Some content is hidden

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

.agents/skills/create-spike/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ User says: "Allow sandbox egress to private IP space via networking policy"
253253
1. Problem is clear — no clarification needed
254254
2. Fire `principal-engineer-reviewer` to investigate:
255255
- Finds `is_internal_ip()` SSRF check in `proxy.rs` that blocks RFC 1918 addresses
256-
- Reads OPA policy evaluation pipeline in `opa.rs` and `crates/navigator-sandbox/data/sandbox-policy.rego`
256+
- Reads OPA policy evaluation pipeline in `opa.rs` and `crates/openshell-sandbox/data/sandbox-policy.rego`
257257
- Reads proto definitions in `sandbox.proto` for `NetworkEndpoint`
258258
- Maps the 4-layer defense model: netns, seccomp, OPA, SSRF check
259259
- Reads `architecture/security-policy.md` and `architecture/sandbox.md`

.agents/skills/debug-navigator-cluster/SKILL.md renamed to .agents/skills/debug-openshell-cluster/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: debug-navigator-cluster
2+
name: debug-openshell-cluster
33
description: Debug why a openshell cluster failed to start or is unhealthy. Use when the user has a failed `openshell gateway start`, cluster health check failure, or wants to diagnose cluster infrastructure issues. Trigger keywords - debug cluster, cluster failing, cluster not starting, deploy failed, cluster troubleshoot, cluster health, cluster diagnose, why won't my cluster start, health check failed, gateway start failed, gateway not starting.
44
---
55

@@ -209,7 +209,7 @@ If `registries.yaml` is missing or has wrong values, verify env wiring (`OPENSHE
209209

210210
### Step 6: Check mTLS / PKI
211211

212-
TLS certificates are generated by the `navigator-bootstrap` crate (using `rcgen`) and stored as K8s secrets before the Helm release installs. There is no PKI job or cert-manager — certificates are applied directly via `kubectl apply`.
212+
TLS certificates are generated by the `openshell-bootstrap` crate (using `rcgen`) and stored as K8s secrets before the Helm release installs. There is no PKI job or cert-manager — certificates are applied directly via `kubectl apply`.
213213

214214
```bash
215215
# Check if the three TLS secrets exist

.agents/skills/generate-sandbox-policy/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,5 +542,5 @@ private_services:
542542
543543
- Full policy schema: [architecture/security-policy.md](../../../architecture/security-policy.md)
544544
- Default policy: baked into the community base image (`ghcr.io/nvidia/openshell-community/sandboxes/base:latest`)
545-
- Rego evaluation rules: [sandbox-policy.rego](../../../crates/navigator-sandbox/data/sandbox-policy.rego)
545+
- Rego evaluation rules: [sandbox-policy.rego](../../../crates/openshell-sandbox/data/sandbox-policy.rego)
546546
- For translation examples from real API docs, see [examples.md](examples.md)

.agents/skills/openshell-cli/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This is your primary fallback. Use it freely -- the CLI's help output is authori
2525

2626
## Prerequisites
2727

28-
- `openshell` is on the PATH (install via `cargo install --path crates/navigator-cli`)
28+
- `openshell` is on the PATH (install via `cargo install --path crates/openshell-cli`)
2929
- Docker is running (required for gateway operations and BYOC)
3030
- For remote clusters: SSH access to the target host
3131

@@ -563,5 +563,5 @@ $ openshell sandbox upload --help
563563
| Skill | When to use |
564564
|-------|------------|
565565
| `generate-sandbox-policy` | Creating or modifying policy YAML content (network rules, L7 inspection, access presets, endpoint configuration) |
566-
| `debug-navigator-cluster` | Diagnosing cluster startup or health failures |
566+
| `debug-openshell-cluster` | Diagnosing cluster startup or health failures |
567567
| `tui-development` | Developing features for the OpenShell TUI (`openshell term`) |

.agents/skills/tui-development/SKILL.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: tui-development
3-
description: Guide for developing the OpenShell TUI — a ratatui-based terminal UI for the OpenShell platform. Covers architecture, navigation, data fetching, theming, UX conventions, and development workflow. Trigger keywords - term, TUI, terminal UI, ratatui, navigator-tui, tui development, tui feature, tui bug.
3+
description: Guide for developing the OpenShell TUI — a ratatui-based terminal UI for the OpenShell platform. Covers architecture, navigation, data fetching, theming, UX conventions, and development workflow. Trigger keywords - term, TUI, terminal UI, ratatui, openshell-tui, tui development, tui feature, tui bug.
44
---
55

66
# OpenShell TUI Development Guide
@@ -12,27 +12,27 @@ Comprehensive reference for any agent working on the OpenShell TUI.
1212
The OpenShell TUI is a ratatui-based terminal UI for the OpenShell platform. It provides a keyboard-driven interface for managing gateways, sandboxes, and logs — the same operations available via the `openshell` CLI, but with a live, interactive dashboard.
1313

1414
- **Launched via:** `openshell term` or `mise run term`
15-
- **Crate:** `crates/navigator-tui/`
15+
- **Crate:** `crates/openshell-tui/`
1616
- **Key dependencies:**
1717
- `ratatui` (workspace version) — uses `frame.size()` (not `frame.area()`)
1818
- `crossterm` (workspace version) — terminal backend and event polling
1919
- `tonic` with TLS — gRPC client for the OpenShell gateway
2020
- `tokio` — async runtime for event loop, spawned tasks, and mpsc channels
21-
- `navigator-core` — proto-generated types (`NavigatorClient`, request/response structs)
22-
- `navigator-bootstrap` — cluster discovery (`list_clusters()`)
21+
- `openshell-core` — proto-generated types (`OpenShellClient`, request/response structs)
22+
- `openshell-bootstrap` — cluster discovery (`list_clusters()`)
2323
- **Theme:** Adaptive dark/light via `Theme` struct — NVIDIA-branded green accents. Controlled by `--theme` flag, `OPENSHELL_THEME` env var, or auto-detection.
2424

2525
## 2. Domain Object Hierarchy
2626

2727
The data model follows a strict hierarchy: **Gateway > Sandboxes > Logs**.
2828

2929
```
30-
Gateway (discovered via navigator_bootstrap::list_gateways())
30+
Gateway (discovered via openshell_bootstrap::list_gateways())
3131
└── Sandboxes (fetched via gRPC ListSandboxes)
3232
└── Logs (fetched via GetSandboxLogs + streamed via WatchSandbox)
3333
```
3434

35-
- **Gateways** are discovered from on-disk config via `navigator_bootstrap::list_gateways()`. Each gateway has a name, endpoint, and local/remote flag.
35+
- **Gateways** are discovered from on-disk config via `openshell_bootstrap::list_gateways()`. Each gateway has a name, endpoint, and local/remote flag.
3636
- **Sandboxes** belong to the active cluster. Fetched via `ListSandboxes` gRPC call with a periodic tick refresh. Each sandbox has: `id`, `name`, `phase`, `created_at_ms`, and `spec.template.image`.
3737
- **Logs** belong to a single sandbox. Initial batch fetched via `GetSandboxLogs` (500 lines), then live-tailed via `WatchSandbox` with `follow_logs: true`.
3838

@@ -174,7 +174,7 @@ tokio::time::timeout(Duration::from_secs(5), client.health(req)).await
174174

175175
### Theme System (`theme.rs`)
176176

177-
Colors and styles are defined in `crates/navigator-tui/src/theme.rs` via the `Theme` struct. The TUI supports dark and light terminal backgrounds.
177+
Colors and styles are defined in `crates/openshell-tui/src/theme.rs` via the `Theme` struct. The TUI supports dark and light terminal backgrounds.
178178

179179
#### Theme selection
180180

@@ -344,16 +344,16 @@ Same as above.
344344

345345
| File | Purpose |
346346
| --- | --- |
347-
| `crates/navigator-tui/Cargo.toml` | Crate manifest — dependencies on `navigator-core`, `navigator-bootstrap`, `ratatui`, `crossterm`, `tonic`, `tokio` |
348-
| `crates/navigator-tui/src/lib.rs` | Entry point. Event loop, gRPC calls (`refresh_health`, `refresh_sandboxes`, `spawn_log_stream`, `handle_sandbox_delete`), gateway switching, mTLS channel building |
349-
| `crates/navigator-tui/src/app.rs` | `App` state struct, `Screen`/`Focus`/`InputMode`/`LogSourceFilter` enums, `LogLine` struct, `GatewayEntry`, all key handling logic |
350-
| `crates/navigator-tui/src/event.rs` | `Event` enum (`Key`, `Mouse`, `Tick`, `Resize`, `LogLines`), `EventHandler` with mpsc channels and crossterm polling |
351-
| `crates/navigator-tui/src/theme.rs` | `colors` module (NVIDIA_GREEN, EVERGLADE, BG, FG) and `styles` module (all `Style` constants) |
352-
| `crates/navigator-tui/src/ui/mod.rs` | Top-level `draw()` dispatcher, `draw_title_bar`, `draw_nav_bar`, `draw_command_bar`, screen routing |
353-
| `crates/navigator-tui/src/ui/dashboard.rs` | Dashboard screen — gateway list table (top) + sandbox table (bottom) |
354-
| `crates/navigator-tui/src/ui/sandboxes.rs` | Reusable sandbox table widget with columns: Name, Status, Created, Age, Image |
355-
| `crates/navigator-tui/src/ui/sandbox_detail.rs` | Sandbox detail view — name, status, image, created, age, delete confirmation dialog |
356-
| `crates/navigator-tui/src/ui/sandbox_logs.rs` | Structured log viewer — timestamp, source, level, target, message, key=value fields, scroll position, source filter |
347+
| `crates/openshell-tui/Cargo.toml` | Crate manifest — dependencies on `openshell-core`, `openshell-bootstrap`, `ratatui`, `crossterm`, `tonic`, `tokio` |
348+
| `crates/openshell-tui/src/lib.rs` | Entry point. Event loop, gRPC calls (`refresh_health`, `refresh_sandboxes`, `spawn_log_stream`, `handle_sandbox_delete`), gateway switching, mTLS channel building |
349+
| `crates/openshell-tui/src/app.rs` | `App` state struct, `Screen`/`Focus`/`InputMode`/`LogSourceFilter` enums, `LogLine` struct, `GatewayEntry`, all key handling logic |
350+
| `crates/openshell-tui/src/event.rs` | `Event` enum (`Key`, `Mouse`, `Tick`, `Resize`, `LogLines`), `EventHandler` with mpsc channels and crossterm polling |
351+
| `crates/openshell-tui/src/theme.rs` | `colors` module (NVIDIA_GREEN, EVERGLADE, BG, FG) and `styles` module (all `Style` constants) |
352+
| `crates/openshell-tui/src/ui/mod.rs` | Top-level `draw()` dispatcher, `draw_title_bar`, `draw_nav_bar`, `draw_command_bar`, screen routing |
353+
| `crates/openshell-tui/src/ui/dashboard.rs` | Dashboard screen — gateway list table (top) + sandbox table (bottom) |
354+
| `crates/openshell-tui/src/ui/sandboxes.rs` | Reusable sandbox table widget with columns: Name, Status, Created, Age, Image |
355+
| `crates/openshell-tui/src/ui/sandbox_detail.rs` | Sandbox detail view — name, status, image, created, age, delete confirmation dialog |
356+
| `crates/openshell-tui/src/ui/sandbox_logs.rs` | Structured log viewer — timestamp, source, level, target, message, key=value fields, scroll position, source filter |
357357

358358
### Module dependency flow
359359

@@ -374,27 +374,27 @@ lib.rs (event loop, gRPC, async tasks)
374374

375375
### Dependency constraints
376376

377-
- **`navigator-tui` cannot depend on `navigator-cli`** — this would create a circular dependency. TLS channel building for gateway switching is done directly in `lib.rs` using `tonic::transport` primitives (`Certificate`, `Identity`, `ClientTlsConfig`, `Endpoint`).
377+
- **`openshell-tui` cannot depend on `openshell-cli`** — this would create a circular dependency. TLS channel building for gateway switching is done directly in `lib.rs` using `tonic::transport` primitives (`Certificate`, `Identity`, `ClientTlsConfig`, `Endpoint`).
378378
- mTLS certs are read from `~/.config/openshell/gateways/<name>/mtls/` (ca.crt, tls.crt, tls.key).
379379

380380
### Proto generated code
381381

382-
Proto types come from `navigator-core` which generates them from `OUT_DIR` via `include!`. They are **not** checked into the repo. Import paths look like:
382+
Proto types come from `openshell-core` which generates them from `OUT_DIR` via `include!`. They are **not** checked into the repo. Import paths look like:
383383

384384
```rust
385-
use navigator_core::proto::navigator_client::NavigatorClient;
386-
use navigator_core::proto::{ListSandboxesRequest, GetSandboxLogsRequest, ...};
385+
use openshell_core::proto::openshell_client::OpenShellClient;
386+
use openshell_core::proto::{ListSandboxesRequest, GetSandboxLogsRequest, ...};
387387
```
388388

389389
### Proto field gotchas
390390

391391
- `DeleteSandboxRequest` uses the `name` field (not `id`):
392392
```rust
393-
let req = navigator_core::proto::DeleteSandboxRequest { name: sandbox_name };
393+
let req = openshell_core::proto::DeleteSandboxRequest { name: sandbox_name };
394394
```
395395
- `WatchSandboxRequest` has extra fields beyond what you might need — always use `..Default::default()`:
396396
```rust
397-
let req = navigator_core::proto::WatchSandboxRequest {
397+
let req = openshell_core::proto::WatchSandboxRequest {
398398
id: sandbox_id,
399399
follow_status: false,
400400
follow_logs: true,
@@ -441,7 +441,7 @@ The connect timeout for cluster switching is 10 seconds with HTTP/2 keepalive at
441441

442442
```bash
443443
# Build the crate
444-
cargo build -p navigator-tui
444+
cargo build -p openshell-tui
445445

446446
# Run the TUI against the active cluster
447447
mise run term
@@ -450,10 +450,10 @@ mise run term
450450
mise run term:dev
451451

452452
# Format
453-
cargo fmt -p navigator-tui
453+
cargo fmt -p openshell-tui
454454

455455
# Lint
456-
cargo clippy -p navigator-tui
456+
cargo clippy -p openshell-tui
457457
```
458458

459459
### Pre-commit
@@ -480,7 +480,7 @@ kubectl delete pod <pod-name> -n <namespace>
480480

481481
### Adding a new gRPC call
482482

483-
1. Check the proto definitions in `navigator-core` for available RPCs and message types.
483+
1. Check the proto definitions in `openshell-core` for available RPCs and message types.
484484
2. Add the call in `lib.rs` following the existing pattern (timeout wrapper, error handling, state update).
485485
3. If the call is triggered by a key press, add a `pending_*` flag to `App` and handle it in the event loop.
486486
4. If the call returns streaming data, spawn it as a background task and send results via `Event` variants.

0 commit comments

Comments
 (0)