aegis-desktop 0.7.7 → 0.8.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/README.md +103 -18
- package/lib/local/engine.js +296 -139
- package/lib/local/local.js +433 -0
- package/lib/local/tools.js +7 -56
- package/lib/settings.js +39 -1
- package/main.js +44 -7
- package/package.json +8 -2
- package/renderer/app.js +307 -246
- package/renderer/budget.js +22 -17
- package/renderer/index.html +8 -2
- package/renderer/stream-policy.js +65 -1
- package/renderer/transcript-view.js +5 -0
- package/renderer/usage.js +46 -15
- package/vendor/aegis.js +21 -3
- package/vendor/env-file.js +182 -0
- package/lib/local/ollama.js +0 -77
- package/lib/local/providers.js +0 -679
package/README.md
CHANGED
|
@@ -5,26 +5,94 @@ with an **agentic tool loop**: the model can read, write, and edit files,
|
|
|
5
5
|
list directories, glob, grep, run shell commands in a persistent session, and
|
|
6
6
|
delegate whole sub-tasks to subagents. It does **not** require Claude Code.
|
|
7
7
|
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
Download a build from the
|
|
11
|
+
[releases page](https://github.com/aegiscloud/aegiscode-desktop/releases), or
|
|
12
|
+
install from npm:
|
|
13
|
+
|
|
8
14
|
```bash
|
|
9
|
-
npm install -g aegis-desktop
|
|
10
|
-
aegis
|
|
15
|
+
npm install -g aegis-desktop # requires Node 18+
|
|
16
|
+
aegis # launch
|
|
11
17
|
```
|
|
12
18
|
|
|
19
|
+
Either way, on first launch:
|
|
20
|
+
|
|
21
|
+
1. Open **Settings** in the sidebar.
|
|
22
|
+
2. Paste an AEGIS key into the **API key** row — get a free one at
|
|
23
|
+
<https://aegiscloud.org>. `AEGIS_API_KEY` is picked up from the environment
|
|
24
|
+
if you would rather not paste it.
|
|
25
|
+
3. Pick a model class from the picker at the bottom of the composer.
|
|
26
|
+
|
|
27
|
+
The published package is [`aegis-desktop`](https://www.npmjs.com/package/aegis-desktop)
|
|
28
|
+
on npm; this repo is its source. Both classes bill your AEGIS account — either
|
|
29
|
+
the pooled margin, or the BYOK handling fee on top of your own provider key.
|
|
30
|
+
|
|
31
|
+
## Using it
|
|
32
|
+
|
|
33
|
+
Everything is in the window — there is no slash-command line to learn. Plain
|
|
34
|
+
text in the composer is a prompt.
|
|
35
|
+
|
|
36
|
+
| Where | What it does |
|
|
37
|
+
|---|---|
|
|
38
|
+
| **Composer** | Type and press `Enter`. `Shift+Enter` for a newline. |
|
|
39
|
+
| **Class picker** | Bottom of the composer — switches the route mid-conversation, context intact. |
|
|
40
|
+
| **Model dropdown** | Next to it — pins a model id for the selected class, or leaves it on "server default (auto)". |
|
|
41
|
+
| **Settings** (sidebar) | API key, provider keys, tool-confirmation toggle. |
|
|
42
|
+
| **Queue card** (sidebar) | The unattended work queue — same file the CLI drains. |
|
|
43
|
+
| **Quick Launcher card** | Enable/rebind the global hotkey. |
|
|
44
|
+
| **remember** (on any reply) | Pin that message to cross-machine cloud memory. |
|
|
45
|
+
|
|
46
|
+
Approval cards appear inline before `exec`, `writeFile` or `editFile` runs:
|
|
47
|
+
**Allow once**, **Allow for this session**, or **Deny**. Turn them off entirely
|
|
48
|
+
with **Settings → "Confirm before running tools"** — on by default.
|
|
49
|
+
|
|
13
50
|
## Model classes
|
|
14
51
|
|
|
15
|
-
Pick
|
|
52
|
+
Pick either of two routes from the model-class picker, switchable
|
|
16
53
|
mid-conversation with context intact:
|
|
17
54
|
|
|
18
|
-
| Class | Transport | Key held in |
|
|
19
|
-
|
|
20
|
-
| **Aegis Cloud** | `aegiscloud.org` — one entry, **Nexus**; the pool auto-routes across whichever providers are live | main process |
|
|
21
|
-
| **
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
55
|
+
| Class | Transport | Key held in | Billed? |
|
|
56
|
+
|---|---|---|---|
|
|
57
|
+
| **Aegis Cloud** | `aegiscloud.org` — one entry, **Nexus**; the pool auto-routes across whichever providers are live | main process | yes — pooled margin |
|
|
58
|
+
| **Bring your own key** | your provider key, relayed by AEGIS — see below | main process | yes — flat AEGIS handling fee |
|
|
59
|
+
|
|
60
|
+
Get a free AEGIS key at **https://aegiscloud.org**. The local-endpoint classes
|
|
61
|
+
that used to live here — Ollama, and the OpenAI-/Anthropic-compatible direct
|
|
62
|
+
lanes — have been removed; the hosted providers they could reach are on the
|
|
63
|
+
**Bring your own key** class, which bills the handling fee.
|
|
64
|
+
|
|
65
|
+
### Bring your own key (BYOK)
|
|
66
|
+
|
|
67
|
+
For the providers AEGIS does **not** run in its pool — bring your own key and
|
|
68
|
+
the models that key unlocks appear as their own entries, one per provider.
|
|
69
|
+
|
|
70
|
+
1. **Settings** → find the row named `BYOK: <Provider>` (OpenAI, Anthropic,
|
|
71
|
+
DeepSeek, Groq, xAI, Mistral, Gemini, OpenRouter, …), paste your provider key
|
|
72
|
+
and **Save**. There is no base-URL field on these rows: a BYOK turn always
|
|
73
|
+
talks to AEGIS's own relay (`/api/v1/byok/chat/completions`), which is what
|
|
74
|
+
attaches your AEGIS key.
|
|
75
|
+
2. Or skip the UI and put the key in `~/.aegiscode/.env` (`OPENAI_API_KEY=…`,
|
|
76
|
+
`ANTHROPIC_API_KEY=…`); the app reads that file into the environment at
|
|
77
|
+
startup, and a provider with no key saved in Settings is resolved from it.
|
|
78
|
+
3. Select the **Bring your own key** class and pick a model.
|
|
79
|
+
|
|
80
|
+
**What it costs.** AEGIS pays your provider nothing on this lane, so there is no
|
|
81
|
+
provider cost to take a margin on — instead your AEGIS account is charged a flat
|
|
82
|
+
**handling fee** per 1k tokens, for the routing, prompt assembly, caching, tool
|
|
83
|
+
bridging and uptime that still happen server-side. The rate is the server's own
|
|
84
|
+
(published on `GET /api/v1/byok/providers`) and is shown in Settings directly
|
|
85
|
+
under the provider rows; it is never hardcoded here, so it cannot drift from the
|
|
86
|
+
ledger that bills you. It is deliberately below the pooled price for the same
|
|
87
|
+
traffic — BYOK stays the cheaper lane, it just is not the free one.
|
|
88
|
+
|
|
89
|
+
**Two keys are needed.** Your provider key *and* an AEGIS account key: the
|
|
90
|
+
handling fee has to be billed somewhere. With no AEGIS key connected the class
|
|
91
|
+
shows every model but says exactly that, rather than failing opaquely.
|
|
92
|
+
|
|
93
|
+
Note that a **BYOK turn is single-shot** — the relay takes no `tools` parameter,
|
|
94
|
+
so the agentic tool loop below is off for these models. Use the **Aegis Cloud**
|
|
95
|
+
class when you want file and shell access.
|
|
28
96
|
|
|
29
97
|
## Tools available to the model
|
|
30
98
|
|
|
@@ -180,7 +248,16 @@ The app registers an `aegis://` protocol handler:
|
|
|
180
248
|
## Run from source
|
|
181
249
|
|
|
182
250
|
```bash
|
|
183
|
-
|
|
251
|
+
git clone https://github.com/aegiscloud/aegiscode-desktop.git
|
|
252
|
+
cd aegiscode-desktop
|
|
253
|
+
npm install
|
|
254
|
+
npm start
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Or, from the monorepo checkout, run this directory directly:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
cd aegiscode-plugin/desktop
|
|
184
261
|
npm install
|
|
185
262
|
npm start
|
|
186
263
|
```
|
|
@@ -205,7 +282,7 @@ node ../test/desktop-shell.mjs # headless IPC smoke test (no Electron binary n
|
|
|
205
282
|
main.js Electron main process — window + IPC shell only
|
|
206
283
|
preload.js Context-isolated IPC bridge exposed to the renderer
|
|
207
284
|
renderer/ UI (vanilla JS, no framework)
|
|
208
|
-
lib/local/ Model classes,
|
|
285
|
+
lib/local/ Model classes, agentic tool loop, prompt
|
|
209
286
|
lib/local/queue.js The shared work queue (~/.aegiscode/queue.jsonl)
|
|
210
287
|
lib/local/autonomous.js The unattended worker — directive, digest, commits
|
|
211
288
|
lib/local/session-rounds.js Session-scoped tool-round ledger (in-memory)
|
|
@@ -217,6 +294,14 @@ bin/aegis.js `aegis` CLI entry point for the global npm install
|
|
|
217
294
|
This directory is part of the [aegiscode-plugin](../README.md) monorepo,
|
|
218
295
|
which also ships a Claude Code plugin and the shared `client/aegis.js`
|
|
219
296
|
transport over the same AEGIS backend — see the repo root for that fuller
|
|
220
|
-
architecture picture
|
|
221
|
-
|
|
222
|
-
|
|
297
|
+
architecture picture, and [cli/README.md](../cli/README.md) for the terminal
|
|
298
|
+
host over the same engine.
|
|
299
|
+
|
|
300
|
+
**Two repos, one product.** This directory is the source of truth. The
|
|
301
|
+
standalone repo at
|
|
302
|
+
[aegiscloud/aegiscode-desktop](https://github.com/aegiscloud/aegiscode-desktop)
|
|
303
|
+
is a `git subtree split` of it — same code, published separately so it can be
|
|
304
|
+
cloned and built on its own. Edits land here and are synced out; nothing is
|
|
305
|
+
authored there. The npm package
|
|
306
|
+
[`aegis-desktop`](https://www.npmjs.com/package/aegis-desktop) is built from
|
|
307
|
+
that standalone repo.
|