aegisai-harness 0.82.0 → 0.84.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/CHANGELOG.md +1 -1
- package/README.md +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/packaging/windows/installer.iss +2 -2
- package/public/app.js +1 -1
- package/src/backends/index.js +4 -0
- package/src/index.js +18 -6
- package/src/tui.js +18 -0
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to AegisAi Harness are documented here.
|
|
4
4
|
|
|
5
|
-
## [0.
|
|
5
|
+
## [0.84.0] - 2026-11-25
|
|
6
6
|
|
|
7
7
|
### Fixed
|
|
8
8
|
- Installation: Windows installer now preflights Node.js 22.13+ with actionable messages; launcher no longer hides npm failures, uses `--omit=dev`, and records a dependency marker. Inno uninstall removes stale `node_modules`/lockfiles; `install.ps1` preserves `data/` and handles GitHub source zips.
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ A **feature-rich, local-only AI agent harness** — OpenCode-class runtime, but
|
|
|
10
10
|
offline-first: no cloud dependencies, no telemetry. 66 milestones, ~200 modules,
|
|
11
11
|
257 tests, CI green.
|
|
12
12
|
|
|
13
|
-
> Status: v0.
|
|
13
|
+
> Status: v0.84.0 (see [ROADMAP.md](./ROADMAP.md)).
|
|
14
14
|
> **Successor to [aegisai-next](https://github.com/user6811992/aegisai-next)** — that project is deprecated; all features have been ported here.
|
|
15
15
|
> **Live docs:** https://user6811992.github.io/aegisai-harness/
|
|
16
16
|
|
package/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AegisAi Harness — agent-readable catalog
|
|
2
2
|
|
|
3
|
-
A feature-rich, local-only AI agent harness. CLI-first, offline-first. v0.
|
|
3
|
+
A feature-rich, local-only AI agent harness. CLI-first, offline-first. v0.84.0.
|
|
4
4
|
|
|
5
5
|
## Capabilities
|
|
6
6
|
- Multi-backend LLM adapter (Ollama + OpenAI-compatible + 18 providers)
|
package/package.json
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
[Setup]
|
|
5
5
|
AppId={{8F3D1B2A-6C4E-4B9A-9D21-AE615A010001}}
|
|
6
6
|
AppName=AegisAi Harness
|
|
7
|
-
AppVersion=0.
|
|
7
|
+
AppVersion=0.84.0
|
|
8
8
|
AppPublisher=AegisAi
|
|
9
9
|
AppPublisherURL=https://github.com/user6811992/aegisai-harness
|
|
10
10
|
DefaultDirName={autopf}\AegisAiHarness
|
|
11
11
|
DefaultGroupName=AegisAi Harness
|
|
12
12
|
OutputDir=..\..\dist
|
|
13
|
-
OutputBaseFilename=AegisAi-Harness-0.
|
|
13
|
+
OutputBaseFilename=AegisAi-Harness-0.84.0-Setup
|
|
14
14
|
Compression=lzma2
|
|
15
15
|
SolidCompression=yes
|
|
16
16
|
PrivilegesRequired=lowest
|
package/public/app.js
CHANGED
|
@@ -6,7 +6,7 @@ const html = htm.bind(h);
|
|
|
6
6
|
|
|
7
7
|
// Auth token support: stored in sessionStorage, sent as Bearer on every API call.
|
|
8
8
|
function authToken() { try { return sessionStorage.getItem('aegisai_token') || localStorage.getItem('aegisai_token') || ''; } catch (e) { return ''; } }
|
|
9
|
-
function setAuthToken(t) { try { if (t) sessionStorage.setItem('aegisai_token', t); else sessionStorage.removeItem('aegisai_token'); } catch (e) {} }
|
|
9
|
+
function setAuthToken(t) { try { if (t) { sessionStorage.setItem('aegisai_token', t); localStorage.setItem('aegisai_token', t); } else { sessionStorage.removeItem('aegisai_token'); localStorage.removeItem('aegisai_token'); } } catch (e) {} }
|
|
10
10
|
function authHeaders(extra) {
|
|
11
11
|
const h = Object.assign({}, extra || {});
|
|
12
12
|
const t = authToken();
|
package/src/backends/index.js
CHANGED
|
@@ -241,6 +241,10 @@ async function backendListModels() {
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
async function backendChat(bodyObj, onChunk, signal) {
|
|
244
|
+
if (!signal) {
|
|
245
|
+
const ms = parseInt(process.env.AEGISAI_BACKEND_TIMEOUT_MS || '300000', 10);
|
|
246
|
+
signal = AbortSignal.timeout(ms);
|
|
247
|
+
}
|
|
244
248
|
if (isCircuitOpen()) throw new Error('circuit breaker open');
|
|
245
249
|
// escalation strategy: try efficient, then capable on failure/empty
|
|
246
250
|
if (state.type === 'router' && state.routerStrategy === 'escalation' && state.routerUrls.length > 1) {
|
package/src/index.js
CHANGED
|
@@ -221,11 +221,17 @@ async function main() {
|
|
|
221
221
|
return [path.resolve(process.cwd())];
|
|
222
222
|
}
|
|
223
223
|
function assertAllowedPath(target) {
|
|
224
|
+
const fs = require('fs');
|
|
224
225
|
const resolved = path.resolve(String(target || ''));
|
|
225
226
|
const roots = allowedRoots();
|
|
227
|
+
// Resolve symlinks/junctions so a link can't escape the allowed root.
|
|
228
|
+
let real = resolved;
|
|
229
|
+
try { real = fs.realpathSync(resolved); } catch (e) { /* file may not exist yet */ }
|
|
226
230
|
for (const root of roots) {
|
|
227
|
-
|
|
228
|
-
|
|
231
|
+
let rootReal = root;
|
|
232
|
+
try { rootReal = fs.realpathSync(root); } catch (e) {}
|
|
233
|
+
const rel = path.relative(rootReal, real);
|
|
234
|
+
if (!rel.startsWith('..') && !path.isAbsolute(rel)) return real;
|
|
229
235
|
}
|
|
230
236
|
throw Object.assign(new Error('path outside allowed roots'), { status: 403 });
|
|
231
237
|
}
|
|
@@ -264,9 +270,12 @@ async function main() {
|
|
|
264
270
|
}
|
|
265
271
|
if (!authorized) { sendJson(res, 401, { error: 'unauthorized' }); return; }
|
|
266
272
|
if (patScopes) {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
273
|
+
// /api/stream performs its own scope check (stream/execute) inside stream_actions.
|
|
274
|
+
if (urlPathOnly !== '/api/stream') {
|
|
275
|
+
const required = requiredScope(req.method, urlPathOnly);
|
|
276
|
+
const allowed = patScopes.includes('*') || patScopes.includes(required) || (required === 'read' && patScopes.includes('execute'));
|
|
277
|
+
if (!allowed) { sendJson(res, 403, { error: 'insufficient_scope', required, granted: patScopes }); return; }
|
|
278
|
+
}
|
|
270
279
|
}
|
|
271
280
|
}
|
|
272
281
|
// rate limit — API only; static assets must not consume the API budget
|
|
@@ -730,8 +739,11 @@ async function main() {
|
|
|
730
739
|
catch (e) { sendJson(res, e.status || 403, { error: String(e.message || e) }); return; }
|
|
731
740
|
try {
|
|
732
741
|
const fs = require('fs');
|
|
742
|
+
const MAX_FILE = parseInt(process.env.AEGISAI_MAX_FILE_BYTES || '2097152', 10); // 2 MiB
|
|
743
|
+
const st = fs.statSync(filePath);
|
|
744
|
+
if (st.size > MAX_FILE) { sendJson(res, 413, { error: 'file too large', size: st.size, limit: MAX_FILE }); return; }
|
|
733
745
|
const content = fs.readFileSync(filePath, 'utf8');
|
|
734
|
-
sendJson(res, 200, { content, path: filePath });
|
|
746
|
+
sendJson(res, 200, { content, path: filePath, size: st.size });
|
|
735
747
|
} catch (e) { sendJson(res, 500, { error: String(e.message || e) }); }
|
|
736
748
|
return;
|
|
737
749
|
}
|
package/src/tui.js
CHANGED
|
@@ -58,6 +58,24 @@ class Tui extends EventEmitter {
|
|
|
58
58
|
const s = d.toString();
|
|
59
59
|
if (!s) return;
|
|
60
60
|
if (s === '\u0003') { this.stop(); return; } // Ctrl+C
|
|
61
|
+
// Bracketed paste: ESC[200~ ... ESC[201~. Process the content between the
|
|
62
|
+
// markers as literal text (newlines become spaces, no auto-submit).
|
|
63
|
+
if (s.includes('\x1b[200~') || s.includes('\x1b[201~') || this._pasteBuffer !== undefined) {
|
|
64
|
+
if (this._pasteBuffer === undefined) this._pasteBuffer = '';
|
|
65
|
+
const parts = s.split(/\x1b\[200~|\x1b\[201~/);
|
|
66
|
+
let buf = this._pasteBuffer;
|
|
67
|
+
for (const chunk of parts) buf += chunk.replace(/\r?\n/g, ' ').replace(/[^\x20-\x7e\t]/g, '');
|
|
68
|
+
if (s.includes('\x1b[201~')) {
|
|
69
|
+
const text = buf.trim();
|
|
70
|
+
if (text) this.input += (this.input ? ' ' : '') + text;
|
|
71
|
+
this._pasteBuffer = undefined;
|
|
72
|
+
this.render();
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
this._pasteBuffer = buf;
|
|
76
|
+
this.render();
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
61
79
|
// Split pasted/multi-byte chunks into lines and printable runs.
|
|
62
80
|
if (s === '\r' || s === '\n') {
|
|
63
81
|
const cmd = this.input.trim();
|
package/src/version.js
CHANGED