tokensafe 4.3.0 → 4.3.1

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.3.0",
2
+ "version": "4.3.1",
3
3
  "name": "tokensafe",
4
4
  "description": "Your AI agent is smart enough to code all day. Now it actually can. Local runtime firewall & zero-loss context optimizer for AI coding agents.",
5
5
  "author": {
package/kimi.plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tokensafe",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "description": "Your AI agent is smart enough to code all day. Now it actually can. Local runtime firewall & zero-loss context optimizer for AI coding agents.",
5
5
  "homepage": "https://tokensafe.dev",
6
6
  "license": "MIT",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tokensafe",
3
3
  "mcpName": "dev.tokensafe/tokensafe",
4
- "version": "4.3.0",
4
+ "version": "4.3.1",
5
5
  "description": "Your AI agent is smart enough to code all day. Now it actually can. Local runtime firewall & zero-loss context optimizer for AI coding agents.",
6
6
  "main": "bin/tokensafe.js",
7
7
  "bin": {
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tokensafe",
3
3
  "displayName": "TokenSafe",
4
- "version": "4.3.0",
4
+ "version": "4.3.1",
5
5
  "description": "Your AI agent is smart enough to code all day. Now it actually can. Local runtime firewall & zero-loss context optimizer for AI coding agents.",
6
6
  "logo": "assets/logo.png",
7
7
  "developerName": "TokenSafe",
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "dev.tokensafe/tokensafe",
4
4
  "title": "TokenSafe",
5
5
  "description": "Your AI agent is smart enough to code all day. Local firewall & zero-loss runtime.",
6
- "version": "4.3.0",
6
+ "version": "4.3.1",
7
7
  "websiteUrl": "https://tokensafe.dev",
8
8
  "repository": {
9
9
  "url": "https://github.com/tokensafe-dev/tokensafe",
@@ -23,7 +23,7 @@
23
23
  "registryType": "npm",
24
24
  "registryBaseUrl": "https://registry.npmjs.org",
25
25
  "identifier": "tokensafe",
26
- "version": "4.3.0",
26
+ "version": "4.3.1",
27
27
  "runtimeHint": "npx",
28
28
  "transport": {
29
29
  "type": "stdio"
@@ -39,7 +39,7 @@
39
39
  "registryType": "pypi",
40
40
  "registryBaseUrl": "https://pypi.org",
41
41
  "identifier": "tokensafe",
42
- "version": "4.3.0",
42
+ "version": "4.3.1",
43
43
  "runtimeHint": "uvx",
44
44
  "transport": {
45
45
  "type": "stdio"
package/src/cli.py CHANGED
@@ -405,7 +405,8 @@ def main(argv: Optional[List[str]] = None):
405
405
  status = "\033[32m✔\033[0m" if r["success"] else "\033[31m✖\033[0m"
406
406
  print(f" {status} \033[1m{r['name']:<28}\033[0m: {r['message']}")
407
407
  print(f"\n\033[32m✔ Universal project rules injected into: {', '.join(res['project_rules'])}\033[0m\n")
408
- AgentInstaller.maybe_prompt_proxy_enable(context="install")
408
+ # Proxy default-on is asserted INSIDE install_all (_ensure_proxy_default);
409
+ # the retired interactive prompt must never be referenced here again.
409
410
  elif "--project" in args:
410
411
  agents_plugin = None
411
412
  if "--agents-plugin" in args:
package/src/installer.py CHANGED
@@ -306,16 +306,23 @@ class AgentInstaller:
306
306
  if not isinstance(entries, list):
307
307
  hooks[event_name] = [default_entry]
308
308
  return True
309
+ default_matcher = str(default_entry.get("matcher") or "")
309
310
  seen = False
310
311
  dirty = False
311
312
  for entry in entries:
312
313
  if isinstance(entry, dict) and isinstance(entry.get("hooks"), list):
313
314
  for h in entry["hooks"]:
314
315
  if isinstance(h, dict) and "claude_code_hook.py" in str(h.get("command", "")):
315
- seen = True
316
- if h.get("command") != claude_cmd:
317
- h["command"] = claude_cmd
318
- dirty = True
316
+ # Matcher-aware sync: a legacy entry with a
317
+ # DIFFERENT matcher covers only its own tool
318
+ # set (e.g. PostToolUse "Write|Edit|MultiEdit"
319
+ # never fires for Read), so the canonical
320
+ # default entry must still be appended.
321
+ if str(entry.get("matcher") or "") == default_matcher:
322
+ seen = True
323
+ if h.get("command") != claude_cmd:
324
+ h["command"] = claude_cmd
325
+ dirty = True
319
326
  if not seen:
320
327
  entries.append(default_entry)
321
328
  dirty = True
package/src/mcp_server.py CHANGED
@@ -42,7 +42,7 @@ from src.paths import get_active_workspace, is_plugin_or_system_dir
42
42
 
43
43
  SERVER_INFO = {
44
44
  "name": "tokensafe-mcp",
45
- "version": "4.3.0"
45
+ "version": "4.3.1"
46
46
  }
47
47
 
48
48
  # MCP client attribution: the initialize handshake carries clientInfo, which
@@ -241,7 +241,7 @@ class TelemetrySync:
241
241
  current_last_id = last_id
242
242
  headers = {
243
243
  "Content-Type": "application/json",
244
- "User-Agent": "TokenSafe-Sync/4.3.0"
244
+ "User-Agent": "TokenSafe-Sync/4.3.1"
245
245
  }
246
246
  if active_key:
247
247
  headers["Authorization"] = f"Bearer {active_key}"
@@ -17,7 +17,7 @@ import urllib.request
17
17
  import urllib.error
18
18
  from typing import Dict, Any, Optional, Tuple
19
19
 
20
- CURRENT_VERSION = "4.3.0"
20
+ CURRENT_VERSION = "4.3.1"
21
21
  CACHE_TTL = 86400 # 24 hours
22
22
  # When the cloud is unreachable we must NOT cache the synthesized "up to date"
23
23
  # answer for a full day — otherwise an update released right after an outage