somora 2026.1001.3 → 2026.1001.4
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 +6 -5
- package/docs/setup.md +12 -5
- package/package.json +2 -9
- package/src/cli/setup.ts +54 -1
- package/src/cli/somora.ts +14 -5
- package/src/cli/update-args.ts +1 -1
- package/npm-shrinkwrap.json +0 -5661
package/README.md
CHANGED
|
@@ -189,11 +189,12 @@ then starts the **setup assistant**:
|
|
|
189
189
|
```text
|
|
190
190
|
somora setup
|
|
191
191
|
1 Models connect a Claude or ChatGPT subscription, or your own model server
|
|
192
|
-
2
|
|
193
|
-
3
|
|
194
|
-
4
|
|
195
|
-
5
|
|
196
|
-
6
|
|
192
|
+
2 Web search a Brave Search API key, so agents can search the web
|
|
193
|
+
3 First agent name, language, model and a backup model
|
|
194
|
+
4 Memory REM, Deep and Lucid — and where the shared wiki lives
|
|
195
|
+
5 Team who is who, once there is more than one agent
|
|
196
|
+
6 Access HTTPS through Tailscale, so phone and laptop can reach it
|
|
197
|
+
7 Start + test starts the service and sends your agent a real message
|
|
197
198
|
```
|
|
198
199
|
|
|
199
200
|
Every step first looks at what is already there, so `somora setup` is safe
|
package/docs/setup.md
CHANGED
|
@@ -42,12 +42,13 @@ every GitHub release as `install.sh`.
|
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
44
|
somora setup # all steps
|
|
45
|
-
somora setup access # one step: models | agent | memory | team | access | start
|
|
45
|
+
somora setup access # one step: models | search | agent | memory | team | access | start
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
| Step | What it does |
|
|
49
49
|
|---|---|
|
|
50
50
|
| `models` | Claude subscription (installs Claude Code if missing, runs its login), ChatGPT subscription (the bundled Codex login, browser or device code), or your own OpenAI-compatible server (asks the address, lists its models, asks the context window). Writes the `providers:` block with the tested settings from [models.md](models.md). |
|
|
51
|
+
| `search` | Web search: asks for a Brave Search API key (free plan, 2,000 searches a month), checks it with one real search and stores it under `web.brave.apiKey` — that switches the agents' `web_search` tool on. |
|
|
51
52
|
| `agent` | Creates the first agent: name, how it addresses you, answer language, model, backup model. On an existing install it lists the agents and offers to repair one whose model no longer exists. |
|
|
52
53
|
| `memory` | Turns on REM per agent (with its own model), the duplicate check for new notes, and the shared wiki with Deep and Lucid — in a new folder or an existing Obsidian vault ([dream-phases.md](dream-phases.md), [wiki.md](wiki.md)). |
|
|
53
54
|
| `team` | With two or more agents: writes the first `team.yaml` ([team.md](team.md)). |
|
|
@@ -129,10 +130,16 @@ single-window-only; the TUI is unaffected.
|
|
|
129
130
|
npm install -g somora
|
|
130
131
|
```
|
|
131
132
|
|
|
132
|
-
The package carries the built web clients
|
|
133
|
-
(`
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
The package carries the built web clients. One native module
|
|
134
|
+
(`node-pty`) is compiled during the install on Linux — that is what the
|
|
135
|
+
compiler from §1 is for. The install is about 1.4 GB: somora itself is
|
|
136
|
+
20 MB, the rest are the bundled Codex and Claude engines (each a
|
|
137
|
+
complete program for your platform), the embedding runtime for the
|
|
138
|
+
memory search, the image library and the terminal module. The embedding
|
|
139
|
+
runtime would also download a 300 MB CUDA library on Linux that somora
|
|
140
|
+
never uses (embeddings run on the CPU); the installer and `somora
|
|
141
|
+
update` skip it with `ONNXRUNTIME_NODE_INSTALL=skip` — set the same
|
|
142
|
+
variable when you run `npm install -g somora` by hand.
|
|
136
143
|
|
|
137
144
|
If npm answers `EACCES`, its global folder belongs to root. Give npm a
|
|
138
145
|
folder of your own instead of reaching for `sudo`:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "somora",
|
|
3
|
-
"version": "2026.1001.
|
|
3
|
+
"version": "2026.1001.4",
|
|
4
4
|
"description": "A self-hosted multi-agent harness: your agents, your models, one server — with memory, a shared wiki, a web desktop, a phone app and a terminal client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
"web-mobile/dist",
|
|
44
44
|
"tsconfig.json",
|
|
45
45
|
"package.json",
|
|
46
|
-
"npm-shrinkwrap.json",
|
|
47
46
|
"README.md",
|
|
48
47
|
"LICENSE",
|
|
49
48
|
"!src/**/*.test.mts",
|
|
@@ -65,7 +64,7 @@
|
|
|
65
64
|
"@anthropic-ai/claude-agent-sdk": "^0.3.152",
|
|
66
65
|
"@anthropic-ai/sdk": "^0.99.0",
|
|
67
66
|
"@hono/node-server": "2.1.1",
|
|
68
|
-
"@huggingface/transformers": "^4.
|
|
67
|
+
"@huggingface/transformers": "^4.3.0",
|
|
69
68
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
70
69
|
"@mozilla/readability": "^0.6.0",
|
|
71
70
|
"@openai/codex": "0.153.4",
|
|
@@ -106,11 +105,5 @@
|
|
|
106
105
|
"@types/turndown": "^5.0.6",
|
|
107
106
|
"@types/ws": "^8.18.1",
|
|
108
107
|
"typescript": "^6.0.3"
|
|
109
|
-
},
|
|
110
|
-
"overrides": {
|
|
111
|
-
"sharp": "^0.35.4",
|
|
112
|
-
"onnxruntime-node": {
|
|
113
|
-
"adm-zip": "^0.6.0"
|
|
114
|
-
}
|
|
115
108
|
}
|
|
116
109
|
}
|
package/src/cli/setup.ts
CHANGED
|
@@ -38,11 +38,12 @@ const AGENTS_DIR = join(SOMORA_HOME, 'agents');
|
|
|
38
38
|
const UNIT_PATH = join(HOME, '.config', 'systemd', 'user', 'somora.service');
|
|
39
39
|
const BIN_PATH = process.env.SOMORA_BIN_PATH ?? '';
|
|
40
40
|
|
|
41
|
-
const STEPS = ['models', 'agent', 'memory', 'team', 'access', 'start'] as const;
|
|
41
|
+
const STEPS = ['models', 'search', 'agent', 'memory', 'team', 'access', 'start'] as const;
|
|
42
42
|
type Step = (typeof STEPS)[number];
|
|
43
43
|
|
|
44
44
|
const STEP_TITLES: Record<Step, string> = {
|
|
45
45
|
models: 'Models — which AI your agents use',
|
|
46
|
+
search: 'Web search',
|
|
46
47
|
agent: 'Your first agent',
|
|
47
48
|
memory: 'Memory and dreaming',
|
|
48
49
|
team: 'Team',
|
|
@@ -419,6 +420,57 @@ async function stepModels(ctx: Ctx): Promise<void> {
|
|
|
419
420
|
if (save(config, 'config', 'models saved')) ctx.needsRestart = true;
|
|
420
421
|
}
|
|
421
422
|
|
|
423
|
+
// ─── step: search ─────────────────────────────────────────────────────
|
|
424
|
+
|
|
425
|
+
/** One request to Brave with the key: is it accepted? */
|
|
426
|
+
async function braveKeyWorks(key: string): Promise<true | string> {
|
|
427
|
+
try {
|
|
428
|
+
const r = await fetch('https://api.search.brave.com/res/v1/web/search?q=somora&count=1', {
|
|
429
|
+
headers: { Accept: 'application/json', 'X-Subscription-Token': key },
|
|
430
|
+
signal: AbortSignal.timeout(10_000),
|
|
431
|
+
});
|
|
432
|
+
if (r.ok) return true;
|
|
433
|
+
if (r.status === 401 || r.status === 403 || r.status === 422) return `Brave rejected the key (HTTP ${r.status}) — copy it again from the dashboard`;
|
|
434
|
+
if (r.status === 429) return 'Brave answered "rate limited" (429) — the key works, but the monthly quota is used up';
|
|
435
|
+
return `Brave answered HTTP ${r.status}`;
|
|
436
|
+
} catch (err) {
|
|
437
|
+
return `could not reach Brave: ${(err as Error).message}`;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
async function stepSearch(ctx: Ctx): Promise<void> {
|
|
442
|
+
const { p } = ctx;
|
|
443
|
+
const config = openConfig();
|
|
444
|
+
const current = getIn(config, ['web', 'brave', 'apiKey']);
|
|
445
|
+
if (typeof current === 'string' && current) {
|
|
446
|
+
ok('web search is on (Brave Search API key present)');
|
|
447
|
+
if (!(await p.confirm('Replace the key?', false))) return;
|
|
448
|
+
} else {
|
|
449
|
+
explain(`Agents can search the web through the Brave Search API: they get the
|
|
450
|
+
\`web_search\` tool, and \`web_fetch\` reads the pages it finds. The free plan
|
|
451
|
+
allows 2,000 searches a month. Without a key the agents can still read a page
|
|
452
|
+
you give them, but not search.
|
|
453
|
+
1. create an account at https://api-dashboard.search.brave.com
|
|
454
|
+
2. choose the free "Data for Search" plan and create an API key
|
|
455
|
+
3. paste the key here (it is stored in config.yaml, which only you can read)`);
|
|
456
|
+
if (!(await p.confirm('Do you have a Brave Search API key?', false))) {
|
|
457
|
+
warn('skipped — add it later with `somora setup search`');
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
const key = await p.askValid('API key', undefined, (v) => (v.length < 10 ? 'that is too short for a key' : /\s/.test(v) ? 'a key has no spaces' : null));
|
|
462
|
+
say(` ${dim('checking the key with one search…')}`);
|
|
463
|
+
const result = await braveKeyWorks(key);
|
|
464
|
+
if (result !== true) {
|
|
465
|
+
warn(result);
|
|
466
|
+
if (!(await p.confirm('Store it anyway?', false))) return;
|
|
467
|
+
} else {
|
|
468
|
+
ok('Brave accepted the key');
|
|
469
|
+
}
|
|
470
|
+
setIn(config, ['web', 'brave', 'apiKey'], key);
|
|
471
|
+
if (save(config, 'config', 'web search saved')) ctx.needsRestart = true;
|
|
472
|
+
}
|
|
473
|
+
|
|
422
474
|
// ─── step: agent ──────────────────────────────────────────────────────
|
|
423
475
|
|
|
424
476
|
function personaFiles(name: string, userName: string, language: string): Record<string, string> {
|
|
@@ -833,6 +885,7 @@ async function stepStart(ctx: Ctx): Promise<void> {
|
|
|
833
885
|
|
|
834
886
|
const RUN: Record<Step, (ctx: Ctx) => Promise<void>> = {
|
|
835
887
|
models: stepModels,
|
|
888
|
+
search: stepSearch,
|
|
836
889
|
agent: stepAgent,
|
|
837
890
|
memory: stepMemory,
|
|
838
891
|
team: stepTeam,
|
package/src/cli/somora.ts
CHANGED
|
@@ -382,9 +382,14 @@ function cmdServerStatus(): number {
|
|
|
382
382
|
}
|
|
383
383
|
const update = updateStatus();
|
|
384
384
|
if (update.latestVersion) {
|
|
385
|
+
// somora.ai may still name the previous version for up to an hour
|
|
386
|
+
// after a release — then this install is the newer one, not behind.
|
|
387
|
+
const newer = compareVersions(SOMORA_VERSION, update.latestVersion) > 0;
|
|
385
388
|
process.stdout.write(update.updateAvailable
|
|
386
389
|
? ` update: ${update.latestVersion} is available — run \`somora update\`${update.note ? ` (${update.note})` : ''}\n`
|
|
387
|
-
:
|
|
390
|
+
: newer
|
|
391
|
+
? ` update: none — somora.ai reports ${update.latestVersion}, this install is newer\n`
|
|
392
|
+
: ` update: none — ${update.latestVersion} is the current version\n`);
|
|
388
393
|
}
|
|
389
394
|
if (launchdAvailable()) {
|
|
390
395
|
const installed = existsSync(launchdPlistPath());
|
|
@@ -534,13 +539,17 @@ async function cmdUpdate(args: string[]): Promise<number> {
|
|
|
534
539
|
return 1;
|
|
535
540
|
}
|
|
536
541
|
|
|
537
|
-
//
|
|
538
|
-
//
|
|
539
|
-
//
|
|
542
|
+
// somora never runs embeddings on CUDA (the embedder uses the CPU
|
|
543
|
+
// provider), so the 300 MB CUDA library onnxruntime-node would
|
|
544
|
+
// download on Linux is skipped — a fifth of the install.
|
|
540
545
|
const spec = `${SOMORA_NPM_NAME}@${target.version}`;
|
|
541
546
|
process.stdout.write(` npm install -g ${spec}\n`);
|
|
542
547
|
const allow = allowScriptsArgs(run('npm', ['config', 'get', 'allow-scripts']).stdout);
|
|
543
|
-
const ri = spawnSync('npm', ['install', '-g', '--no-audit', '--no-fund', ...allow, spec], {
|
|
548
|
+
const ri = spawnSync('npm', ['install', '-g', '--no-audit', '--no-fund', ...allow, spec], {
|
|
549
|
+
encoding: 'utf8',
|
|
550
|
+
stdio: ['inherit', 'inherit', 'pipe'],
|
|
551
|
+
env: { ...process.env, ONNXRUNTIME_NODE_INSTALL: 'skip' },
|
|
552
|
+
});
|
|
544
553
|
if (ri.stderr) process.stderr.write(ri.stderr);
|
|
545
554
|
if (ri.status !== 0) {
|
|
546
555
|
if (/EACCES/.test(ri.stderr ?? '')) {
|
package/src/cli/update-args.ts
CHANGED
|
@@ -58,7 +58,7 @@ export function compareVersions(a: string, b: string): number {
|
|
|
58
58
|
* 11.16 on wants them named on a global install (`--allow-scripts`);
|
|
59
59
|
* today it only warns, a stricter default would leave node-pty and
|
|
60
60
|
* better-sqlite3 unbuilt. update-args.test.mts holds this list against
|
|
61
|
-
*
|
|
61
|
+
* package-lock.json and install.sh. */
|
|
62
62
|
export const ALLOW_SCRIPTS = ['better-sqlite3', 'cpu-features', 'esbuild', 'fsevents', 'node-pty', 'onnxruntime-node', 'protobufjs', 'ssh2'];
|
|
63
63
|
|
|
64
64
|
/** Extra arguments for `npm install -g`, given what `npm config get
|