@topolo/mcp 0.13.0 → 0.13.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/dist/index.js +28 -12
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// src/index.ts
|
|
4
4
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
5
5
|
|
|
6
|
-
// node_modules/.pnpm/@topolo+sdk@0.21.
|
|
6
|
+
// node_modules/.pnpm/@topolo+sdk@0.21.1/node_modules/@topolo/sdk/dist/index.js
|
|
7
7
|
function applyAuthHeaders(headers, credential) {
|
|
8
8
|
if (credential.kind === "api_key") {
|
|
9
9
|
headers.set("X-Api-Key", credential.apiKey);
|
|
@@ -3254,7 +3254,7 @@ function createTopolo(options) {
|
|
|
3254
3254
|
};
|
|
3255
3255
|
}
|
|
3256
3256
|
|
|
3257
|
-
// node_modules/.pnpm/@topolo+sdk@0.21.
|
|
3257
|
+
// node_modules/.pnpm/@topolo+sdk@0.21.1/node_modules/@topolo/sdk/dist/node/credential-store.js
|
|
3258
3258
|
import { mkdir as mkdir2, readFile as readFile2, writeFile as writeFile2, chmod as chmod2, rm as rm2, stat } from "fs/promises";
|
|
3259
3259
|
import { existsSync as existsSync2 } from "fs";
|
|
3260
3260
|
import { homedir as homedir2, platform } from "os";
|
|
@@ -3671,6 +3671,22 @@ function topoloServiceOrigins2(serviceUrls, environment) {
|
|
|
3671
3671
|
);
|
|
3672
3672
|
}
|
|
3673
3673
|
var KEYCHAIN_SERVICE = "topolo-external-agent-installation";
|
|
3674
|
+
var MACOS_KEYCHAIN_WRITE_SCRIPT = [
|
|
3675
|
+
"log_user 0",
|
|
3676
|
+
"set timeout 10",
|
|
3677
|
+
"set secret [gets stdin]",
|
|
3678
|
+
"spawn -noecho /usr/bin/security add-generic-password -U -a $env(TOPOLO_KEYCHAIN_ACCOUNT) -s $env(TOPOLO_KEYCHAIN_SERVICE) -w",
|
|
3679
|
+
"for {set prompt 0} {$prompt < 2} {incr prompt} {",
|
|
3680
|
+
" expect {",
|
|
3681
|
+
' -re {(?i)password} { send -- "$secret\\r" }',
|
|
3682
|
+
" timeout { exit 70 }",
|
|
3683
|
+
" eof { exit 71 }",
|
|
3684
|
+
" }",
|
|
3685
|
+
"}",
|
|
3686
|
+
"expect eof",
|
|
3687
|
+
"set result [wait]",
|
|
3688
|
+
"exit [lindex $result 3]"
|
|
3689
|
+
].join("\n");
|
|
3674
3690
|
function installationStorePath() {
|
|
3675
3691
|
const override = process.env.TOPOLO_INSTALLATIONS_PATH?.trim();
|
|
3676
3692
|
if (override) return override;
|
|
@@ -3697,16 +3713,16 @@ function createPlatformInstallationSecretBackend(options = {}) {
|
|
|
3697
3713
|
if (platform2 === "darwin") {
|
|
3698
3714
|
return {
|
|
3699
3715
|
async set(account, value) {
|
|
3700
|
-
runOrThrow(spawn("
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
"
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3716
|
+
runOrThrow(spawn("/usr/bin/expect", ["-c", MACOS_KEYCHAIN_WRITE_SCRIPT], {
|
|
3717
|
+
input: `${value}
|
|
3718
|
+
`,
|
|
3719
|
+
encoding: "utf8",
|
|
3720
|
+
env: {
|
|
3721
|
+
...process.env,
|
|
3722
|
+
TOPOLO_KEYCHAIN_ACCOUNT: account,
|
|
3723
|
+
TOPOLO_KEYCHAIN_SERVICE: KEYCHAIN_SERVICE
|
|
3724
|
+
}
|
|
3725
|
+
}), "macOS Keychain write");
|
|
3710
3726
|
},
|
|
3711
3727
|
async get(account) {
|
|
3712
3728
|
const result = spawn("security", [
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topolo/mcp",
|
|
3
3
|
"packageManager": "pnpm@10.17.1",
|
|
4
|
-
"version": "0.13.
|
|
5
|
-
"topoloPublishedVersion": "0.13.
|
|
4
|
+
"version": "0.13.1",
|
|
5
|
+
"topoloPublishedVersion": "0.13.1",
|
|
6
6
|
"description": "Model Context Protocol server for the Topolo platform. Exposes scope-gated tools that third-party agents (Claude, Codex, etc.) can call natively.",
|
|
7
7
|
"license": "UNLICENSED",
|
|
8
8
|
"author": "Topolo",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
39
|
-
"@topolo/sdk": "0.21.
|
|
39
|
+
"@topolo/sdk": "0.21.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "^20.12.0",
|