expluro 0.1.2__tar.gz → 0.1.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.
- {expluro-0.1.2 → expluro-0.1.4}/PKG-INFO +1 -1
- {expluro-0.1.2 → expluro-0.1.4}/expluro.egg-info/PKG-INFO +1 -1
- {expluro-0.1.2 → expluro-0.1.4}/expluro.egg-info/SOURCES.txt +1 -0
- {expluro-0.1.2 → expluro-0.1.4}/pyproject.toml +1 -1
- {expluro-0.1.2 → expluro-0.1.4}/topo/auth.py +22 -10
- {expluro-0.1.2 → expluro-0.1.4}/topo/main.py +11 -1
- expluro-0.1.4/topo/update_check.py +25 -0
- {expluro-0.1.2 → expluro-0.1.4}/expluro.egg-info/dependency_links.txt +0 -0
- {expluro-0.1.2 → expluro-0.1.4}/expluro.egg-info/entry_points.txt +0 -0
- {expluro-0.1.2 → expluro-0.1.4}/expluro.egg-info/requires.txt +0 -0
- {expluro-0.1.2 → expluro-0.1.4}/expluro.egg-info/top_level.txt +0 -0
- {expluro-0.1.2 → expluro-0.1.4}/setup.cfg +0 -0
- {expluro-0.1.2 → expluro-0.1.4}/topo/__init__.py +0 -0
- {expluro-0.1.2 → expluro-0.1.4}/topo/backend.py +0 -0
- {expluro-0.1.2 → expluro-0.1.4}/topo/capture.py +0 -0
- {expluro-0.1.2 → expluro-0.1.4}/topo/constants.py +0 -0
- {expluro-0.1.2 → expluro-0.1.4}/topo/display.py +0 -0
- {expluro-0.1.2 → expluro-0.1.4}/topo/drivers/__init__.py +0 -0
- {expluro-0.1.2 → expluro-0.1.4}/topo/drivers/base.py +0 -0
- {expluro-0.1.2 → expluro-0.1.4}/topo/drivers/claude.py +0 -0
- {expluro-0.1.2 → expluro-0.1.4}/topo/picker.py +0 -0
- {expluro-0.1.2 → expluro-0.1.4}/topo/renderer.py +0 -0
- {expluro-0.1.2 → expluro-0.1.4}/topo/session.py +0 -0
- {expluro-0.1.2 → expluro-0.1.4}/topo/session_files.py +0 -0
- {expluro-0.1.2 → expluro-0.1.4}/topo/snapshot.py +0 -0
|
@@ -64,22 +64,34 @@ def login(email: str, password: str, base_url: str = DEFAULT_BASE_URL) -> dict[s
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
def login_command() -> None:
|
|
67
|
-
import
|
|
67
|
+
from rich.console import Console
|
|
68
|
+
from rich.prompt import Prompt
|
|
69
|
+
from rich.status import Status
|
|
70
|
+
from rich.padding import Padding
|
|
68
71
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
console = Console()
|
|
73
|
+
|
|
74
|
+
console.print()
|
|
75
|
+
console.print(" [bold #6366f1]◆[/bold #6366f1] [bold white]expluro[/bold white]", highlight=False)
|
|
76
|
+
console.print(Padding("[dim]Version control for your AI thinking.[/dim]", (0, 0, 1, 5)))
|
|
77
|
+
|
|
78
|
+
email = Prompt.ask(" [dim]Email[/dim]", console=console)
|
|
79
|
+
password = Prompt.ask(" [dim]Password[/dim]", console=console, password=True)
|
|
80
|
+
console.print()
|
|
72
81
|
|
|
73
82
|
from .backend import BackendError
|
|
74
83
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
84
|
+
with Status("[dim]Authenticating…[/dim]", console=console, spinner="dots"):
|
|
85
|
+
try:
|
|
86
|
+
tokens = login(email, password)
|
|
87
|
+
except BackendError as exc:
|
|
88
|
+
console.print(f" [bold red]✗[/bold red] {exc.detail}")
|
|
89
|
+
console.print()
|
|
90
|
+
raise SystemExit(1)
|
|
80
91
|
|
|
81
92
|
save_tokens(tokens["access"], tokens["refresh"])
|
|
82
|
-
|
|
93
|
+
console.print(f" [bold green]✓[/bold green] Logged in as [bold]{email}[/bold]")
|
|
94
|
+
console.print(Padding("[dim]Run [bold]expluro[/bold] in any project directory to start a session.[/dim]", (0, 0, 1, 5)))
|
|
83
95
|
|
|
84
96
|
|
|
85
97
|
def _load_config() -> dict:
|
|
@@ -4,16 +4,25 @@ from topo.constants import APP_NAME, APP_DISPLAY_NAME
|
|
|
4
4
|
from topo.session import start_session
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
def _print_update_notice() -> None:
|
|
8
|
+
from topo.update_check import check_for_update
|
|
9
|
+
latest = check_for_update()
|
|
10
|
+
if latest:
|
|
11
|
+
from rich.console import Console
|
|
12
|
+
Console().print(f"\n [bold yellow]⚡ New version available:[/bold yellow] [bold]{latest}[/bold] → pip install --upgrade expluro\n")
|
|
13
|
+
|
|
14
|
+
|
|
7
15
|
@click.group(invoke_without_command=True)
|
|
8
16
|
@click.option('--no-browser', is_flag=True, default=False, help='Do not open the graph in the browser.')
|
|
9
17
|
@click.pass_context
|
|
10
18
|
def cli(ctx: click.Context, no_browser: bool) -> None:
|
|
11
|
-
f"""{APP_DISPLAY_NAME} — graph layer on top of
|
|
19
|
+
f"""{APP_DISPLAY_NAME} — graph layer on top of your AI agent.
|
|
12
20
|
|
|
13
21
|
Run `{APP_NAME}` to start an interactive session.
|
|
14
22
|
Run `{APP_NAME} login` to authenticate first.
|
|
15
23
|
"""
|
|
16
24
|
if ctx.invoked_subcommand is None:
|
|
25
|
+
_print_update_notice()
|
|
17
26
|
if not is_authenticated():
|
|
18
27
|
click.echo(f"Not logged in. Run `{APP_NAME} login` first.")
|
|
19
28
|
raise SystemExit(1)
|
|
@@ -23,4 +32,5 @@ def cli(ctx: click.Context, no_browser: bool) -> None:
|
|
|
23
32
|
@cli.command()
|
|
24
33
|
def login() -> None:
|
|
25
34
|
"""Authenticate with Expluro."""
|
|
35
|
+
_print_update_notice()
|
|
26
36
|
login_command()
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import importlib.metadata
|
|
2
|
+
import httpx
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def check_for_update() -> str | None:
|
|
6
|
+
"""Returns the latest version string if newer than installed, else None."""
|
|
7
|
+
try:
|
|
8
|
+
installed = importlib.metadata.version("expluro")
|
|
9
|
+
resp = httpx.get("https://pypi.org/pypi/expluro/json", timeout=3)
|
|
10
|
+
if resp.status_code == 200:
|
|
11
|
+
latest = resp.json()["info"]["version"]
|
|
12
|
+
if _is_newer(latest, installed):
|
|
13
|
+
return latest
|
|
14
|
+
except Exception:
|
|
15
|
+
pass
|
|
16
|
+
return None
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _is_newer(latest: str, installed: str) -> bool:
|
|
20
|
+
def parse(v: str) -> tuple:
|
|
21
|
+
return tuple(int(x) for x in v.split("."))
|
|
22
|
+
try:
|
|
23
|
+
return parse(latest) > parse(installed)
|
|
24
|
+
except Exception:
|
|
25
|
+
return False
|
|
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
|