tokenzero 0.1.2__tar.gz → 0.1.3__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.
- {tokenzero-0.1.2/tokenzero.egg-info → tokenzero-0.1.3}/PKG-INFO +1 -1
- {tokenzero-0.1.2 → tokenzero-0.1.3}/pyproject.toml +1 -1
- {tokenzero-0.1.2 → tokenzero-0.1.3}/squeeze.py +30 -38
- {tokenzero-0.1.2 → tokenzero-0.1.3/tokenzero.egg-info}/PKG-INFO +1 -1
- {tokenzero-0.1.2 → tokenzero-0.1.3}/LICENSE +0 -0
- {tokenzero-0.1.2 → tokenzero-0.1.3}/README.md +0 -0
- {tokenzero-0.1.2 → tokenzero-0.1.3}/mcp_server.py +0 -0
- {tokenzero-0.1.2 → tokenzero-0.1.3}/proxy.py +0 -0
- {tokenzero-0.1.2 → tokenzero-0.1.3}/scanner.py +0 -0
- {tokenzero-0.1.2 → tokenzero-0.1.3}/setup.cfg +0 -0
- {tokenzero-0.1.2 → tokenzero-0.1.3}/tests/test_cli.py +0 -0
- {tokenzero-0.1.2 → tokenzero-0.1.3}/tokenzero.egg-info/SOURCES.txt +0 -0
- {tokenzero-0.1.2 → tokenzero-0.1.3}/tokenzero.egg-info/dependency_links.txt +0 -0
- {tokenzero-0.1.2 → tokenzero-0.1.3}/tokenzero.egg-info/entry_points.txt +0 -0
- {tokenzero-0.1.2 → tokenzero-0.1.3}/tokenzero.egg-info/requires.txt +0 -0
- {tokenzero-0.1.2 → tokenzero-0.1.3}/tokenzero.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tokenzero
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Zero Token Waste - AST Code Skeletonizer & Live AI Monitor for Coding Agents
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Keywords: tokenzero,tokens,ai-agents,ast,antigravity,claude,cursor,optimization,mcp
|
|
@@ -388,15 +388,15 @@ def render_dashboard_layout(target_dir: Path, spinner_frame: str) -> Layout:
|
|
|
388
388
|
summary_table.add_column("C1", justify="center")
|
|
389
389
|
|
|
390
390
|
summary_table.add_row(
|
|
391
|
-
f"[dim]
|
|
392
|
-
f"[dim]
|
|
393
|
-
f"[dim]
|
|
391
|
+
f"[dim][telemetry][/dim] {len(entries)} events across {len(files_touched)} files | "
|
|
392
|
+
f"[dim]unoptimized:[/dim] {without_tokens:,} tokens (${dollars_without:.4f}) ➜ "
|
|
393
|
+
f"[dim]optimized:[/dim] [green]{total_tokens_used:,}[/green] tokens (${dollars_with:.4f})"
|
|
394
394
|
)
|
|
395
395
|
summary_table.add_row(
|
|
396
|
-
f"[bold green]
|
|
396
|
+
f"[bold green][savings] net saved: +{total_tokens_saved:,} tokens ({pct_saved:.1f}% reduction) | cost saved: ${dollars_saved:.4f} USD[/bold green]"
|
|
397
397
|
)
|
|
398
398
|
|
|
399
|
-
layout["footer"].update(Panel(summary_table, title="
|
|
399
|
+
layout["footer"].update(Panel(summary_table, title="[dim]tokenzero metrics[/dim]", border_style="dim"))
|
|
400
400
|
|
|
401
401
|
return layout
|
|
402
402
|
|
|
@@ -426,7 +426,7 @@ def show_stats_once(target_dir: Path):
|
|
|
426
426
|
console.print(render_dashboard_layout(target_dir, "●"))
|
|
427
427
|
|
|
428
428
|
def init_tokenzero(target_dir: Path, local: bool = False):
|
|
429
|
-
|
|
429
|
+
|
|
430
430
|
|
|
431
431
|
# 1. Scan codebase (Python, JavaScript, TypeScript, Go)
|
|
432
432
|
scan_results = scan_project(target_dir)
|
|
@@ -503,20 +503,17 @@ def init_tokenzero(target_dir: Path, local: bool = False):
|
|
|
503
503
|
|
|
504
504
|
mode_label = "Local (Auto-.gitignore)" if local else "[bold green]Zero-File Stealth Mode (0 files in project)[/bold green]"
|
|
505
505
|
|
|
506
|
-
table = Table(title="TokenZero Configuration", header_style="bold")
|
|
507
|
-
table.add_column("Component", style="cyan")
|
|
508
|
-
table.add_column("Status / Impact", style="bold white")
|
|
509
|
-
|
|
510
|
-
table.add_row("Codebase Analysis", f"{total_files} files, {total_classes + total_funcs + total_methods} symbols indexed")
|
|
511
|
-
table.add_row("Project Directory", mode_label)
|
|
512
|
-
table.add_row("TokenZero Core Engine", "[bold green]Online & Synchronized[/bold green]")
|
|
513
|
-
table.add_row("Context Compression", f"[bold green]{pct:.1f}% reduction[/bold green]")
|
|
514
|
-
table.add_row("Multi-Agent Guard", "[bold green]Active (Antigravity, Claude, Cursor, Copilot, Windsurf)[/bold green]")
|
|
515
|
-
table.add_row("Real-Time Telemetry", "[bold green]Connected (~/.tokenzero/audit.jsonl)[/bold green]")
|
|
516
|
-
|
|
517
506
|
console.print()
|
|
518
|
-
console.print(
|
|
519
|
-
console.print("
|
|
507
|
+
console.print("[bold cyan]tokenzero[/bold cyan] [dim]v0.1.2[/dim]")
|
|
508
|
+
console.print(f"[bold cyan] init[/bold cyan] target [white]{target_dir.resolve()}[/white]")
|
|
509
|
+
console.print(f"[bold blue] scan[/bold blue] indexed [white]{total_files} files[/white] [dim]({total_classes + total_funcs + total_methods} symbols, {raw_lines:,} lines)[/dim]")
|
|
510
|
+
mode_text = "[green]zero-file stealth[/green] [dim](0 repository files touched)[/dim]" if not local else "[yellow]local repo rules[/yellow]"
|
|
511
|
+
console.print(f"[bold magenta] mode[/bold magenta] storage {mode_text}")
|
|
512
|
+
console.print(f"[bold green] sync[/bold green] agents [white]Antigravity, Cursor, Claude, Copilot[/white]")
|
|
513
|
+
cache_info = f"[dim]{cache_dir}[/dim]" if not local else f"[dim]{tokenzero_dir}[/dim]"
|
|
514
|
+
console.print(f"[dim] cache path {cache_info}[/dim]")
|
|
515
|
+
console.print()
|
|
516
|
+
console.print("[dim]ready: run[/dim] [cyan]tokenzero watch[/cyan] [dim]to stream live token consumption[/dim]\n")
|
|
520
517
|
|
|
521
518
|
def ensure_antigravity_plugin() -> tuple:
|
|
522
519
|
"""Installs or updates the global Antigravity plugin in ~/.gemini/config/plugins/tokenzero/"""
|
|
@@ -617,17 +614,14 @@ def setup_tokenzero(silent: bool = False) -> list:
|
|
|
617
614
|
results.append(("Google Antigravity", "~/.gemini/config/plugins/", f"[yellow]Skipped ({path_or_err})[/yellow]"))
|
|
618
615
|
|
|
619
616
|
if not silent:
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
table.add_column("Status", style="bold white")
|
|
624
|
-
|
|
617
|
+
console.print()
|
|
618
|
+
console.print("[bold cyan]tokenzero[/bold cyan] [dim]v0.1.2[/dim]")
|
|
619
|
+
console.print("[bold cyan] setup[/bold cyan] configuring universal integrations...")
|
|
625
620
|
for agent, path, status in results:
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
console.print(
|
|
629
|
-
console.print("
|
|
630
|
-
console.print("[dim]Project repositories remain 100% clean with 0 files added.[/dim]\n")
|
|
621
|
+
status_text = "[green]connected[/green]" if "Configured" in status else "[dim]skipped[/dim]"
|
|
622
|
+
console.print(f"[bold green] ok[/bold green] {agent:<20} [dim]{path}[/dim] -> {status_text}")
|
|
623
|
+
console.print()
|
|
624
|
+
console.print("[dim]connected: all configured agents will route tool calls through tokenzero.[/dim]\n")
|
|
631
625
|
|
|
632
626
|
return results
|
|
633
627
|
|
|
@@ -786,16 +780,14 @@ def remove_global_configs() -> list:
|
|
|
786
780
|
except Exception as e:
|
|
787
781
|
cleaned.append(("Global Cache & Telemetry", str(GLOBAL_DIR), f"[yellow]Error ({e})[/yellow]"))
|
|
788
782
|
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
table.add_column("Result", style="bold white")
|
|
793
|
-
|
|
783
|
+
console.print()
|
|
784
|
+
console.print("[bold cyan]tokenzero[/bold cyan] [dim]v0.1.2[/dim]")
|
|
785
|
+
console.print("[bold yellow] clean[/bold yellow] removing global integrations and cache...")
|
|
794
786
|
for agent, path, status in cleaned:
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
console.print(
|
|
798
|
-
console.print("
|
|
787
|
+
tag = "[green]removed[/green]" if "Removed" in status or "Deleted" in status else "[dim]not found[/dim]"
|
|
788
|
+
console.print(f"[bold red] purge[/bold red] {agent:<22} [dim]{path}[/dim] -> {tag}")
|
|
789
|
+
console.print()
|
|
790
|
+
console.print("[dim]cleanup complete: all global integrations and caches removed.[/dim]\n")
|
|
799
791
|
return cleaned
|
|
800
792
|
|
|
801
793
|
def main():
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tokenzero
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Zero Token Waste - AST Code Skeletonizer & Live AI Monitor for Coding Agents
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Keywords: tokenzero,tokens,ai-agents,ast,antigravity,claude,cursor,optimization,mcp
|
|
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
|