@bibobonking/opensol 3.0.1 → 3.0.3
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/README.md +15 -12
- package/package.json +1 -1
- package/server/README.md +75 -0
- package/server/daemon.mjs +1082 -0
- package/server/lib/checkpoints.mjs +124 -0
- package/server/lib/checkpoints.test.mjs +110 -0
- package/server/lib/deploy.mjs +436 -0
- package/server/lib/http.mjs +237 -0
- package/server/lib/plugins.mjs +321 -0
- package/server/lib/plugins.test.mjs +140 -0
- package/server/lib/providers.mjs +594 -0
- package/server/lib/store.mjs +491 -0
- package/server/lib/tools.mjs +990 -0
- package/server/opensol.mjs +202 -0
- package/server/package.json +42 -0
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.
|
package/package.json
CHANGED
package/server/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# OpenSol
|
|
2
|
+
|
|
3
|
+
A local-first AI coding agent by OpenSoft. 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
|
+
|
|
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
|
+
|
|
7
|
+
## Run the built app
|
|
8
|
+
|
|
9
|
+
Requires Node.js 20 or newer. No `npm install` is needed to run the built app.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm start
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`npm start` launches the daemon in the background and opens `http://127.0.0.1:4174`. Equivalent commands:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
node server/opensol.mjs start --open
|
|
19
|
+
node server/opensol.mjs status
|
|
20
|
+
node server/opensol.mjs logs
|
|
21
|
+
node server/opensol.mjs stop
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
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.
|
|
25
|
+
|
|
26
|
+
## What is in the app
|
|
27
|
+
|
|
28
|
+
- **Build and Plan modes.** Build can edit files and run commands; Plan is read-only investigation.
|
|
29
|
+
- **Live models and reasoning.** Model lists come from each provider; the models.dev catalog is only a fallback. Thinking is the provider's job: an effort control appears only when the selected model advertises effort levels or a token budget, and it is sent automatically.
|
|
30
|
+
- **Themes.** Light, Dark, Night Owl, Claude Code and Flame, plus System, which follows the OS preference. Syntax highlighting follows the theme.
|
|
31
|
+
- **Real tools.** Read/write/edit files, grep, list files, shell, git, web search, URL reading and a read-only SubAgent. Each user turn renders as one answer, with consecutive tool rounds collapsed into a single “Used N tools” group.
|
|
32
|
+
- **Turn queue.** A prompt sent while a turn is streaming waits its turn and runs next, instead of splitting into a second reply.
|
|
33
|
+
- **Local plugins.** Two plugin modes:
|
|
34
|
+
- **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
|
+
- **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 `~/.maxcode/plugins`, outside the selected workspace.
|
|
37
|
+
- **Workspace panel.** Folder tree, file editor, git status and quick file actions.
|
|
38
|
+
- **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
|
+
- **Local history.** Conversations, settings, workspaces and encrypted keys survive restarts.
|
|
40
|
+
|
|
41
|
+
Slash commands include `/search`, `/plan`, `/build`, `/new`, `/workspace`, `/deploy`, `/settings` and `/clear`.
|
|
42
|
+
|
|
43
|
+
## Development
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm install
|
|
47
|
+
npm run dev # starts the daemon and Vite on http://127.0.0.1:5173
|
|
48
|
+
npm run build # typecheck + production build into dist/
|
|
49
|
+
npm run typecheck
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`npm run dev` proxies `/api` to the daemon on port 4174. For a production-style run, use `npm run build` followed by `npm start`.
|
|
53
|
+
|
|
54
|
+
Remote models need provider access from this machine. Local providers such as Ollama are keyless but must already be running; OpenSol reports an actionable error when they are not.
|
|
55
|
+
|
|
56
|
+
OpenCode free-tier models only work inside OpenCode itself, so they are hidden here. Paid OpenCode models work with an API key. Deploys require the matching CLI (`wrangler`, `netlify` or `vercel`) or `npx`, plus credentials in **Settings → Deploy**.
|
|
57
|
+
|
|
58
|
+
## Data and security
|
|
59
|
+
|
|
60
|
+
- Data directory: `~/.maxcode` (override with `MAXCODE_DATA`).
|
|
61
|
+
- `secrets.enc` and `master.key` are created with mode `600`.
|
|
62
|
+
- All API routes require the local session cookie and a CSRF header; Host and Origin are checked.
|
|
63
|
+
- The daemon rejects code execution outside the selected workspace except for an explicit, existing deploy folder.
|
|
64
|
+
- No telemetry or OpenSoft-hosted proxy. Provider requests go directly from the daemon to the provider you configured.
|
|
65
|
+
|
|
66
|
+
## Stack
|
|
67
|
+
|
|
68
|
+
TypeScript, React 19, Vite, Tailwind CSS, Zustand, direct provider adapters (OpenAI, Anthropic, Gemini, OpenCode and OpenAI-compatible endpoints), and a Node HTTP daemon with no runtime dependencies.
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
src/ React app, stores, agent loop, adapters and tools
|
|
72
|
+
server/ local daemon, encrypted store, workspace tools and deploy
|
|
73
|
+
dist/ verified production build
|
|
74
|
+
public/ favicon
|
|
75
|
+
```
|