mindgraph-sdk 0.2.0__tar.gz → 0.2.2__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.
- {mindgraph_sdk-0.2.0 → mindgraph_sdk-0.2.2}/PKG-INFO +1 -1
- {mindgraph_sdk-0.2.0 → mindgraph_sdk-0.2.2}/mindgraph/client.py +42 -1
- {mindgraph_sdk-0.2.0 → mindgraph_sdk-0.2.2}/pyproject.toml +1 -1
- {mindgraph_sdk-0.2.0 → mindgraph_sdk-0.2.2}/.github/workflows/publish.yml +0 -0
- {mindgraph_sdk-0.2.0 → mindgraph_sdk-0.2.2}/CHANGELOG.md +0 -0
- {mindgraph_sdk-0.2.0 → mindgraph_sdk-0.2.2}/README.md +0 -0
- {mindgraph_sdk-0.2.0 → mindgraph_sdk-0.2.2}/examples/README.md +0 -0
- {mindgraph_sdk-0.2.0 → mindgraph_sdk-0.2.2}/examples/research_continuity.py +0 -0
- {mindgraph_sdk-0.2.0 → mindgraph_sdk-0.2.2}/mindgraph/__init__.py +0 -0
- {mindgraph_sdk-0.2.0 → mindgraph_sdk-0.2.2}/tests/__init__.py +0 -0
- {mindgraph_sdk-0.2.0 → mindgraph_sdk-0.2.2}/tests/test_integration.py +0 -0
|
@@ -451,6 +451,32 @@ class MindGraph:
|
|
|
451
451
|
def delete_node(self, uid: str) -> None:
|
|
452
452
|
self._request("DELETE", f"/node/{uid}")
|
|
453
453
|
|
|
454
|
+
def batch_delete_nodes(
|
|
455
|
+
self,
|
|
456
|
+
uids: list[str] | None = None,
|
|
457
|
+
agent_id: str | None = None,
|
|
458
|
+
filter: dict[str, Any] | None = None,
|
|
459
|
+
reason: str | None = None,
|
|
460
|
+
by: str | None = None,
|
|
461
|
+
hard_purge: bool = False,
|
|
462
|
+
) -> dict[str, Any]:
|
|
463
|
+
"""Batch tombstone-cascade nodes by UIDs, agent_id, and/or filter.
|
|
464
|
+
|
|
465
|
+
Returns counts of nodes/edges tombstoned and purged.
|
|
466
|
+
"""
|
|
467
|
+
body: dict[str, Any] = {"hard_purge": hard_purge}
|
|
468
|
+
if uids:
|
|
469
|
+
body["uids"] = uids
|
|
470
|
+
if agent_id:
|
|
471
|
+
body["agent_id"] = agent_id
|
|
472
|
+
if filter:
|
|
473
|
+
body["filter"] = filter
|
|
474
|
+
if reason:
|
|
475
|
+
body["reason"] = reason
|
|
476
|
+
if by:
|
|
477
|
+
body["by"] = by
|
|
478
|
+
return self._request("POST", "/nodes/delete", body)
|
|
479
|
+
|
|
454
480
|
def get_node_history(self, uid: str) -> list[dict[str, Any]]:
|
|
455
481
|
return self._request("GET", f"/node/{uid}/history")
|
|
456
482
|
|
|
@@ -554,7 +580,16 @@ class MindGraph:
|
|
|
554
580
|
node_type: str | None = None,
|
|
555
581
|
layer: str | None = None,
|
|
556
582
|
limit: int | None = None,
|
|
557
|
-
|
|
583
|
+
min_score: float | None = None,
|
|
584
|
+
include_edges: bool = False,
|
|
585
|
+
include_chunks: bool = False,
|
|
586
|
+
) -> list[dict[str, Any]] | dict[str, Any]:
|
|
587
|
+
"""Full-text search over nodes.
|
|
588
|
+
|
|
589
|
+
When ``include_edges`` or ``include_chunks`` is True the response is an
|
|
590
|
+
enriched dict with ``results``, ``edges``, and ``chunks`` keys.
|
|
591
|
+
Otherwise a flat list of search results is returned.
|
|
592
|
+
"""
|
|
558
593
|
body: dict[str, Any] = {"query": query}
|
|
559
594
|
if node_type:
|
|
560
595
|
body["node_type"] = node_type
|
|
@@ -562,6 +597,12 @@ class MindGraph:
|
|
|
562
597
|
body["layer"] = layer
|
|
563
598
|
if limit:
|
|
564
599
|
body["limit"] = limit
|
|
600
|
+
if min_score is not None:
|
|
601
|
+
body["min_score"] = min_score
|
|
602
|
+
if include_edges:
|
|
603
|
+
body["include_edges"] = True
|
|
604
|
+
if include_chunks:
|
|
605
|
+
body["include_chunks"] = True
|
|
565
606
|
return self._request("POST", "/search", body)
|
|
566
607
|
|
|
567
608
|
def hybrid_search(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|