mango-brain 3.3.3__tar.gz → 3.3.4__tar.gz
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.
- {mango_brain-3.3.3 → mango_brain-3.3.4}/PKG-INFO +2 -2
- {mango_brain-3.3.3 → mango_brain-3.3.4}/README.md +1 -1
- {mango_brain-3.3.3 → mango_brain-3.3.4}/mango_brain.egg-info/PKG-INFO +2 -2
- {mango_brain-3.3.3 → mango_brain-3.3.4}/pyproject.toml +1 -1
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/config.py +1 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/mcp_tools.py +30 -39
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/retrieval.py +3 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/LICENSE +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/mango_brain.egg-info/SOURCES.txt +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/mango_brain.egg-info/dependency_links.txt +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/mango_brain.egg-info/entry_points.txt +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/mango_brain.egg-info/requires.txt +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/mango_brain.egg-info/top_level.txt +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/__init__.py +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/__main__.py +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/agents/analyzer.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/agents/executor.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/agents/mem-manager.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/agents/verifier.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/api_routes.py +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/cli.py +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/dashboard_dist/assets/index-DmI5d2FU.css +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/dashboard_dist/assets/index-DojB8F-G.js +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/dashboard_dist/favicon.svg +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/dashboard_dist/icons.svg +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/dashboard_dist/index.html +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/dashboard_dist/logo.svg +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/database.py +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/decay.py +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/embeddings.py +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/graph.py +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/jsonl_parser.py +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/main.py +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/mangobrain.default.toml +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/models.py +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/prompts/init/01-doc-base.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/prompts/init/02-code-base.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/prompts/init/03-event-base.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/prompts/init/04-chat-base.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/prompts/init/05-elaborate-base.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/prompts/reference/memory-definition.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/rules/mangobrain-remember.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/rules/mangobrain-workflow.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/skills/brain-init/SKILL.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/skills/discuss/SKILL.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/skills/elaborate/SKILL.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/skills/health-check/SKILL.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/skills/memorize/SKILL.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/skills/smoke-test/SKILL.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/skills/task/SKILL.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/agents/creator.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/agents/mem-manager.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/agents/researcher.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/agents/reviewer.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/prompts/init-work.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/prompts/memory-definition.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/rules/mangobrain-remember-work.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/rules/mangobrain-workflow-work.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/skills/brain-init-work/SKILL.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/skills/brief/SKILL.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/skills/create/SKILL.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/skills/elaborate-work/SKILL.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/skills/health-check-work/SKILL.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/skills/memorize-work/SKILL.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/skills/smoke-test-work/SKILL.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/templates/CLAUDE.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/templates/rules/audience.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/templates/rules/brand.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/templates/rules/channels.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/templates/rules/product.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/templates/rules/strategy.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/server/work/templates/rules/tone.md +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/setup.cfg +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/tests/test_core.py +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/tests/test_init.py +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/tests/test_phase2.py +0 -0
- {mango_brain-3.3.3 → mango_brain-3.3.4}/tests/test_setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mango-brain
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.4
|
|
4
4
|
Summary: The learning layer for Claude Code — persistent associative memory + development workflow. Claude Code gets smarter the longer you use it.
|
|
5
5
|
Author-email: Federico Anastasi <federico.anastasi@outlook.com>
|
|
6
6
|
License: MIT
|
|
@@ -44,7 +44,7 @@ Dynamic: license-file
|
|
|
44
44
|
|
|
45
45
|
<p align="center">
|
|
46
46
|
<a href="https://pypi.org/project/mango-brain/"><img src="https://img.shields.io/pypi/v/mangobrain?style=flat-square&color=7c3aed&label=PyPI" /></a>
|
|
47
|
-
<img src="https://img.shields.io/badge/v3.3.
|
|
47
|
+
<img src="https://img.shields.io/badge/v3.3.4-7c3aed?style=flat-square" />
|
|
48
48
|
<img src="https://img.shields.io/badge/python-3.11+-blue?style=flat-square&logo=python&logoColor=white" />
|
|
49
49
|
<img src="https://img.shields.io/badge/MCP-compatible-8A2BE2?style=flat-square" />
|
|
50
50
|
<img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" />
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
17
17
|
<a href="https://pypi.org/project/mango-brain/"><img src="https://img.shields.io/pypi/v/mangobrain?style=flat-square&color=7c3aed&label=PyPI" /></a>
|
|
18
|
-
<img src="https://img.shields.io/badge/v3.3.
|
|
18
|
+
<img src="https://img.shields.io/badge/v3.3.4-7c3aed?style=flat-square" />
|
|
19
19
|
<img src="https://img.shields.io/badge/python-3.11+-blue?style=flat-square&logo=python&logoColor=white" />
|
|
20
20
|
<img src="https://img.shields.io/badge/MCP-compatible-8A2BE2?style=flat-square" />
|
|
21
21
|
<img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mango-brain
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.4
|
|
4
4
|
Summary: The learning layer for Claude Code — persistent associative memory + development workflow. Claude Code gets smarter the longer you use it.
|
|
5
5
|
Author-email: Federico Anastasi <federico.anastasi@outlook.com>
|
|
6
6
|
License: MIT
|
|
@@ -44,7 +44,7 @@ Dynamic: license-file
|
|
|
44
44
|
|
|
45
45
|
<p align="center">
|
|
46
46
|
<a href="https://pypi.org/project/mango-brain/"><img src="https://img.shields.io/pypi/v/mangobrain?style=flat-square&color=7c3aed&label=PyPI" /></a>
|
|
47
|
-
<img src="https://img.shields.io/badge/v3.3.
|
|
47
|
+
<img src="https://img.shields.io/badge/v3.3.4-7c3aed?style=flat-square" />
|
|
48
48
|
<img src="https://img.shields.io/badge/python-3.11+-blue?style=flat-square&logo=python&logoColor=white" />
|
|
49
49
|
<img src="https://img.shields.io/badge/MCP-compatible-8A2BE2?style=flat-square" />
|
|
50
50
|
<img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" />
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "mango-brain"
|
|
7
|
-
version = "3.3.
|
|
7
|
+
version = "3.3.4"
|
|
8
8
|
description = "The learning layer for Claude Code — persistent associative memory + development workflow. Claude Code gets smarter the longer you use it."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "MIT"}
|
|
@@ -164,6 +164,7 @@ QUICK_BUDGET = int(_get("retrieval", "quick_budget", "2000"))
|
|
|
164
164
|
SESSION_QUICK_BUDGET = int(_get("retrieval", "session_quick_budget", "4000"))
|
|
165
165
|
DEEP_MAX_RESULTS = int(_get("retrieval", "deep_max_results", "20"))
|
|
166
166
|
QUICK_MAX_RESULTS = int(_get("retrieval", "quick_max_results", "6"))
|
|
167
|
+
RECENT_MAX_RESULTS = int(_get("retrieval", "recent_max_results", "20"))
|
|
167
168
|
RELEVANCE_THRESHOLD_RATIO = float(_get("retrieval", "deep_threshold", "0.78"))
|
|
168
169
|
QUICK_RELEVANCE_THRESHOLD_RATIO = float(_get("retrieval", "quick_threshold", "0.85"))
|
|
169
170
|
|
|
@@ -103,26 +103,9 @@ def register_tools(
|
|
|
103
103
|
recent_count = sum(1 for m in memories if m.id in recent_ids)
|
|
104
104
|
neighbor_count = len(memories) - recent_count
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"id": m.id,
|
|
110
|
-
"content": m.content,
|
|
111
|
-
"type": m.type.value if hasattr(m.type, 'value') else m.type,
|
|
112
|
-
"project": m.project,
|
|
113
|
-
"tags": m.tags,
|
|
114
|
-
"relevance": round(scores[i], 4),
|
|
115
|
-
"file_path": m.file_path,
|
|
116
|
-
"code_signature": m.code_signature,
|
|
117
|
-
"is_recent": m.id in recent_ids,
|
|
118
|
-
}
|
|
119
|
-
for i, m in enumerate(memories)
|
|
120
|
-
],
|
|
121
|
-
"total_tokens": total_tokens,
|
|
122
|
-
"count": len(memories),
|
|
123
|
-
"recent_count": recent_count,
|
|
124
|
-
"neighbor_count": neighbor_count,
|
|
125
|
-
}
|
|
106
|
+
count = len(memories)
|
|
107
|
+
recent_count_val = recent_count
|
|
108
|
+
neighbor_count_val = neighbor_count
|
|
126
109
|
else:
|
|
127
110
|
if not query:
|
|
128
111
|
return json.dumps({"error": "query is required for deep/quick mode"})
|
|
@@ -130,29 +113,37 @@ def register_tools(
|
|
|
130
113
|
query=query, mode=mode, project=project,
|
|
131
114
|
budget=budget, session_id=session_id,
|
|
132
115
|
)
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
"type": m.type.value if hasattr(m.type, 'value') else m.type,
|
|
139
|
-
"project": m.project,
|
|
140
|
-
"tags": m.tags,
|
|
141
|
-
"relevance": round(scores[i], 4),
|
|
142
|
-
"file_path": m.file_path,
|
|
143
|
-
"code_signature": m.code_signature,
|
|
144
|
-
}
|
|
145
|
-
for i, m in enumerate(memories)
|
|
146
|
-
],
|
|
147
|
-
"total_tokens": total_tokens,
|
|
148
|
-
"count": len(memories),
|
|
149
|
-
}
|
|
116
|
+
count = len(memories)
|
|
117
|
+
recent_count_val = None
|
|
118
|
+
neighbor_count_val = None
|
|
119
|
+
|
|
120
|
+
# Format as readable text (not raw JSON)
|
|
150
121
|
_dur = int((_time.monotonic_ns() - _t0) / 1_000_000)
|
|
151
122
|
await _log_op(db, "remember", project=project,
|
|
152
123
|
params={"query": query, "mode": mode, "limit": limit},
|
|
153
|
-
result={"count":
|
|
124
|
+
result={"count": count, "total_tokens": total_tokens},
|
|
154
125
|
duration_ms=_dur)
|
|
155
|
-
|
|
126
|
+
|
|
127
|
+
lines = []
|
|
128
|
+
header = f"{count} memories · {mode} mode · {_dur}ms"
|
|
129
|
+
if recent_count_val is not None:
|
|
130
|
+
header += f" · {recent_count_val} recent + {neighbor_count_val} neighbors"
|
|
131
|
+
lines.append(header)
|
|
132
|
+
lines.append("")
|
|
133
|
+
|
|
134
|
+
for i, m in enumerate(memories):
|
|
135
|
+
mtype = m.type.value if hasattr(m.type, 'value') else m.type
|
|
136
|
+
rel = round(scores[i], 4)
|
|
137
|
+
lines.append(f"[{mtype}] {m.content}")
|
|
138
|
+
meta_parts = []
|
|
139
|
+
if m.file_path:
|
|
140
|
+
meta_parts.append(f"file: {m.file_path}")
|
|
141
|
+
meta_parts.append(f"relevance: {rel}")
|
|
142
|
+
meta_parts.append(f"id: {m.id}")
|
|
143
|
+
lines.append(" " + " · ".join(meta_parts))
|
|
144
|
+
lines.append("")
|
|
145
|
+
|
|
146
|
+
return "\n".join(lines)
|
|
156
147
|
except ValueError as e:
|
|
157
148
|
_dur = int((_time.monotonic_ns() - _t0) / 1_000_000)
|
|
158
149
|
await _log_op(db, "remember", project=project,
|
|
@@ -185,10 +185,13 @@ class RetrievalEngine:
|
|
|
185
185
|
candidates.append((score / max(m.token_count, 1), score, m))
|
|
186
186
|
candidates.sort(key=lambda x: x[0], reverse=True)
|
|
187
187
|
|
|
188
|
+
from server.config import RECENT_MAX_RESULTS
|
|
188
189
|
selected: list[Memory] = []
|
|
189
190
|
scores: list[float] = []
|
|
190
191
|
total_tokens = 0
|
|
191
192
|
for _, score, m in candidates:
|
|
193
|
+
if len(selected) >= RECENT_MAX_RESULTS:
|
|
194
|
+
break
|
|
192
195
|
if total_tokens + m.token_count > budget:
|
|
193
196
|
continue
|
|
194
197
|
selected.append(m)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|