tokensafe 4.7.10 → 4.7.12
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/bin/tokensafe.js +24 -1
- package/kimi.plugin.json +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/server.json +3 -3
- package/src/auto_inject.py +4 -4
- package/src/mcp_server.py +1 -1
- package/src/retrofit.py +2 -2
- package/src/telemetry_sync.py +1 -1
- package/src/version_checker.py +1 -1
package/bin/tokensafe.js
CHANGED
|
@@ -244,7 +244,23 @@ function download(url, dest, expectedSize, redirects) {
|
|
|
244
244
|
|
|
245
245
|
function extractArchive(archive, destDir) {
|
|
246
246
|
fs.mkdirSync(destDir, { recursive: true });
|
|
247
|
-
|
|
247
|
+
// Windows: GNU tar (the one Git for Windows ships) reads `D:\...` as a remote
|
|
248
|
+
// host and fails with "Cannot connect to D:". Copying the archive next to the
|
|
249
|
+
// target and extracting it by relative name keeps the drive letter out of the
|
|
250
|
+
// argument list, which works for both GNU tar and bsdtar.
|
|
251
|
+
const localArchive = path.join(destDir, `.runtime${path.extname(archive) || '.tgz'}`);
|
|
252
|
+
fs.copyFileSync(archive, localArchive);
|
|
253
|
+
const res = spawnSync('tar', ['-xzf', path.basename(localArchive)], {
|
|
254
|
+
cwd: destDir,
|
|
255
|
+
encoding: 'utf-8',
|
|
256
|
+
stdio: 'pipe',
|
|
257
|
+
timeout: 600000,
|
|
258
|
+
});
|
|
259
|
+
try {
|
|
260
|
+
fs.rmSync(localArchive, { force: true });
|
|
261
|
+
} catch (_) {
|
|
262
|
+
/* the extraction verdict matters more than the leftover */
|
|
263
|
+
}
|
|
248
264
|
if (res.status !== 0) {
|
|
249
265
|
const detail = ((res.stderr || '') || (res.error && res.error.message) || '').trim();
|
|
250
266
|
throw new Error(`failed to extract the runtime archive${detail ? `: ${detail}` : ''}`);
|
|
@@ -366,6 +382,13 @@ async function findPython(options = {}) {
|
|
|
366
382
|
fail(`TOKENSAFE_PYTHON=${pinned} is not a usable CPython ${MIN_PYTHON[0]}.${MIN_PYTHON[1]}+ with 'cryptography'.`);
|
|
367
383
|
}
|
|
368
384
|
|
|
385
|
+
// CI and support repros need the managed path even when the machine happens to
|
|
386
|
+
// have a suitable CPython: without this the provisioner is never exercised on
|
|
387
|
+
// the runners, which is exactly how a broken Linux/Windows archive ships.
|
|
388
|
+
if ((process.env.TOKENSAFE_FORCE_MANAGED_RUNTIME || '').trim() === '1') {
|
|
389
|
+
return allowProvision ? await ensureManagedRuntime() : null;
|
|
390
|
+
}
|
|
391
|
+
|
|
369
392
|
const candidates = [];
|
|
370
393
|
const venvPy = venvPythonPath();
|
|
371
394
|
if (fs.existsSync(venvPy)) candidates.push(venvPy);
|
package/kimi.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tokensafe",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.12",
|
|
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.7.
|
|
4
|
+
"version": "4.7.12",
|
|
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.7.
|
|
4
|
+
"version": "4.7.12",
|
|
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.7.
|
|
6
|
+
"version": "4.7.12",
|
|
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.7.
|
|
26
|
+
"version": "4.7.12",
|
|
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.7.
|
|
42
|
+
"version": "4.7.12",
|
|
43
43
|
"runtimeHint": "uvx",
|
|
44
44
|
"transport": {
|
|
45
45
|
"type": "stdio"
|
package/src/auto_inject.py
CHANGED
|
@@ -281,7 +281,7 @@ def go_patch_state(workspace: str) -> Dict[str, Any]:
|
|
|
281
281
|
_GO_MODULE = "github.com/tokensafe-dev/tokensafe-backend/go"
|
|
282
282
|
# Keep in step with the backend release tag (go/vX.Y.Z): injection must never
|
|
283
283
|
# downgrade an adapter that is already newer than this pin.
|
|
284
|
-
_GO_MODULE_VERSION = "v0.9.
|
|
284
|
+
_GO_MODULE_VERSION = "v0.9.2"
|
|
285
285
|
|
|
286
286
|
|
|
287
287
|
def _version_tuple(tag: str):
|
|
@@ -911,17 +911,17 @@ def revert_dotnet_patch(workspace: str) -> Dict[str, Any]:
|
|
|
911
911
|
# Pinned to the backend release: the sidecars are single files, so the cache is
|
|
912
912
|
# content-addressed by SHA-256 and a clean machine downloads the exact bytes the
|
|
913
913
|
# release was certified from. Bump both the tag and the hashes together.
|
|
914
|
-
_SIDECAR_RELEASE_TAG = "v0.9.
|
|
914
|
+
_SIDECAR_RELEASE_TAG = "v0.9.2"
|
|
915
915
|
_SIDECARS = {
|
|
916
916
|
"spring": (
|
|
917
917
|
"java/src/dev/tokensafe/oumv/OumvSpring.java",
|
|
918
918
|
"OumvSpring.java",
|
|
919
|
-
"
|
|
919
|
+
"45aa63f2c71cf25065f591ebd589b21c7c7c58d218f3dce45880af0e1f1e7d81",
|
|
920
920
|
),
|
|
921
921
|
"php": (
|
|
922
922
|
"php/bin/oumv-php",
|
|
923
923
|
"oumv-php",
|
|
924
|
-
"
|
|
924
|
+
"660e7f53cc3799bd700cea2173f672594a5b8bc33e26cfa91ee559aec66f325a",
|
|
925
925
|
),
|
|
926
926
|
}
|
|
927
927
|
|
package/src/mcp_server.py
CHANGED
package/src/retrofit.py
CHANGED
|
@@ -652,7 +652,7 @@ def get_adapters_catalog() -> List[Dict[str, Any]]:
|
|
|
652
652
|
"repo": "tokensafe-backend/java",
|
|
653
653
|
"mode": "sidecar",
|
|
654
654
|
"status": "ready",
|
|
655
|
-
"description": "Single-file JDK sidecar: scans @RestController mappings statically, serves HTTP and stdio, applies OCC edits and runs a real verify command. Certified Level 2 32/33 (no live request traces, L4 not advertised).",
|
|
655
|
+
"description": "Single-file JDK sidecar: scans @RestController mappings statically, serves HTTP and stdio, applies OCC edits and runs a real verify command. Certified Level 2 32/33 (no live request traces, L4 not advertised). Frozen at wire 1.5.0 on purpose: the handshake negotiates 1.5.0 until the 1.6.0 surface is worth implementing.",
|
|
656
656
|
"technology": {
|
|
657
657
|
"language": "java",
|
|
658
658
|
"framework": "spring",
|
|
@@ -678,7 +678,7 @@ def get_adapters_catalog() -> List[Dict[str, Any]]:
|
|
|
678
678
|
"repo": "tokensafe-backend/php",
|
|
679
679
|
"mode": "sidecar",
|
|
680
680
|
"status": "ready",
|
|
681
|
-
"description": "Dependency-free PHP sidecar: Laravel Route:: and Symfony #[Route] discovery, token_get_all handler ranges, php -l pre-flight, OCC edits and stdio. Certified Level 2 32/33 (no live traces).",
|
|
681
|
+
"description": "Dependency-free PHP sidecar: Laravel Route:: and Symfony #[Route] discovery, token_get_all handler ranges, php -l pre-flight, OCC edits and stdio. Certified Level 2 32/33 (no live traces). Frozen at wire 1.5.0 on purpose: the handshake negotiates 1.5.0 until the 1.6.0 surface is worth implementing.",
|
|
682
682
|
"technology": {
|
|
683
683
|
"language": "php",
|
|
684
684
|
"framework": "laravel | symfony",
|
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.7.
|
|
314
|
+
"User-Agent": "TokenSafe-Sync/4.7.12"
|
|
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.7.
|
|
20
|
+
CURRENT_VERSION = "4.7.12"
|
|
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
|