-
Notifications
You must be signed in to change notification settings - Fork 0
Add GitForge README, .gitignore and initial Tauri + MCP/UI skeleton #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nanocubit
wants to merge
1
commit into
master
Choose a base branch
from
codex/review-technical-specifications-for-gitforge-v2.0
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "name": "GitForge MCP IDE", | ||
| "image": "mcr.microsoft.com/devcontainers/rust:1-bullseye", | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/node:1": { "version": "20.18" }, | ||
| "ghcr.io/devcontainers/features/rust-debugger": {} | ||
| }, | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "rust-lang.rust-analyzer", | ||
| "tauri-apps.tauri-vscode", | ||
| "Vue.volar", | ||
| "ms-vscode.vscode-json" | ||
| ] | ||
| } | ||
| }, | ||
| "forwardPorts": [1420, 6767] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Rust / Cargo | ||
| /target | ||
| **/*.rs.bk | ||
| Cargo.lock | ||
|
|
||
| # Tauri | ||
| src-tauri/target | ||
| src-tauri/gen | ||
|
|
||
| # Node / frontend | ||
| node_modules | ||
| dist | ||
| .vite | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| pnpm-debug.log* | ||
|
|
||
| # IDE / editor | ||
| .vscode | ||
| .idea | ||
| *.swp | ||
| *.swo | ||
| .DS_Store | ||
|
|
||
| # Local runtime data | ||
| *.db | ||
| *.db-shm | ||
| *.db-wal | ||
| *.sqlite | ||
| *.sqlite3 | ||
| *.log | ||
| .env | ||
| .env.* | ||
|
|
||
| # Test/temp artifacts | ||
| coverage | ||
| *.lcov | ||
| /tmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| [package] | ||
| name = "gitforge" | ||
| version = "2.0.0" | ||
| edition = "2021" | ||
| description = "Forge your Git workflow — MCP Git IDE + AI Agent" | ||
|
|
||
| [[bin]] | ||
| name = "gitforge" | ||
| path = "src/bin/gitforge.rs" | ||
|
|
||
| [dependencies] | ||
| tauri = { version = "2.0", features = ["api-all", "webview"] } | ||
| git2 = "0.18" | ||
| serde = { version = "1.0", features = ["derive"] } | ||
| serde_json = "1.0" | ||
| tokio-tungstenite = { version = "0.23", features = ["rustls-tls-webpki-roots"] } | ||
| tokio = { version = "1.0", features = ["full"] } | ||
| async-tungstenite = "0.23" | ||
| rusqlite = { version = "0.31", features = ["bundled"] } | ||
| redb = "1.1" | ||
| clap = { version = "4.0", features = ["derive"] } | ||
| anyhow = "1.0" | ||
| futures-util = "0.3" | ||
|
|
||
| [build-dependencies] | ||
| tauri-build = "2.0" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # GitForge | ||
|
|
||
| > Forge your Git workflow — MCP-native desktop IDE with local AI agent and terminal-first flow. | ||
|
|
||
| GitForge is a compact desktop Git workspace that combines editor, terminal, PR management, browser panel, and MCP server in one app. The goal is to reduce context switching between VS Code, terminal, Git hosting UI, and AI assistant tools. | ||
|
|
||
| ## Repository Description (for GitHub) | ||
|
|
||
| **Short description:** | ||
|
|
||
| `MCP-native Git IDE (Tauri + Vue) with libgit2 terminal workflow, local voice agent, and 5-panel workspace.` | ||
|
|
||
| ## Core Features | ||
|
|
||
| - **MCP JSON-RPC server** for Claude/Cursor/GPT integrations (`tools/list`, `git_status`, `git_commit`, PR/worktree methods). | ||
| - **Terminal Terminator direction**: git operations routed through `libgit2` backend APIs. | ||
| - **5-panel workspace UI**: Files, Editor, Terminal, PR panel, Browser panel. | ||
| - **Local BPGT agent memory** backed by `redb`. | ||
| - **SQLite metadata layer** for PRs and worktree tracking. | ||
|
|
||
| ## Tech Stack | ||
|
|
||
| - **Desktop shell:** Tauri (Rust) | ||
| - **Backend:** Rust + git2 + rusqlite + redb + tokio/tungstenite | ||
| - **Frontend:** Vue 3 | ||
| - **Protocol:** MCP-style JSON-RPC over WebSocket | ||
|
|
||
| ## Current Status | ||
|
|
||
| This repository is at **MVP foundation** stage: | ||
|
|
||
| - backend MCP methods are implemented for core git/pr/worktree flows; | ||
| - UI is implemented as an interactive MVP shell; | ||
| - production hardening (security, full E2E, packaging/release pipeline) is still in progress. | ||
|
|
||
| ## Local Development | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| - Rust toolchain (stable) | ||
| - Node.js 20+ | ||
| - npm | ||
|
|
||
| ### Quick start | ||
|
|
||
| ```bash | ||
| # frontend deps | ||
| cd gitforge | ||
| npm install | ||
|
|
||
| # rust format check | ||
| cargo fmt --all -- --check | ||
|
|
||
| # tests (when crates.io access is available) | ||
| cargo test | ||
| ``` | ||
|
|
||
| ## High-priority Next Steps | ||
|
|
||
| 1. Wire Vue panels to real Tauri `invoke` calls (remove mock data paths). | ||
| 2. Add MCP contract/integration tests for all methods and edge-cases. | ||
| 3. Implement secure command execution policy for terminal routing. | ||
| 4. Add release pipeline with signed builds and staged rollout. | ||
|
|
||
| ## License | ||
|
|
||
| TBD (set before public release). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| GitForge — MCP-native Git IDE built with Tauri + Vue: 5-column workspace (Files, Monaco, Terminal, PR, Browser), libgit2-powered terminal workflow, local BPGT voice agent, and JSON-RPC MCP server for Claude/Cursor/GPT integration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "name": "gitforge-ui", | ||
| "version": "2.0.0", | ||
| "private": true, | ||
| "scripts": { | ||
| "dev": "vite", | ||
| "build": "vite build" | ||
| }, | ||
| "dependencies": { | ||
| "vue": "^3.4.0", | ||
| "xterm": "^5.5.0", | ||
| "xterm-addon-fit": "^0.10.0" | ||
| }, | ||
| "devDependencies": { | ||
| "vite": "^5.0.0" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| use redb::{Database, ReadableTable, TableDefinition}; | ||
| use serde::{Deserialize, Serialize}; | ||
|
|
||
| const MEMORY_TABLE: TableDefinition<&str, &str> = TableDefinition::new("agent_memory"); | ||
|
|
||
| pub struct BpgtAgent { | ||
| db: Database, | ||
| model: Option<String>, | ||
| } | ||
|
|
||
| #[derive(Serialize, Deserialize)] | ||
| pub struct AgentMemory { | ||
| pub context: String, | ||
| pub last_commands: Vec<String>, | ||
| pub repo_state: String, | ||
| } | ||
|
|
||
| #[derive(Debug, Clone, Copy)] | ||
| enum VoiceIntent { | ||
| Status, | ||
| Commit, | ||
| CreatePr, | ||
| ToolsList, | ||
| } | ||
|
|
||
| impl BpgtAgent { | ||
| pub fn new(db_path: &str) -> Self { | ||
| let db = Database::create(db_path).expect("failed to create redb db"); | ||
| { | ||
| let write_txn = db.begin_write().expect("failed to begin write transaction"); | ||
| { | ||
| let _ = write_txn | ||
| .open_table(MEMORY_TABLE) | ||
| .expect("failed to open memory table"); | ||
| } | ||
| write_txn.commit().expect("failed to commit memory table creation"); | ||
| } | ||
|
|
||
| Self { db, model: None } | ||
| } | ||
|
|
||
| pub async fn process_voice(&self, text: &str) -> Result<String, String> { | ||
| let _active_model = self.model.as_deref().unwrap_or("bgpt-fallback"); | ||
| let intent = self.parse_intent(text); | ||
| let method = match intent { | ||
| VoiceIntent::Status => "git_status", | ||
| VoiceIntent::Commit => "git_commit", | ||
| VoiceIntent::CreatePr => "git_create_pr", | ||
| VoiceIntent::ToolsList => "tools/list", | ||
| }; | ||
|
|
||
| self.persist_last_command(method)?; | ||
| Ok(method.to_string()) | ||
| } | ||
|
|
||
| fn parse_intent(&self, text: &str) -> VoiceIntent { | ||
| let lowered = text.to_lowercase(); | ||
| if lowered.contains("статус") || lowered.contains("status") { | ||
| VoiceIntent::Status | ||
| } else if lowered.contains("коммит") || lowered.contains("commit") { | ||
| VoiceIntent::Commit | ||
| } else if lowered.contains("пулреквест") || lowered.contains("pr") { | ||
| VoiceIntent::CreatePr | ||
| } else { | ||
| VoiceIntent::ToolsList | ||
| } | ||
| } | ||
|
|
||
| fn persist_last_command(&self, command: &str) -> Result<(), String> { | ||
| let write_txn = self | ||
| .db | ||
| .begin_write() | ||
| .map_err(|e| format!("failed to begin write transaction: {e}"))?; | ||
| { | ||
| let mut table = write_txn | ||
| .open_table(MEMORY_TABLE) | ||
| .map_err(|e| format!("failed to open memory table: {e}"))?; | ||
| table | ||
| .insert("last_command", command) | ||
| .map_err(|e| format!("failed to save memory: {e}"))?; | ||
| } | ||
| write_txn | ||
| .commit() | ||
| .map_err(|e| format!("failed to commit memory: {e}")) | ||
| } | ||
|
|
||
| pub fn last_command(&self) -> Result<Option<String>, String> { | ||
| let read_txn = self | ||
| .db | ||
| .begin_read() | ||
| .map_err(|e| format!("failed to begin read transaction: {e}"))?; | ||
| let table = read_txn | ||
| .open_table(MEMORY_TABLE) | ||
| .map_err(|e| format!("failed to open memory table: {e}"))?; | ||
|
|
||
| let value = table | ||
| .get("last_command") | ||
| .map_err(|e| format!("failed to read memory: {e}"))? | ||
| .map(|v| v.value().to_string()); | ||
|
|
||
| Ok(value) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| use std::sync::Arc; | ||
|
|
||
| mod agent; | ||
| mod mcp { | ||
| pub mod server; | ||
| } | ||
|
|
||
| use agent::BpgtAgent; | ||
| use mcp::server::GitForgeMcp; | ||
|
|
||
| #[tauri::command] | ||
| async fn mcp_call(method: String, params: serde_json::Value, repo_path: String) -> Result<serde_json::Value, String> { | ||
| let server = GitForgeMcp::new(repo_path)?; | ||
| let request = mcp::server::McpRequest { | ||
| jsonrpc: "2.0".to_string(), | ||
| id: serde_json::json!(1), | ||
| method, | ||
| params, | ||
| }; | ||
|
|
||
| let response = { | ||
| let server = Arc::new(server); | ||
| server.execute_mcp_for_tauri(&request).await | ||
| }; | ||
|
|
||
| match response.error { | ||
| Some(err) => Err(err.message), | ||
| None => Ok(response.result.unwrap_or_default()), | ||
| } | ||
| } | ||
|
|
||
| #[tauri::command] | ||
| async fn voice_process(text: String, db_path: String) -> Result<String, String> { | ||
| let agent = BpgtAgent::new(&db_path); | ||
| agent.process_voice(&text).await | ||
| } | ||
|
|
||
| fn main() { | ||
| tauri::Builder::default() | ||
| .invoke_handler(tauri::generate_handler![mcp_call, voice_process]) | ||
| .run(tauri::generate_context!()) | ||
| .expect("error while running tauri application"); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The manifest declares only one binary target (
src/bin/gitforge.rs), so Cargo will not buildsrc-tauri/src/main.rswheremcp_call,voice_process, and the MCP backend wiring live. In this state, the shipped binary cannot run the Tauri/MCP backend code from this commit, and thesrc-tauritests are also excluded from normalcargo testruns.Useful? React with 👍 / 👎.