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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tokensafe",
3
- "version": "1.4.9",
3
+ "version": "1.4.10",
4
4
  "description": "Autonomous Zero-Loss Token Economy & Context Optimizer for AI Coding Agents",
5
5
  "main": "bin/tokensafe.js",
6
6
  "bin": {
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agy-token-optimizer",
3
3
  "displayName": "TokenSafe",
4
- "version": "1.4.9",
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
@@ -32,7 +32,7 @@ from src.scoped_search import ScopedSearch
32
32
 
33
33
  SERVER_INFO = {
34
34
  "name": "tokensafe-mcp",
35
- "version": "1.4.9"
35
+ "version": "1.4.10"
36
36
  }
37
37
 
38
38
  TOOLS = [
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 = 0.4 # Strict 400ms timeout to prevent blocking agent turns
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=1.0) as resp:
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
@@ -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.9"
239
+ "User-Agent": "TokenSafe-Sync/1.4.10"
240
240
  }
241
241
  if active_key:
242
242
  headers["Authorization"] = f"Bearer {active_key}"
@@ -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.9"
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__)))