hipcortex 3.11.0__tar.gz → 3.12.0__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.
- {hipcortex-3.11.0 → hipcortex-3.12.0}/PKG-INFO +2 -2
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/cli.py +29 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/install/mcp_server.py +25 -1
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/install_hosts.py +12 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex.egg-info/PKG-INFO +2 -2
- {hipcortex-3.11.0 → hipcortex-3.12.0}/pyproject.toml +2 -2
- {hipcortex-3.11.0 → hipcortex-3.12.0}/README.md +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/__init__.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/adapters/__init__.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/adapters/autogen.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/adapters/common.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/adapters/crewai.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/async_client.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/client.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/config.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/daemon.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/doctor.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/framework_scaffold.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/indexer.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/install/RUNNER_SKILL.md +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/install/SKILL.md +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/install/__init__.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/install/templates/autogen.py.tmpl +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/install/templates/crewai.py.tmpl +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/install/templates/dspy.py.tmpl +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/install/templates/langchain.py.tmpl +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/install/templates/llamaindex.py.tmpl +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/install/templates/n8n_curl.sh.tmpl +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/install/templates/pydantic_ai.py.tmpl +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/langchain_memory.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/llamaindex_storage.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/runner.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex/substrate.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex.egg-info/SOURCES.txt +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex.egg-info/dependency_links.txt +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex.egg-info/entry_points.txt +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex.egg-info/requires.txt +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/hipcortex.egg-info/top_level.txt +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/setup.cfg +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/setup.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/tests/test_adapters_common.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/tests/test_async_client.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/tests/test_async_langchain.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/tests/test_can_execute.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/tests/test_cli_install.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/tests/test_client_config.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/tests/test_client_v070.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/tests/test_config.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/tests/test_daemon.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/tests/test_doctor.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/tests/test_harness_with_loop.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/tests/test_host_install_e2e.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/tests/test_mcp_server_req.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/tests/test_mcp_tool_surface.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/tests/test_probe_honesty_runtime.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/tests/test_reflect_predict.py +0 -0
- {hipcortex-3.11.0 → hipcortex-3.12.0}/tests/test_substrate.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hipcortex
|
|
3
|
-
Version: 3.
|
|
4
|
-
Summary: Cognitive state substrate for AI agents — Python SDK + CLI.
|
|
3
|
+
Version: 3.12.0
|
|
4
|
+
Summary: Cognitive state substrate for AI agents — Python SDK + CLI. Graceful shutdown + auto-backup (POST /v1/backup tars 4 data files); actor merge (merge_actor MCP tool); snapshot CLI; VSIX dedup guard; schema-compat proven; universal passive capture; 62-tool / 7-resource MCP server; WAL-persistent. LangChain, AutoGen, CrewAI, MCP
|
|
5
5
|
Author: HipCortex Contributors
|
|
6
6
|
License: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://github.com/farmountain/HipCortex
|
|
@@ -1335,6 +1335,29 @@ def cmd_restore(args: argparse.Namespace) -> None:
|
|
|
1335
1335
|
__import__('sys').exit(1)
|
|
1336
1336
|
|
|
1337
1337
|
|
|
1338
|
+
def cmd_snapshot(args: argparse.Namespace) -> None:
|
|
1339
|
+
"""Trigger server-side full data-directory backup (tar.gz)."""
|
|
1340
|
+
import json, urllib.request, urllib.error
|
|
1341
|
+
url = (getattr(args, "url", None) or os.environ.get("HIPCORTEX_URL", DEFAULT_URL)).rstrip("/")
|
|
1342
|
+
req = urllib.request.Request(
|
|
1343
|
+
f"{url}/v1/backup",
|
|
1344
|
+
data=b"{}",
|
|
1345
|
+
headers={"Content-Type": "application/json"},
|
|
1346
|
+
method="POST",
|
|
1347
|
+
)
|
|
1348
|
+
try:
|
|
1349
|
+
with urllib.request.urlopen(req, timeout=30) as r:
|
|
1350
|
+
result = json.loads(r.read().decode("utf-8"))
|
|
1351
|
+
if result.get("ok"):
|
|
1352
|
+
print(f"✓ Snapshot created: {result.get('path', '(server did not return path)')}")
|
|
1353
|
+
else:
|
|
1354
|
+
print(f"✗ Snapshot failed: {result.get('error', 'unknown')}", file=__import__('sys').stderr)
|
|
1355
|
+
__import__('sys').exit(1)
|
|
1356
|
+
except Exception as e:
|
|
1357
|
+
print(f"✗ Snapshot failed: {e}", file=__import__('sys').stderr)
|
|
1358
|
+
__import__('sys').exit(1)
|
|
1359
|
+
|
|
1360
|
+
|
|
1338
1361
|
def _channels_yaml_candidates() -> list[Path]:
|
|
1339
1362
|
"""Resolve docs/channels.yaml from repo checkout or CWD."""
|
|
1340
1363
|
here = Path(__file__).resolve()
|
|
@@ -1597,6 +1620,10 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
1597
1620
|
p_restore.add_argument("file", help="Backup file path (.json)")
|
|
1598
1621
|
p_restore.add_argument("--url", help="Server URL")
|
|
1599
1622
|
|
|
1623
|
+
# snapshot
|
|
1624
|
+
p_snapshot = sub.add_parser("snapshot", help="Trigger server-side data directory backup (tar.gz)")
|
|
1625
|
+
p_snapshot.add_argument("--url", help="Server URL")
|
|
1626
|
+
|
|
1600
1627
|
# index
|
|
1601
1628
|
p_index = sub.add_parser("index", help="Index a codebase into the HipCortex knowledge graph")
|
|
1602
1629
|
p_index.add_argument("path", nargs="?", default=".", help="Directory or file to index (default: current dir)")
|
|
@@ -1666,6 +1693,8 @@ def main() -> None:
|
|
|
1666
1693
|
cmd_backup(args)
|
|
1667
1694
|
elif args.command == "restore":
|
|
1668
1695
|
cmd_restore(args)
|
|
1696
|
+
elif args.command == "snapshot":
|
|
1697
|
+
cmd_snapshot(args)
|
|
1669
1698
|
elif args.command == "index":
|
|
1670
1699
|
cmd_index(args)
|
|
1671
1700
|
elif args.command == "channels":
|
|
@@ -233,6 +233,22 @@ TOOLS = [
|
|
|
233
233
|
},
|
|
234
234
|
},
|
|
235
235
|
},
|
|
236
|
+
{
|
|
237
|
+
"name": "merge_actor",
|
|
238
|
+
"description": (
|
|
239
|
+
"Move all memory records from one actor to another (MOVE semantics: "
|
|
240
|
+
"source actor records are deleted after being re-assigned to target). "
|
|
241
|
+
"Use to consolidate two agent identities or rename an actor."
|
|
242
|
+
),
|
|
243
|
+
"inputSchema": {
|
|
244
|
+
"type": "object",
|
|
245
|
+
"required": ["source", "target"],
|
|
246
|
+
"properties": {
|
|
247
|
+
"source": {"type": "string", "description": "Actor whose records to move away from"},
|
|
248
|
+
"target": {"type": "string", "description": "Actor to receive the moved records"},
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
},
|
|
236
252
|
{
|
|
237
253
|
"name": "get_stats",
|
|
238
254
|
"description": "Get memory store statistics: total records, types, unique actors.",
|
|
@@ -1428,6 +1444,13 @@ def handle_forget_actor(args: dict) -> str:
|
|
|
1428
1444
|
delta = {"type": "ForgetActor", "actor": actor}
|
|
1429
1445
|
return json.dumps(_post("/v1/cognitive/transact", {"delta": delta, "actor": "mcp"}))
|
|
1430
1446
|
|
|
1447
|
+
def handle_merge_actor(args: dict) -> str:
|
|
1448
|
+
source = args.get("source", "").strip()
|
|
1449
|
+
target = args.get("target", "").strip()
|
|
1450
|
+
if not source or not target:
|
|
1451
|
+
raise ValueError("merge_actor requires 'source' and 'target'")
|
|
1452
|
+
return json.dumps(_post("/v1/actor/merge", {"source": source, "target": target}))
|
|
1453
|
+
|
|
1431
1454
|
def handle_archive_record(args: dict) -> str:
|
|
1432
1455
|
delta = {"type": "ArchiveRecord", "id": args["id"]}
|
|
1433
1456
|
return json.dumps(_post("/v1/cognitive/transact", {"delta": delta, "actor": "mcp"}))
|
|
@@ -1777,6 +1800,7 @@ def dispatch_tool(name: str, args: dict) -> str:
|
|
|
1777
1800
|
"add_memory": handle_add_memory,
|
|
1778
1801
|
"search_memory": handle_search_memory,
|
|
1779
1802
|
"forget_actor": handle_forget_actor,
|
|
1803
|
+
"merge_actor": handle_merge_actor,
|
|
1780
1804
|
"get_stats": handle_get_stats,
|
|
1781
1805
|
"search_code": handle_search_code,
|
|
1782
1806
|
"link_memories": handle_link_memories,
|
|
@@ -1960,7 +1984,7 @@ def main() -> None:
|
|
|
1960
1984
|
respond(id_, {
|
|
1961
1985
|
"protocolVersion": "2024-11-05",
|
|
1962
1986
|
"capabilities": {"tools": {}, "resources": {}},
|
|
1963
|
-
"serverInfo": {"name": "hipcortex", "version": "3.
|
|
1987
|
+
"serverInfo": {"name": "hipcortex", "version": "3.12.0"},
|
|
1964
1988
|
})
|
|
1965
1989
|
elif method == "initialized":
|
|
1966
1990
|
pass # notification — no response
|
|
@@ -77,6 +77,16 @@ def _desired_mcp_entry(server_url: str) -> dict:
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
|
|
80
|
+
def _is_vsix_managed_entry(entry: object) -> bool:
|
|
81
|
+
"""True if entry was written by the VS Code extension (args[0] ends in launcher.py)."""
|
|
82
|
+
if not isinstance(entry, dict):
|
|
83
|
+
return False
|
|
84
|
+
args = entry.get("args")
|
|
85
|
+
if not isinstance(args, list) or not args:
|
|
86
|
+
return False
|
|
87
|
+
return str(args[0]).endswith("launcher.py")
|
|
88
|
+
|
|
89
|
+
|
|
80
90
|
def _atomic_write_text(path: Path, content: str) -> None:
|
|
81
91
|
"""Write text via temp file + os.replace (same-dir atomic swap)."""
|
|
82
92
|
path.parent.mkdir(parents=True, exist_ok=True)
|
|
@@ -134,6 +144,8 @@ def _write_mcp_servers(mcp_path: Path, server_url: str) -> str:
|
|
|
134
144
|
prev = mcp_servers.get("hipcortex")
|
|
135
145
|
if prev == entry:
|
|
136
146
|
return INSTALL_UNCHANGED
|
|
147
|
+
if _is_vsix_managed_entry(prev):
|
|
148
|
+
return INSTALL_UNCHANGED
|
|
137
149
|
|
|
138
150
|
had_entry = prev is not None
|
|
139
151
|
mcp_servers["hipcortex"] = entry
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hipcortex
|
|
3
|
-
Version: 3.
|
|
4
|
-
Summary: Cognitive state substrate for AI agents — Python SDK + CLI.
|
|
3
|
+
Version: 3.12.0
|
|
4
|
+
Summary: Cognitive state substrate for AI agents — Python SDK + CLI. Graceful shutdown + auto-backup (POST /v1/backup tars 4 data files); actor merge (merge_actor MCP tool); snapshot CLI; VSIX dedup guard; schema-compat proven; universal passive capture; 62-tool / 7-resource MCP server; WAL-persistent. LangChain, AutoGen, CrewAI, MCP
|
|
5
5
|
Author: HipCortex Contributors
|
|
6
6
|
License: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://github.com/farmountain/HipCortex
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "hipcortex"
|
|
7
|
-
version = "3.
|
|
8
|
-
description = "Cognitive state substrate for AI agents — Python SDK + CLI.
|
|
7
|
+
version = "3.12.0"
|
|
8
|
+
description = "Cognitive state substrate for AI agents — Python SDK + CLI. Graceful shutdown + auto-backup (POST /v1/backup tars 4 data files); actor merge (merge_actor MCP tool); snapshot CLI; VSIX dedup guard; schema-compat proven; universal passive capture; 62-tool / 7-resource MCP server; WAL-persistent. LangChain, AutoGen, CrewAI, MCP"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "Apache-2.0"}
|
|
11
11
|
requires-python = ">=3.9"
|
|
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
|