nexo-brain 3.0.2 → 3.1.0
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/.claude-plugin/plugin.json +1 -1
- package/README.md +62 -0
- package/community/launch/2026-04-v3-0-2/case-study-outreach.md +36 -0
- package/community/launch/2026-04-v3-0-2/devto-v3-0-2.md +91 -0
- package/community/launch/2026-04-v3-0-2/github-discussion-v3-0-2.md +58 -0
- package/community/launch/2026-04-v3-0-2/x-thread-v3-0-2.md +60 -0
- package/hooks/hooks.json +12 -0
- package/package.json +1 -1
- package/src/client_sync.py +6 -0
- package/src/doctor/providers/runtime.py +10 -5
- package/src/evolution_cycle.py +28 -1
- package/src/hook_guardrails.py +182 -0
- package/src/hooks/protocol-guardrail.sh +1 -1
- package/src/hooks/protocol-pretool-guardrail.sh +9 -0
- package/src/plugins/protocol.py +15 -0
- package/src/protocol_settings.py +59 -0
- package/src/public_evolution_queue.py +241 -0
- package/src/scripts/nexo-daily-self-audit.py +665 -27
- package/src/scripts/nexo-evolution-run.py +35 -1
- package/src/server.py +26 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexo-brain",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Local cognitive runtime for Claude Code \u2014 persistent memory, overnight learning, doctor diagnostics, personal scripts, recovery-aware jobs, startup preflight, and optional dashboard/power helper.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "NEXO Brain",
|
package/README.md
CHANGED
|
@@ -20,12 +20,16 @@
|
|
|
20
20
|
|
|
21
21
|
Start here:
|
|
22
22
|
- [5-minute quickstart](docs/quickstart-5-minutes.md)
|
|
23
|
+
- [Workflow quickstart](docs/workflows-quickstart.md)
|
|
24
|
+
- [Supported client guides](docs/integrations/cursor.md)
|
|
25
|
+
- [Docker setup](docs/docker-setup.md)
|
|
23
26
|
- [Architecture visuals](docs/architecture-visuals.md)
|
|
24
27
|
- [Memory classes](docs/memory-classes.md)
|
|
25
28
|
- [Session portability](docs/session-portability.md)
|
|
26
29
|
- [Python SDK](docs/sdk-python.md)
|
|
27
30
|
- [Reference verticals](docs/reference-verticals.md)
|
|
28
31
|
- [Measured compare scorecard](compare/README.md)
|
|
32
|
+
- [Memory benchmark harness](benchmarks/README.md)
|
|
29
33
|
- [Public contribution guide](docs/public-contribution.md)
|
|
30
34
|
|
|
31
35
|
Every time you close a session, everything is lost. Your agent doesn't remember yesterday's decisions, repeats the same mistakes, and starts from zero. NEXO Brain fixes this with a cognitive architecture modeled after how human memory actually works.
|
|
@@ -89,6 +93,17 @@ Versions `3.0.0` and `3.0.1` close the next execution gap:
|
|
|
89
93
|
| Runtime doctor parity audit | Yes | Yes | Shared-brain only |
|
|
90
94
|
| Recommended today | Yes | Supported | Shared-brain companion |
|
|
91
95
|
|
|
96
|
+
### Supported Clients
|
|
97
|
+
|
|
98
|
+
| Client | Status | Integration style | Notes |
|
|
99
|
+
|--------|--------|-------------------|-------|
|
|
100
|
+
| Claude Code | First-class | Managed install + hooks + bootstrap | Deepest NEXO parity today |
|
|
101
|
+
| Codex | First-class | Managed install + bootstrap + transcript parity | Best non-Claude terminal path |
|
|
102
|
+
| Claude Desktop | Companion | MCP-only shared brain | Useful as read/chat companion |
|
|
103
|
+
| Cursor | Documented companion | MCP + `.cursor/rules` | Good editor pairing; no Deep Sleep transcript parity yet |
|
|
104
|
+
| Windsurf | Documented companion | MCP + `.windsurf/rules` or repo `AGENTS.md` | Native MCP support, manual companion mode |
|
|
105
|
+
| Gemini CLI | Adapter included | MCP + `GEMINI.md` | Best when you want Gemini as a shared-brain companion, not the primary NEXO runtime |
|
|
106
|
+
|
|
92
107
|
## The Problem
|
|
93
108
|
|
|
94
109
|
AI coding agents are powerful but amnesic:
|
|
@@ -669,6 +684,27 @@ The installer handles everything and syncs the same `nexo` MCP brain into Claude
|
|
|
669
684
|
+----------------------------------------------------------+
|
|
670
685
|
```
|
|
671
686
|
|
|
687
|
+
### Docker Compose
|
|
688
|
+
|
|
689
|
+
NEXO now ships a root-level [`docker-compose.yml`](docs/docker-setup.md) for a persistent containerized runtime. It does two things at once:
|
|
690
|
+
|
|
691
|
+
- keeps `NEXO_HOME` on a named volume
|
|
692
|
+
- exposes a remote MCP endpoint at `http://localhost:8000/mcp` for IDEs that support HTTP/SSE MCP
|
|
693
|
+
|
|
694
|
+
Start it with:
|
|
695
|
+
|
|
696
|
+
```bash
|
|
697
|
+
docker compose up -d
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
For Claude Code and Codex, keep using stdio and point the MCP command at the running container:
|
|
701
|
+
|
|
702
|
+
```bash
|
|
703
|
+
docker compose exec -T nexo python src/server.py
|
|
704
|
+
```
|
|
705
|
+
|
|
706
|
+
That gives you the same persistent brain in the container while keeping terminal clients on their native stdio transport. The full step-by-step flow, health checks, and config examples live in [docs/docker-setup.md](docs/docker-setup.md).
|
|
707
|
+
|
|
672
708
|
### Starting a Session
|
|
673
709
|
|
|
674
710
|
After install, use the runtime CLI:
|
|
@@ -896,6 +932,18 @@ When Claude Desktop is installed, `nexo-brain`, `nexo update`, and `nexo clients
|
|
|
896
932
|
|
|
897
933
|
When Codex CLI is available, `nexo-brain`, `nexo update`, and `nexo clients sync` register the same `nexo` MCP server via `codex mcp add`, so Codex uses the same local memory store as Claude Code and Claude Desktop. If selected during install, `nexo chat` can open Codex directly and background automation can also run through Codex. Interactive `nexo chat` launches use Codex's aggressive no-confirmation mode so the session does not stall on repetitive approval prompts. The current recommended Codex profile is `gpt-5.4` with `xhigh` reasoning. Runtime Doctor also audits recent Codex sessions for NEXO startup markers and conditioned-file protocol discipline so parity drift does not hide behind the lack of native Claude-style hooks.
|
|
898
934
|
|
|
935
|
+
### Cursor
|
|
936
|
+
|
|
937
|
+
Cursor works well as a documented companion client. Point Cursor at the same local `nexo` MCP server and add a project rule that forces `nexo_startup`, `nexo_heartbeat`, and the protocol path on real work. See [docs/integrations/cursor.md](docs/integrations/cursor.md).
|
|
938
|
+
|
|
939
|
+
### Windsurf
|
|
940
|
+
|
|
941
|
+
Windsurf/Cascade supports MCP plus durable repo rules. Use the same local `nexo` server and add NEXO startup/protocol instructions in `.windsurf/rules/` or your repo `AGENTS.md`. See [docs/integrations/windsurf.md](docs/integrations/windsurf.md).
|
|
942
|
+
|
|
943
|
+
### Gemini CLI
|
|
944
|
+
|
|
945
|
+
Gemini CLI can share the same local NEXO brain through `mcpServers` in `~/.gemini/settings.json` plus a repo `GEMINI.md`. NEXO now ships a starter adapter in [adapters/gemini/README.md](adapters/gemini/README.md).
|
|
946
|
+
|
|
899
947
|
### OpenClaw
|
|
900
948
|
|
|
901
949
|
NEXO Brain also works as a cognitive memory backend for [OpenClaw](https://github.com/openclaw/openclaw):
|
|
@@ -980,6 +1028,20 @@ If NEXO Brain is useful to you, consider:
|
|
|
980
1028
|
|
|
981
1029
|
[](https://star-history.com/#wazionapps/nexo&Date)
|
|
982
1030
|
|
|
1031
|
+
## Memory Benchmark Snapshot
|
|
1032
|
+
|
|
1033
|
+
The full harness is in [benchmarks/README.md](benchmarks/README.md). The first checked-in micro-benchmark compares the NEXO runtime against a static `CLAUDE.md`-only baseline on five recall-heavy scenarios:
|
|
1034
|
+
|
|
1035
|
+
| Scenario | NEXO full stack | Static `CLAUDE.md` | No memory |
|
|
1036
|
+
|----------|-----------------|--------------------|-----------|
|
|
1037
|
+
| Decision rationale recall | Pass | Partial | Fail |
|
|
1038
|
+
| User preference recall | Pass | Partial | Fail |
|
|
1039
|
+
| Repeat-error avoidance | Pass | Partial | Fail |
|
|
1040
|
+
| Resume interrupted task | Pass | Partial | Fail |
|
|
1041
|
+
| Related-context stitching | Pass | Fail | Fail |
|
|
1042
|
+
|
|
1043
|
+
See [benchmarks/results/memory-recall-vs-static.md](benchmarks/results/memory-recall-vs-static.md) for the rubric, prompt shape, and first-run notes.
|
|
1044
|
+
|
|
983
1045
|
## Changelog
|
|
984
1046
|
|
|
985
1047
|
### v3.0.1 — Python 3.10 Compatibility Patch (2026-04-06)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# NEXO case-study outreach template
|
|
2
|
+
|
|
3
|
+
Use this to ask operators for a public NEXO story without making the ask heavy.
|
|
4
|
+
|
|
5
|
+
## Short outreach message
|
|
6
|
+
|
|
7
|
+
Hi,
|
|
8
|
+
|
|
9
|
+
I am collecting a few public NEXO operator stories so the project can show real-world usage more clearly.
|
|
10
|
+
|
|
11
|
+
If NEXO has been useful in your setup, would you be open to sending a short note with:
|
|
12
|
+
|
|
13
|
+
- your main client surface
|
|
14
|
+
- what problem you wanted to solve
|
|
15
|
+
- which NEXO pieces actually mattered
|
|
16
|
+
- one concrete example of how it helped
|
|
17
|
+
|
|
18
|
+
Even 5-8 lines is enough. If you prefer, I can turn it into a draft and send it back for approval before anything is published.
|
|
19
|
+
|
|
20
|
+
Thanks.
|
|
21
|
+
|
|
22
|
+
## Structured version
|
|
23
|
+
|
|
24
|
+
Ask for:
|
|
25
|
+
|
|
26
|
+
- Role or setup
|
|
27
|
+
- Main client or clients
|
|
28
|
+
- What was painful before NEXO
|
|
29
|
+
- What changed after using NEXO
|
|
30
|
+
- Which feature or workflow mattered most
|
|
31
|
+
- Whether the story can be quoted publicly
|
|
32
|
+
|
|
33
|
+
## Public proof rule
|
|
34
|
+
|
|
35
|
+
Do not fabricate company names, usage scale, or testimonials.
|
|
36
|
+
If a case is not approved for public quoting, keep it private until the operator confirms.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# NEXO v3.0.2: libre shared brain, review-gated Evolution, and a cleaner public path
|
|
2
|
+
|
|
3
|
+
NEXO is free/libre, open-source software for people who want a local cognitive runtime instead of another isolated AI session.
|
|
4
|
+
|
|
5
|
+
At the center is a simple promise:
|
|
6
|
+
|
|
7
|
+
- one shared brain across Claude Code, Codex, Claude Desktop, and other MCP-compatible clients
|
|
8
|
+
- persistent local memory instead of session-only context
|
|
9
|
+
- a real runtime around memory: doctor, workflows, reminders, scripts, followups, and review-gated Evolution
|
|
10
|
+
|
|
11
|
+
With `v3.0.2`, the product itself is not radically different, but the public path is much clearer.
|
|
12
|
+
|
|
13
|
+
## What changed in this release
|
|
14
|
+
|
|
15
|
+
Three things matter most:
|
|
16
|
+
|
|
17
|
+
1. Public integrations and release publishing were hardened.
|
|
18
|
+
2. The public site now explains NEXO faster, with demo-first entry points and sharper search-intent pages.
|
|
19
|
+
3. The runtime keeps moving toward a more disciplined public Evolution loop, where opt-in contributors can propose bounded changes via Draft PRs and maintainers still decide what gets merged.
|
|
20
|
+
|
|
21
|
+
## Why "libre" matters here
|
|
22
|
+
|
|
23
|
+
NEXO is not just "free as in price."
|
|
24
|
+
|
|
25
|
+
It is AGPL-licensed, inspectable, forkable, and local-first by design. That matters because memory systems are infrastructure. If your agent remembers project state, release habits, and past failures, you should be able to inspect the system that stores and retrieves that memory.
|
|
26
|
+
|
|
27
|
+
There is no hidden hosted control plane behind the product story.
|
|
28
|
+
|
|
29
|
+
## The shortest way to understand NEXO now
|
|
30
|
+
|
|
31
|
+
Instead of sending everyone straight into a huge feature map, the public site now starts with three short demos:
|
|
32
|
+
|
|
33
|
+
- Install in 60 seconds
|
|
34
|
+
- Shared brain across Claude Code and Codex
|
|
35
|
+
- Review-gated public Evolution with Draft PR pause/resume behavior
|
|
36
|
+
|
|
37
|
+
There are also three search-intent pages for:
|
|
38
|
+
|
|
39
|
+
- Claude Code memory
|
|
40
|
+
- Codex memory
|
|
41
|
+
- Open-source MCP memory server
|
|
42
|
+
|
|
43
|
+
That matters because most people do not search for "cognitive runtime." They search for a concrete need.
|
|
44
|
+
|
|
45
|
+
## What NEXO is best at today
|
|
46
|
+
|
|
47
|
+
The strongest fit today is still the operator who wants:
|
|
48
|
+
|
|
49
|
+
- local persistent memory
|
|
50
|
+
- a shared brain across more than one client
|
|
51
|
+
- guardrails before changes
|
|
52
|
+
- durable workflows and followups
|
|
53
|
+
- an inspectable runtime instead of a black box
|
|
54
|
+
|
|
55
|
+
Claude Code remains the deepest integration path.
|
|
56
|
+
Codex is also supported and benefits from the same shared-brain model.
|
|
57
|
+
|
|
58
|
+
## Install
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npx nexo-brain
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
After install, the fastest sanity check is:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
nexo doctor
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Public links
|
|
71
|
+
|
|
72
|
+
- Release: https://github.com/wazionapps/nexo/releases/tag/v3.0.2
|
|
73
|
+
- Home: https://nexo-brain.com
|
|
74
|
+
- Demos: https://nexo-brain.com/demos/
|
|
75
|
+
- Solutions: https://nexo-brain.com/solutions/
|
|
76
|
+
- Docs: https://nexo-brain.com/docs/
|
|
77
|
+
- GitHub: https://github.com/wazionapps/nexo
|
|
78
|
+
- npm: https://www.npmjs.com/package/nexo-brain
|
|
79
|
+
|
|
80
|
+
## What comes next
|
|
81
|
+
|
|
82
|
+
The next public step is not "more adjectives."
|
|
83
|
+
|
|
84
|
+
It is more proof:
|
|
85
|
+
|
|
86
|
+
- more operator case studies
|
|
87
|
+
- more demo material
|
|
88
|
+
- more high-intent entry pages
|
|
89
|
+
- more disciplined public Evolution cycles that generate reviewable improvements
|
|
90
|
+
|
|
91
|
+
If you use Claude Code, Codex, or other MCP-compatible clients and want a local shared brain rather than another stateless session, NEXO is ready to try now.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# NEXO v3.0.2 is out: libre shared brain, cleaner demos, and sharper public entry points
|
|
2
|
+
|
|
3
|
+
`v3.0.2` is now published:
|
|
4
|
+
|
|
5
|
+
- Release: https://github.com/wazionapps/nexo/releases/tag/v3.0.2
|
|
6
|
+
- npm: https://www.npmjs.com/package/nexo-brain
|
|
7
|
+
- Site: https://nexo-brain.com
|
|
8
|
+
|
|
9
|
+
This release matters less because of one giant feature and more because the public product story is now much easier to understand.
|
|
10
|
+
|
|
11
|
+
## What NEXO is
|
|
12
|
+
|
|
13
|
+
NEXO is libre/open-source software for a local cognitive runtime with:
|
|
14
|
+
|
|
15
|
+
- one shared brain across Claude Code, Codex, Claude Desktop, and other MCP-compatible clients
|
|
16
|
+
- persistent local memory
|
|
17
|
+
- doctor diagnostics, workflows, scripts, reminders, followups, and public Evolution discipline around that memory layer
|
|
18
|
+
|
|
19
|
+
## What changed
|
|
20
|
+
|
|
21
|
+
- release and public integration verification were hardened
|
|
22
|
+
- the public website now has a demo-first path
|
|
23
|
+
- new search-intent pages explain where NEXO fits without forcing everyone through the full docs first
|
|
24
|
+
|
|
25
|
+
New public surfaces:
|
|
26
|
+
|
|
27
|
+
- Demos: https://nexo-brain.com/demos/
|
|
28
|
+
- Solutions: https://nexo-brain.com/solutions/
|
|
29
|
+
- Use cases: https://nexo-brain.com/use-cases/
|
|
30
|
+
|
|
31
|
+
## The three shortest demos
|
|
32
|
+
|
|
33
|
+
1. Install in 60 seconds
|
|
34
|
+
2. Shared brain across Claude Code and Codex
|
|
35
|
+
3. Review-gated public Evolution with Draft PR pause/resume behavior
|
|
36
|
+
|
|
37
|
+
## Why this direction
|
|
38
|
+
|
|
39
|
+
The old problem was not lack of capability. It was that the path from "I heard about NEXO" to "I understand what it actually does" was too long.
|
|
40
|
+
|
|
41
|
+
The new public surfaces are designed to fix that while keeping the product technically honest:
|
|
42
|
+
|
|
43
|
+
- local-first
|
|
44
|
+
- inspectable
|
|
45
|
+
- AGPL-licensed
|
|
46
|
+
- stronger for real operators than for generic AI hype
|
|
47
|
+
|
|
48
|
+
## If you are already using NEXO
|
|
49
|
+
|
|
50
|
+
The most useful thing right now is public proof.
|
|
51
|
+
|
|
52
|
+
If you have a real setup or workflow where NEXO helps, reply here or open a new discussion with:
|
|
53
|
+
|
|
54
|
+
- your main client surface
|
|
55
|
+
- the problem you wanted to solve
|
|
56
|
+
- which NEXO pieces actually mattered
|
|
57
|
+
|
|
58
|
+
That will help turn the current honest use-case patterns into stronger public case studies.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
1. NEXO v3.0.2 is out.
|
|
2
|
+
|
|
3
|
+
Libre/open-source shared brain for Claude Code, Codex, Claude Desktop, and other MCP-compatible clients.
|
|
4
|
+
|
|
5
|
+
Local memory, workflows, doctor, followups, scripts, and review-gated Evolution.
|
|
6
|
+
|
|
7
|
+
Release:
|
|
8
|
+
https://github.com/wazionapps/nexo/releases/tag/v3.0.2
|
|
9
|
+
|
|
10
|
+
2. The main idea is simple:
|
|
11
|
+
|
|
12
|
+
NEXO is not just "memory for AI."
|
|
13
|
+
|
|
14
|
+
It is a local cognitive runtime so your assistant can keep operator context across sessions instead of resetting every time the terminal resets.
|
|
15
|
+
|
|
16
|
+
3. We also cleaned up the public path.
|
|
17
|
+
|
|
18
|
+
Three short demos now explain the product faster than a feature list:
|
|
19
|
+
|
|
20
|
+
- install in 60 seconds
|
|
21
|
+
- shared brain across Claude Code + Codex
|
|
22
|
+
- review-gated public Evolution
|
|
23
|
+
|
|
24
|
+
https://nexo-brain.com/demos/
|
|
25
|
+
|
|
26
|
+
4. We added sharper search-intent pages too:
|
|
27
|
+
|
|
28
|
+
- Claude Code memory
|
|
29
|
+
- Codex memory
|
|
30
|
+
- open-source MCP memory server
|
|
31
|
+
|
|
32
|
+
https://nexo-brain.com/solutions/
|
|
33
|
+
|
|
34
|
+
5. NEXO is AGPL-3.0 and local-first by design.
|
|
35
|
+
|
|
36
|
+
If your assistant remembers your work, you should be able to inspect and fork the system behind that memory.
|
|
37
|
+
|
|
38
|
+
https://github.com/wazionapps/nexo
|
|
39
|
+
|
|
40
|
+
6. Strongest fit today:
|
|
41
|
+
|
|
42
|
+
- operators using Claude Code or Codex
|
|
43
|
+
- people who want one shared brain across clients
|
|
44
|
+
- local-first workflows
|
|
45
|
+
- teams that want real runtime discipline, not just retrieval
|
|
46
|
+
|
|
47
|
+
7. If you want to try it:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npx nexo-brain
|
|
51
|
+
nexo doctor
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
8. If you already use it, the next thing we need is public proof.
|
|
55
|
+
|
|
56
|
+
Real setups.
|
|
57
|
+
Real use cases.
|
|
58
|
+
Real feedback.
|
|
59
|
+
|
|
60
|
+
That is how the project gets easier to trust.
|
package/hooks/hooks.json
CHANGED
|
@@ -38,6 +38,18 @@
|
|
|
38
38
|
]
|
|
39
39
|
}
|
|
40
40
|
],
|
|
41
|
+
"PreToolUse": [
|
|
42
|
+
{
|
|
43
|
+
"matcher": "Edit|MultiEdit|Write|Delete",
|
|
44
|
+
"hooks": [
|
|
45
|
+
{
|
|
46
|
+
"type": "command",
|
|
47
|
+
"command": "NEXO_HOME=\"${CLAUDE_PLUGIN_DATA}\" NEXO_CODE=\"${CLAUDE_PLUGIN_ROOT}/src\" bash \"${CLAUDE_PLUGIN_ROOT}/src/hooks/protocol-pretool-guardrail.sh\"",
|
|
48
|
+
"timeout": 5
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
],
|
|
41
53
|
"PostToolUse": [
|
|
42
54
|
{
|
|
43
55
|
"matcher": "*",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexo-brain",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"mcpName": "io.github.wazionapps/nexo",
|
|
5
5
|
"description": "NEXO Brain — Shared brain for AI agents. Persistent memory, semantic RAG, natural forgetting, metacognitive guard, trust scoring, 150+ MCP tools. Works with Claude Code, Codex, Claude Desktop & any MCP client. 100% local, free.",
|
|
6
6
|
"homepage": "https://nexo-brain.com",
|
package/src/client_sync.py
CHANGED
|
@@ -342,6 +342,12 @@ CORE_HOOK_SPECS = [
|
|
|
342
342
|
"timeout": 10,
|
|
343
343
|
"script": "session-stop.sh",
|
|
344
344
|
},
|
|
345
|
+
{
|
|
346
|
+
"event": "PreToolUse",
|
|
347
|
+
"identity": "protocol-pretool-guardrail.sh",
|
|
348
|
+
"timeout": 5,
|
|
349
|
+
"script": "protocol-pretool-guardrail.sh",
|
|
350
|
+
},
|
|
345
351
|
{
|
|
346
352
|
"event": "PostToolUse",
|
|
347
353
|
"identity": "capture-tool-logs.sh",
|
|
@@ -627,11 +627,12 @@ def _client_assumption_regressions() -> list[str]:
|
|
|
627
627
|
src_root = NEXO_CODE if (NEXO_CODE / "server.py").is_file() else (NEXO_CODE / "src")
|
|
628
628
|
if not src_root.is_dir():
|
|
629
629
|
return []
|
|
630
|
+
src_root = src_root.resolve()
|
|
630
631
|
backup_root = (NEXO_HOME / "backups").resolve()
|
|
631
632
|
contrib_root = (NEXO_HOME / "contrib").resolve()
|
|
632
|
-
|
|
633
|
-
(
|
|
634
|
-
Path(
|
|
633
|
+
allowed_relative_paths = {
|
|
634
|
+
Path("scripts") / "deep-sleep" / "collect.py",
|
|
635
|
+
Path("doctor") / "providers" / "runtime.py",
|
|
635
636
|
}
|
|
636
637
|
offenders: list[str] = []
|
|
637
638
|
for path in src_root.rglob("*.py"):
|
|
@@ -650,8 +651,12 @@ def _client_assumption_regressions() -> list[str]:
|
|
|
650
651
|
continue
|
|
651
652
|
except Exception:
|
|
652
653
|
pass
|
|
653
|
-
|
|
654
|
-
|
|
654
|
+
try:
|
|
655
|
+
relative_path = resolved.relative_to(src_root)
|
|
656
|
+
except Exception:
|
|
657
|
+
relative_path = path.relative_to(src_root)
|
|
658
|
+
if ".claude/projects" in text and relative_path not in allowed_relative_paths:
|
|
659
|
+
offenders.append(f"{relative_path} hardcodes ~/.claude/projects")
|
|
655
660
|
collect_path = src_root / "scripts" / "deep-sleep" / "collect.py"
|
|
656
661
|
try:
|
|
657
662
|
collect_text = collect_path.read_text()
|
package/src/evolution_cycle.py
CHANGED
|
@@ -350,7 +350,12 @@ Max 3 proposals. Quality over quantity. If nothing needs improving, say so."""
|
|
|
350
350
|
return prompt
|
|
351
351
|
|
|
352
352
|
|
|
353
|
-
def build_public_contribution_prompt(
|
|
353
|
+
def build_public_contribution_prompt(
|
|
354
|
+
*,
|
|
355
|
+
repo_root: str,
|
|
356
|
+
cycle_number: int,
|
|
357
|
+
queued_candidate: dict | None = None,
|
|
358
|
+
) -> str:
|
|
354
359
|
"""Prompt for the public-core contributor mode.
|
|
355
360
|
|
|
356
361
|
This prompt must never rely on private runtime state. It should inspect only
|
|
@@ -358,6 +363,27 @@ def build_public_contribution_prompt(*, repo_root: str, cycle_number: int) -> st
|
|
|
358
363
|
by returning machine-readable summary JSON.
|
|
359
364
|
"""
|
|
360
365
|
|
|
366
|
+
queued_section = ""
|
|
367
|
+
if queued_candidate:
|
|
368
|
+
queued_files = "\n".join(
|
|
369
|
+
f"- {path}" for path in (queued_candidate.get("files_changed") or [])[:20]
|
|
370
|
+
) or "- (no files recorded)"
|
|
371
|
+
queued_source = str((queued_candidate.get("metadata") or {}).get("source") or "managed-runtime")
|
|
372
|
+
queued_section = f"""
|
|
373
|
+
|
|
374
|
+
PRIORITY PUBLIC-PORT QUEUE ITEM:
|
|
375
|
+
- Source: {queued_source}
|
|
376
|
+
- Title: {str(queued_candidate.get("title") or "").strip()}
|
|
377
|
+
- Why it matters: {str(queued_candidate.get("reasoning") or "").strip()}
|
|
378
|
+
- Files originally touched:
|
|
379
|
+
{queued_files}
|
|
380
|
+
|
|
381
|
+
This item was already fixed or detected outside the public contribution runner.
|
|
382
|
+
Before inventing another improvement, verify whether the public repository still
|
|
383
|
+
needs the same change and port it if necessary. If the repo is already correct,
|
|
384
|
+
make the smallest validating change that captures the same gap.
|
|
385
|
+
"""
|
|
386
|
+
|
|
361
387
|
return f"""You are NEXO Public Evolution.
|
|
362
388
|
|
|
363
389
|
You are running inside an isolated checkout of the public NEXO repository.
|
|
@@ -389,6 +415,7 @@ What to do:
|
|
|
389
415
|
|
|
390
416
|
Cycle: #{cycle_number}
|
|
391
417
|
Quality over quantity. One strong improvement is better than three weak ones.
|
|
418
|
+
{queued_section}
|
|
392
419
|
"""
|
|
393
420
|
|
|
394
421
|
|