tzero-mcp 10.7.2 → 10.7.3
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/bin/tzero-mcp.js +4 -4
- package/bin/tzero.js +4 -4
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/package.json +7 -5
- package/test/package.test.js +19 -0
- package/bin/postinstall.js +0 -34
package/bin/tzero-mcp.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Repository: https://github.com/toprakahmetaydogmus/TZeroAlgorithm
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
const { spawn,
|
|
9
|
+
const { spawn, spawnSync } = require("child_process");
|
|
10
10
|
const process = require("process");
|
|
11
11
|
const path = require("path");
|
|
12
12
|
const pkg = require("../package.json");
|
|
@@ -34,8 +34,8 @@ function findPython() {
|
|
|
34
34
|
const candidates = ["python3", "python", "py"];
|
|
35
35
|
for (const cmd of candidates) {
|
|
36
36
|
try {
|
|
37
|
-
|
|
38
|
-
return cmd;
|
|
37
|
+
const res = spawnSync(cmd, ["--version"], { stdio: "ignore", shell: false });
|
|
38
|
+
if (res.status === 0) return cmd;
|
|
39
39
|
} catch (e) {
|
|
40
40
|
// continue
|
|
41
41
|
}
|
|
@@ -58,7 +58,7 @@ const env = Object.assign({}, process.env, {
|
|
|
58
58
|
});
|
|
59
59
|
|
|
60
60
|
const args = [scriptPath, ...process.argv.slice(2)];
|
|
61
|
-
const child = spawn(py, args, { stdio: "inherit", env });
|
|
61
|
+
const child = spawn(py, args, { stdio: "inherit", shell: false, env });
|
|
62
62
|
|
|
63
63
|
child.on("close", (code) => {
|
|
64
64
|
process.exit(code ?? 0);
|
package/bin/tzero.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Repository: https://github.com/toprakahmetaydogmus/TZeroAlgorithm
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
const { spawn,
|
|
9
|
+
const { spawn, spawnSync } = require("child_process");
|
|
10
10
|
const process = require("process");
|
|
11
11
|
const path = require("path");
|
|
12
12
|
const pkg = require("../package.json");
|
|
@@ -33,8 +33,8 @@ function findPython() {
|
|
|
33
33
|
const candidates = ["python3", "python", "py"];
|
|
34
34
|
for (const cmd of candidates) {
|
|
35
35
|
try {
|
|
36
|
-
|
|
37
|
-
return cmd;
|
|
36
|
+
const res = spawnSync(cmd, ["--version"], { stdio: "ignore", shell: false });
|
|
37
|
+
if (res.status === 0) return cmd;
|
|
38
38
|
} catch (e) {
|
|
39
39
|
// continue
|
|
40
40
|
}
|
|
@@ -57,7 +57,7 @@ const env = Object.assign({}, process.env, {
|
|
|
57
57
|
});
|
|
58
58
|
|
|
59
59
|
const args = [scriptPath, ...process.argv.slice(2)];
|
|
60
|
-
const child = spawn(py, args, { stdio: "inherit", env });
|
|
60
|
+
const child = spawn(py, args, { stdio: "inherit", shell: false, env });
|
|
61
61
|
|
|
62
62
|
child.on("close", (code) => {
|
|
63
63
|
process.exit(code ?? 0);
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -6,7 +6,7 @@ const path = require("path");
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
module.exports = {
|
|
9
|
-
version: "10.7.
|
|
9
|
+
version: "10.7.3",
|
|
10
10
|
author: "Toprak Ahmet Aydoğmuş (Siber Akademi)",
|
|
11
11
|
repository: "https://github.com/toprakahmetaydogmus/TZeroAlgorithm",
|
|
12
12
|
srcDir: path.resolve(__dirname, "src"),
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tzero-mcp",
|
|
3
|
-
"version": "10.7.
|
|
4
|
-
"description": "Deterministic AST Context Compressor, 95% Token Reducer & 20-Tool MCP Server for Cursor, Claude Desktop & Copilot
|
|
3
|
+
"version": "10.7.3",
|
|
4
|
+
"description": "Deterministic AST Context Compressor, 95% Token Reducer & 20-Tool MCP Server for Cursor, Claude Desktop & Copilot",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
|
+
"type": "commonjs",
|
|
7
8
|
"exports": {
|
|
8
9
|
".": {
|
|
9
10
|
"types": "./index.d.ts",
|
|
@@ -13,11 +14,13 @@
|
|
|
13
14
|
},
|
|
14
15
|
"sideEffects": false,
|
|
15
16
|
"engines": {
|
|
16
|
-
"node": ">=18.0.0"
|
|
17
|
+
"node": ">=18.0.0",
|
|
18
|
+
"npm": ">=9.0.0"
|
|
17
19
|
},
|
|
18
20
|
"files": [
|
|
19
21
|
"bin",
|
|
20
22
|
"src",
|
|
23
|
+
"test",
|
|
21
24
|
"index.js",
|
|
22
25
|
"index.d.ts",
|
|
23
26
|
"README.md",
|
|
@@ -31,8 +34,7 @@
|
|
|
31
34
|
"tzero-mcp": "bin/tzero-mcp.js"
|
|
32
35
|
},
|
|
33
36
|
"scripts": {
|
|
34
|
-
"
|
|
35
|
-
"test": "node bin/tzero.js --version"
|
|
37
|
+
"test": "node --test test/package.test.js"
|
|
36
38
|
},
|
|
37
39
|
"repository": {
|
|
38
40
|
"type": "git",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const test = require("node:test");
|
|
2
|
+
const assert = require("node:assert");
|
|
3
|
+
const path = require("node:path");
|
|
4
|
+
const fs = require("node:fs");
|
|
5
|
+
const tzero = require("../index.js");
|
|
6
|
+
|
|
7
|
+
test("tzero package exports correct properties", () => {
|
|
8
|
+
assert.strictEqual(typeof tzero.version, "string");
|
|
9
|
+
assert.strictEqual(typeof tzero.author, "string");
|
|
10
|
+
assert.strictEqual(typeof tzero.repository, "string");
|
|
11
|
+
assert.strictEqual(typeof tzero.srcDir, "string");
|
|
12
|
+
assert.strictEqual(typeof tzero.mcpServer, "string");
|
|
13
|
+
assert.strictEqual(typeof tzero.cli, "string");
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
test("tzero core python files exist in srcDir", () => {
|
|
17
|
+
assert.strictEqual(fs.existsSync(tzero.mcpServer), true);
|
|
18
|
+
assert.strictEqual(fs.existsSync(tzero.cli), true);
|
|
19
|
+
});
|
package/bin/postinstall.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* T-Zero Post-Install Banner & Star Request
|
|
5
|
-
* Author: Toprak Ahmet Aydoğmuş (15-Year-Old Solo Developer @ Siber Akademi)
|
|
6
|
-
* Repository: https://github.com/toprakahmetaydogmus/TZeroAlgorithm
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
const isCI = process.env.CI || process.env.CONTINUOUS_INTEGRATION;
|
|
10
|
-
if (!isCI) {
|
|
11
|
-
const cyan = "\x1b[36m";
|
|
12
|
-
const yellow = "\x1b[33m";
|
|
13
|
-
const green = "\x1b[32m";
|
|
14
|
-
const bold = "\x1b[1m";
|
|
15
|
-
const reset = "\x1b[0m";
|
|
16
|
-
|
|
17
|
-
console.log(`
|
|
18
|
-
${yellow}┌──────────────────────────────────────────────────────────────────────────────┐
|
|
19
|
-
│ ${bold}${green}⚡ T-ZERO CONTEXT ARCHITECT & MCP SERVER INSTALLED SUCCESSFULLY!${reset}${yellow} │
|
|
20
|
-
│ │
|
|
21
|
-
│ Hi! I'm ${bold}Toprak Ahmet Aydoğmuş${reset}${yellow}, a 15-year-old solo developer from │
|
|
22
|
-
│ ${bold}Siber Akademi${reset}${yellow}. I built T-Zero from scratch to eliminate token bloat and │
|
|
23
|
-
│ AI coding hallucinations using deterministic AST analysis. │
|
|
24
|
-
│ │
|
|
25
|
-
│ ⭐ ${bold}If T-Zero saves you tokens or helps your AI workflows,${reset}${yellow} │
|
|
26
|
-
│ ${bold}${cyan}please give our repository a STAR on GitHub:${reset}${yellow} │
|
|
27
|
-
│ │
|
|
28
|
-
│ 👉 ${bold}${cyan}https://github.com/toprakahmetaydogmus/TZeroAlgorithm${reset}${yellow} │
|
|
29
|
-
│ │
|
|
30
|
-
│ Every star means the world to a young open-source creator! 🚀 Thank you! │
|
|
31
|
-
└──────────────────────────────────────────────────────────────────────────────┘${reset}
|
|
32
|
-
`);
|
|
33
|
-
}
|
|
34
|
-
process.exit(0);
|