@adobe/design-data-agent-mcp 1.3.0 → 1.3.1
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/package.json +7 -7
- package/src/index.js +16 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/design-data-agent-mcp",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "MCP server and Claude Code skill for the design-data agent surface — shells out to the design-data CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -14,10 +14,6 @@
|
|
|
14
14
|
"README.md",
|
|
15
15
|
"LICENSE"
|
|
16
16
|
],
|
|
17
|
-
"scripts": {
|
|
18
|
-
"start": "node src/index.js",
|
|
19
|
-
"test": "ava"
|
|
20
|
-
},
|
|
21
17
|
"repository": {
|
|
22
18
|
"type": "git",
|
|
23
19
|
"url": "git+https://github.com/adobe/spectrum-design-data.git",
|
|
@@ -50,5 +46,9 @@
|
|
|
50
46
|
"cli"
|
|
51
47
|
],
|
|
52
48
|
"author": "Adobe",
|
|
53
|
-
"license": "Apache-2.0"
|
|
54
|
-
|
|
49
|
+
"license": "Apache-2.0",
|
|
50
|
+
"scripts": {
|
|
51
|
+
"start": "node src/index.js",
|
|
52
|
+
"test": "ava"
|
|
53
|
+
}
|
|
54
|
+
}
|
package/src/index.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
10
|
// governing permissions and limitations under the License.
|
|
11
11
|
|
|
12
|
-
import { readFileSync } from "fs";
|
|
12
|
+
import { readFileSync, realpathSync } from "fs";
|
|
13
13
|
import { fileURLToPath } from "url";
|
|
14
14
|
import { resolve, dirname } from "path";
|
|
15
15
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
@@ -89,7 +89,21 @@ async function startServer() {
|
|
|
89
89
|
console.error("design-data-agent-mcp started");
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
// Resolve real paths so the entry-point check still matches when this module is
|
|
93
|
+
// launched through a symlink (e.g. node_modules/.bin shim created by npx/pnpm).
|
|
94
|
+
function isMainModule() {
|
|
95
|
+
const entry = process.argv[1];
|
|
96
|
+
if (!entry) return false;
|
|
97
|
+
const here = fileURLToPath(import.meta.url);
|
|
98
|
+
if (entry === here) return true;
|
|
99
|
+
try {
|
|
100
|
+
return realpathSync(entry) === realpathSync(here);
|
|
101
|
+
} catch {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (isMainModule()) {
|
|
93
107
|
startServer().catch((err) => {
|
|
94
108
|
console.error(err);
|
|
95
109
|
process.exit(1);
|