wisdomgraph 0.3.0__tar.gz → 0.3.1__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.
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/PKG-INFO +8 -9
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/README.md +5 -5
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/pyproject.toml +3 -4
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/tests/test_mcp.py +30 -2
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/__main__.py +10 -4
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/local.py +73 -34
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdomgraph.egg-info/PKG-INFO +8 -9
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/LICENSE +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/setup.cfg +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/tests/test_cache.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/tests/test_classify.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/tests/test_detect.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/tests/test_ingest.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/tests/test_reflect.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/tests/test_security.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/tests/test_validate.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/__init__.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/cache.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/classify.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/connect.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/detect.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/docker.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/export.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/ingest.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/mcp.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/merge.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/reflect.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/report.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/security.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/skill-claw.md +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/skill.md +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/traverse.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdom/validate.py +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdomgraph.egg-info/SOURCES.txt +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdomgraph.egg-info/dependency_links.txt +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdomgraph.egg-info/entry_points.txt +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdomgraph.egg-info/requires.txt +0 -0
- {wisdomgraph-0.3.0 → wisdomgraph-0.3.1}/wisdomgraph.egg-info/top_level.txt +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: wisdomgraph
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Graph-native persistent cognition for AI agents using Neo4j, DIKW, and MCP
|
|
5
|
-
License
|
|
5
|
+
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/cklam12345/wisdomGraph
|
|
7
7
|
Project-URL: Repository, https://github.com/cklam12345/wisdomGraph
|
|
8
8
|
Project-URL: Issues, https://github.com/cklam12345/wisdomGraph/issues
|
|
@@ -66,7 +66,6 @@ Requires-Dist: pypdf; extra == "all"
|
|
|
66
66
|
Requires-Dist: html2text; extra == "all"
|
|
67
67
|
Requires-Dist: python-docx; extra == "all"
|
|
68
68
|
Requires-Dist: openpyxl; extra == "all"
|
|
69
|
-
Dynamic: license-file
|
|
70
69
|
|
|
71
70
|
# wisdomGraph
|
|
72
71
|
|
|
@@ -108,7 +107,7 @@ wisdomGraph does something fundamentally different.
|
|
|
108
107
|
| **Memory** | resets each session | accumulates across sessions, projects, months |
|
|
109
108
|
| **Reasoning** | community detection (topology) | graph path traversal + DIKW hierarchy |
|
|
110
109
|
| **Feedback loop** | none | Wisdom → Knowledge (neuroplasticity) |
|
|
111
|
-
| **Database** | none required | Neo4j Aura (free) or
|
|
110
|
+
| **Database** | none required | Neo4j Aura (free) or local Neo4j Docker |
|
|
112
111
|
|
|
113
112
|
The difference is not incremental. It's architectural. graphify compresses a codebase into a readable report. wisdomGraph builds an artificial epistemology — one that remembers, connects, and grows.
|
|
114
113
|
|
|
@@ -138,7 +137,7 @@ The feedback loop is critical: when a Wisdom node is queried and found useful, i
|
|
|
138
137
|
|
|
139
138
|
**Requires:** Python 3.10+ and one of: [Claude Code](https://claude.ai/code), [Codex](https://openai.com/codex), [OpenClaw](https://openclaw.ai), or another MCP host
|
|
140
139
|
|
|
141
|
-
**And one of:** [Neo4j Aura Free](https://neo4j.com/cloud/platform/aura-graph-database/) (cloud, no install) or
|
|
140
|
+
**And one of:** [Neo4j Aura Free](https://neo4j.com/cloud/platform/aura-graph-database/) (cloud, no install) or Docker Desktop/Engine for a managed local Neo4j container
|
|
142
141
|
|
|
143
142
|
```bash
|
|
144
143
|
pip install 'wisdomgraph[mcp]'
|
|
@@ -148,7 +147,7 @@ wisdom quickstart
|
|
|
148
147
|
`wisdom quickstart` is the end-to-end first-time setup. It prepares storage, verifies the Neo4j connection, and registers wisdomGraph with detected MCP hosts.
|
|
149
148
|
|
|
150
149
|
```bash
|
|
151
|
-
# Local managed Neo4j
|
|
150
|
+
# Local managed Neo4j backend + detected MCP hosts
|
|
152
151
|
wisdom quickstart
|
|
153
152
|
|
|
154
153
|
# Local backend + Codex only
|
|
@@ -170,7 +169,7 @@ wisdom local up
|
|
|
170
169
|
wisdom doctor
|
|
171
170
|
```
|
|
172
171
|
|
|
173
|
-
This starts a managed
|
|
172
|
+
This starts a managed `neo4j:latest` container named `wisdomgraph-neo4j`, stores data under `~/.wisdom/neo4j`, uses the documented local login `neo4j/password`, saves the connection, and leaves MCP startup cleanly separate. The implementation uses the Docker CLI directly, so the same `wisdom local up` command works from Windows PowerShell, Windows cmd.exe, macOS Terminal, and Ubuntu Terminal after Docker is installed.
|
|
174
173
|
|
|
175
174
|
Useful commands:
|
|
176
175
|
|
|
@@ -192,7 +191,7 @@ wisdom connect bolt+s://xxxxxxxx.databases.neo4j.io --user neo4j --password <you
|
|
|
192
191
|
|
|
193
192
|
Free tier: 200,000 nodes. Enough for years of accumulated wisdom.
|
|
194
193
|
|
|
195
|
-
### Option C —
|
|
194
|
+
### Option C — Optional/manual DozerDB Docker (full control, APOC included)
|
|
196
195
|
|
|
197
196
|
```bash
|
|
198
197
|
wisdom docker up # pulls graphstack/dozerdb:5.26.3.0 and starts it
|
|
@@ -38,7 +38,7 @@ wisdomGraph does something fundamentally different.
|
|
|
38
38
|
| **Memory** | resets each session | accumulates across sessions, projects, months |
|
|
39
39
|
| **Reasoning** | community detection (topology) | graph path traversal + DIKW hierarchy |
|
|
40
40
|
| **Feedback loop** | none | Wisdom → Knowledge (neuroplasticity) |
|
|
41
|
-
| **Database** | none required | Neo4j Aura (free) or
|
|
41
|
+
| **Database** | none required | Neo4j Aura (free) or local Neo4j Docker |
|
|
42
42
|
|
|
43
43
|
The difference is not incremental. It's architectural. graphify compresses a codebase into a readable report. wisdomGraph builds an artificial epistemology — one that remembers, connects, and grows.
|
|
44
44
|
|
|
@@ -68,7 +68,7 @@ The feedback loop is critical: when a Wisdom node is queried and found useful, i
|
|
|
68
68
|
|
|
69
69
|
**Requires:** Python 3.10+ and one of: [Claude Code](https://claude.ai/code), [Codex](https://openai.com/codex), [OpenClaw](https://openclaw.ai), or another MCP host
|
|
70
70
|
|
|
71
|
-
**And one of:** [Neo4j Aura Free](https://neo4j.com/cloud/platform/aura-graph-database/) (cloud, no install) or
|
|
71
|
+
**And one of:** [Neo4j Aura Free](https://neo4j.com/cloud/platform/aura-graph-database/) (cloud, no install) or Docker Desktop/Engine for a managed local Neo4j container
|
|
72
72
|
|
|
73
73
|
```bash
|
|
74
74
|
pip install 'wisdomgraph[mcp]'
|
|
@@ -78,7 +78,7 @@ wisdom quickstart
|
|
|
78
78
|
`wisdom quickstart` is the end-to-end first-time setup. It prepares storage, verifies the Neo4j connection, and registers wisdomGraph with detected MCP hosts.
|
|
79
79
|
|
|
80
80
|
```bash
|
|
81
|
-
# Local managed Neo4j
|
|
81
|
+
# Local managed Neo4j backend + detected MCP hosts
|
|
82
82
|
wisdom quickstart
|
|
83
83
|
|
|
84
84
|
# Local backend + Codex only
|
|
@@ -100,7 +100,7 @@ wisdom local up
|
|
|
100
100
|
wisdom doctor
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
This starts a managed
|
|
103
|
+
This starts a managed `neo4j:latest` container named `wisdomgraph-neo4j`, stores data under `~/.wisdom/neo4j`, uses the documented local login `neo4j/password`, saves the connection, and leaves MCP startup cleanly separate. The implementation uses the Docker CLI directly, so the same `wisdom local up` command works from Windows PowerShell, Windows cmd.exe, macOS Terminal, and Ubuntu Terminal after Docker is installed.
|
|
104
104
|
|
|
105
105
|
Useful commands:
|
|
106
106
|
|
|
@@ -122,7 +122,7 @@ wisdom connect bolt+s://xxxxxxxx.databases.neo4j.io --user neo4j --password <you
|
|
|
122
122
|
|
|
123
123
|
Free tier: 200,000 nodes. Enough for years of accumulated wisdom.
|
|
124
124
|
|
|
125
|
-
### Option C —
|
|
125
|
+
### Option C — Optional/manual DozerDB Docker (full control, APOC included)
|
|
126
126
|
|
|
127
127
|
```bash
|
|
128
128
|
wisdom docker up # pulls graphstack/dozerdb:5.26.3.0 and starts it
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["setuptools>=68"]
|
|
2
|
+
requires = ["setuptools>=68,<77"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "wisdomgraph"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.1"
|
|
8
8
|
description = "Graph-native persistent cognition for AI agents using Neo4j, DIKW, and MCP"
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
license = "MIT"
|
|
11
|
-
license-files = ["LICENSE"]
|
|
10
|
+
license = {text = "MIT"}
|
|
12
11
|
keywords = [
|
|
13
12
|
"claude", "claude-code", "openclaw", "neo4j", "knowledge-graph",
|
|
14
13
|
"graphrag", "dikw", "wisdom", "memory", "accumulative", "llm",
|
|
@@ -665,6 +665,32 @@ def test_mcp_install_rejects_unknown_host():
|
|
|
665
665
|
|
|
666
666
|
# ── local backend / quickstart CLI ────────────────────────────────────────────
|
|
667
667
|
|
|
668
|
+
def test_local_default_image_is_official_neo4j(monkeypatch):
|
|
669
|
+
import wisdom.local as local
|
|
670
|
+
|
|
671
|
+
monkeypatch.delenv("WISDOM_NEO4J_IMAGE", raising=False)
|
|
672
|
+
monkeypatch.delenv("WISDOM_NEO4J_ENGINE", raising=False)
|
|
673
|
+
|
|
674
|
+
assert local._select_image() == "neo4j:latest"
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
def test_local_dozerdb_engine_is_explicit():
|
|
678
|
+
import wisdom.local as local
|
|
679
|
+
|
|
680
|
+
assert local._select_image(engine="dozerdb") == "graphstack/dozerdb:5.26.3.0"
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
def test_local_docker_run_args_are_shell_independent(tmp_path, monkeypatch):
|
|
684
|
+
import wisdom.local as local
|
|
685
|
+
|
|
686
|
+
monkeypatch.setattr(local, "BASE_DIR", tmp_path / "neo4j")
|
|
687
|
+
args = local._docker_run_args("neo4j:latest", "password")
|
|
688
|
+
|
|
689
|
+
assert args[:3] == ["docker", "run", "-d"]
|
|
690
|
+
assert "neo4j:latest" == args[-1]
|
|
691
|
+
assert "NEO4J_AUTH=neo4j/password" in args
|
|
692
|
+
assert all(isinstance(part, str) for part in args)
|
|
693
|
+
|
|
668
694
|
def test_local_up_starts_managed_backend_without_existing_container(tmp_path, monkeypatch):
|
|
669
695
|
import wisdom.local as local
|
|
670
696
|
|
|
@@ -693,7 +719,7 @@ def test_local_up_starts_managed_backend_without_existing_container(tmp_path, mo
|
|
|
693
719
|
save.assert_called_once_with(local.URI, local.USER, "test-password")
|
|
694
720
|
|
|
695
721
|
|
|
696
|
-
def test_local_up_reuses_existing_running_backend():
|
|
722
|
+
def test_local_up_reuses_existing_running_backend(tmp_path, monkeypatch):
|
|
697
723
|
import wisdom.local as local
|
|
698
724
|
|
|
699
725
|
def fake_run(cmd, capture=False):
|
|
@@ -703,6 +729,8 @@ def test_local_up_reuses_existing_running_backend():
|
|
|
703
729
|
return SimpleNamespace(returncode=0, stdout="abc123\n", stderr="")
|
|
704
730
|
return SimpleNamespace(returncode=0, stdout="", stderr="")
|
|
705
731
|
|
|
732
|
+
monkeypatch.setattr(local, "PASSWORD_PATH", tmp_path / "local-password")
|
|
733
|
+
|
|
706
734
|
with patch("wisdom.local.shutil.which", return_value="/usr/bin/docker"), \
|
|
707
735
|
patch("wisdom.local._run", side_effect=fake_run), \
|
|
708
736
|
patch("wisdom.local.save_connection") as save:
|
|
@@ -722,7 +750,7 @@ def test_quickstart_local_registers_requested_host(monkeypatch):
|
|
|
722
750
|
patch("wisdom.__main__._install_mcp") as install_mcp:
|
|
723
751
|
_run_quickstart()
|
|
724
752
|
|
|
725
|
-
local_up.assert_called_once_with()
|
|
753
|
+
local_up.assert_called_once_with(password=None, image=None, engine=None)
|
|
726
754
|
doctor.assert_called_once_with(connect_only=True)
|
|
727
755
|
install_mcp.assert_called_once_with(host="codex")
|
|
728
756
|
|
|
@@ -265,7 +265,11 @@ def _run_quickstart() -> None:
|
|
|
265
265
|
|
|
266
266
|
if storage == "local":
|
|
267
267
|
from wisdom.local import up as local_up
|
|
268
|
-
local_up(
|
|
268
|
+
local_up(
|
|
269
|
+
password=_get_arg("--password", None),
|
|
270
|
+
image=_get_arg("--image", None),
|
|
271
|
+
engine=_get_arg("--engine", None),
|
|
272
|
+
)
|
|
269
273
|
elif storage in {"aura", "existing"}:
|
|
270
274
|
uri = _get_arg("--uri", "")
|
|
271
275
|
user = _get_arg("--user", "neo4j")
|
|
@@ -411,8 +415,10 @@ def main() -> None:
|
|
|
411
415
|
from wisdom.local import down as local_down, logs as local_logs, status as local_status, up as local_up
|
|
412
416
|
subcmd = sys.argv[2] if len(sys.argv) > 2 else ""
|
|
413
417
|
password = _get_arg("--password", None)
|
|
418
|
+
image = _get_arg("--image", None)
|
|
419
|
+
engine = _get_arg("--engine", None)
|
|
414
420
|
if subcmd == "up":
|
|
415
|
-
local_up(password=password)
|
|
421
|
+
local_up(password=password, image=image, engine=engine)
|
|
416
422
|
elif subcmd == "down":
|
|
417
423
|
local_down()
|
|
418
424
|
elif subcmd == "status":
|
|
@@ -634,8 +640,8 @@ def _print_help() -> None:
|
|
|
634
640
|
print(" doctor check Neo4j, local backend, and MCP host readiness")
|
|
635
641
|
print(" install [--platform P] copy skill (claude|windows|claw)")
|
|
636
642
|
print(" connect <uri> --user U --pass P save Neo4j connection")
|
|
637
|
-
print(" local up|
|
|
638
|
-
print(" docker up|down|status manage DozerDB
|
|
643
|
+
print(" local up [--engine neo4j|dozerdb] [--image IMAGE] [--password P]")
|
|
644
|
+
print(" docker up|down|status manage legacy/manual DozerDB container")
|
|
639
645
|
print(" claude install|uninstall write CLAUDE.md + PreToolUse hook")
|
|
640
646
|
print()
|
|
641
647
|
print("MCP:")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"""Managed local Neo4j
|
|
1
|
+
"""Managed local Neo4j backend for first-time wisdomGraph setup."""
|
|
2
2
|
from __future__ import annotations
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import os
|
|
5
5
|
import shutil
|
|
6
6
|
import socket
|
|
7
7
|
import stat
|
|
@@ -13,7 +13,12 @@ from pathlib import Path
|
|
|
13
13
|
from .connect import save_connection
|
|
14
14
|
|
|
15
15
|
CONTAINER_NAME = "wisdomgraph-neo4j"
|
|
16
|
-
|
|
16
|
+
DEFAULT_ENGINE = "neo4j"
|
|
17
|
+
IMAGE_BY_ENGINE = {
|
|
18
|
+
"neo4j": "neo4j:latest",
|
|
19
|
+
"dozerdb": "graphstack/dozerdb:5.26.3.0",
|
|
20
|
+
}
|
|
21
|
+
DEFAULT_PASSWORD = "password"
|
|
17
22
|
BASE_DIR = Path.home() / ".wisdom" / "neo4j"
|
|
18
23
|
PASSWORD_PATH = Path.home() / ".wisdom" / "local-password"
|
|
19
24
|
HTTP_PORT = 7474
|
|
@@ -52,14 +57,51 @@ def _ensure_dirs() -> None:
|
|
|
52
57
|
(BASE_DIR / subdir).mkdir(parents=True, exist_ok=True)
|
|
53
58
|
|
|
54
59
|
|
|
55
|
-
def
|
|
60
|
+
def _select_image(engine: str | None = None, image: str | None = None) -> str:
|
|
61
|
+
explicit_image = image or os.environ.get("WISDOM_NEO4J_IMAGE")
|
|
62
|
+
if explicit_image:
|
|
63
|
+
return explicit_image
|
|
64
|
+
|
|
65
|
+
selected_engine = (engine or os.environ.get("WISDOM_NEO4J_ENGINE") or DEFAULT_ENGINE).lower()
|
|
66
|
+
if selected_engine not in IMAGE_BY_ENGINE:
|
|
67
|
+
choices = ", ".join(sorted(IMAGE_BY_ENGINE))
|
|
68
|
+
print(f"error: unknown local backend engine '{selected_engine}'. Choose: {choices}", file=sys.stderr)
|
|
69
|
+
sys.exit(1)
|
|
70
|
+
return IMAGE_BY_ENGINE[selected_engine]
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def _read_or_create_password(default: str = DEFAULT_PASSWORD) -> str:
|
|
56
74
|
if PASSWORD_PATH.exists():
|
|
57
75
|
return PASSWORD_PATH.read_text(encoding="utf-8").strip()
|
|
58
76
|
PASSWORD_PATH.parent.mkdir(parents=True, exist_ok=True)
|
|
59
|
-
|
|
60
|
-
PASSWORD_PATH.write_text(password + "\n", encoding="utf-8")
|
|
77
|
+
PASSWORD_PATH.write_text(default + "\n", encoding="utf-8")
|
|
61
78
|
PASSWORD_PATH.chmod(stat.S_IRUSR | stat.S_IWUSR)
|
|
62
|
-
return
|
|
79
|
+
return default
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def _resolve_password(password: str | None = None) -> str:
|
|
83
|
+
selected = password or os.environ.get("WISDOM_NEO4J_PASSWORD")
|
|
84
|
+
if selected:
|
|
85
|
+
PASSWORD_PATH.parent.mkdir(parents=True, exist_ok=True)
|
|
86
|
+
PASSWORD_PATH.write_text(selected + "\n", encoding="utf-8")
|
|
87
|
+
PASSWORD_PATH.chmod(stat.S_IRUSR | stat.S_IWUSR)
|
|
88
|
+
return selected
|
|
89
|
+
return _read_or_create_password()
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def _docker_run_args(image: str, password: str) -> list[str]:
|
|
93
|
+
return [
|
|
94
|
+
"docker", "run", "-d",
|
|
95
|
+
"--name", CONTAINER_NAME,
|
|
96
|
+
"-p", f"{HTTP_PORT}:7474",
|
|
97
|
+
"-p", f"{BOLT_PORT}:7687",
|
|
98
|
+
"-v", f"{BASE_DIR}/data:/data",
|
|
99
|
+
"-v", f"{BASE_DIR}/logs:/logs",
|
|
100
|
+
"-v", f"{BASE_DIR}/import:/var/lib/neo4j/import",
|
|
101
|
+
"-v", f"{BASE_DIR}/plugins:/plugins",
|
|
102
|
+
"--env", f"NEO4J_AUTH=neo4j/{password}",
|
|
103
|
+
image,
|
|
104
|
+
]
|
|
63
105
|
|
|
64
106
|
|
|
65
107
|
def _wait_for_port(timeout_s: int = 45) -> bool:
|
|
@@ -73,8 +115,15 @@ def _wait_for_port(timeout_s: int = 45) -> bool:
|
|
|
73
115
|
return False
|
|
74
116
|
|
|
75
117
|
|
|
76
|
-
def up(
|
|
118
|
+
def up(
|
|
119
|
+
password: str | None = None,
|
|
120
|
+
connect: bool = True,
|
|
121
|
+
image: str | None = None,
|
|
122
|
+
engine: str | None = None,
|
|
123
|
+
) -> None:
|
|
77
124
|
"""Start the managed local backend and optionally save wisdomGraph connection."""
|
|
125
|
+
selected_image = _select_image(engine=engine, image=image)
|
|
126
|
+
|
|
78
127
|
if not docker_available():
|
|
79
128
|
print("error: Docker is not installed or not on PATH.", file=sys.stderr)
|
|
80
129
|
print("Install Docker Desktop/Engine, or use Neo4j Aura with:", file=sys.stderr)
|
|
@@ -82,16 +131,16 @@ def up(password: str | None = None, connect: bool = True) -> None:
|
|
|
82
131
|
sys.exit(1)
|
|
83
132
|
if not docker_daemon_available():
|
|
84
133
|
print("error: Docker is installed but the daemon is not reachable.", file=sys.stderr)
|
|
85
|
-
print("Start Docker, then run: wisdom local up", file=sys.stderr)
|
|
134
|
+
print("Start Docker Desktop/Engine, then run: wisdom local up", file=sys.stderr)
|
|
86
135
|
sys.exit(1)
|
|
87
136
|
|
|
88
|
-
password = password
|
|
137
|
+
password = _resolve_password(password)
|
|
89
138
|
|
|
90
139
|
if _container_id(all_containers=False):
|
|
91
140
|
print(f" Local wisdomGraph backend already running ({CONTAINER_NAME})")
|
|
92
141
|
if connect:
|
|
93
142
|
save_connection(URI, USER, password)
|
|
94
|
-
_print_ready(password)
|
|
143
|
+
_print_ready(password, selected_image)
|
|
95
144
|
return
|
|
96
145
|
|
|
97
146
|
if _container_id(all_containers=True):
|
|
@@ -102,34 +151,20 @@ def up(password: str | None = None, connect: bool = True) -> None:
|
|
|
102
151
|
sys.exit(result.returncode)
|
|
103
152
|
if connect:
|
|
104
153
|
save_connection(URI, USER, password)
|
|
105
|
-
_print_ready(password)
|
|
154
|
+
_print_ready(password, selected_image)
|
|
106
155
|
return
|
|
107
156
|
|
|
108
157
|
_ensure_dirs()
|
|
109
158
|
|
|
110
|
-
print(f" Pulling {
|
|
111
|
-
result = _run(["docker", "pull",
|
|
159
|
+
print(f" Pulling {selected_image}...")
|
|
160
|
+
result = _run(["docker", "pull", selected_image], capture=True)
|
|
112
161
|
if result.returncode != 0:
|
|
113
|
-
print(result.stderr.strip() or "error: failed to pull
|
|
162
|
+
print(result.stderr.strip() or f"error: failed to pull {selected_image}", file=sys.stderr)
|
|
163
|
+
print("Check Docker Hub access/proxy settings, then retry: wisdom local up", file=sys.stderr)
|
|
114
164
|
sys.exit(result.returncode)
|
|
115
165
|
|
|
116
166
|
print(f" Starting managed local backend ({CONTAINER_NAME})...")
|
|
117
|
-
result = _run(
|
|
118
|
-
"docker", "run", "-d",
|
|
119
|
-
"--name", CONTAINER_NAME,
|
|
120
|
-
"-p", f"{HTTP_PORT}:7474",
|
|
121
|
-
"-p", f"{BOLT_PORT}:7687",
|
|
122
|
-
"-v", f"{BASE_DIR}/data:/data",
|
|
123
|
-
"-v", f"{BASE_DIR}/logs:/logs",
|
|
124
|
-
"-v", f"{BASE_DIR}/import:/var/lib/neo4j/import",
|
|
125
|
-
"-v", f"{BASE_DIR}/plugins:/plugins",
|
|
126
|
-
"--env", f"NEO4J_AUTH=neo4j/{password}",
|
|
127
|
-
"--env", "NEO4J_PLUGINS=[\"apoc\"]",
|
|
128
|
-
"--env", "NEO4J_apoc_export_file_enabled=true",
|
|
129
|
-
"--env", "NEO4J_apoc_import_file_enabled=true",
|
|
130
|
-
"--env", "NEO4J_dbms_security_procedures_unrestricted=*",
|
|
131
|
-
IMAGE,
|
|
132
|
-
], capture=True)
|
|
167
|
+
result = _run(_docker_run_args(selected_image, password), capture=True)
|
|
133
168
|
if result.returncode != 0:
|
|
134
169
|
print(result.stderr.strip() or "error: failed to start local backend", file=sys.stderr)
|
|
135
170
|
sys.exit(result.returncode)
|
|
@@ -140,7 +175,7 @@ def up(password: str | None = None, connect: bool = True) -> None:
|
|
|
140
175
|
|
|
141
176
|
if connect:
|
|
142
177
|
save_connection(URI, USER, password)
|
|
143
|
-
_print_ready(password)
|
|
178
|
+
_print_ready(password, selected_image)
|
|
144
179
|
|
|
145
180
|
|
|
146
181
|
def down() -> None:
|
|
@@ -185,13 +220,17 @@ def logs(tail: int = 80) -> None:
|
|
|
185
220
|
print(result.stderr.rstrip(), file=sys.stderr)
|
|
186
221
|
|
|
187
222
|
|
|
188
|
-
def _print_ready(password: str) -> None:
|
|
223
|
+
def _print_ready(password: str, image: str) -> None:
|
|
189
224
|
print()
|
|
190
225
|
print(" wisdomGraph local backend is ready")
|
|
191
226
|
print()
|
|
192
227
|
print(f" Container: {CONTAINER_NAME}")
|
|
228
|
+
print(f" Image: {image}")
|
|
193
229
|
print(f" Browser: http://localhost:{HTTP_PORT}")
|
|
194
230
|
print(f" Bolt URI: {URI}")
|
|
195
231
|
print(f" User: {USER}")
|
|
196
|
-
|
|
232
|
+
if password == DEFAULT_PASSWORD:
|
|
233
|
+
print(f" Password: {password}")
|
|
234
|
+
else:
|
|
235
|
+
print(f" Password: stored in {PASSWORD_PATH}")
|
|
197
236
|
print()
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: wisdomgraph
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Graph-native persistent cognition for AI agents using Neo4j, DIKW, and MCP
|
|
5
|
-
License
|
|
5
|
+
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/cklam12345/wisdomGraph
|
|
7
7
|
Project-URL: Repository, https://github.com/cklam12345/wisdomGraph
|
|
8
8
|
Project-URL: Issues, https://github.com/cklam12345/wisdomGraph/issues
|
|
@@ -66,7 +66,6 @@ Requires-Dist: pypdf; extra == "all"
|
|
|
66
66
|
Requires-Dist: html2text; extra == "all"
|
|
67
67
|
Requires-Dist: python-docx; extra == "all"
|
|
68
68
|
Requires-Dist: openpyxl; extra == "all"
|
|
69
|
-
Dynamic: license-file
|
|
70
69
|
|
|
71
70
|
# wisdomGraph
|
|
72
71
|
|
|
@@ -108,7 +107,7 @@ wisdomGraph does something fundamentally different.
|
|
|
108
107
|
| **Memory** | resets each session | accumulates across sessions, projects, months |
|
|
109
108
|
| **Reasoning** | community detection (topology) | graph path traversal + DIKW hierarchy |
|
|
110
109
|
| **Feedback loop** | none | Wisdom → Knowledge (neuroplasticity) |
|
|
111
|
-
| **Database** | none required | Neo4j Aura (free) or
|
|
110
|
+
| **Database** | none required | Neo4j Aura (free) or local Neo4j Docker |
|
|
112
111
|
|
|
113
112
|
The difference is not incremental. It's architectural. graphify compresses a codebase into a readable report. wisdomGraph builds an artificial epistemology — one that remembers, connects, and grows.
|
|
114
113
|
|
|
@@ -138,7 +137,7 @@ The feedback loop is critical: when a Wisdom node is queried and found useful, i
|
|
|
138
137
|
|
|
139
138
|
**Requires:** Python 3.10+ and one of: [Claude Code](https://claude.ai/code), [Codex](https://openai.com/codex), [OpenClaw](https://openclaw.ai), or another MCP host
|
|
140
139
|
|
|
141
|
-
**And one of:** [Neo4j Aura Free](https://neo4j.com/cloud/platform/aura-graph-database/) (cloud, no install) or
|
|
140
|
+
**And one of:** [Neo4j Aura Free](https://neo4j.com/cloud/platform/aura-graph-database/) (cloud, no install) or Docker Desktop/Engine for a managed local Neo4j container
|
|
142
141
|
|
|
143
142
|
```bash
|
|
144
143
|
pip install 'wisdomgraph[mcp]'
|
|
@@ -148,7 +147,7 @@ wisdom quickstart
|
|
|
148
147
|
`wisdom quickstart` is the end-to-end first-time setup. It prepares storage, verifies the Neo4j connection, and registers wisdomGraph with detected MCP hosts.
|
|
149
148
|
|
|
150
149
|
```bash
|
|
151
|
-
# Local managed Neo4j
|
|
150
|
+
# Local managed Neo4j backend + detected MCP hosts
|
|
152
151
|
wisdom quickstart
|
|
153
152
|
|
|
154
153
|
# Local backend + Codex only
|
|
@@ -170,7 +169,7 @@ wisdom local up
|
|
|
170
169
|
wisdom doctor
|
|
171
170
|
```
|
|
172
171
|
|
|
173
|
-
This starts a managed
|
|
172
|
+
This starts a managed `neo4j:latest` container named `wisdomgraph-neo4j`, stores data under `~/.wisdom/neo4j`, uses the documented local login `neo4j/password`, saves the connection, and leaves MCP startup cleanly separate. The implementation uses the Docker CLI directly, so the same `wisdom local up` command works from Windows PowerShell, Windows cmd.exe, macOS Terminal, and Ubuntu Terminal after Docker is installed.
|
|
174
173
|
|
|
175
174
|
Useful commands:
|
|
176
175
|
|
|
@@ -192,7 +191,7 @@ wisdom connect bolt+s://xxxxxxxx.databases.neo4j.io --user neo4j --password <you
|
|
|
192
191
|
|
|
193
192
|
Free tier: 200,000 nodes. Enough for years of accumulated wisdom.
|
|
194
193
|
|
|
195
|
-
### Option C —
|
|
194
|
+
### Option C — Optional/manual DozerDB Docker (full control, APOC included)
|
|
196
195
|
|
|
197
196
|
```bash
|
|
198
197
|
wisdom docker up # pulls graphstack/dozerdb:5.26.3.0 and starts it
|
|
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
|