tokensafe 4.12.0 → 4.12.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.
- package/.codex-plugin/plugin.json +1 -1
- package/kimi.plugin.json +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/server.json +3 -3
- package/src/cli.py +39 -1
- package/src/mcp_server.py +1 -1
- package/src/telemetry_sync.py +1 -1
- package/src/version_checker.py +1 -1
package/kimi.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tokensafe",
|
|
3
|
-
"version": "4.12.
|
|
3
|
+
"version": "4.12.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": "Apache-2.0",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tokensafe",
|
|
3
3
|
"mcpName": "dev.tokensafe/tokensafe",
|
|
4
|
-
"version": "4.12.
|
|
4
|
+
"version": "4.12.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.12.
|
|
4
|
+
"version": "4.12.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"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.",
|
|
7
7
|
"logo": "assets/logo.png",
|
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.12.
|
|
6
|
+
"version": "4.12.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.12.
|
|
26
|
+
"version": "4.12.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.12.
|
|
42
|
+
"version": "4.12.1",
|
|
43
43
|
"runtimeHint": "uvx",
|
|
44
44
|
"transport": {
|
|
45
45
|
"type": "stdio"
|
package/src/cli.py
CHANGED
|
@@ -876,7 +876,16 @@ def main(argv: Optional[List[str]] = None):
|
|
|
876
876
|
print(f" Workspace: {status.get('workspace')}\n")
|
|
877
877
|
|
|
878
878
|
elif command == "dev":
|
|
879
|
-
from src.retrofit import resolve_zero_footprint_vite_command
|
|
879
|
+
from src.retrofit import detect_project_stack, resolve_zero_footprint_vite_command
|
|
880
|
+
|
|
881
|
+
if "--help" in args or "-h" in args:
|
|
882
|
+
print(
|
|
883
|
+
"\n tokensafe dev [path] [--port N] [--host H] [--open]\n"
|
|
884
|
+
"\n Starts the app's own Vite dev server with the tokensafe-ui OUMV bridge and\n"
|
|
885
|
+
" leaves the repository untouched. Needs a Vite frontend: React, Vue, Solid,\n"
|
|
886
|
+
" or Angular through @analogjs/vite-plugin-angular. Run it in the app directory.\n"
|
|
887
|
+
)
|
|
888
|
+
return
|
|
880
889
|
target_dir = os.getcwd()
|
|
881
890
|
port_val: Optional[int] = None
|
|
882
891
|
host_val: Optional[str] = None
|
|
@@ -917,6 +926,35 @@ def main(argv: Optional[List[str]] = None):
|
|
|
917
926
|
i += 1
|
|
918
927
|
if unknown_flags:
|
|
919
928
|
print(f"⚠ Ignoring unsupported 'tokensafe dev' flag(s): {' '.join(unknown_flags)}")
|
|
929
|
+
# `tokensafe dev` cannot invent a frontend: without a Vite app the server
|
|
930
|
+
# would serve an empty directory. Refuse with the reason and the nearest
|
|
931
|
+
# frontend path instead of failing inside Vite.
|
|
932
|
+
stack = detect_project_stack(target_dir)
|
|
933
|
+
frontend = stack.get("frontend") or {}
|
|
934
|
+
if not frontend:
|
|
935
|
+
nested = [
|
|
936
|
+
pkg.get("path")
|
|
937
|
+
for pkg in (stack.get("packages") or [])
|
|
938
|
+
if pkg.get("vite") and pkg.get("path") not in (None, ".")
|
|
939
|
+
]
|
|
940
|
+
hint = f"\n A Vite frontend lives in {nested[0]} — run `tokensafe dev` there." if nested else ""
|
|
941
|
+
print(
|
|
942
|
+
f"✗ No Vite frontend in {target_dir}. `tokensafe dev` starts the app's own Vite\n"
|
|
943
|
+
f" dev server (React, Vue, Solid, or Angular with @analogjs/vite-plugin-angular).{hint}"
|
|
944
|
+
)
|
|
945
|
+
sys.exit(1)
|
|
946
|
+
if frontend.get("vite") and not frontend.get("oumv_supported", True):
|
|
947
|
+
note = frontend.get("note") or f"status: {frontend.get('status')}"
|
|
948
|
+
print(f"✗ {frontend.get('framework')} detected, but the OUMV dev bridge is not available: {note}")
|
|
949
|
+
sys.exit(1)
|
|
950
|
+
# In a monorepo the frontend is a nested package: run the server there,
|
|
951
|
+
# not at the root that has no index.html.
|
|
952
|
+
frontend_root = frontend.get("root")
|
|
953
|
+
if frontend_root and frontend_root != ".":
|
|
954
|
+
nested_dir = os.path.abspath(os.path.join(target_dir, frontend_root))
|
|
955
|
+
if os.path.isdir(nested_dir):
|
|
956
|
+
print(f"⚡ Using the {frontend.get('framework')} Vite frontend at {frontend_root}")
|
|
957
|
+
target_dir = nested_dir
|
|
920
958
|
cmd, source = resolve_zero_footprint_vite_command(
|
|
921
959
|
target_dir, port=port_val, host=host_val, open_browser=open_browser
|
|
922
960
|
)
|
package/src/mcp_server.py
CHANGED
package/src/telemetry_sync.py
CHANGED
|
@@ -311,7 +311,7 @@ class TelemetrySync:
|
|
|
311
311
|
current_last_id = last_id
|
|
312
312
|
headers = {
|
|
313
313
|
"Content-Type": "application/json",
|
|
314
|
-
"User-Agent": "TokenSafe-Sync/4.12.
|
|
314
|
+
"User-Agent": "TokenSafe-Sync/4.12.1"
|
|
315
315
|
}
|
|
316
316
|
if active_key:
|
|
317
317
|
headers["Authorization"] = f"Bearer {active_key}"
|
package/src/version_checker.py
CHANGED
|
@@ -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.12.
|
|
20
|
+
CURRENT_VERSION = "4.12.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
|