You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ARCHITECTURE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
10
10
Genesis is a self-modifying AI agent that runs as an Electron desktop app. It talks to LLM backends (Ollama local, Anthropic, OpenAI-compatible), plans multi-step tasks, writes and verifies code, modifies its own source, and monitors its own health. It has an organism-inspired layer that regulates behavior under stress and a lightweight awareness system that gates self-modification via coherence checks.
11
11
12
-
The codebase is ~119k LOC of JavaScript (CommonJS), 379 source modules, with zero external runtime frameworks. The manifest statically registers 165 DI-managed services. During boot, late-binding wiring and derived services (like `llmCache` being exposed from `model._cache`) bring the active service count to 178 — this is what you'll see in the final boot log line. Four production dependencies: `acorn` (AST parsing), `chokidar` (file watching), `dompurify` (XSS sanitisation in the chat-renderer), `tree-kill` (process cleanup).
12
+
The codebase is ~119k LOC of JavaScript (CommonJS), 380 source modules, with zero external runtime frameworks. The manifest statically registers 165 DI-managed services. During boot, late-binding wiring and derived services (like `llmCache` being exposed from `model._cache`) bring the active service count to 178 — this is what you'll see in the final boot log line. Four production dependencies: `acorn` (AST parsing), `chokidar` (file watching), `dompurify` (XSS sanitisation in the chat-renderer), `tree-kill` (process cleanup).
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,12 @@
8
8
<br>
9
9
<sub>Reads its own source code. Plans changes. Tests them in a sandbox before applying.<br>Verifies output programmatically before trusting it. Pursues multi-step goals across restarts.<br>Runs idle-time consolidation in the background. Tracks an emotional state as a behavioral steering signal — not a claim of sentience.<br>Learns what prompts and temperatures work for its specific model.</sub>
-**489 event types** catalogued in `EventTypes.js` (v7.9.10 baseline)
42
+
-**489 event types** catalogued in `EventTypes.js` (v7.9.11 baseline)
43
43
-**489 payload schemas** in `EventPayloadSchemas.js` — full parity since v7.6.x (every catalog entry has a registered schema); dev-mode validation throws on mismatch
44
44
-**Ring buffer history** — last 500 events for debugging
45
45
-**Source tracking** — every event carries `{ source: 'ModuleName' }` for audit
Copy file name to clipboardExpand all lines: docs/TROUBLESHOOTING.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -346,6 +346,22 @@ If you're at AUTONOMOUS and want approval prompts on high-sim-risk steps regardl
346
346
347
347
**Fix:** Upgrade to v7.9.10 or later. The cap is automatically lifted to 10 when `LLMCapabilityDetector` flags the model as no-prefill. Local prefill-capable models still cap at 6 (no benefit to raising it).
348
348
349
+
### SEARCH-step returns 2-of-5 irrelevant results that don't match the file in the query (pre-v7.9.11)
350
+
351
+
**Symptom:** A SEARCH goal-step with a query like `"Identify all references to Reflect.js in the codebase"` returns a top-5 mix that includes idea-nodes or insight-nodes referencing other files — even when the KG contains insight-nodes whose `properties.file` matches the queried file exactly.
352
+
353
+
**Why it happens (pre-v7.9.11):**`KnowledgeGraphSearch.search()` weighted every query word equally (+2 for text match, +3 for label match). Generic words like `"all"`, `"the"`, `"references"`, `"reflect"` matched many nodes and rare tokens (file names, specific identifiers) were undistinguished. A generic idea-node containing `"reflect on..."` outranked a specific insight tagged with `properties.file = "Reflect.js"`.
354
+
355
+
**Fix:** Upgrade to v7.9.11 or later. The new scoring uses inverse document frequency per query word (rare tokens score higher than common ones) plus a file-token boost (`X.js`/`X.ts`/`X.md`/`X.json` patterns in the query lift matching `properties.file` nodes and demote generic-match-only nodes). Existing `searchAsync` hybrid keyword+vector ranking gets the improvement automatically because it uses `search()` internally as its keyword source.
356
+
357
+
### Dashboard shows "0 thoughts" next to activity counts in double digits (pre-v7.9.11)
358
+
359
+
**Symptom:** The IdleMind dashboard widget displays `0 thoughts · idle 24min` immediately next to per-activity counts like `explore 5 · ideate 5 · reflect 4 · plan 4 · research 4` — clearly more than zero activities have happened, but the thought counter is zero.
360
+
361
+
**Why it happens (pre-v7.9.11):**`IdleMindActivityStats._saveActivityStats` wrote `activityCounts` to disk but never `thoughtCount`. The constructor's `this.thoughtCount = 0` survived every restart because the load path didn't restore it.
362
+
363
+
**Fix:** Upgrade to v7.9.11 or later. The save payload now includes `thoughtCount` and the load path restores it. Legacy stats files from v7.9.10 and earlier fall back to `sum(activityCounts.values())` — a lower bound (skip-cycles where Genesis decided not to think weren't counted at all pre-fix) but better than the visible reset to zero. The counter remains "grossly accurate" by design, not bookkeeping-precise; it's a dashboard indicator.
364
+
349
365
---
350
366
351
367
## Test Suite Performance
@@ -433,6 +449,22 @@ npm run test:coverage
433
449
2. Space in directory path — move the project to a path without spaces
434
450
3. PowerShell execution policy — run `Set-ExecutionPolicy RemoteSigned -Scope CurrentUser`
435
451
452
+
### Windows: SHELL step fails with "syntax of the filename is incorrect"
453
+
454
+
**Symptom:** A SHELL goal-step or `shell` tool call returns the cmd.exe error `The syntax of the filename, directory name, or volume label is incorrect` (or its German equivalent `Die Syntax fuer den Dateinamen ... ist falsch`, with umlauts that may render as replacement characters on cp850 consoles before v7.9.11) when the LLM-generated command contained a Unix-style path like `cat src/agent/X.js`.
455
+
456
+
**Cause:** cmd.exe interprets `/agent` (the second segment of the forward-slash path) as command switches `/a /g /e /n /t`. Pre-v7.9.11 the `ShellOSAdapter` translated `cat → type` but left the forward-slash path intact.
457
+
458
+
**Fix:** Resolved in v7.9.11 — `ShellOSAdapter.adaptCommand` now also converts forward-slash paths to backslashes in a quote-aware, switch-aware way (single-letter and short-word `/x` tokens are recognised as cmd switches and preserved). If you see this on an older version, upgrade.
**Symptom:** Output from the `shell` tool or SHELL goal-step contains `U+FFFD` replacement characters where umlauts or other accented characters should be.
463
+
464
+
**Cause:** cmd.exe writes its output in the active console codepage (cp850 on German Windows, cp437 on English Windows). Pre-v7.9.11 Node read the output with `encoding: 'utf-8'`, which misinterpreted the cp850/cp437 bytes and replaced them with `U+FFFD`.
465
+
466
+
**Fix:** Resolved in v7.9.11 — `WinConsoleEncoding.js` detects the active codepage via `chcp` at boot and decodes shell output with `iconv-lite`. The fix applies to all eight execFile sites (`shell`/`git-log`/`git-diff` tools, `ShellAgent` central + git status/branch + powershell, `AgentLoopSteps` SHELL fallback). Linux and macOS are unaffected.
0 commit comments