tokensafe 1.3.2 → 1.3.3
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.
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/src/__init__.py +1 -1
- package/src/dashboard.py +8 -8
- package/src/mcp_server.py +1 -1
- package/src/version_checker.py +1 -1
package/package.json
CHANGED
package/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agy-token-optimizer",
|
|
3
3
|
"displayName": "TokenSafe",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.3",
|
|
5
5
|
"description": "Zero-Loss Token Economy & Context Optimizer for AI Agents. Compresses prompts, slices AST/tool outputs, and prevents stuck loops.",
|
|
6
6
|
"logo": "assets/logo.svg",
|
|
7
7
|
"author": {
|
package/src/__init__.py
CHANGED
package/src/dashboard.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"""
|
|
2
|
-
Terminal & Interactive HTML Dashboard for
|
|
2
|
+
Terminal & Interactive HTML Dashboard for TokenSafe Context & Token Optimizer.
|
|
3
3
|
Provides colorful CLI reports, Markdown exports, and rich modern HTML widgets.
|
|
4
4
|
"""
|
|
5
5
|
|
|
@@ -68,7 +68,7 @@ class Dashboard:
|
|
|
68
68
|
|
|
69
69
|
out = []
|
|
70
70
|
out.append(f"\n{BOLD}{CYAN}╔════════════════════════════════════════════════════════════════════╗{RESET}")
|
|
71
|
-
out.append(f"{BOLD}{CYAN}║ ⚡
|
|
71
|
+
out.append(f"{BOLD}{CYAN}║ ⚡ TOKENSAFE CONTEXT OPTIMIZER DASHBOARD ⚡ ║{RESET}")
|
|
72
72
|
out.append(f"{BOLD}{CYAN}╚════════════════════════════════════════════════════════════════════╝{RESET}\n")
|
|
73
73
|
|
|
74
74
|
# Top summary cards
|
|
@@ -105,8 +105,8 @@ class Dashboard:
|
|
|
105
105
|
|
|
106
106
|
out.append(f" [{DIM}{t_str}{RESET}] {CYAN}{ev_type:<15}{RESET} {detail_desc:<20} ➔ {GREEN}+{saved:,} saved{RESET} ({pct_ev:.1f}%)")
|
|
107
107
|
|
|
108
|
-
out.append(f"\n{DIM}Run `
|
|
109
|
-
out.append(f"{DIM}Run `agy-tokens html` to view interactive browser dashboard.{RESET}")
|
|
108
|
+
out.append(f"\n{DIM}Run `tokensafe test \"<prompt>\"` (or `agy-tokens`) to test compression on custom input.{RESET}")
|
|
109
|
+
out.append(f"{DIM}Run `tokensafe html` (or `agy-tokens html`) to view interactive browser dashboard.{RESET}")
|
|
110
110
|
|
|
111
111
|
if VersionChecker:
|
|
112
112
|
banner = VersionChecker.get_banner()
|
|
@@ -129,7 +129,7 @@ class Dashboard:
|
|
|
129
129
|
opt = summary["total_optimized_tokens"]
|
|
130
130
|
|
|
131
131
|
md = []
|
|
132
|
-
md.append("# ⚡
|
|
132
|
+
md.append("# ⚡ TokenSafe Context & Token Optimizer Report\n")
|
|
133
133
|
md.append(f"> **Cumulative Resource Efficiency:** **{pct:.1f}% Reduction** across {summary['total_events']} events.\n")
|
|
134
134
|
md.append("| Metric | Value |")
|
|
135
135
|
md.append("| :--- | :--- |")
|
|
@@ -208,7 +208,7 @@ class Dashboard:
|
|
|
208
208
|
<head>
|
|
209
209
|
<meta charset="UTF-8">
|
|
210
210
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
211
|
-
<title>⚡
|
|
211
|
+
<title>⚡ TokenSafe Context Optimizer Dashboard</title>
|
|
212
212
|
<style>
|
|
213
213
|
:root {{
|
|
214
214
|
--bg: #090a0f;
|
|
@@ -259,8 +259,8 @@ class Dashboard:
|
|
|
259
259
|
<div class="container">
|
|
260
260
|
<div class="header">
|
|
261
261
|
<div>
|
|
262
|
-
<h1 class="title">⚡
|
|
263
|
-
<p class="subtitle">
|
|
262
|
+
<h1 class="title">⚡ TokenSafe</h1>
|
|
263
|
+
<p class="subtitle">Autonomous Zero-Loss Token Economy & Context Preservation</p>
|
|
264
264
|
</div>
|
|
265
265
|
<div id="live-pill" class="subtitle" style="display: flex; align-items: center; gap: 6px;">
|
|
266
266
|
<span style="color: #10b981;">●</span> Live SQLite Tracking
|
package/src/mcp_server.py
CHANGED
package/src/version_checker.py
CHANGED
|
@@ -14,7 +14,7 @@ import urllib.request
|
|
|
14
14
|
import urllib.error
|
|
15
15
|
from typing import Dict, Any, Optional, Tuple
|
|
16
16
|
|
|
17
|
-
CURRENT_VERSION = "1.3.
|
|
17
|
+
CURRENT_VERSION = "1.3.3"
|
|
18
18
|
CACHE_TTL = 86400 # 24 hours
|
|
19
19
|
|
|
20
20
|
PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|