@bibobonking/opensol 3.0.2 → 3.1.0
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 +18 -0
- package/README.md +15 -12
- 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-DdI1_iPD.css +1 -0
- package/dist/assets/index-egG5Bgfo.js +312 -0
- package/dist/index.html +2 -2
- package/package.json +2 -1
- package/server/daemon.mjs +64 -2
- package/server/lib/mcp.mjs +532 -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/agent/tools.ts +6 -5
- package/src/components/Composer.tsx +22 -38
- package/src/components/DiffView.tsx +98 -0
- package/src/components/McpTab.tsx +337 -0
- package/src/components/MessageItem.tsx +62 -13
- package/src/components/ModelDeck.tsx +652 -0
- package/src/components/SessionsTab.tsx +206 -0
- package/src/components/SettingsModal.tsx +106 -69
- package/src/components/Sidebar.tsx +78 -24
- 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/index.css +97 -1
- package/src/lib/daemon.ts +29 -0
- package/src/lib/diff.ts +62 -0
- package/src/lib/permissions.ts +6 -6
- package/src/store/chats.ts +9 -1
- package/src/store/mcp.ts +67 -0
- package/src/store/settings.ts +9 -6
- package/src/store/ui.ts +13 -0
- package/src/store/workspace.ts +26 -0
- package/src/types.ts +51 -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,18 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 3.1.0
|
|
4
|
+
|
|
5
|
+
**New**
|
|
6
|
+
- **MCP connect** — Settings → MCP (and the sidebar). 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`).
|
|
7
|
+
- **Remove workspace** — trash button on each workspace in the sidebar (removes it from the list; the folder stays on disk).
|
|
8
|
+
- **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.
|
|
9
|
+
- **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.
|
|
10
|
+
- **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.
|
|
11
|
+
- **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`.
|
|
12
|
+
|
|
13
|
+
**Changed**
|
|
14
|
+
- Thoughts are closed by default, also while the model is still thinking.
|
|
15
|
+
- 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.
|
|
16
|
+
- Redesigned Settings: numbered rail with a sliding pill, large section headers, card layout.
|
|
17
|
+
- More motion: spring knob, staggered rows, blur-in titles, diff rows, tool rows. All of it respects `prefers-reduced-motion`.
|
|
18
|
+
- Daemon now persists `chatFontSize`, `workDetail` and `autoCollapseWork` (they were dropped before).
|
package/README.md
CHANGED
|
@@ -4,21 +4,24 @@ A local-first AI coding agent by OpenSoft. OpenSol pairs a warm React chat inter
|
|
|
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
|
|
|
7
|
-
## Run the built app
|
|
7
|
+
## Run the built app or install with npm
|
|
8
8
|
|
|
9
|
-
Requires Node.js 20 or newer. No `
|
|
9
|
+
Requires Node.js 20 or newer. No `node_modules` is needed to run the built app.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
npm start
|
|
13
|
-
```
|
|
11
|
+
## Install globally via npm
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g @bibobonking/opensol
|
|
16
15
|
|
|
17
16
|
```bash
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
npm start run
|
|
18
|
+
```
|
|
19
|
+
```
|
|
20
|
+
opensol start [--port=4174] [--open] [--foreground]
|
|
21
|
+
opensol stop
|
|
22
|
+
opensol status
|
|
23
|
+
opensol open
|
|
24
|
+
opensol logs
|
|
22
25
|
```
|
|
23
26
|
|
|
24
27
|
On first launch, choose a real project folder, then add a provider key in **Settings → Models** and pick a live model. Everything else — workspace tree, editor, git, search, build/plan modes, subagents and deploys — runs through the local daemon.
|
|
@@ -33,7 +36,7 @@ On first launch, choose a real project folder, then add a provider key in **Sett
|
|
|
33
36
|
- **Local plugins.** Two plugin modes:
|
|
34
37
|
- **API v1 (sandboxed):** Install a package, review its declared workspace capabilities and HTTPS domains, preview in a sandbox, mark it Safe. Plugin code gets a restricted API (`registerCommand`, `registerPanel`, `registerTheme`, workspace read/write, HTTPS-only network to declared hosts).
|
|
35
38
|
- **API v2 (free):** Plugin receives the full Cordis kernel context — register custom AI tools, hook into `agent/request` / `tools/execute` / `system-prompt/assemble` events, patch any app behaviour at runtime. No capability declarations needed. When removed, the Cordis fiber disposes automatically and the app returns to its original state — no source files are ever modified.
|
|
36
|
-
The same panel builds a package from a folder you pick. Packages live under `~/.
|
|
39
|
+
The same panel builds a package from a folder you pick. Packages live under `~/.opensol/plugins`, outside the selected workspace.
|
|
37
40
|
- **Workspace panel.** Folder tree, file editor, git status and quick file actions.
|
|
38
41
|
- **Deploy.** Cloudflare Pages, Netlify and Vercel, for the open workspace or another existing folder. Tokens stay in the daemon and are passed to CLIs through environment variables.
|
|
39
42
|
- **Local history.** Conversations, settings, workspaces and encrypted keys survive restarts.
|
|
@@ -57,7 +60,7 @@ OpenCode free-tier models only work inside OpenCode itself, so they are hidden h
|
|
|
57
60
|
|
|
58
61
|
## Data and security
|
|
59
62
|
|
|
60
|
-
- Data directory: `~/.
|
|
63
|
+
- Data directory: `~/.opensol` (override with `OPENSOL_DATA`).
|
|
61
64
|
- `secrets.enc` and `master.key` are created with mode `600`.
|
|
62
65
|
- All API routes require the local session cookie and a CSRF header; Host and Origin are checked.
|
|
63
66
|
- The daemon rejects code execution outside the selected workspace except for an explicit, existing deploy folder.
|
|
@@ -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>
|