atabey 0.0.3 → 0.0.4
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.
|
@@ -20,18 +20,42 @@ export const FRAMEWORK_DIR_CANDIDATES = [
|
|
|
20
20
|
];
|
|
21
21
|
export function buildMcpServerEntry(projectRoot) {
|
|
22
22
|
const packageRoot = getPackageRoot();
|
|
23
|
-
// Check
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
// Check if we are running in the framework local development repository itself
|
|
24
|
+
const isLocalFrameworkDev = path.resolve(packageRoot) === path.resolve(projectRoot);
|
|
25
|
+
let relativePath = "";
|
|
26
|
+
if (isLocalFrameworkDev) {
|
|
27
|
+
// In local framework dev, always use the build path directly relative to project root
|
|
28
|
+
let mcpServerPath = path.join(packageRoot, "framework-mcp/dist/index.js");
|
|
29
|
+
if (!fs.existsSync(mcpServerPath)) {
|
|
30
|
+
mcpServerPath = path.join(packageRoot, "../@atabey/mcp/dist/index.js");
|
|
31
|
+
}
|
|
32
|
+
if (!fs.existsSync(mcpServerPath)) {
|
|
33
|
+
mcpServerPath = path.join(projectRoot, "node_modules/@atabey/mcp/dist/index.js");
|
|
34
|
+
}
|
|
35
|
+
if (!fs.existsSync(mcpServerPath)) {
|
|
36
|
+
console.warn("⚠️ MCP Server not found. Did you run 'npm run build' inside @atabey/mcp?");
|
|
37
|
+
}
|
|
38
|
+
relativePath = path.relative(projectRoot, mcpServerPath) || mcpServerPath;
|
|
27
39
|
}
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
else {
|
|
41
|
+
// If we are initializing in a user's project:
|
|
42
|
+
// We want to target the local node_modules of the user's project.
|
|
43
|
+
// Even if node_modules is not populated yet (e.g. running via npx before npm install),
|
|
44
|
+
// we should write the local node_modules path so that it will work once installed.
|
|
45
|
+
const localAtabeyPath = path.join(projectRoot, "node_modules/atabey/framework-mcp/dist/index.js");
|
|
46
|
+
const localScopedPath = path.join(projectRoot, "node_modules/@atabey/mcp/dist/index.js");
|
|
47
|
+
if (fs.existsSync(localScopedPath)) {
|
|
48
|
+
relativePath = path.relative(projectRoot, localScopedPath);
|
|
49
|
+
}
|
|
50
|
+
else if (fs.existsSync(localAtabeyPath)) {
|
|
51
|
+
relativePath = path.relative(projectRoot, localAtabeyPath);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
// Default to the standard relative local path in node_modules/atabey
|
|
55
|
+
// This is clean and portable across machines/developers.
|
|
56
|
+
relativePath = "node_modules/atabey/framework-mcp/dist/index.js";
|
|
57
|
+
}
|
|
30
58
|
}
|
|
31
|
-
if (!fs.existsSync(mcpServerPath)) {
|
|
32
|
-
console.warn("⚠️ MCP Server not found. Did you run 'npm run build' inside @atabey/mcp?");
|
|
33
|
-
}
|
|
34
|
-
const relativePath = path.relative(projectRoot, mcpServerPath) || mcpServerPath;
|
|
35
59
|
return {
|
|
36
60
|
command: "node",
|
|
37
61
|
args: [relativePath],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../../../src/cli/adapters/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAG5F,MAAM,CAAC,MAAM,QAAQ,GAAqC,eAAe,CAAC;AAE1E,MAAM,CAAC,MAAM,UAAU,GAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAiB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;AAEpG,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACpC,SAAS;IACT,SAAS;I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,OAAO;QACH,OAAO,EAAE,MAAM;QACf,IAAI,EAAE,CAAC,YAAY,CAAC;QACpB,GAAG,EAAE;YACD,mBAAmB,EAAE,WAAW;SACnC;KACJ,CAAC;AACN,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,OAAsB,EAAE,WAAmB;IAC1E,MAAM,QAAQ,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAG,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,CAAC;IAExD,MAAM,UAAU,GAAG,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAClD,IAAI,UAAU,EAAE,CAAC;QACb,UAAU,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IACvD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9B,aAAa,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IACzC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "atabey",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "The Supreme AI Governance & Autonomous Orchestration Framework for Enterprise Development. Supports Polyglot Backends (Go, Java, Python, .NET, Node.js) and Multi-Language Communication (TR/EN).",
|
|
5
5
|
"author": "Yusuf BEKAR",
|
|
6
6
|
"license": "MIT",
|
package/src/cli/adapters/core.ts
CHANGED
|
@@ -27,20 +27,44 @@ export const FRAMEWORK_DIR_CANDIDATES = [
|
|
|
27
27
|
export function buildMcpServerEntry(projectRoot: string) {
|
|
28
28
|
const packageRoot = getPackageRoot();
|
|
29
29
|
|
|
30
|
-
// Check
|
|
31
|
-
|
|
32
|
-
if (!fs.existsSync(mcpServerPath)) {
|
|
33
|
-
mcpServerPath = path.join(packageRoot, "../@atabey/mcp/dist/index.js");
|
|
34
|
-
}
|
|
35
|
-
if (!fs.existsSync(mcpServerPath)) {
|
|
36
|
-
mcpServerPath = path.join(projectRoot, "node_modules/@atabey/mcp/dist/index.js");
|
|
37
|
-
}
|
|
30
|
+
// Check if we are running in the framework local development repository itself
|
|
31
|
+
const isLocalFrameworkDev = path.resolve(packageRoot) === path.resolve(projectRoot);
|
|
38
32
|
|
|
39
|
-
|
|
40
|
-
console.warn("⚠️ MCP Server not found. Did you run 'npm run build' inside @atabey/mcp?");
|
|
41
|
-
}
|
|
33
|
+
let relativePath = "";
|
|
42
34
|
|
|
43
|
-
|
|
35
|
+
if (isLocalFrameworkDev) {
|
|
36
|
+
// In local framework dev, always use the build path directly relative to project root
|
|
37
|
+
let mcpServerPath = path.join(packageRoot, "framework-mcp/dist/index.js");
|
|
38
|
+
if (!fs.existsSync(mcpServerPath)) {
|
|
39
|
+
mcpServerPath = path.join(packageRoot, "../@atabey/mcp/dist/index.js");
|
|
40
|
+
}
|
|
41
|
+
if (!fs.existsSync(mcpServerPath)) {
|
|
42
|
+
mcpServerPath = path.join(projectRoot, "node_modules/@atabey/mcp/dist/index.js");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (!fs.existsSync(mcpServerPath)) {
|
|
46
|
+
console.warn("⚠️ MCP Server not found. Did you run 'npm run build' inside @atabey/mcp?");
|
|
47
|
+
}
|
|
48
|
+
relativePath = path.relative(projectRoot, mcpServerPath) || mcpServerPath;
|
|
49
|
+
} else {
|
|
50
|
+
// If we are initializing in a user's project:
|
|
51
|
+
// We want to target the local node_modules of the user's project.
|
|
52
|
+
// Even if node_modules is not populated yet (e.g. running via npx before npm install),
|
|
53
|
+
// we should write the local node_modules path so that it will work once installed.
|
|
54
|
+
|
|
55
|
+
const localAtabeyPath = path.join(projectRoot, "node_modules/atabey/framework-mcp/dist/index.js");
|
|
56
|
+
const localScopedPath = path.join(projectRoot, "node_modules/@atabey/mcp/dist/index.js");
|
|
57
|
+
|
|
58
|
+
if (fs.existsSync(localScopedPath)) {
|
|
59
|
+
relativePath = path.relative(projectRoot, localScopedPath);
|
|
60
|
+
} else if (fs.existsSync(localAtabeyPath)) {
|
|
61
|
+
relativePath = path.relative(projectRoot, localAtabeyPath);
|
|
62
|
+
} else {
|
|
63
|
+
// Default to the standard relative local path in node_modules/atabey
|
|
64
|
+
// This is clean and portable across machines/developers.
|
|
65
|
+
relativePath = "node_modules/atabey/framework-mcp/dist/index.js";
|
|
66
|
+
}
|
|
67
|
+
}
|
|
44
68
|
|
|
45
69
|
return {
|
|
46
70
|
command: "node",
|