Skip to content

Commit 5dd08c3

Browse files
v7.9.11 — IdleMind thoughtCount persistence, KG-search TF-IDF + file-boost, Win path adapter, Win console codepage decoding
1 parent e3928c0 commit 5dd08c3

24 files changed

Lines changed: 1029 additions & 160 deletions

ARCHITECTURE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
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.
1111

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).
1313

1414
---
1515

CHANGELOG-v7.md

Lines changed: 84 additions & 0 deletions
Large diffs are not rendered by default.

CHANGELOG.md

Lines changed: 26 additions & 61 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<br>
99
<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>
1010
<br><br>
11-
<img src="https://img.shields.io/badge/version-7.9.10-d4a017?style=flat-square" alt="Version">
11+
<img src="https://img.shields.io/badge/version-7.9.11-d4a017?style=flat-square" alt="Version">
1212
<img src="https://img.shields.io/badge/tests-8105%20passing-4ade80?style=flat-square" alt="Tests">
1313
<img src="https://img.shields.io/badge/fitness-126%2F130-4ade80?style=flat-square" alt="Fitness">
1414
<img src="https://img.shields.io/badge/TSC-typecheck_ok-4ade80?style=flat-square" alt="TSC">
1515
<img src="https://img.shields.io/badge/schemas-100%25-4ade80?style=flat-square" alt="Schemas">
16-
<img src="https://img.shields.io/badge/modules-379-e0e0e8?style=flat-square" alt="Modules">
16+
<img src="https://img.shields.io/badge/modules-380-e0e0e8?style=flat-square" alt="Modules">
1717
<img src="https://img.shields.io/badge/services-178-fbbf24?style=flat-square" alt="Services">
1818
<img src="https://img.shields.io/badge/capabilities-240+-fbbf24?style=flat-square" alt="Capabilities">
1919
<img src="https://img.shields.io/badge/phases-12-c084fc?style=flat-square" alt="Phases">

RELEASE_NOTES.md

Lines changed: 26 additions & 61 deletions
Large diffs are not rendered by default.

docs/ARCHITECTURE-DEEP-DIVE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ Genesis Agent is a **self-modifying, self-verifying, cognitive AI agent** built
1313
| Metric | Value |
1414
|--------|-------|
1515
| Production LOC (src/) | ~101,500 |
16-
| Source Modules | 379 JS files |
17-
| Test Files / Tests | 502 / 8105 (Win baseline) |
16+
| Source Modules | 380 JS files |
17+
| Test Files / Tests | 506 / 8105 (Win baseline) |
1818
| DI Services | 178 (165 manifest + 13 bootstrap) |
1919
| Boot Phases | 12 |
2020
| Boot Time (Windows, cold) | ~1.3 s |
21-
| npm Dependencies | 4 production + 1 optional + 10 dev |
21+
| npm Dependencies | 5 production + 1 optional + 10 dev |
2222
| Event Types (catalogued) | 489 |
2323
| Event Schemas | 489 |
2424
| IPC Channels | 68 main ↔ 68 preload |
@@ -569,5 +569,5 @@ Approximate as of v7.5.6 (numbers shift with each release):
569569
─────────────────────────────────────────────
570570
agent/ total 259 files ~84,900 LOC
571571
+ UI/kernel 47 files ~13,800 LOC
572-
= src/ total 379 modules ~119,000 LOC
572+
= src/ total 380 modules ~119,000 LOC
573573
```

docs/CAPABILITIES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
## Scale
66

7-
- 379 source modules across 12 boot phases
7+
- 380 source modules across 12 boot phases
88
- 178 DI services (165 manifest + 13 bootstrap)
99
- 8105 tests on Windows / 7932 on Linux (passing, 0 failures)
1010
- 489 events with 489 payload schemas (full parity)
@@ -257,7 +257,7 @@ See [COMMUNICATION.md](COMMUNICATION.md) for the full protocol specification.
257257
| **Dashboard** | EventBus inspector, health status, dependency graph (v5.4: extracted to 3 delegate files) |
258258
| **i18n** | EN, DE, FR, ES UI (auto-detected, switchable) |
259259
| **Structured logging** | Human-readable or JSON-lines format, pluggable sink |
260-
| **502 test files** | 8105 tests (Win baseline, v7.9.6), coverage gates: 80% lines, 76% branches, 78% functions |
260+
| **506 test files** | 8105 tests (Win baseline, v7.9.6), coverage gates: 80% lines, 76% branches, 78% functions |
261261
| **CI scripts** | `npm run ci` = tests + event validation + channel validation + fitness gate |
262262
| **TypeScript CI** `v5.4` | `tsc --noEmit` blocks merges — zero type regressions allowed |
263263
| **Degradation matrix** | Auto-generated report showing what breaks if each service is missing |

docs/COMMUNICATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ EmotionalState ──emit('emotion:shift')──→ EventBus ──→ PromptBui
3939

4040
Key properties:
4141

42-
- **489 event types** catalogued in `EventTypes.js` (v7.9.10 baseline)
42+
- **489 event types** catalogued in `EventTypes.js` (v7.9.11 baseline)
4343
- **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
4444
- **Ring buffer history** — last 500 events for debugging
4545
- **Source tracking** — every event carries `{ source: 'ModuleName' }` for audit

docs/TROUBLESHOOTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,22 @@ If you're at AUTONOMOUS and want approval prompts on high-sim-risk steps regardl
346346
347347
**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).
348348
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+
349365
---
350366
351367
## Test Suite Performance
@@ -433,6 +449,22 @@ npm run test:coverage
433449
2. Space in directory path — move the project to a path without spaces
434450
3. PowerShell execution policy — run `Set-ExecutionPolicy RemoteSigned -Scope CurrentUser`
435451
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.
459+
460+
### Windows: SHELL output shows `f�r` / `Datentr�ger` / replacement characters
461+
462+
**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.
467+
436468
### macOS: App is damaged / can't be opened
437469
438470
**Cause:** Unsigned Electron app.

docs/banner.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)