Skip to content

Commit 08fb59f

Browse files
author
VoardWalker-Code
committed
feat: entity orchestration, blueprints, coding skill, project executor, health scanner, fixer generator, cmd_run tool, failsafe console, self-repair skill
MAJOR ADDITIONS (Phase 4.10–4.16): - Entity Orchestration (E-0 → E-7): multi-entity chat sessions, worker invoker, planning orchestrator, entity chat manager - Blueprint System: 11 core/module blueprints for task decomposition, tool guidance, error recovery, quality gates, output formatting, and domain modules (code, research, analysis, planning, writing, project) - Coding Skill + Project Executor: structured code/project task execution with blueprint-driven planning and workspace sandboxing - Health Scanner (scripts/health-scan.js): 300-entry CORE_REGISTRY, JSON/fix-list output modes, integrity verification - Fixer Generator (scripts/generate-fixer.js): produces standalone neko_fixer.py rebuild script (Python 3 stdlib only — NOT a dependency) - Sandboxed Code Execution (cmd_run tool): 20+ command whitelist, shell: false, workspace jail, timeout enforcement, 17 attack vectors blocked - Failsafe Console (client/failsafe.html): zero-dependency emergency WebGUI with auth, LLM setup, and chat — disaster recovery fallback - Self-Repair Skill: teaches entity to diagnose/fix its own system DOCS: - README: warning banner (active development), updated test count (2,012), expanded roadmap (Phases 4.10–4.16), self-repair/failsafe section, Python-not-required clarification, updated skills list and project structure - CHANGELOG: all new features documented - WORKLOG: session ledgers and stop/resume snapshot updated TESTS: 2,012/2,012 passing (0 fail) — +445 new guard tests
1 parent 0e17f64 commit 08fb59f

56 files changed

Lines changed: 10420 additions & 81 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,36 @@ jobs:
2626

2727
- name: Run tests
2828
working-directory: project
29-
run: npm test
29+
run: |
30+
npm test 2>&1 | tee test-output.txt
31+
# Fail the step if node exited non-zero (tee masks the exit code)
32+
exit ${PIPESTATUS[0]}
33+
34+
- name: Parse test results
35+
if: always()
36+
id: test-results
37+
working-directory: project
38+
run: |
39+
PASS=$(grep -oP '# pass \K[0-9]+' test-output.txt || echo "0")
40+
FAIL=$(grep -oP '# fail \K[0-9]+' test-output.txt || echo "0")
41+
echo "pass=$PASS" >> "$GITHUB_OUTPUT"
42+
echo "fail=$FAIL" >> "$GITHUB_OUTPUT"
43+
if [ "$FAIL" = "0" ]; then
44+
echo "color=brightgreen" >> "$GITHUB_OUTPUT"
45+
echo "label=$PASS passing" >> "$GITHUB_OUTPUT"
46+
else
47+
echo "color=red" >> "$GITHUB_OUTPUT"
48+
echo "label=$PASS passing, $FAIL failing" >> "$GITHUB_OUTPUT"
49+
fi
50+
51+
- name: Update test count badge
52+
if: github.ref == 'refs/heads/main' && always()
53+
uses: schneegans/dynamic-badges-action@v1.7.0
54+
with:
55+
auth: ${{ secrets.GIST_SECRET }}
56+
gistID: ${{ vars.BADGE_GIST_ID }}
57+
filename: nekocore-test-results.json
58+
label: tests
59+
message: ${{ steps.test-results.outputs.label }}
60+
color: ${{ steps.test-results.outputs.color }}
61+
style: flat-square

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ project/Config/ma-config.json
1111
project/server/data/accounts.json
1212
project/server/data/sessions.json
1313
project/server/data/task-sessions.json
14+
project/server/data/task-sessions.json.tmp-*
1415
project/server/data/checkouts.json
1516

1617
# Browser runtime data — generated by browser app
@@ -56,6 +57,9 @@ project/server/data/nekocore-audit.ndjson
5657
project/skills/*/workspace/*
5758
!project/skills/*/workspace/.gitkeep
5859

60+
# Generated system repair script (build artifact from generate-fixer.js)
61+
project/neko_fixer.py
62+
5963
# Wrangler / Cloudflare Pages deploy artifacts — not part of the project
6064
project/wrangler.toml
6165
project/.wrangler/

CHANGELOG.md

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

README.md

Lines changed: 61 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
 
2323
<img src="https://img.shields.io/badge/dependencies-0-brightgreen?style=flat-square" alt="zero deps"/>
2424
&nbsp;
25-
<img src="https://img.shields.io/badge/tests-1555%20passing-brightgreen?style=flat-square" alt="1555 tests"/>
25+
<a href="https://github.com/voardwalker-code/NekoCore-OS/actions/workflows/ci.yml"><img src="https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/voardwalker-code/BADGE_GIST_ID/raw/nekocore-test-results.json" alt="Tests"/></a>
2626
</p>
2727

2828
<p align="center">
@@ -37,14 +37,30 @@
3737

3838
<div align="center">
3939

40-
| 1,555 | 0 | 5 |
40+
| 2,012 | 0 | 5 |
4141
|:-----:|:-:|:-:|
4242
| **Tests Passing** | **Runtime Dependencies** | **Pipeline Phases** |
4343

4444
</div>
4545

4646
<br>
4747

48+
> [!WARNING]
49+
> **ACTIVE DEVELOPMENT — POWERFUL FEATURES, NOT YET BATTLE-TESTED**
50+
>
51+
> The `staging` branch contains major new subsystems that are **under active development**:
52+
> entity orchestration, blueprint-driven project execution, sandboxed code execution (Rust, Python, C/C++, Node.js),
53+
> a self-repair/diagnostics chain, and a failsafe emergency console.
54+
>
55+
> These features have **2,012 passing unit tests** but have **not been stress-tested in production**.
56+
> Expect rough edges. Back up your `entities/` and `memories/` folders before experimenting.
57+
>
58+
> **Python is NOT required to run NekoCore.** The only runtime dependency is Node.js 18+.
59+
> Python 3 is used *only* by the optional self-repair fixer script (`neko_fixer.py`) — a standalone
60+
> emergency rebuild tool generated on demand. It uses only the Python 3 standard library.
61+
62+
<br>
63+
4864
> **Core conviction:** an entity should be shaped by what it has experienced, not only by what it was told on day one.
4965
5066
---
@@ -200,7 +216,7 @@ The brain loop ticks independently of conversation:
200216
| **Realtime** | SSE cognitive bus — all pipeline events streamed to the browser |
201217
| **Visualizer** | Three.js WebGL 3D neural node graph — live cognitive bus events |
202218
| **Skills** | Drop-in function-call plugins: web search, memory tools, workspace ops |
203-
| **Test suite** | 1,555 passing — unit + integration (Node built-in `--test` runner) |
219+
| **Test suite** | 2,012 passing — unit + integration (Node built-in `--test` runner) |
204220
| **Installer** | Contract-driven app install/uninstall with rollback and file lifecycle |
205221

206222
### Memory System
@@ -260,17 +276,24 @@ The brain loop ticks independently of conversation:
260276
## ◉ Roadmap
261277

262278
```
263-
✔ Phase 1 Bug Fixes Complete
264-
✔ Phase 2 Refactor / Cleanup Complete
265-
✔ Phase 3 Full App Modularization Complete (866 tests, 0 fail)
266-
✔ Phase 4 Feature Foundation Complete
267-
✔ Phase 4.5 Intelligent Memory Expansion Complete
268-
✔ Phase 4.6 Slash Command System Complete (A0–A2; A3/A4 future)
269-
✔ Phase 4.7 HTML Shadow Cleanup Complete (guard-first refactor)
270-
✔ Phase 4.8 Cognitive State Integration Complete (4 phases, 14 slices)
271-
✔ Phase 4.8 Token Optimization Complete (Phases 1–4, ~68% reduction)
272-
✔ Phase 4.9 Task Orchestration (MTOA) Complete (T-1 → T-7)
273-
○ Phase 5 Predictive Memory Topology Next
279+
✔ Phase 1 Bug Fixes Complete
280+
✔ Phase 2 Refactor / Cleanup Complete
281+
✔ Phase 3 Full App Modularization Complete (866 tests, 0 fail)
282+
✔ Phase 4 Feature Foundation Complete
283+
✔ Phase 4.5 Intelligent Memory Expansion Complete
284+
✔ Phase 4.6 Slash Command System Complete (A0–A2; A3/A4 future)
285+
✔ Phase 4.7 HTML Shadow Cleanup Complete (guard-first refactor)
286+
✔ Phase 4.8 Cognitive State Integration Complete (4 phases, 14 slices)
287+
✔ Phase 4.8 Token Optimization Complete (Phases 1–4, ~68% reduction)
288+
✔ Phase 4.9 Task Orchestration (MTOA) Complete (T-1 → T-7)
289+
✔ Phase 4.10 Entity Orchestration Complete (E-0 → E-7)
290+
✔ Phase 4.11 Blueprint System Complete
291+
✔ Phase 4.12 Coding Skill + Project Executor Complete
292+
✔ Phase 4.13 Health Scanner + Fixer Generator Complete (self-repair chain)
293+
✔ Phase 4.14 Sandboxed Code Execution Complete (cmd_run tool)
294+
✔ Phase 4.15 BIOS Completeness + Failsafe Complete (300 registry entries)
295+
✔ Phase 4.16 Self-Repair Skill Complete (2,012 tests, 0 fail)
296+
○ Phase 5 Predictive Memory Topology Next
274297
```
275298

276299
**Token Optimization** eliminated ~68% of per-turn token usage across 4 phases:
@@ -299,8 +322,9 @@ The brain loop ticks independently of conversation:
299322

300323
### Prerequisites
301324

302-
- Node.js 18+
325+
- Node.js 18+ *(the only runtime requirement)*
303326
- An LLM provider — [Ollama](https://ollama.ai) (local) or an [OpenRouter](https://openrouter.ai) API key
327+
- Python 3 — **not required**. Only used by the optional `neko_fixer.py` self-repair script
304328

305329
### Clone & Start
306330

@@ -411,7 +435,26 @@ Skills live in `project/skills/<name>/`. The entity's LLM invokes them via funct
411435

412436
- `web-search` — searches the web and summarizes results
413437
- `memory-tools` — query, tag, or reinforce specific memories
438+
- `search-archive` — search archived conversation history
414439
- `ws_mkdir` / `ws_move` — workspace file operations
440+
- `vscode` — VS Code workspace integration
441+
- `coding` — write, run, test, and debug code projects
442+
- `python` / `rust` — language-specific programming skills
443+
- `tutorial-notes` — structured learning note-taking
444+
- `self-repair` — diagnose and fix NekoCore's own system (health scanner, fixer generator, failsafe console)
445+
446+
### Self-Repair & Failsafe
447+
448+
NekoCore includes a full self-healing chain for disaster recovery:
449+
450+
| Tool | What it does | Requires |
451+
|------|-------------|----------|
452+
| **Health Scanner** (`node scripts/health-scan.js`) | Scans 300 core files for missing/corrupt entries | Node.js |
453+
| **Fixer Generator** (`node scripts/generate-fixer.js`) | Produces `neko_fixer.py` — a standalone rebuild script | Node.js |
454+
| **neko_fixer.py** | Restores missing/corrupt files from embedded DNA hashes | Python 3 (stdlib only) |
455+
| **Failsafe Console** (`/failsafe.html`) | Zero-dependency emergency WebGUI — auth, LLM setup, chat | Browser |
456+
457+
> **Python is not required to run NekoCore.** The fixer script is an optional emergency tool generated on demand. It uses only the Python 3 standard library — no pip, no packages.
415458
416459
### Telegram Integration
417460

@@ -434,8 +477,9 @@ NekoCore-OS/
434477
├── client/ # Browser frontend (desktop shell + apps)
435478
├── server/ # Backend server
436479
├── browser-host/ # Browser host modules
437-
├── skills/ # Pluggable skill plugins
438-
├── tests/ # Unit + integration tests (1,555 passing)
480+
├── skills/ # Pluggable skill plugins (11 skills)
481+
├── scripts/ # Health scanner, fixer generator, safety scripts
482+
├── tests/ # Unit + integration tests (2,012 passing)
439483
├── Config/ # Runtime config template/example
440484
├── entities/ # Runtime entity data (gitignored)
441485
├── memories/ # System memory (gitignored)

0 commit comments

Comments
 (0)