@bibobonking/opensol 3.0.3 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build.yml +60 -8
- package/CHANGELOG.md +21 -0
- package/README.md +2 -2
- package/desktop/README.md +39 -0
- package/desktop/loading/index.html +36 -0
- package/desktop/src-tauri/Cargo.lock +4301 -0
- package/desktop/src-tauri/Cargo.toml +23 -0
- package/desktop/src-tauri/binaries/.gitkeep +0 -0
- package/desktop/src-tauri/build.rs +3 -0
- package/desktop/src-tauri/capabilities/default.json +7 -0
- package/desktop/src-tauri/icons/128x128.png +0 -0
- package/desktop/src-tauri/icons/128x128@2x.png +0 -0
- package/desktop/src-tauri/icons/32x32.png +0 -0
- package/desktop/src-tauri/icons/64x64.png +0 -0
- package/desktop/src-tauri/icons/Square107x107Logo.png +0 -0
- package/desktop/src-tauri/icons/Square142x142Logo.png +0 -0
- package/desktop/src-tauri/icons/Square150x150Logo.png +0 -0
- package/desktop/src-tauri/icons/Square284x284Logo.png +0 -0
- package/desktop/src-tauri/icons/Square30x30Logo.png +0 -0
- package/desktop/src-tauri/icons/Square310x310Logo.png +0 -0
- package/desktop/src-tauri/icons/Square44x44Logo.png +0 -0
- package/desktop/src-tauri/icons/Square71x71Logo.png +0 -0
- package/desktop/src-tauri/icons/Square89x89Logo.png +0 -0
- package/desktop/src-tauri/icons/StoreLogo.png +0 -0
- package/desktop/src-tauri/icons/icon.icns +0 -0
- package/desktop/src-tauri/icons/icon.ico +0 -0
- package/desktop/src-tauri/icons/icon.png +0 -0
- package/desktop/src-tauri/src/lib.rs +210 -0
- package/desktop/src-tauri/src/main.rs +6 -0
- package/desktop/src-tauri/tauri.conf.json +48 -0
- package/dist/assets/index-CeN54A2N.css +1 -0
- package/dist/assets/index-fhIO9a7_.js +318 -0
- package/dist/index.html +4 -4
- package/index.html +2 -2
- package/package.json +2 -1
- package/server/README.md +2 -2
- package/server/daemon.mjs +138 -2
- package/server/lib/mcp-oauth.mjs +219 -0
- package/server/lib/mcp-oauth.test.mjs +175 -0
- package/server/lib/mcp.mjs +899 -0
- package/server/lib/mcp.test.mjs +46 -0
- package/server/lib/store.mjs +22 -0
- package/server/lib/tools.mjs +59 -1
- package/src/App.tsx +2 -0
- package/src/agent/tools.ts +6 -5
- package/src/components/CommandPalette.tsx +14 -1
- package/src/components/Composer.tsx +22 -38
- package/src/components/DiffView.tsx +98 -0
- package/src/components/Logo.tsx +1 -1
- package/src/components/McpPanel.tsx +687 -0
- package/src/components/MessageItem.tsx +62 -13
- package/src/components/ModelDeck.tsx +661 -0
- package/src/components/SessionsTab.tsx +206 -0
- package/src/components/SettingsModal.tsx +146 -71
- package/src/components/Sidebar.tsx +79 -24
- package/src/components/Splash.tsx +1 -1
- package/src/components/ToolCallCard.tsx +29 -7
- package/src/components/WorkspacePanel.tsx +16 -1
- package/src/core/kernel.ts +2 -0
- package/src/core/mcp-tools.ts +63 -0
- package/src/core/plugins/tools/fs.ts +24 -3
- package/src/core/services/agent-loop.ts +3 -1
- package/src/core/services/approval.ts +2 -1
- package/src/core/services/titles.ts +135 -0
- package/src/core/services/tools.ts +11 -8
- package/src/core/types.ts +4 -0
- package/src/data/providers.ts +1 -1
- package/src/index.css +97 -1
- package/src/lib/daemon.ts +38 -0
- package/src/lib/diff.ts +62 -0
- package/src/lib/mcp-config.test.mjs +47 -0
- package/src/lib/mcp-config.ts +203 -0
- package/src/lib/permissions.ts +6 -6
- package/src/store/chats.ts +9 -1
- package/src/store/mcp.ts +94 -0
- package/src/store/settings.ts +10 -7
- package/src/store/ui.ts +17 -0
- package/src/store/workspace.ts +26 -0
- package/src/types.ts +63 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/assets/index-BmN7pBji.css +0 -1
- package/dist/assets/index-DgNDjkOz.js +0 -301
- package/src/components/ModelPicker.tsx +0 -487
|
@@ -1,25 +1,77 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: OpenSol Desktop
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
4
|
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
tags: ['v*']
|
|
7
7
|
|
|
8
8
|
jobs:
|
|
9
9
|
build:
|
|
10
|
-
|
|
10
|
+
strategy:
|
|
11
|
+
fail-fast: false
|
|
12
|
+
matrix:
|
|
13
|
+
include:
|
|
14
|
+
- os: ubuntu-22.04
|
|
15
|
+
label: linux-x64
|
|
16
|
+
- os: windows-latest
|
|
17
|
+
label: windows-x64
|
|
18
|
+
- os: macos-latest
|
|
19
|
+
label: macos-arm64
|
|
20
|
+
- os: macos-13
|
|
21
|
+
label: macos-x64
|
|
22
|
+
runs-on: ${{ matrix.os }}
|
|
11
23
|
steps:
|
|
12
24
|
- uses: actions/checkout@v4
|
|
13
25
|
- uses: actions/setup-node@v4
|
|
14
26
|
with:
|
|
15
27
|
node-version: 22
|
|
16
28
|
cache: npm
|
|
29
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
30
|
+
- uses: swatinem/rust-cache@v2
|
|
31
|
+
with:
|
|
32
|
+
workspaces: desktop/src-tauri
|
|
33
|
+
- name: Linux system libraries
|
|
34
|
+
if: runner.os == 'Linux'
|
|
35
|
+
run: |
|
|
36
|
+
sudo apt-get update
|
|
37
|
+
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libssl-dev patchelf
|
|
17
38
|
- run: npm ci
|
|
18
|
-
- run: npm run typecheck
|
|
19
|
-
- run: npm test
|
|
20
39
|
- run: npm run build
|
|
21
|
-
-
|
|
40
|
+
- name: Upload web build (dist)
|
|
41
|
+
if: matrix.label == 'linux-x64'
|
|
42
|
+
uses: actions/upload-artifact@v4
|
|
22
43
|
with:
|
|
23
|
-
name: dist
|
|
44
|
+
name: opensol-web-dist
|
|
24
45
|
path: dist
|
|
25
46
|
if-no-files-found: error
|
|
47
|
+
- name: Bundle the Node.js sidecar
|
|
48
|
+
run: node desktop/scripts/prepare-sidecar.mjs
|
|
49
|
+
- name: Build installers
|
|
50
|
+
working-directory: desktop
|
|
51
|
+
run: npx --yes @tauri-apps/cli@2 build
|
|
52
|
+
- uses: actions/upload-artifact@v4
|
|
53
|
+
with:
|
|
54
|
+
name: opensol-desktop-${{ matrix.label }}
|
|
55
|
+
path: |
|
|
56
|
+
desktop/src-tauri/target/release/bundle/deb/*.deb
|
|
57
|
+
desktop/src-tauri/target/release/bundle/appimage/*.AppImage
|
|
58
|
+
desktop/src-tauri/target/release/bundle/rpm/*.rpm
|
|
59
|
+
desktop/src-tauri/target/release/bundle/msi/*.msi
|
|
60
|
+
desktop/src-tauri/target/release/bundle/nsis/*.exe
|
|
61
|
+
desktop/src-tauri/target/release/bundle/dmg/*.dmg
|
|
62
|
+
if-no-files-found: error
|
|
63
|
+
|
|
64
|
+
release:
|
|
65
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
66
|
+
needs: build
|
|
67
|
+
runs-on: ubuntu-22.04
|
|
68
|
+
permissions:
|
|
69
|
+
contents: write
|
|
70
|
+
steps:
|
|
71
|
+
- uses: actions/download-artifact@v4
|
|
72
|
+
with:
|
|
73
|
+
path: dist-desktop
|
|
74
|
+
merge-multiple: true
|
|
75
|
+
- uses: softprops/action-gh-release@v2
|
|
76
|
+
with:
|
|
77
|
+
files: dist-desktop/*
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 3.1.0
|
|
4
|
+
|
|
5
|
+
**New**
|
|
6
|
+
- **MCP panel + OAuth** — MCP has its own panel (sidebar → MCP, Settings → MCP → Open MCP panel, or Ctrl/⌘ K) instead of living inside Settings: server list, edit-in-place, templates, tool filter and **Import JSON** (Claude Desktop / Cursor / VS Code `mcpServers`). Remote servers can use **OAuth 2.1** (discovery, dynamic client registration, PKCE, automatic refresh; tokens stay in the encrypted secrets file) and there is a third connection type, legacy **HTTP+SSE**, next to stdio and Streamable HTTP. See `server/lib/mcp-oauth.mjs`.
|
|
7
|
+
- **MCP connect** — Add local (stdio) or remote (Streamable HTTP) Model Context Protocol servers; their tools reach the agent as `mcp__<server>__<tool>`. Per-server approval (ask / auto), per-tool switches, secrets masked in the UI. The daemon owns every connection (`server/lib/mcp.mjs`).
|
|
8
|
+
- **Remove workspace** — trash button on each workspace in the sidebar (removes it from the list; the folder stays on disk).
|
|
9
|
+
- **Sessions tab** — new tab in the workspace panel: sessions of the open workspace (or all), with rename, AI title and delete. New sessions record the workspace they started in.
|
|
10
|
+
- **AI session titles** — after the first answer the model names the session (Settings → General turns it off). "Name with AI" in the session menu regenerates a title; names you type are never overwritten.
|
|
11
|
+
- **Edit stats** — file edits show `+added −removed` and where the change starts (`L42:7`), with a mini diff in the tool card; the task header and the Undo bar show the turn total.
|
|
12
|
+
- **OpenSol Desktop** — Tauri app (`desktop/`) using the OS webview: WebKitGTK (Linux), WebView2 (Windows 10/11), WKWebView (macOS). The web version is unchanged. See `desktop/README.md`.
|
|
13
|
+
|
|
14
|
+
**Changed**
|
|
15
|
+
- Brand name is now **OpenSoftX** (the app is still OpenSol).
|
|
16
|
+
- Model Deck: the provider highlight no longer drifts off its button and the active provider scrolls into view.
|
|
17
|
+
- Thoughts are closed by default, also while the model is still thinking.
|
|
18
|
+
- New **Model Deck** replaces the dropdown picker: centered overlay, provider rail, context bars, and a draggable effort throttle; the composer shows live effort bars. `Ctrl/⌘ M` opens it.
|
|
19
|
+
- Redesigned Settings: numbered rail with a sliding pill, large section headers, card layout.
|
|
20
|
+
- More motion: spring knob, staggered rows, blur-in titles, diff rows, tool rows. All of it respects `prefers-reduced-motion`.
|
|
21
|
+
- Daemon now persists `chatFontSize`, `workDetail` and `autoCollapseWork` (they were dropped before).
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenSol
|
|
2
2
|
|
|
3
|
-
A local-first AI coding agent by
|
|
3
|
+
A local-first AI coding agent by OpenSoftX. OpenSol pairs a warm React chat interface with a zero-dependency Node daemon that owns the real workspace, shell, git, search, deploy and provider credentials on your machine.
|
|
4
4
|
|
|
5
5
|
The daemon binds to `127.0.0.1` only. It serves the prebuilt app from `dist/` and stores everything under `~/.maxcode`. API keys and hosting tokens are encrypted with AES-256-GCM using a local `master.key`; the browser only ever receives a masked hint.
|
|
6
6
|
|
|
@@ -64,7 +64,7 @@ OpenCode free-tier models only work inside OpenCode itself, so they are hidden h
|
|
|
64
64
|
- `secrets.enc` and `master.key` are created with mode `600`.
|
|
65
65
|
- All API routes require the local session cookie and a CSRF header; Host and Origin are checked.
|
|
66
66
|
- The daemon rejects code execution outside the selected workspace except for an explicit, existing deploy folder.
|
|
67
|
-
- No telemetry or
|
|
67
|
+
- No telemetry or OpenSoftX-hosted proxy. Provider requests go directly from the daemon to the provider you configured.
|
|
68
68
|
|
|
69
69
|
## Stack
|
|
70
70
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# OpenSol Desktop
|
|
2
|
+
|
|
3
|
+
OpenSol Desktop is the same OpenSol app in a native window. It uses each operating
|
|
4
|
+
system's own webview instead of bundling a browser:
|
|
5
|
+
|
|
6
|
+
| OS | Webview | Installer |
|
|
7
|
+
|---|---|---|
|
|
8
|
+
| Linux | WebKitGTK 4.1 | `.deb`, `.AppImage` |
|
|
9
|
+
| Windows 10 / 11 | Microsoft WebView2 (installed on demand on Windows 10) | `.exe` (NSIS), `.msi` |
|
|
10
|
+
| macOS 11+ | WKWebView | `.dmg` (Apple Silicon and Intel) |
|
|
11
|
+
|
|
12
|
+
The web version (`npm start`, `dist/`) is unchanged and still works. Desktop and web share the
|
|
13
|
+
same data folder (`~/.opensol`), so keys, chats and settings are the same in both.
|
|
14
|
+
|
|
15
|
+
## How it works
|
|
16
|
+
|
|
17
|
+
1. The window opens a small loading page.
|
|
18
|
+
2. If an OpenSol daemon of the same version already runs on `127.0.0.1:4174` it is reused.
|
|
19
|
+
Otherwise the app starts its own daemon with a bundled Node.js (`opensol-node`) on a free port.
|
|
20
|
+
3. The window navigates to the daemon. Links to other sites open in your default browser.
|
|
21
|
+
4. When you close the window, a daemon that the app started is stopped.
|
|
22
|
+
|
|
23
|
+
## Build it yourself
|
|
24
|
+
|
|
25
|
+
Requirements: Node 22+, Rust (stable), and the Tauri prerequisites for your OS
|
|
26
|
+
(<https://tauri.app/start/prerequisites/>). From the repository root:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm ci
|
|
30
|
+
npm run build # the web app → dist/
|
|
31
|
+
node desktop/scripts/prepare-sidecar.mjs # copies this machine's Node as the sidecar
|
|
32
|
+
cd desktop && npx @tauri-apps/cli@2 build
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Installers appear in `desktop/src-tauri/target/release/bundle/`. Each OS has to be built on that
|
|
36
|
+
OS (Windows installers on Windows, macOS on macOS); `.github/workflows/desktop.yml` does all four
|
|
37
|
+
on GitHub Actions when you push a `v*` tag or run it manually.
|
|
38
|
+
|
|
39
|
+
For a quick run from source: `cd desktop/src-tauri && cargo run` (needs `dist/` built).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>OpenSol</title>
|
|
7
|
+
<style>
|
|
8
|
+
:root { color-scheme: light dark; --bg:#f8f8f6; --ink:#171715; --muted:#62625d; --accent:#d97706; }
|
|
9
|
+
@media (prefers-color-scheme: dark) { :root { --bg:#0f0f0e; --ink:#edede9; --muted:#a0a099; --accent:#f59e0b; } }
|
|
10
|
+
html,body{height:100%;margin:0;background:var(--bg);color:var(--ink);font:14px system-ui,-apple-system,"Segoe UI",sans-serif}
|
|
11
|
+
body{display:grid;place-items:center}
|
|
12
|
+
.box{text-align:center;animation:in .6s cubic-bezier(.16,1,.3,1) both}
|
|
13
|
+
.orb{width:46px;height:46px;margin:0 auto 18px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff7,transparent 40%),var(--accent);animation:pulse 1.6s ease-in-out infinite}
|
|
14
|
+
h1{margin:0;font-size:20px;letter-spacing:-.03em}
|
|
15
|
+
p{margin:8px 0 0;color:var(--muted);max-width:360px;line-height:1.5}
|
|
16
|
+
.err{color:#cf3830;white-space:pre-wrap}
|
|
17
|
+
@keyframes pulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(.86);opacity:.7}}
|
|
18
|
+
@keyframes in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
|
|
19
|
+
</style>
|
|
20
|
+
</head>
|
|
21
|
+
<body>
|
|
22
|
+
<div class="box">
|
|
23
|
+
<div class="orb" id="orb"></div>
|
|
24
|
+
<h1>OpenSol</h1>
|
|
25
|
+
<p id="msg">Starting the local daemon…</p>
|
|
26
|
+
</div>
|
|
27
|
+
<script>
|
|
28
|
+
window.__opensolError = function (message) {
|
|
29
|
+
document.getElementById('orb').style.animation = 'none';
|
|
30
|
+
var el = document.getElementById('msg');
|
|
31
|
+
el.className = 'err';
|
|
32
|
+
el.textContent = message;
|
|
33
|
+
};
|
|
34
|
+
</script>
|
|
35
|
+
</body>
|
|
36
|
+
</html>
|