kompas 0.7.5 (из 9c10372ffcb666fd32090e411d434fb1b8faa71f)
This commit is contained in:
1 parent
d514b45b88
commit
ef953f6e4b
15 files changed
+143
-23
No files matched your search
@@ -0,0 +1,36 @@
|
||||
// pi-расширение пакета kompas: регистрирует MCP-сервер КОМПАС-3D.
|
||||
//
|
||||
// Сервер и лаунчер ехат внутри одного пакета (plugin/bin + plugin/scripts),
|
||||
// поэтому путь резолвится от этого файла. Регистрация не сохраняется, поэтому
|
||||
// она повторяется при каждой загрузке расширения.
|
||||
//
|
||||
// Свой сервер подставляется переменной окружения KOMPAS_MCP_EXE — ей управляет
|
||||
// лаунчер launch-kompas-mcp.ps1, а не это расширение.
|
||||
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { type ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
||||
|
||||
const launcher = path.resolve(
|
||||
path.dirname(fileURLToPath(import.meta.url)),
|
||||
"..",
|
||||
"scripts",
|
||||
"launch-kompas-mcp.ps1",
|
||||
);
|
||||
|
||||
export default function (pi: ExtensionAPI) {
|
||||
pi.registerMcpServer("kompas", {
|
||||
command: "powershell",
|
||||
args: [
|
||||
"-NoProfile",
|
||||
"-NonInteractive",
|
||||
"-ExecutionPolicy",
|
||||
"Bypass",
|
||||
"-File",
|
||||
launcher,
|
||||
],
|
||||
exposure: "deferred",
|
||||
description:
|
||||
"Контроль КОМПАС-3D: детали, эскизы, формообразующие операции, сборки, 2D-чертежи, STEP/STL, осмотр модели — через MCP-сервер kompas-mcp.exe",
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user