tokensafe 1.4.9 → 1.4.10
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/mcp_server.py +1 -1
- package/src/team_cache.py +2 -2
- package/src/telemetry_sync.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.4.
|
|
4
|
+
"version": "1.4.10",
|
|
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/mcp_server.py
CHANGED
package/src/team_cache.py
CHANGED
|
@@ -17,7 +17,7 @@ from src.license_manager import LicenseManager
|
|
|
17
17
|
class TeamCache:
|
|
18
18
|
"""Distributed cross-developer cache client for TokenSafe Team tier."""
|
|
19
19
|
|
|
20
|
-
DEFAULT_TIMEOUT =
|
|
20
|
+
DEFAULT_TIMEOUT = float(os.environ.get("TOKENSAFE_CACHE_TIMEOUT", "1.2")) # Fast 1.2s timeout to prevent blocking agent turns
|
|
21
21
|
|
|
22
22
|
@classmethod
|
|
23
23
|
def _get_cloud_url(cls) -> str:
|
|
@@ -144,7 +144,7 @@ class TeamCache:
|
|
|
144
144
|
headers={"Authorization": f"Bearer {lic_key}", "User-Agent": "TokenSafe-TeamCache/1.0"}
|
|
145
145
|
)
|
|
146
146
|
try:
|
|
147
|
-
with urllib.request.urlopen(req, timeout=
|
|
147
|
+
with urllib.request.urlopen(req, timeout=max(2.5, cls.DEFAULT_TIMEOUT)) as resp:
|
|
148
148
|
if resp.status == 200:
|
|
149
149
|
res = json.loads(resp.read().decode("utf-8"))
|
|
150
150
|
res["active"] = True
|
package/src/telemetry_sync.py
CHANGED
|
@@ -236,7 +236,7 @@ class TelemetrySync:
|
|
|
236
236
|
total_sent = 0
|
|
237
237
|
headers = {
|
|
238
238
|
"Content-Type": "application/json",
|
|
239
|
-
"User-Agent": "TokenSafe-Sync/1.4.
|
|
239
|
+
"User-Agent": "TokenSafe-Sync/1.4.10"
|
|
240
240
|
}
|
|
241
241
|
if active_key:
|
|
242
242
|
headers["Authorization"] = f"Bearer {active_key}"
|
package/src/version_checker.py
CHANGED
|
@@ -16,7 +16,7 @@ import urllib.request
|
|
|
16
16
|
import urllib.error
|
|
17
17
|
from typing import Dict, Any, Optional, Tuple
|
|
18
18
|
|
|
19
|
-
CURRENT_VERSION = "1.4.
|
|
19
|
+
CURRENT_VERSION = "1.4.10"
|
|
20
20
|
CACHE_TTL = 86400 # 24 hours
|
|
21
21
|
|
|
22
22
|
PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|