Compare commits
10 commits
c9927a41e6
...
5d0d5c5f07
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d0d5c5f07 | ||
|
|
719496853e | ||
|
|
92d8ee2c03 | ||
|
|
09463810c4 | ||
|
|
5815943861 | ||
|
|
31fed163d0 | ||
|
|
a7077c7987 | ||
|
|
f9ec78ce1e | ||
|
|
af670871ed | ||
|
|
6938e8c3a9 |
6 changed files with 1699 additions and 97 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[submodule "agent-orchestrator"]
|
||||
path = agent-orchestrator
|
||||
url = git@github.com:DexterFromLab/agent-orchestrator.git
|
||||
53
README.md
53
README.md
|
|
@ -1,6 +1,6 @@
|
|||
# BTerminal
|
||||
|
||||
Terminal with session panel (MobaXterm-style), built with GTK 3 + VTE. Catppuccin Mocha theme.
|
||||
GTK 3 terminal with SSH & Claude Code session management, macros, and a cross-session context database. Catppuccin Mocha theme.
|
||||
|
||||
> **v2 complete, v3 all phases complete.** v2: Multi-session Claude agent dashboard using Tauri 2.x + Svelte 5. v3: Multi-project mission control dashboard (All Phases 1-10 complete + sidebar redesign) -- project groups with per-project Claude sessions, session continuity (persist/restore agent messages), team agents panel, terminal tabs, **VSCode-style left sidebar** (vertical icon rail + expandable drawer panel + always-visible workspace), command palette with group switching. Features: **project groups** (up to 5 projects per group, horizontal layout, adaptive viewport count), **per-project Claude sessions** with session continuity, **team agents panel** (compact subagent cards), **terminal tabs** (shell/SSH/agent per project), agent panes with structured output, tree visualization with subtree cost and session resume, **subagent/agent-teams support**, **multi-machine support** (bterminal-relay WebSocket server + RemoteManager), **Claude profile/account switching** (switcher-claude integration), **skill discovery and autocomplete** (type `/` in agent prompt), SSH session management, ctx context database viewer, SQLite session persistence with layout restore, live markdown file viewer with Shiki syntax highlighting, 17 themes in 3 groups (4 Catppuccin + 7 Editor + 6 Deep Dark: Tokyo Night, Gruvbox Dark, Ayu Dark, Poimandres, Vesper, Midnight), **global font controls** (separate UI font [sans-serif] + terminal font [monospace] with live preview), .deb + AppImage packaging, GitHub Actions CI, 138 vitest + 36 cargo tests. Branch `v2-mission-control`. See [docs/v3-task_plan.md](docs/v3-task_plan.md) for v3 architecture.
|
||||
|
||||
|
|
@ -8,14 +8,21 @@ Terminal with session panel (MobaXterm-style), built with GTK 3 + VTE. Catppucci
|
|||
|
||||
## Features
|
||||
|
||||
- **SSH sessions** — saved configs (host, port, user, key, folder, color), CRUD with side panel
|
||||
- **Claude Code sessions** — saved Claude Code configs with sudo, resume, skip-permissions and initial prompt
|
||||
- **SSH macros** — multi-step macros (text, key, delay) assigned to sessions, run from sidebar
|
||||
- **Tabs** — multiple terminals in tabs, Ctrl+T new, Ctrl+Shift+W close, Ctrl+PageUp/Down switch
|
||||
- **Sudo askpass** — Claude Code with sudo: password entered once, temporary askpass helper, auto-cleanup
|
||||
- **Folder grouping** — SSH and Claude Code sessions can be grouped in folders on the sidebar
|
||||
- **ctx — Context manager** — SQLite-based cross-session context database for Claude Code projects
|
||||
- **Catppuccin Mocha** — full theme: terminal, sidebar, tabs, session colors
|
||||
- **SSH sessions** — saved configs (host, port, user, key, folder, color), one-click connect from sidebar
|
||||
- **Claude Code sessions** — saved configs with sudo askpass, resume, skip-permissions and initial prompt
|
||||
- **SSH macros** — multi-step automation (text, key press, delay) bound to sessions, runnable from sidebar
|
||||
- **Tabs** — multiple terminals in tabs with reordering, auto-close and shell respawn
|
||||
- **Folder grouping** — organize both SSH and Claude Code sessions in collapsible sidebar folders
|
||||
- **Session colors** — 10 Catppuccin accent colors for quick visual identification
|
||||
- **Sudo askpass** — temporary helper for Claude Code sudo mode: password entered once, auto-cleanup on exit
|
||||
- **Catppuccin Mocha** — full theme across terminal, sidebar, tabs, dialogs and scrollbars
|
||||
|
||||
### Context Manager
|
||||
|
||||
- **ctx CLI** — SQLite-based tool for persistent context across Claude Code sessions
|
||||
- **Ctx Manager panel** — sidebar tab for browsing, editing and managing all project contexts
|
||||
- **Ctx Setup Wizard** — step-by-step project setup with auto-detection from README and CLAUDE.md generation
|
||||
- **Import / Export** — selective import and export of projects, entries, summaries and shared context via JSON with checkbox tree UI
|
||||
|
||||
## Installation
|
||||
|
||||
|
|
@ -30,7 +37,7 @@ The installer will:
|
|||
2. Copy files to `~/.local/share/bterminal/`
|
||||
3. Create symlinks: `bterminal` and `ctx` in `~/.local/bin/`
|
||||
4. Initialize context database at `~/.claude-context/context.db`
|
||||
5. Add desktop entry to application menu
|
||||
5. Add desktop entry and icon to application menu
|
||||
|
||||
### v2 Installation (Tauri — build from source)
|
||||
|
||||
|
|
@ -60,23 +67,37 @@ bterminal
|
|||
|
||||
## Context Manager (ctx)
|
||||
|
||||
`ctx` is a SQLite-based tool for managing persistent context across Claude Code sessions.
|
||||
`ctx` is a SQLite-based tool for managing persistent context across Claude Code sessions. It uses FTS5 full-text search and WAL journal mode.
|
||||
|
||||
```bash
|
||||
ctx init myproject "Project description" /path/to/project
|
||||
ctx get myproject # Load full context (shared + project)
|
||||
ctx get myproject # Load project context
|
||||
ctx get myproject --shared # Include shared context
|
||||
ctx set myproject key "value" # Save a context entry
|
||||
ctx shared set preferences "value" # Save shared context (available in all projects)
|
||||
ctx append myproject key "more" # Append to existing entry
|
||||
ctx shared set preferences "value" # Save shared context (all projects)
|
||||
ctx summary myproject "What was done" # Save session summary
|
||||
ctx search "query" # Full-text search across everything
|
||||
ctx list # List all projects
|
||||
ctx history myproject # Show session history
|
||||
ctx export # Export all data as JSON
|
||||
ctx delete myproject [key] # Delete project or entry
|
||||
ctx --help # All commands
|
||||
```
|
||||
|
||||
### Ctx Manager Panel
|
||||
|
||||
The sidebar **Ctx** tab provides a GUI for the context database:
|
||||
|
||||
- Browse all projects and their entries in a tree view
|
||||
- View entry values and project details in the detail pane
|
||||
- Add, edit and delete projects and entries
|
||||
- **Export** — select specific projects, entries, summaries and shared context to save as JSON
|
||||
- **Import** — load a JSON file, preview contents with checkboxes, optionally overwrite existing entries
|
||||
|
||||
### Integration with Claude Code
|
||||
|
||||
Add a `CLAUDE.md` to your project root:
|
||||
Add a `CLAUDE.md` to your project root (the Ctx Setup Wizard can generate this automatically):
|
||||
|
||||
```markdown
|
||||
On session start, load context:
|
||||
|
|
@ -94,8 +115,8 @@ Config files in `~/.config/bterminal/`:
|
|||
|
||||
| File | Description |
|
||||
|------|-------------|
|
||||
| `sessions.json` | Saved SSH sessions + macros |
|
||||
| `claude_sessions.json` | Saved Claude Code configs |
|
||||
| `sessions.json` | SSH sessions and macros |
|
||||
| `claude_sessions.json` | Claude Code session configs |
|
||||
|
||||
Context database: `~/.claude-context/context.db`
|
||||
|
||||
|
|
|
|||
10
TODO.md
10
TODO.md
|
|
@ -2,12 +2,18 @@
|
|||
|
||||
## Active
|
||||
|
||||
### Migration to agent-orchestrator
|
||||
- [ ] **Review Dexter's 13 feature commits** -- hib_changes rebased onto dexter_changes (55ba8d0). Need to review: Aider provider, splash screen, provider/model unification, Tier 2 btmsg access, auto-wake on btmsg. Then push hib_changes and start working from agent-orchestrator repo.
|
||||
- [ ] **CLAUDE.md Commit Zero** -- Update agent-orchestrator's CLAUDE.md to reflect rebrand + new features. Update docs/ accordingly.
|
||||
- [ ] **Switch primary development to agent-orchestrator** -- After review + CLAUDE.md update, develop on hib_changes in agent-orchestrator. BTerminal repo stays for v1 production only.
|
||||
|
||||
### v3.1 Remaining
|
||||
- [ ] **Multi-machine real-world testing** -- TLS added to relay. Needs real 2-machine test. Multi-machine UI not surfaced in v3, code exists in bridges/stores only.
|
||||
- [ ] **Certificate pinning** -- TLS encryption done (v3.0). Pin cert hash in RemoteManager for v3.1.
|
||||
- [ ] **Agent Teams real-world testing** -- Subagent delegation prompt fix done + env var injection. Needs real multi-agent session to verify Manager spawns child agents.
|
||||
- [ ] **Plugin sandbox migration** -- `new Function()` has inherent escape vectors (prototype walking, arguments.callee.constructor). Consider Web Worker isolation for v3.2.
|
||||
- [ ] **Soak test** -- Run 4-hour soak with 6+ agents across 3+ projects. Monitor memory, SQLite WAL size, xterm.js instances.
|
||||
- [ ] **E2E agent tests hang in nested Claude sessions** -- B4/B5 phase-b tests timeout when run from within a Claude Code session (sidecar spawns Claude CLI which hangs in git repo context). Works in CI. Investigate process isolation or session nesting guard.
|
||||
|
||||
## Completed
|
||||
|
||||
|
|
@ -20,7 +26,3 @@
|
|||
- [x] **Reviewer agent role** -- Tier 1 specialist with role='reviewer'. Reviewer workflow in agent-prompts.ts (8-step process). #review-queue/#review-log auto-channels. reviewQueueDepth in attention scoring (10pts/task, cap 50). 388 vitest + 76 cargo. | Done: 2026-03-12
|
||||
- [x] **Auto-wake Manager** -- wake-scheduler.svelte.ts + wake-scorer.ts (24 tests). 3 strategies: persistent/on-demand/smart. 6 signals. Settings UI. 381 vitest + 72 cargo. | Done: 2026-03-12
|
||||
- [x] **Dashboard metrics panel** -- MetricsPanel.svelte: live health + task board summary + SVG sparkline history. 25 tests. 357 vitest + 72 cargo. | Done: 2026-03-12
|
||||
- [x] **Brand Dexter's new types (SOLID Phase 3b)** -- GroupId + AgentId branded types. Applied to ~40 sites. 332 vitest + 72 cargo. | Done: 2026-03-11
|
||||
- [x] **Regression tests + sidecar env security** -- 49 new tests. Added ANTHROPIC_* to Rust env strip. 327 vitest + 72 cargo. | Done: 2026-03-11
|
||||
- [x] **Integrate dexter_changes + fix 5 critical bugs** -- Fixed: btmsg.rs column index, btmsg-bridge camelCase, GroupAgentsPanel stopPropagation, ArchitectureTab PlantUML, TestingTab Tauri 2.x. | Done: 2026-03-11
|
||||
- [x] **SOLID Phase 3 — Primitive obsession** -- Branded types SessionId/ProjectId. Applied to ~130 sites. 293 vitest + 49 cargo. | Done: 2026-03-11
|
||||
|
|
|
|||
1
agent-orchestrator
Submodule
1
agent-orchestrator
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 55ba8d0969b4c9e34e47fe621ea4812528441365
|
||||
1676
bterminal.py
1676
bterminal.py
File diff suppressed because it is too large
Load diff
17
ctx
17
ctx
|
|
@ -103,19 +103,18 @@ def cmd_init(args):
|
|||
|
||||
|
||||
def cmd_get(args):
|
||||
"""Get full context for a project (shared + project-specific + recent summaries)."""
|
||||
"""Get full context for a project (project-specific + recent summaries).
|
||||
Use --shared flag to also include shared context."""
|
||||
if len(args) < 1:
|
||||
print("Usage: ctx get <project>")
|
||||
print("Usage: ctx get <project> [--shared]")
|
||||
sys.exit(1)
|
||||
project = args[0]
|
||||
show_shared = "--shared" in args
|
||||
db = get_db()
|
||||
|
||||
# Session info
|
||||
session = db.execute("SELECT * FROM sessions WHERE name = ?", (project,)).fetchone()
|
||||
|
||||
# Shared context
|
||||
shared = db.execute("SELECT key, value FROM shared ORDER BY key").fetchall()
|
||||
|
||||
# Project context
|
||||
contexts = db.execute(
|
||||
"SELECT key, value FROM contexts WHERE project = ? ORDER BY key", (project,)
|
||||
|
|
@ -137,6 +136,8 @@ def cmd_get(args):
|
|||
print(f"PROJECT: {project} (not registered, use: ctx init)")
|
||||
print("=" * 60)
|
||||
|
||||
if show_shared:
|
||||
shared = db.execute("SELECT key, value FROM shared ORDER BY key").fetchall()
|
||||
if shared:
|
||||
print("\n--- Shared Context ---")
|
||||
for row in shared:
|
||||
|
|
@ -155,8 +156,8 @@ def cmd_get(args):
|
|||
print(f"\n[{row['created_at']}]")
|
||||
print(row["summary"])
|
||||
|
||||
if not shared and not contexts and not summaries:
|
||||
print("\nNo context stored yet. Use 'ctx set' or 'ctx shared set' to add.")
|
||||
if not contexts and not summaries:
|
||||
print("\nNo context stored yet. Use 'ctx set' to add project context.")
|
||||
|
||||
db.close()
|
||||
|
||||
|
|
@ -444,7 +445,7 @@ def print_help():
|
|||
print("ctx — Cross-session context manager for Claude Code\n")
|
||||
print("Commands:")
|
||||
print(" init <project> <desc> [dir] Register a new project")
|
||||
print(" get <project> Load full context (shared + project)")
|
||||
print(" get <project> [--shared] Load project context (optionally with shared)")
|
||||
print(" set <project> <key> <value> Set project context entry")
|
||||
print(" append <project> <key> <val> Append to existing entry")
|
||||
print(" shared get|set|delete Manage shared context")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue