Files
TransPyC/MCP/tools/tools.json
T
TermiNexus 4640211e3c docs(mcp): 非生产环境默认推荐启用 ASan,ASan/非 ASan 切换需 --rebuild-includes
- protocol.md 新增 5.8 ASan 推荐:非生产环境 --asan 捕获内存错误,生产环境不启用
- 明确 ASan 与非 ASan 共享 includes.binary 缓存会互相污染(undefined symbol: __asan_*),切换必须重建缓存
- README/tools.json 同步更新 asan 字段描述
2026-08-21 14:08:37 +08:00

353 lines
7.8 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[
{
"name": "tpc_build",
"description": "用 TransPyC 编译任意 Viper 工程(Projectrans.py --project,两阶段)",
"inputSchema": {
"type": "object",
"properties": {
"type": "string",
"description": "project.json 路径(相对根),如 Test/CoroTest/project.json",
"clean": {
"type": "boolean",
"default": false
},
"run": {
"type": "boolean",
"default": false
},
"phase": {
"type": "string",
"enum": [
"1",
"2",
"all"
],
"default": "all"
},
"rebuild_includes": {
"type": "boolean",
"default": false
},
"clear_cache": {
"type": "boolean",
"default": false
},
"asan": {
"type": "boolean",
"default": false,
"description": "ASan 插桩(非生产环境推荐启用)"
},
"nowarn_register": {
"type": "boolean",
"default": false
},
"src": {
"type": "string"
},
"temp": {
"type": "string"
},
"output": {
"type": "string"
},
"cc": {
"type": "string"
}
},
"required": [
"project"
]
}
},
{
"name": "tpc_build_file",
"description": "单文件 .vp → LLVM IR(TransPyC.py -f),可选链接运行",
"inputSchema": {
"type": "object",
"properties": {
"input": {
"type": "string",
"description": "输入 .vp 路径(相对根)"
},
"output": {
"type": "string",
"description": "输出 .ll 路径"
},
"run": {
"type": "boolean",
"default": false
},
"args": {
"type": "string"
},
"level": {
"type": "string"
},
"encoding": {
"type": "string",
"default": "utf-8"
},
"cc": {
"type": "string"
},
"cflags": {
"type": "string"
}
},
"required": [
"input",
"output"
]
}
},
{
"name": "tpc_run_test",
"description": "编译并运行单个 Test/<Name>(--clean --run)",
"inputSchema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Test/ 下子目录名,如 CoroTest"
},
"rebuild_includes": {
"type": "boolean",
"default": false
},
"clear_cache": {
"type": "boolean",
"default": false
},
"asan": {
"type": "boolean",
"default": false,
"description": "ASan 插桩(非生产环境推荐启用)"
}
},
"required": [
"name"
]
}
},
{
"name": "tpc_run_regression",
"description": "全量回归(Test/regression_test.py)",
"inputSchema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "可选过滤测试名"
},
"timeout": {
"type": "integer",
"default": 300
}
},
"required": []
}
},
{
"name": "tpc_clean_project",
"description": "清理并编译工程(--clean,清理后继续完整编译流程)",
"inputSchema": {
"type": "object",
"properties": {
"type": "string",
"description": "project.json 路径(相对根),如 Test/CoroTest/project.json"
},
"required": [
"project"
]
}
},
{
"name": "tpc_clear_cache",
"description": "清除全局 .transpyc_cache(--clear-cache)",
"inputSchema": {
"type": "object",
"properties": {
"type": "string",
"description": "project.json 路径(相对根),如 Test/CoroTest/project.json"
},
"required": [
"project"
]
}
},
{
"name": "tpc_rebuild_includes",
"description": "重建 includes.binary 预编译缓存(--rebuild-includes)",
"inputSchema": {
"type": "object",
"properties": {
"type": "string",
"description": "project.json 路径(相对根),如 Test/CoroTest/project.json"
},
"required": [
"project"
]
}
},
{
"name": "tpv_build",
"description": "TPC 编译 TransPyV → TransPyV/output/TransPyV.exe(Phase A)",
"inputSchema": {
"type": "object",
"properties": {
"clean": {
"type": "boolean",
"default": true
},
"rebuild_includes": {
"type": "boolean",
"default": true
},
"clear_cache": {
"type": "boolean",
"default": true
}
},
"required": []
}
},
{
"name": "tpv_bootstrap",
"description": "自举链 Phase A/B/C 验证并对比产物",
"inputSchema": {
"type": "object",
"properties": {
"phases": {
"type": "array",
"items": {
"type": "string",
"enum": [
"A",
"B",
"C"
]
},
"default": [
"A",
"B",
"C"
]
},
"compare": {
"type": "boolean",
"default": true
}
},
"required": []
}
},
{
"name": "tpv_compile_project",
"description": "用 TransPyV/output/TransPyV.exe 编译工程(参数同 tpc_build)",
"inputSchema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "可选过滤测试名"
},
"timeout": {
"type": "integer",
"default": 300
}
},
"required": [
"project"
]
}
},
{
"name": "tpv_run_test",
"description": "运行 TransPyV/Test 自测(App/NegativeTest/Sha1Test)",
"inputSchema": {
"type": "object",
"properties": {
"suite": {
"type": "string",
"enum": [
"App",
"NegativeTest",
"Sha1Test",
"all"
],
"default": "all"
},
"filter": {
"type": "string"
}
},
"required": []
}
},
{
"name": "tp_read_ast",
"description": "解析 .vp 源码输出 vast AST dump",
"inputSchema": {
"type": "object",
"properties": {
"file": {
"type": "string",
"description": ".vp 源文件路径(相对根)"
},
"dump": {
"type": "string",
"enum": [
"compact",
"full"
],
"default": "compact"
}
},
"required": [
"file"
]
}
},
{
"name": "tp_read_log",
"description": "读取项目内文本文件末尾 N 行或正则过滤",
"inputSchema": {
"type": "object",
"properties": {
"file": {
"type": "string",
"description": "文件路径(相对根),如 1.log"
},
"lines": {
"type": "integer",
"default": 50
},
"pattern": {
"type": "string"
}
},
"required": [
"file"
]
}
},
{
"name": "tp_sha1_map",
"description": "读取工程 temp/_sha1_map.txt(诊断缓存命中)",
"inputSchema": {
"type": "object",
"properties": {
"project": {
"type": "string",
"description": "工程目录(相对根),如 Test/CoroTest"
},
"filter": {
"type": "string"
}
},
"required": [
"project"
]
}
}
]