aegisai-harness 0.71.1 → 0.72.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/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  All notable changes to AegisAi Harness are documented here.
4
4
 
5
- ## [0.71.1] - 2026-11-24
5
+ ## [0.72.1] - 2026-11-24
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.71.1 (see [ROADMAP.md](./ROADMAP.md)).
13
+ > Status: v0.72.1 (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.71.1.
3
+ A feature-rich, local-only AI agent harness. CLI-first, offline-first. v0.72.1.
4
4
 
5
5
  ## Capabilities
6
6
  - Multi-backend LLM adapter (Ollama + OpenAI-compatible + 18 providers)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aegisai-harness",
3
- "version": "0.71.1",
3
+ "version": "0.72.1",
4
4
  "description": "AegisAi Harness — feature-rich, local-only AI agent harness",
5
5
  "type": "commonjs",
6
6
  "main": "src/index.js",
@@ -4,13 +4,13 @@
4
4
  [Setup]
5
5
  AppId={{8F3D1B2A-6C4E-4B9A-9D21-AE615A010001}}
6
6
  AppName=AegisAi Harness
7
- AppVersion=0.71.1
7
+ AppVersion=0.72.1
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.71.1-Setup
13
+ OutputBaseFilename=AegisAi-Harness-0.72.1-Setup
14
14
  Compression=lzma2
15
15
  SolidCompression=yes
16
16
  PrivilegesRequired=lowest
package/public/app.js CHANGED
@@ -424,15 +424,52 @@ function App() {
424
424
  setMessages((m) => [...m, { role: 'user', content: text }]);
425
425
  setLoading(true);
426
426
  setToolLog([]);
427
+ // Add empty assistant message for streaming
428
+ setMessages((m) => [...m, { role: 'assistant', content: '' }]);
427
429
  try {
428
- const r = await fetch('/api/chat', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ message: text }) });
429
- const d = await r.json();
430
- setMessages((m) => [...m, { role: 'assistant', content: d.reply || '(no reply)' }]);
431
- if (d.toolLog) setToolLog(d.toolLog);
432
- updateCtx();
433
- toast('Response received', 'success');
430
+ const r = await fetch('/api/chat', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ message: text, stream: true }) });
431
+ if (!r.ok) throw new Error('HTTP ' + r.status);
432
+ const reader = r.body.getReader();
433
+ const decoder = new TextDecoder();
434
+ let buffer = '';
435
+ let fullReply = '';
436
+ while (true) {
437
+ const { done, value } = await reader.read();
438
+ if (done) break;
439
+ buffer += decoder.decode(value, { stream: true });
440
+ const lines = buffer.split('\\n\\n');
441
+ buffer = lines.pop() || '';
442
+ for (const line of lines) {
443
+ if (!line.startsWith('data: ')) continue;
444
+ try {
445
+ const data = JSON.parse(line.slice(6));
446
+ if (data.type === 'token') {
447
+ fullReply += data.content;
448
+ setMessages((m) => {
449
+ const updated = [...m];
450
+ updated[updated.length - 1] = { role: 'assistant', content: fullReply };
451
+ return updated;
452
+ });
453
+ } else if (data.type === 'tool_call') {
454
+ toast('Tool: ' + data.name, 'info');
455
+ } else if (data.type === 'done') {
456
+ if (data.toolLog) setToolLog(data.toolLog);
457
+ updateCtx();
458
+ toast('Response received', 'success');
459
+ }
460
+ } catch (e) {}
461
+ }
462
+ }
434
463
  } catch (e) {
435
- setMessages((m) => [...m, { role: 'assistant', content: 'Error: ' + e.message }]);
464
+ setMessages((m) => {
465
+ const updated = [...m];
466
+ if (updated.length > 0 && updated[updated.length - 1].role === 'assistant' && !updated[updated.length - 1].content) {
467
+ updated[updated.length - 1] = { role: 'assistant', content: 'Error: ' + e.message };
468
+ } else {
469
+ updated.push({ role: 'assistant', content: 'Error: ' + e.message });
470
+ }
471
+ return updated;
472
+ });
436
473
  toast('Error: ' + e.message, 'error');
437
474
  } finally { setLoading(false); }
438
475
  }
package/src/index.js CHANGED
@@ -196,13 +196,38 @@ async function main() {
196
196
  const parsed = await readJson(req);
197
197
  const sid = parsed.sessionId || 'default';
198
198
  const history = Array.isArray(parsed.history) ? parsed.history : (sessions.get(sid) || []);
199
+ const stream = parsed.stream === true;
200
+ const autoApprove = process.env.AEGISAI_WEB_AUTO_APPROVE === 'true';
201
+ if (stream) {
202
+ res.writeHead(200, { 'Content-Type': 'text/event-stream', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive', 'Access-Control-Allow-Origin': '*' });
203
+ let fullReply = '';
204
+ const result = await runAgent({
205
+ model: parsed.model || process.env.AEGISAI_MODEL || 'llama3.2:3b',
206
+ messages: history.concat([{ role: 'user', content: parsed.message || '' }]),
207
+ projectRoot: process.cwd(),
208
+ onEvent: (e) => {
209
+ if (e.type === 'token') { fullReply += (e.content || ''); res.write('data: ' + JSON.stringify({ type: 'token', content: e.content || '' }) + '\\n\\n'); }
210
+ else if (e.type === 'tool_call') { res.write('data: ' + JSON.stringify({ type: 'tool_call', name: e.name, args: e.args }) + '\\n\\n'); }
211
+ else if (e.type === 'tool_result') { res.write('data: ' + JSON.stringify({ type: 'tool_result', preview: (e.preview || '').slice(0, 200) }) + '\\n\\n'); }
212
+ else if (e.type === 'status') { res.write('data: ' + JSON.stringify({ type: 'status', message: e.message }) + '\\n\\n'); }
213
+ },
214
+ autoApprove,
215
+ approvalHandler: async () => false,
216
+ });
217
+ const reply = (result.final && result.final.final) || fullReply;
218
+ const updated = history.concat([{ role: 'user', content: parsed.message || '' }, { role: 'assistant', content: reply }]);
219
+ sessions.set(sid, updated);
220
+ res.write('data: ' + JSON.stringify({ type: 'done', reply, toolLog: result.toolLog || [] }) + '\\n\\n');
221
+ res.end();
222
+ return;
223
+ }
199
224
  const result = await runAgent({
200
225
  model: parsed.model || process.env.AEGISAI_MODEL || 'llama3.2:3b',
201
226
  messages: history.concat([{ role: 'user', content: parsed.message || '' }]),
202
227
  projectRoot: process.cwd(),
203
228
  onEvent: () => {},
204
229
  // Tool execution from the browser is opt-in. Default: no writes.
205
- autoApprove: process.env.AEGISAI_WEB_AUTO_APPROVE === 'true',
230
+ autoApprove,
206
231
  approvalHandler: async () => false,
207
232
  });
208
233
  const reply = (result.final && result.final.final) || '';
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // src/version.js — single runtime source for the version string.
2
2
  // Kept separate from package.json so bundled/npm-installed copies behave the same.
3
- const VERSION = '0.71.1';
3
+ const VERSION = '0.72.1';
4
4
  module.exports = { VERSION, version: VERSION };