aegisai-harness 0.70.0 → 0.71.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.70.0] - 2026-11-24
5
+ ## [0.71.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.70.0 (see [ROADMAP.md](./ROADMAP.md)).
13
+ > Status: v0.71.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.70.0.
3
+ A feature-rich, local-only AI agent harness. CLI-first, offline-first. v0.71.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.70.0",
3
+ "version": "0.71.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.70.0
7
+ AppVersion=0.71.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.70.0-Setup
13
+ OutputBaseFilename=AegisAi-Harness-0.71.1-Setup
14
14
  Compression=lzma2
15
15
  SolidCompression=yes
16
16
  PrivilegesRequired=lowest
package/public/app.js CHANGED
@@ -237,7 +237,7 @@ function ConfigModal({ cfg, setCfg, onClose }) {
237
237
  ${tab === 'discover' ? html`
238
238
  <div class="discover-section">
239
239
  <h3>Scan for Local Models</h3>
240
- <p class="hint">Scan drives and directories for GGUF, BIN, and Safetensors model files, plus Ollama models.</p>
240
+ <p class="hint">Active backend: <strong>${cfg.BACKEND_TYPE || 'auto'}</strong>. Scan drives and directories for model files compatible with your backend.</p>
241
241
  <div class="search-bar">
242
242
  <input value=${scanRoot} onInput=${(e) => setScanRoot(e.target.value)} placeholder="Leave empty for default roots, or enter a path (e.g. D:\\models)" style="flex:1" />
243
243
  <button class="btn-primary" onClick=${scanDrives} disabled=${scanning}>${scanning ? 'Scanning...' : 'Scan'}</button>
@@ -248,11 +248,12 @@ function ConfigModal({ cfg, setCfg, onClose }) {
248
248
  ${scanResults.slice(0, 30).map((m) => html`
249
249
  <div class="scan-item">
250
250
  <span class="model-name">${m.name}</span>
251
- <span class="hint">${m.sizeGB > 0 ? m.sizeGB + ' GB' : ''} ${m.type ? '(' + m.type + ')' : ''}</span>
251
+ <span class="hint">${m.sizeGB > 0 ? m.sizeGB + ' GB' : ''} ${m.type ? '[' + m.type + ']' : ''}</span>
252
+ ${m.type !== 'ollama' && m.path && !m.path.startsWith('ollama://') ? html`<button class="btn-sm" onClick=${() => { setLocal({ ...local, AEGISAI_MODEL: m.path }); toast('Selected ' + m.name, 'info'); }}>Use</button>` : null}
252
253
  </div>
253
254
  `)}
254
255
  </div>
255
- ` : html`<p class="hint">No models found. Try scanning a specific directory.</p>`}
256
+ ` : html`<p class="hint">No models found. Try scanning a specific directory or changing the backend.</p>`}
256
257
  <h3 style="margin-top: 16px">Search HuggingFace</h3>
257
258
  <p class="hint">Search HuggingFace for GGUF models. Try terms like "llama", "mistral", "phi", "gemma".</p>
258
259
  <div class="search-bar">
package/src/index.js CHANGED
@@ -241,14 +241,19 @@ async function main() {
241
241
  if (req.method === 'GET' && req.url.split('?')[0] === '/api/models/scan') {
242
242
  const roots = new URL(req.url, 'http://x').searchParams.get('roots');
243
243
  const rootList = roots ? roots.split(',') : undefined;
244
- const found = require('./model_discovery').scan(rootList);
245
- // Also list Ollama models
244
+ const backend = require('./backends').getType();
245
+ const found = require('./model_discovery').scan(rootList, 500, backend);
246
+ // Also list models from the active backend
246
247
  try {
247
248
  const r = await require('./backends').backendListModels();
248
- const ollamaModels = (r.models || []).map((m) => ({ path: 'ollama://' + (m.name || m), name: m.name || m, sizeGB: m.size ? +(m.size / 1024 ** 3).toFixed(2) : 0, type: 'ollama' }));
249
- found.push(...ollamaModels);
249
+ const backendModels = (r.models || []).map((m) => ({ path: backend + '://' + (m.name || m), name: m.name || m, sizeGB: m.size ? +(m.size / 1024 ** 3).toFixed(2) : 0, type: backend }));
250
+ // Only add if not already in found
251
+ const existingNames = new Set(found.map((f) => f.name));
252
+ for (const bm of backendModels) {
253
+ if (!existingNames.has(bm.name)) found.push(bm);
254
+ }
250
255
  } catch (e) {}
251
- sendJson(res, 200, { models: found });
256
+ sendJson(res, 200, { models: found, backend });
252
257
  return;
253
258
  }
254
259
  if (req.method === 'GET' && req.url.split('?')[0] === '/api/models/hf-search') {
@@ -279,14 +284,19 @@ async function main() {
279
284
  if (req.method === 'GET' && req.url.split('?')[0] === '/api/models/scan') {
280
285
  const roots = new URL(req.url, 'http://x').searchParams.get('roots');
281
286
  const rootList = roots ? roots.split(',') : undefined;
282
- const found = require('./model_discovery').scan(rootList);
283
- // Also list Ollama models
287
+ const backend = require('./backends').getType();
288
+ const found = require('./model_discovery').scan(rootList, 500, backend);
289
+ // Also list models from the active backend
284
290
  try {
285
291
  const r = await require('./backends').backendListModels();
286
- const ollamaModels = (r.models || []).map((m) => ({ path: 'ollama://' + (m.name || m), name: m.name || m, sizeGB: m.size ? +(m.size / 1024 ** 3).toFixed(2) : 0, type: 'ollama' }));
287
- found.push(...ollamaModels);
292
+ const backendModels = (r.models || []).map((m) => ({ path: backend + '://' + (m.name || m), name: m.name || m, sizeGB: m.size ? +(m.size / 1024 ** 3).toFixed(2) : 0, type: backend }));
293
+ // Only add if not already in found
294
+ const existingNames = new Set(found.map((f) => f.name));
295
+ for (const bm of backendModels) {
296
+ if (!existingNames.has(bm.name)) found.push(bm);
297
+ }
288
298
  } catch (e) {}
289
- sendJson(res, 200, { models: found });
299
+ sendJson(res, 200, { models: found, backend });
290
300
  return;
291
301
  }
292
302
  if (req.method === 'GET' && req.url.split('?')[0] === '/api/models/hf-search') {
@@ -4,30 +4,65 @@ const fs = require('fs');
4
4
  const path = require('path');
5
5
  const os = require('os');
6
6
 
7
- const ROOTS = [
8
- path.join(os.homedir(), '.ollama'),
9
- path.join(os.homedir(), '.cache', 'lm-studio'),
10
- path.join(os.homedir(), 'LM Studio'),
11
- path.join(os.homedir(), 'models'),
12
- ];
7
+ const ROOTS_BY_BACKEND = {
8
+ ollama: [
9
+ path.join(os.homedir(), '.ollama'),
10
+ ],
11
+ lmstudio: [
12
+ path.join(os.homedir(), '.cache', 'lm-studio'),
13
+ path.join(os.homedir(), 'LM Studio'),
14
+ path.join(os.homedir(), '.lmstudio'),
15
+ ],
16
+ llamacpp: [
17
+ path.join(os.homedir(), 'models'),
18
+ path.join(os.homedir(), 'llama.cpp', 'models'),
19
+ ],
20
+ vllm: [],
21
+ openai: [],
22
+ generic: [
23
+ path.join(os.homedir(), 'models'),
24
+ path.join(os.homedir(), 'Downloads'),
25
+ ],
26
+ };
13
27
 
14
- // Also scan common drive roots on Windows
15
- function getDefaultRoots() {
16
- const roots = [...ROOTS];
28
+ function getDefaultRoots(backend) {
29
+ const roots = [...(ROOTS_BY_BACKEND[backend] || ROOTS_BY_BACKEND.generic)];
30
+ // Add common roots for all backends
31
+ if (!roots.includes(path.join(os.homedir(), 'models'))) {
32
+ roots.push(path.join(os.homedir(), 'models'));
33
+ }
17
34
  if (process.platform === 'win32') {
18
- // Add common Windows locations
19
- for (const drive of ['C:', 'D:', 'E:']) {
35
+ for (const drive of ['C:', 'D:', 'E:', 'F:']) {
20
36
  const modelsDir = drive + '\\models';
21
37
  try { if (fs.existsSync(modelsDir)) roots.push(modelsDir); } catch (e) {}
22
38
  const ollamaDir = drive + '\\.ollama';
23
39
  try { if (fs.existsSync(ollamaDir)) roots.push(ollamaDir); } catch (e) {}
40
+ // LM Studio on Windows
41
+ const lmStudioDir = drive + '\\LM Studio';
42
+ try { if (fs.existsSync(lmStudioDir)) roots.push(lmStudioDir); } catch (e) {}
24
43
  }
25
44
  }
26
- return roots;
45
+ // Deduplicate
46
+ return [...new Set(roots)];
47
+ }
48
+
49
+ // Detect which backend is active
50
+ function detectBackend() {
51
+ const envType = process.env.BACKEND_TYPE || '';
52
+ if (envType && ROOTS_BY_BACKEND[envType]) return envType;
53
+ // Check if Ollama is running
54
+ try {
55
+ const http = require('http');
56
+ // Synchronous check not possible; return 'generic' as default
57
+ } catch (e) {}
58
+ return 'generic';
27
59
  }
28
60
 
29
- function scan(roots, maxFiles) {
30
- roots = roots || getDefaultRoots();
61
+ function scan(roots, maxFiles, backend) {
62
+ // If no roots provided, use backend-specific defaults
63
+ if (!roots || (Array.isArray(roots) && roots.length === 0)) {
64
+ roots = getDefaultRoots(backend || detectBackend());
65
+ }
31
66
  const found = [];
32
67
  let count = 0;
33
68
  const extensions = /\.(gguf|bin|safetensors)$/i;
@@ -84,10 +119,10 @@ function huggingFacePull(repo, filename) {
84
119
  return { ok: true, url, note: 'streaming download not implemented; open URL or use huggingface-cli' };
85
120
  }
86
121
 
87
- module.exports = { ROOTS, getDefaultRoots, scan, huggingFacePull };
122
+ module.exports = { ROOTS: [], getDefaultRoots, scan, huggingFacePull };
88
123
  function huggingFacePull(repo, filename) {
89
124
  const url = 'https://huggingface.co/' + repo + '/resolve/main/' + (filename || '');
90
125
  return { ok: true, url, note: 'streaming download not implemented; open URL or use huggingface-cli' };
91
126
  }
92
127
 
93
- module.exports = { ROOTS, scan, huggingFacePull };
128
+ // (duplicate removed)
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.70.0';
3
+ const VERSION = '0.71.1';
4
4
  module.exports = { VERSION, version: VERSION };