chore: update cognee-cli to use MCP Docker image from main. Bring back deprecation warnings
This commit is contained in:
parent
3dba072c49
commit
0bf3490d63
3 changed files with 24 additions and 3 deletions
|
|
@ -36,4 +36,5 @@ dev = [
|
||||||
allow-direct-references = true
|
allow-direct-references = true
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
cognee-mcp = "src:main"
|
cognee = "src:main"
|
||||||
|
cognee-mcp = "src:main_mcp"
|
||||||
|
|
@ -1,8 +1,28 @@
|
||||||
from .server import main as server_main
|
from .server import main as server_main
|
||||||
|
import warnings
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""Main entry point for the package."""
|
"""Deprecated main entry point for the package."""
|
||||||
|
import asyncio
|
||||||
|
|
||||||
|
warnings.warn(
|
||||||
|
"The 'cognee' command for cognee-mcp is deprecated and will be removed in a future version. "
|
||||||
|
"Please use 'cognee-mcp' instead to avoid conflicts with the main cognee library.",
|
||||||
|
DeprecationWarning,
|
||||||
|
stacklevel=2,
|
||||||
|
)
|
||||||
|
|
||||||
|
print("⚠️ DEPRECATION WARNING: Use 'cognee-mcp' command instead of 'cognee'", file=sys.stderr)
|
||||||
|
print(" This avoids conflicts with the main cognee library.", file=sys.stderr)
|
||||||
|
print(file=sys.stderr)
|
||||||
|
|
||||||
|
asyncio.run(server_main())
|
||||||
|
|
||||||
|
|
||||||
|
def main_mcp():
|
||||||
|
"""Clean main entry point for cognee-mcp command."""
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
asyncio.run(server_main())
|
asyncio.run(server_main())
|
||||||
|
|
|
||||||
|
|
@ -516,7 +516,7 @@ def start_ui(
|
||||||
env_file,
|
env_file,
|
||||||
"-e",
|
"-e",
|
||||||
"TRANSPORT_MODE=sse",
|
"TRANSPORT_MODE=sse",
|
||||||
"cognee/cognee-mcp:daulet-dev",
|
"cognee/cognee-mcp:main",
|
||||||
],
|
],
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE,
|
stderr=subprocess.PIPE,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue