@kwonye/mcpx 0.1.81 → 0.1.84
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/{cli-6bv85kke.js → cli-59dbb6rz.js} +50 -10
- package/dist/{cli-0ztrmp65.js → cli-bq7zsrv6.js} +1 -1
- package/dist/{cli-e6jzjwh5.js → cli-dvj5waat.js} +91 -74
- package/dist/{cli-7bax8twd.js → cli-f0phhbax.js} +51 -11
- package/dist/{cli-08mgt3c8.js → cli-zbbeadz8.js} +6 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +12 -23
- package/dist/{config-p8tjffpa.js → config-ajxqtkq6.js} +2 -2
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +4 -4
- package/dist/core/oauth.d.ts +5 -1
- package/dist/core/oauth.d.ts.map +1 -1
- package/dist/core/paths.d.ts +2 -1
- package/dist/core/paths.d.ts.map +1 -1
- package/dist/core/registry.d.ts.map +1 -1
- package/dist/core/secrets.d.ts +5 -7
- package/dist/core/secrets.d.ts.map +1 -1
- package/dist/core/status.d.ts.map +1 -1
- package/dist/{registry-7rxwynsy.js → registry-j53hz9d4.js} +2 -2
- package/dist/version.d.ts +1 -1
- package/package.json +2 -3
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
loadConfig,
|
|
3
3
|
loadMergedConfig,
|
|
4
4
|
saveConfig
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-bq7zsrv6.js";
|
|
6
6
|
import {
|
|
7
7
|
SecretsManager,
|
|
8
8
|
ensureGatewayToken
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-dvj5waat.js";
|
|
10
10
|
import {
|
|
11
11
|
ensureDir,
|
|
12
12
|
ensureParentDir,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
readJsonFile,
|
|
22
22
|
sha256,
|
|
23
23
|
writeJsonAtomic
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-zbbeadz8.js";
|
|
25
25
|
import {
|
|
26
26
|
isServerEnabled
|
|
27
27
|
} from "./cli-s4gspqdf.js";
|
|
@@ -2033,6 +2033,8 @@ class McpxOAuthProvider {
|
|
|
2033
2033
|
|
|
2034
2034
|
class InteractiveOAuthProvider extends McpxOAuthProvider {
|
|
2035
2035
|
#openUrl;
|
|
2036
|
+
#cachedClientInfo;
|
|
2037
|
+
#cachedCodeVerifier;
|
|
2036
2038
|
constructor(serverName, secrets, redirectUrl, state, openUrl) {
|
|
2037
2039
|
super(serverName, secrets, redirectUrl, state);
|
|
2038
2040
|
this.#openUrl = openUrl;
|
|
@@ -2040,6 +2042,30 @@ class InteractiveOAuthProvider extends McpxOAuthProvider {
|
|
|
2040
2042
|
async redirectToAuthorization(authorizationUrl) {
|
|
2041
2043
|
await this.#openUrl(authorizationUrl.toString());
|
|
2042
2044
|
}
|
|
2045
|
+
clientInformation() {
|
|
2046
|
+
this.#cachedClientInfo ??= super.clientInformation();
|
|
2047
|
+
return this.#cachedClientInfo;
|
|
2048
|
+
}
|
|
2049
|
+
saveClientInformation(clientInformation) {
|
|
2050
|
+
super.saveClientInformation(clientInformation);
|
|
2051
|
+
this.#cachedClientInfo = clientInformation;
|
|
2052
|
+
}
|
|
2053
|
+
codeVerifier() {
|
|
2054
|
+
if (this.#cachedCodeVerifier !== undefined) {
|
|
2055
|
+
return this.#cachedCodeVerifier;
|
|
2056
|
+
}
|
|
2057
|
+
return super.codeVerifier();
|
|
2058
|
+
}
|
|
2059
|
+
saveCodeVerifier(codeVerifier) {
|
|
2060
|
+
super.saveCodeVerifier(codeVerifier);
|
|
2061
|
+
this.#cachedCodeVerifier = codeVerifier;
|
|
2062
|
+
}
|
|
2063
|
+
invalidateCredentials(scope) {
|
|
2064
|
+
super.invalidateCredentials(scope);
|
|
2065
|
+
if (scope === "all" || scope === "client") {
|
|
2066
|
+
this.#cachedClientInfo = undefined;
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2043
2069
|
}
|
|
2044
2070
|
function listen(server) {
|
|
2045
2071
|
return new Promise((resolve, reject) => {
|
|
@@ -2108,13 +2134,22 @@ function bindOAuthReference(config, serverName) {
|
|
|
2108
2134
|
Authorization: `oauth://${encodeURIComponent(serverName)}`
|
|
2109
2135
|
};
|
|
2110
2136
|
}
|
|
2111
|
-
async function runOAuthLogin(serverName, spec, secrets, openUrl, configPath) {
|
|
2137
|
+
async function runOAuthLogin(serverName, spec, secrets, openUrl, configPath, codeReceiver) {
|
|
2138
|
+
new McpxOAuthProvider(serverName, secrets).invalidateCredentials("all");
|
|
2112
2139
|
const state = crypto.randomUUID();
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2140
|
+
let callbackServer;
|
|
2141
|
+
let redirectUrl;
|
|
2142
|
+
let codePromise;
|
|
2143
|
+
if (codeReceiver) {
|
|
2144
|
+
redirectUrl = codeReceiver.redirectUrl;
|
|
2145
|
+
codePromise = codeReceiver.waitForCode(state);
|
|
2146
|
+
} else {
|
|
2147
|
+
callbackServer = http.createServer();
|
|
2148
|
+
const port = await listen(callbackServer);
|
|
2149
|
+
redirectUrl = `http://127.0.0.1:${port}/callback`;
|
|
2150
|
+
codePromise = waitForAuthorizationCode(callbackServer, state);
|
|
2151
|
+
}
|
|
2116
2152
|
const provider = new InteractiveOAuthProvider(serverName, secrets, redirectUrl, state, openUrl);
|
|
2117
|
-
const codePromise = waitForAuthorizationCode(callbackServer, state);
|
|
2118
2153
|
try {
|
|
2119
2154
|
const initial = await auth(provider, {
|
|
2120
2155
|
serverUrl: spec.url
|
|
@@ -2136,7 +2171,9 @@ async function runOAuthLogin(serverName, spec, secrets, openUrl, configPath) {
|
|
|
2136
2171
|
syncAllClients(config, secrets);
|
|
2137
2172
|
return { serverName, authorized: true };
|
|
2138
2173
|
} finally {
|
|
2139
|
-
|
|
2174
|
+
if (callbackServer) {
|
|
2175
|
+
await closeServer(callbackServer);
|
|
2176
|
+
}
|
|
2140
2177
|
}
|
|
2141
2178
|
}
|
|
2142
2179
|
async function getOAuthAccessToken(serverName, spec, secrets, options = {}) {
|
|
@@ -3758,7 +3795,10 @@ async function buildStatusReport(config, managedIndex, daemon = getDaemonStatus(
|
|
|
3758
3795
|
const serverNames = Object.keys(config.servers).sort((left, right) => left.localeCompare(right));
|
|
3759
3796
|
const servers = serverNames.map((name) => {
|
|
3760
3797
|
const spec = config.servers[name];
|
|
3761
|
-
|
|
3798
|
+
let tokenCount = tokenCounts[name];
|
|
3799
|
+
if (tokenCount?.error && buildAuthBindings(spec).length > 0) {
|
|
3800
|
+
tokenCount = { ...tokenCount, error: undefined };
|
|
3801
|
+
}
|
|
3762
3802
|
const serverEntry = {
|
|
3763
3803
|
name,
|
|
3764
3804
|
enabled: isServerEnabled(spec),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureParentDir,
|
|
3
3
|
getGatewayTokenPath,
|
|
4
|
-
|
|
4
|
+
getSecretsKeyPath,
|
|
5
|
+
getSecretsStorePath,
|
|
5
6
|
readJsonFile,
|
|
6
7
|
writeJsonAtomic
|
|
7
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-zbbeadz8.js";
|
|
8
9
|
import {
|
|
9
10
|
normalizeServerSpecEnabled
|
|
10
11
|
} from "./cli-s4gspqdf.js";
|
|
@@ -64,18 +65,14 @@ function ensureGatewayToken(config, secrets) {
|
|
|
64
65
|
try {
|
|
65
66
|
const fileValue = fs.readFileSync(tokenPath, "utf8").trim();
|
|
66
67
|
if (fileValue) {
|
|
68
|
+
secrets.setSecret(secretName, fileValue);
|
|
67
69
|
return fileValue;
|
|
68
70
|
}
|
|
69
71
|
} catch {}
|
|
70
|
-
const keychainValue = secrets.getSecret(secretName);
|
|
71
|
-
if (keychainValue) {
|
|
72
|
-
ensureParentDir(tokenPath);
|
|
73
|
-
fs.writeFileSync(tokenPath, keychainValue, { mode: 384 });
|
|
74
|
-
return keychainValue;
|
|
75
|
-
}
|
|
76
72
|
const token = crypto.randomBytes(32).toString("base64url");
|
|
77
73
|
ensureParentDir(tokenPath);
|
|
78
74
|
fs.writeFileSync(tokenPath, token, { mode: 384 });
|
|
75
|
+
secrets.setSecret(secretName, token);
|
|
79
76
|
return token;
|
|
80
77
|
}
|
|
81
78
|
function rotateGatewayToken(config, secrets) {
|
|
@@ -84,9 +81,7 @@ function rotateGatewayToken(config, secrets) {
|
|
|
84
81
|
const tokenPath = getGatewayTokenPath(secretName);
|
|
85
82
|
ensureParentDir(tokenPath);
|
|
86
83
|
fs.writeFileSync(tokenPath, token, { mode: 384 });
|
|
87
|
-
|
|
88
|
-
secrets.setSecret(secretName, token);
|
|
89
|
-
} catch {}
|
|
84
|
+
secrets.setSecret(secretName, token);
|
|
90
85
|
return token;
|
|
91
86
|
}
|
|
92
87
|
function registerProject(globalConfig, projectPath, name) {
|
|
@@ -108,95 +103,117 @@ function unregisterProject(globalConfig, projectPath) {
|
|
|
108
103
|
// src/core/secrets.ts
|
|
109
104
|
import crypto2 from "node:crypto";
|
|
110
105
|
import fs2 from "node:fs";
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
try {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
106
|
+
var ALGORITHM = "aes-256-gcm";
|
|
107
|
+
function loadKey(keyPath) {
|
|
108
|
+
try {
|
|
109
|
+
const stored = fs2.readFileSync(keyPath, "utf8").trim();
|
|
110
|
+
return Buffer.from(stored, "base64");
|
|
111
|
+
} catch (err) {
|
|
112
|
+
if (err.code !== "ENOENT")
|
|
113
|
+
throw err;
|
|
114
|
+
}
|
|
115
|
+
ensureParentDir(keyPath);
|
|
116
|
+
const key = crypto2.randomBytes(32);
|
|
117
|
+
try {
|
|
118
|
+
fs2.writeFileSync(keyPath, key.toString("base64") + `
|
|
119
|
+
`, { flag: "wx", mode: 384 });
|
|
120
|
+
} catch (err) {
|
|
121
|
+
if (err.code === "EEXIST") {
|
|
122
|
+
const stored = fs2.readFileSync(keyPath, "utf8").trim();
|
|
123
|
+
return Buffer.from(stored, "base64");
|
|
124
|
+
}
|
|
125
|
+
throw err;
|
|
126
|
+
}
|
|
127
|
+
return key;
|
|
119
128
|
}
|
|
120
|
-
function
|
|
121
|
-
|
|
129
|
+
function readSecretsData(storePath, keyPath) {
|
|
130
|
+
const envelope = readJsonFile(storePath, null);
|
|
131
|
+
if (!envelope || envelope.version !== 1 || envelope.algorithm !== ALGORITHM)
|
|
132
|
+
return null;
|
|
133
|
+
try {
|
|
134
|
+
const key = loadKey(keyPath);
|
|
135
|
+
const iv = Buffer.from(envelope.iv, "base64");
|
|
136
|
+
const authTag = Buffer.from(envelope.authTag, "base64");
|
|
137
|
+
const ciphertext = Buffer.from(envelope.ciphertext, "base64");
|
|
138
|
+
const decipher = crypto2.createDecipheriv(ALGORITHM, key, iv);
|
|
139
|
+
decipher.setAuthTag(authTag);
|
|
140
|
+
const decrypted = Buffer.concat([decipher.update(ciphertext), decipher.final()]);
|
|
141
|
+
return JSON.parse(decrypted.toString("utf8"));
|
|
142
|
+
} catch {
|
|
122
143
|
return null;
|
|
123
144
|
}
|
|
145
|
+
}
|
|
146
|
+
function buildEnvelope(keyPath, data) {
|
|
147
|
+
const key = loadKey(keyPath);
|
|
148
|
+
const iv = crypto2.randomBytes(12);
|
|
149
|
+
const cipher = crypto2.createCipheriv(ALGORITHM, key, iv);
|
|
150
|
+
const plaintext = JSON.stringify(data);
|
|
151
|
+
const encrypted = Buffer.concat([cipher.update(plaintext, "utf8"), cipher.final()]);
|
|
152
|
+
return {
|
|
153
|
+
version: 1,
|
|
154
|
+
algorithm: ALGORITHM,
|
|
155
|
+
iv: iv.toString("base64"),
|
|
156
|
+
authTag: cipher.getAuthTag().toString("base64"),
|
|
157
|
+
ciphertext: encrypted.toString("base64")
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
function parseSecretRef(ref) {
|
|
161
|
+
if (!ref.startsWith("secret://"))
|
|
162
|
+
return null;
|
|
124
163
|
const name = ref.slice("secret://".length);
|
|
125
164
|
return name.length > 0 ? name : null;
|
|
126
165
|
}
|
|
127
166
|
|
|
128
167
|
class SecretsManager {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
constructor(
|
|
132
|
-
this.
|
|
133
|
-
this.
|
|
134
|
-
}
|
|
135
|
-
loadNameIndex() {
|
|
136
|
-
return readJsonFile(this.nameIndexPath, { names: [] });
|
|
137
|
-
}
|
|
138
|
-
saveNameIndex(index) {
|
|
139
|
-
const deduped = Array.from(new Set(index.names)).sort();
|
|
140
|
-
writeJsonAtomic(this.nameIndexPath, { names: deduped });
|
|
141
|
-
}
|
|
142
|
-
trackSecretName(name) {
|
|
143
|
-
const index = this.loadNameIndex();
|
|
144
|
-
if (!index.names.includes(name)) {
|
|
145
|
-
index.names.push(name);
|
|
146
|
-
this.saveNameIndex(index);
|
|
147
|
-
}
|
|
168
|
+
storePath;
|
|
169
|
+
keyPath;
|
|
170
|
+
constructor(storePath = getSecretsStorePath(), keyPath = getSecretsKeyPath()) {
|
|
171
|
+
this.storePath = storePath;
|
|
172
|
+
this.keyPath = keyPath;
|
|
148
173
|
}
|
|
149
|
-
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
|
|
174
|
+
readStore() {
|
|
175
|
+
const data = readSecretsData(this.storePath, this.keyPath);
|
|
176
|
+
return data?.secrets ?? null;
|
|
177
|
+
}
|
|
178
|
+
recoverCorruptStore() {
|
|
179
|
+
try {
|
|
180
|
+
if (fs2.existsSync(this.storePath)) {
|
|
181
|
+
fs2.renameSync(this.storePath, `${this.storePath}.corrupt-${Date.now()}`);
|
|
182
|
+
}
|
|
183
|
+
} catch {}
|
|
153
184
|
}
|
|
154
185
|
listSecretNames() {
|
|
155
|
-
return this.
|
|
186
|
+
return Object.keys(this.readStore() ?? {}).sort();
|
|
156
187
|
}
|
|
157
188
|
setSecret(name, value) {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
189
|
+
let map = this.readStore();
|
|
190
|
+
if (map === null) {
|
|
191
|
+
this.recoverCorruptStore();
|
|
192
|
+
map = {};
|
|
162
193
|
}
|
|
163
|
-
|
|
194
|
+
map[name] = value;
|
|
195
|
+
const envelope = buildEnvelope(this.keyPath, { secrets: map });
|
|
196
|
+
writeJsonAtomic(this.storePath, envelope);
|
|
164
197
|
}
|
|
165
198
|
removeSecret(name) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
this.untrackSecretName(name);
|
|
199
|
+
const map = this.readStore() ?? {};
|
|
200
|
+
delete map[name];
|
|
201
|
+
const envelope = buildEnvelope(this.keyPath, { secrets: map });
|
|
202
|
+
writeJsonAtomic(this.storePath, envelope);
|
|
172
203
|
}
|
|
173
204
|
getSecret(name) {
|
|
174
205
|
const envOverride = process.env[`MCPX_SECRET_${name}`];
|
|
175
|
-
if (envOverride && envOverride.length > 0)
|
|
206
|
+
if (envOverride && envOverride.length > 0)
|
|
176
207
|
return envOverride;
|
|
177
|
-
}
|
|
178
|
-
if (!keytarSync) {
|
|
179
|
-
return null;
|
|
180
|
-
}
|
|
181
|
-
try {
|
|
182
|
-
const value = keytarSync.getPassword(this.service, name);
|
|
183
|
-
if (typeof value === "string" && value.length > 0) {
|
|
184
|
-
return value;
|
|
185
|
-
}
|
|
186
|
-
return null;
|
|
187
|
-
} catch {
|
|
188
|
-
return null;
|
|
189
|
-
}
|
|
208
|
+
return (this.readStore() ?? {})[name] ?? null;
|
|
190
209
|
}
|
|
191
210
|
resolveMaybeSecret(value) {
|
|
192
211
|
const secretName = parseSecretRef(value);
|
|
193
|
-
if (!secretName)
|
|
212
|
+
if (!secretName)
|
|
194
213
|
return value;
|
|
195
|
-
}
|
|
196
214
|
const secret = this.getSecret(secretName);
|
|
197
|
-
if (!secret)
|
|
215
|
+
if (!secret)
|
|
198
216
|
throw new Error(`Secret not found: ${secretName}`);
|
|
199
|
-
}
|
|
200
217
|
return secret;
|
|
201
218
|
}
|
|
202
219
|
rotateLocalToken(secretName = "local_gateway_token") {
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
loadConfig,
|
|
3
3
|
loadMergedConfig,
|
|
4
4
|
saveConfig
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-bq7zsrv6.js";
|
|
6
6
|
import {
|
|
7
7
|
SecretsManager,
|
|
8
8
|
ensureGatewayToken
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-dvj5waat.js";
|
|
10
10
|
import {
|
|
11
11
|
ensureDir,
|
|
12
12
|
ensureParentDir,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
readJsonFile,
|
|
22
22
|
sha256,
|
|
23
23
|
writeJsonAtomic
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-zbbeadz8.js";
|
|
25
25
|
import {
|
|
26
26
|
isServerEnabled
|
|
27
27
|
} from "./cli-s4gspqdf.js";
|
|
@@ -2033,6 +2033,8 @@ class McpxOAuthProvider {
|
|
|
2033
2033
|
|
|
2034
2034
|
class InteractiveOAuthProvider extends McpxOAuthProvider {
|
|
2035
2035
|
#openUrl;
|
|
2036
|
+
#cachedClientInfo;
|
|
2037
|
+
#cachedCodeVerifier;
|
|
2036
2038
|
constructor(serverName, secrets, redirectUrl, state, openUrl) {
|
|
2037
2039
|
super(serverName, secrets, redirectUrl, state);
|
|
2038
2040
|
this.#openUrl = openUrl;
|
|
@@ -2040,6 +2042,30 @@ class InteractiveOAuthProvider extends McpxOAuthProvider {
|
|
|
2040
2042
|
async redirectToAuthorization(authorizationUrl) {
|
|
2041
2043
|
await this.#openUrl(authorizationUrl.toString());
|
|
2042
2044
|
}
|
|
2045
|
+
clientInformation() {
|
|
2046
|
+
this.#cachedClientInfo ??= super.clientInformation();
|
|
2047
|
+
return this.#cachedClientInfo;
|
|
2048
|
+
}
|
|
2049
|
+
saveClientInformation(clientInformation) {
|
|
2050
|
+
super.saveClientInformation(clientInformation);
|
|
2051
|
+
this.#cachedClientInfo = clientInformation;
|
|
2052
|
+
}
|
|
2053
|
+
codeVerifier() {
|
|
2054
|
+
if (this.#cachedCodeVerifier !== undefined) {
|
|
2055
|
+
return this.#cachedCodeVerifier;
|
|
2056
|
+
}
|
|
2057
|
+
return super.codeVerifier();
|
|
2058
|
+
}
|
|
2059
|
+
saveCodeVerifier(codeVerifier) {
|
|
2060
|
+
super.saveCodeVerifier(codeVerifier);
|
|
2061
|
+
this.#cachedCodeVerifier = codeVerifier;
|
|
2062
|
+
}
|
|
2063
|
+
invalidateCredentials(scope) {
|
|
2064
|
+
super.invalidateCredentials(scope);
|
|
2065
|
+
if (scope === "all" || scope === "client") {
|
|
2066
|
+
this.#cachedClientInfo = undefined;
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2043
2069
|
}
|
|
2044
2070
|
function listen(server) {
|
|
2045
2071
|
return new Promise((resolve, reject) => {
|
|
@@ -2108,13 +2134,22 @@ function bindOAuthReference(config, serverName) {
|
|
|
2108
2134
|
Authorization: `oauth://${encodeURIComponent(serverName)}`
|
|
2109
2135
|
};
|
|
2110
2136
|
}
|
|
2111
|
-
async function runOAuthLogin(serverName, spec, secrets, openUrl, configPath) {
|
|
2137
|
+
async function runOAuthLogin(serverName, spec, secrets, openUrl, configPath, codeReceiver) {
|
|
2138
|
+
new McpxOAuthProvider(serverName, secrets).invalidateCredentials("all");
|
|
2112
2139
|
const state = crypto.randomUUID();
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2140
|
+
let callbackServer;
|
|
2141
|
+
let redirectUrl;
|
|
2142
|
+
let codePromise;
|
|
2143
|
+
if (codeReceiver) {
|
|
2144
|
+
redirectUrl = codeReceiver.redirectUrl;
|
|
2145
|
+
codePromise = codeReceiver.waitForCode(state);
|
|
2146
|
+
} else {
|
|
2147
|
+
callbackServer = http.createServer();
|
|
2148
|
+
const port = await listen(callbackServer);
|
|
2149
|
+
redirectUrl = `http://127.0.0.1:${port}/callback`;
|
|
2150
|
+
codePromise = waitForAuthorizationCode(callbackServer, state);
|
|
2151
|
+
}
|
|
2116
2152
|
const provider = new InteractiveOAuthProvider(serverName, secrets, redirectUrl, state, openUrl);
|
|
2117
|
-
const codePromise = waitForAuthorizationCode(callbackServer, state);
|
|
2118
2153
|
try {
|
|
2119
2154
|
const initial = await auth(provider, {
|
|
2120
2155
|
serverUrl: spec.url
|
|
@@ -2136,7 +2171,9 @@ async function runOAuthLogin(serverName, spec, secrets, openUrl, configPath) {
|
|
|
2136
2171
|
syncAllClients(config, secrets);
|
|
2137
2172
|
return { serverName, authorized: true };
|
|
2138
2173
|
} finally {
|
|
2139
|
-
|
|
2174
|
+
if (callbackServer) {
|
|
2175
|
+
await closeServer(callbackServer);
|
|
2176
|
+
}
|
|
2140
2177
|
}
|
|
2141
2178
|
}
|
|
2142
2179
|
async function getOAuthAccessToken(serverName, spec, secrets, options = {}) {
|
|
@@ -2171,7 +2208,7 @@ async function getOAuthAccessToken(serverName, spec, secrets, options = {}) {
|
|
|
2171
2208
|
}
|
|
2172
2209
|
|
|
2173
2210
|
// src/version.ts
|
|
2174
|
-
var APP_VERSION = "0.1.
|
|
2211
|
+
var APP_VERSION = "0.1.84";
|
|
2175
2212
|
|
|
2176
2213
|
// src/core/update.ts
|
|
2177
2214
|
import fs7 from "node:fs";
|
|
@@ -3758,7 +3795,10 @@ async function buildStatusReport(config, managedIndex, daemon = getDaemonStatus(
|
|
|
3758
3795
|
const serverNames = Object.keys(config.servers).sort((left, right) => left.localeCompare(right));
|
|
3759
3796
|
const servers = serverNames.map((name) => {
|
|
3760
3797
|
const spec = config.servers[name];
|
|
3761
|
-
|
|
3798
|
+
let tokenCount = tokenCounts[name];
|
|
3799
|
+
if (tokenCount?.error && buildAuthBindings(spec).length > 0) {
|
|
3800
|
+
tokenCount = { ...tokenCount, error: undefined };
|
|
3801
|
+
}
|
|
3762
3802
|
const serverEntry = {
|
|
3763
3803
|
name,
|
|
3764
3804
|
enabled: isServerEnabled(spec),
|
|
@@ -29,8 +29,11 @@ function getSkillsDir() {
|
|
|
29
29
|
function getManagedIndexPath() {
|
|
30
30
|
return path.join(getDataRoot(), "mcpx", "managed-index.json");
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
return path.join(getDataRoot(), "mcpx", "
|
|
32
|
+
function getSecretsStorePath() {
|
|
33
|
+
return path.join(getDataRoot(), "mcpx", "secrets.json");
|
|
34
|
+
}
|
|
35
|
+
function getSecretsKeyPath() {
|
|
36
|
+
return path.join(getDataRoot(), "mcpx", "secrets.key");
|
|
34
37
|
}
|
|
35
38
|
function getRuntimeDir() {
|
|
36
39
|
return path.join(getStateRoot(), "mcpx", "runtime");
|
|
@@ -105,4 +108,4 @@ function sha256(value) {
|
|
|
105
108
|
return crypto.createHash("sha256").update(value).digest("hex");
|
|
106
109
|
}
|
|
107
110
|
|
|
108
|
-
export { homeDir, getConfigPath, getSkillsDir, getManagedIndexPath,
|
|
111
|
+
export { homeDir, getConfigPath, getSkillsDir, getManagedIndexPath, getSecretsStorePath, getSecretsKeyPath, getPidPath, getLogPath, getGatewayTokenPath, getUpdatesDir, getStagedVersionPath, getUpdateLockPath, ensureDir, ensureParentDir, findProjectConfigPath, readJsonFile, writeJsonAtomic, sha256 };
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAq1DA,wBAAsB,MAAM,CAAC,IAAI,WAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAmE/D"}
|
package/dist/cli.js
CHANGED
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
stopDaemon,
|
|
39
39
|
syncAllClients,
|
|
40
40
|
toSecretRef
|
|
41
|
-
} from "./cli-
|
|
41
|
+
} from "./cli-f0phhbax.js";
|
|
42
42
|
import {
|
|
43
43
|
loadConfig,
|
|
44
44
|
loadMergedConfig,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
resolveActiveConfig,
|
|
47
47
|
saveConfig,
|
|
48
48
|
saveProjectConfig
|
|
49
|
-
} from "./cli-
|
|
49
|
+
} from "./cli-bq7zsrv6.js";
|
|
50
50
|
import {
|
|
51
51
|
SecretsManager,
|
|
52
52
|
addServer,
|
|
@@ -56,11 +56,12 @@ import {
|
|
|
56
56
|
removeServer,
|
|
57
57
|
rotateGatewayToken,
|
|
58
58
|
setServerEnabled
|
|
59
|
-
} from "./cli-
|
|
59
|
+
} from "./cli-dvj5waat.js";
|
|
60
60
|
import {
|
|
61
61
|
getConfigPath,
|
|
62
|
-
getManagedIndexPath
|
|
63
|
-
|
|
62
|
+
getManagedIndexPath,
|
|
63
|
+
getSecretsStorePath
|
|
64
|
+
} from "./cli-zbbeadz8.js";
|
|
64
65
|
import {
|
|
65
66
|
__require,
|
|
66
67
|
isServerEnabled
|
|
@@ -900,7 +901,6 @@ async function runStdioProxy(serverName) {
|
|
|
900
901
|
}
|
|
901
902
|
|
|
902
903
|
// src/cli.ts
|
|
903
|
-
var __dirname = "/home/runner/work/mcpx/mcpx/cli/src";
|
|
904
904
|
var VALID_CLIENTS = STATUS_CLIENTS;
|
|
905
905
|
function parseKeyValueFlag(value, label) {
|
|
906
906
|
const split = value.indexOf("=");
|
|
@@ -1959,21 +1959,10 @@ function registerDoctorCommand(program) {
|
|
|
1959
1959
|
details: getManagedIndexPath()
|
|
1960
1960
|
});
|
|
1961
1961
|
try {
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
keytar.getPassword("mcpx-doctor-check", "__probe__");
|
|
1965
|
-
} catch {}
|
|
1966
|
-
checks.push({ check: "keyring", status: "ok", details: "keytar native addon loaded" });
|
|
1962
|
+
new SecretsManager().listSecretNames();
|
|
1963
|
+
checks.push({ check: "secrets_store", status: "ok", details: getSecretsStorePath() });
|
|
1967
1964
|
} catch {
|
|
1968
|
-
|
|
1969
|
-
checks.push({ check: "keyring", status: "warn", details: "keytar native addon unavailable; install libsecret-1-dev and reinstall dependencies" });
|
|
1970
|
-
} else if (process.platform === "win32") {
|
|
1971
|
-
checks.push({ check: "keyring", status: "warn", details: "keytar native addon unavailable; rebuild keytar with 'npx node-gyp rebuild' in app/node_modules/keytar" });
|
|
1972
|
-
} else if (process.platform === "darwin") {
|
|
1973
|
-
checks.push({ check: "keyring", status: "warn", details: "keytar native addon unavailable; reinstall dependencies or check Xcode CLI tools" });
|
|
1974
|
-
} else {
|
|
1975
|
-
checks.push({ check: "keyring", status: "warn", details: "keytar native addon unavailable" });
|
|
1976
|
-
}
|
|
1965
|
+
checks.push({ check: "secrets_store", status: "warn", details: "encrypted secrets store unavailable" });
|
|
1977
1966
|
}
|
|
1978
1967
|
const daemon = getDaemonStatus(config);
|
|
1979
1968
|
checks.push({
|
|
@@ -2323,11 +2312,11 @@ function registerProjectCommands(program, cliPath) {
|
|
|
2323
2312
|
name: projectName,
|
|
2324
2313
|
servers: {}
|
|
2325
2314
|
};
|
|
2326
|
-
const { saveProjectConfig: saveProjectConfig2 } = await import("./config-
|
|
2315
|
+
const { saveProjectConfig: saveProjectConfig2 } = await import("./config-ajxqtkq6.js");
|
|
2327
2316
|
saveProjectConfig2(localConfig, targetPath);
|
|
2328
2317
|
process.stdout.write(`Initialized project configuration at: ${targetPath}
|
|
2329
2318
|
`);
|
|
2330
|
-
const { registerProject: registerProject2 } = await import("./registry-
|
|
2319
|
+
const { registerProject: registerProject2 } = await import("./registry-j53hz9d4.js");
|
|
2331
2320
|
const globalConfig = loadConfig();
|
|
2332
2321
|
registerProject2(globalConfig, process.cwd(), projectName);
|
|
2333
2322
|
saveConfig(globalConfig);
|
|
@@ -2358,7 +2347,7 @@ function registerProjectCommands(program, cliPath) {
|
|
|
2358
2347
|
process.exit(1);
|
|
2359
2348
|
}
|
|
2360
2349
|
const entry = globalConfig.projects[resolvedPath];
|
|
2361
|
-
const { unregisterProject: unregisterProject2 } = await import("./registry-
|
|
2350
|
+
const { unregisterProject: unregisterProject2 } = await import("./registry-j53hz9d4.js");
|
|
2362
2351
|
unregisterProject2(globalConfig, resolvedPath);
|
|
2363
2352
|
saveConfig(globalConfig);
|
|
2364
2353
|
process.stdout.write(`Unregistered project "${entry.name}" (${resolvedPath}) from the global configuration.
|
package/dist/core/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { loadConfig, saveConfig, defaultConfig, loadMergedConfig, loadProjectCon
|
|
|
2
2
|
export { parseCliAddCommand, tokenizeCommandLine } from "./add-command.js";
|
|
3
3
|
export { buildEnrichedPath } from "./spawn-env.js";
|
|
4
4
|
export { runOAuthLogin, getOAuthAccessToken, isOAuthReference, oauthReferenceServerName } from "./oauth.js";
|
|
5
|
+
export type { OAuthCodeReceiver } from "./oauth.js";
|
|
5
6
|
export { getDaemonStatus, startDaemon, stopDaemon, restartDaemon, readDaemonLogs, runDaemonForeground } from "./daemon.js";
|
|
6
7
|
export type { DaemonStatus, DaemonStartResult } from "./daemon.js";
|
|
7
8
|
export { syncAllClients, getGatewayUrl } from "./sync.js";
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC5H,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":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AAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAG3G,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGhE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACzI,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGjG,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D,YAAY,EACV,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,aAAa,EACb,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,UAAU,EACV,mBAAmB,EACpB,MAAM,aAAa,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
stopDaemon,
|
|
42
42
|
syncAllClients,
|
|
43
43
|
toSecretRef
|
|
44
|
-
} from "../cli-
|
|
44
|
+
} from "../cli-f0phhbax.js";
|
|
45
45
|
import {
|
|
46
46
|
defaultConfig,
|
|
47
47
|
loadConfig,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
saveConfig,
|
|
52
52
|
saveProjectConfig,
|
|
53
53
|
tokenizeCommandLine
|
|
54
|
-
} from "../cli-
|
|
54
|
+
} from "../cli-bq7zsrv6.js";
|
|
55
55
|
import {
|
|
56
56
|
SecretsManager,
|
|
57
57
|
addServer,
|
|
@@ -62,11 +62,11 @@ import {
|
|
|
62
62
|
setServerEnabled,
|
|
63
63
|
unregisterProject,
|
|
64
64
|
updateServer
|
|
65
|
-
} from "../cli-
|
|
65
|
+
} from "../cli-dvj5waat.js";
|
|
66
66
|
import {
|
|
67
67
|
getConfigPath,
|
|
68
68
|
getManagedIndexPath
|
|
69
|
-
} from "../cli-
|
|
69
|
+
} from "../cli-zbbeadz8.js";
|
|
70
70
|
import"../cli-s4gspqdf.js";
|
|
71
71
|
export {
|
|
72
72
|
updateServer,
|
package/dist/core/oauth.d.ts
CHANGED
|
@@ -2,7 +2,11 @@ import type { HttpServerSpec } from "../types.js";
|
|
|
2
2
|
import { SecretsManager } from "./secrets.js";
|
|
3
3
|
export declare function isOAuthReference(value: string): boolean;
|
|
4
4
|
export declare function oauthReferenceServerName(value: string): string;
|
|
5
|
-
export
|
|
5
|
+
export interface OAuthCodeReceiver {
|
|
6
|
+
redirectUrl: string;
|
|
7
|
+
waitForCode: (expectedState: string, timeoutMs?: number) => Promise<string>;
|
|
8
|
+
}
|
|
9
|
+
export declare function runOAuthLogin(serverName: string, spec: HttpServerSpec, secrets: SecretsManager, openUrl: (url: string) => void | Promise<void>, configPath?: string, codeReceiver?: OAuthCodeReceiver): Promise<{
|
|
6
10
|
serverName: string;
|
|
7
11
|
authorized: true;
|
|
8
12
|
}>;
|
package/dist/core/oauth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../src/core/oauth.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,aAAa,CAAC;AAE9D,OAAO,EAAE,cAAc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@ export declare function getStateRoot(): string;
|
|
|
5
5
|
export declare function getConfigPath(): string;
|
|
6
6
|
export declare function getSkillsDir(): string;
|
|
7
7
|
export declare function getManagedIndexPath(): string;
|
|
8
|
-
export declare function
|
|
8
|
+
export declare function getSecretsStorePath(): string;
|
|
9
|
+
export declare function getSecretsKeyPath(): string;
|
|
9
10
|
export declare function getRuntimeDir(): string;
|
|
10
11
|
export declare function getLogDir(): string;
|
|
11
12
|
export declare function getPidPath(): string;
|
package/dist/core/paths.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/core/paths.ts"],"names":[],"mappings":"AAaA,wBAAgB,OAAO,IAAI,MAAM,CAEhC;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED,wBAAgB,
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/core/paths.ts"],"names":[],"mappings":"AAaA,wBAAgB,OAAO,IAAI,MAAM,CAEhC;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,wBAAgB,UAAU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AAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAUlG;AAED,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAIrF"}
|
package/dist/core/secrets.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
export declare class SecretsManager {
|
|
2
|
-
private readonly
|
|
3
|
-
private readonly
|
|
4
|
-
constructor(
|
|
5
|
-
private
|
|
6
|
-
private
|
|
7
|
-
private trackSecretName;
|
|
8
|
-
private untrackSecretName;
|
|
2
|
+
private readonly storePath;
|
|
3
|
+
private readonly keyPath;
|
|
4
|
+
constructor(storePath?: string, keyPath?: string);
|
|
5
|
+
private readStore;
|
|
6
|
+
private recoverCorruptStore;
|
|
9
7
|
listSecretNames(): string[];
|
|
10
8
|
setSecret(name: string, value: string): void;
|
|
11
9
|
removeSecret(name: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../src/core/secrets.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../src/core/secrets.ts"],"names":[],"mappings":"AAgFA,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAErB,SAAS,SAAwB,EAAE,OAAO,SAAsB;IAK5E,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,mBAAmB;IAU3B,eAAe,IAAI,MAAM,EAAE;IAI3B,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAW5C,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAOhC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAOtC,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IASzC,gBAAg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,SAAS,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACjC;AAED,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,YAAY,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAClC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C;AAyED,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,UAAU,EAClB,YAAY,EAAE,YAAY,EAC1B,MAAM,GAAE,YAAsC,GAC7C,OAAO,CAAC,YAAY,CAAC,CA2DvB"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const APP_VERSION = "0.1.
|
|
1
|
+
export declare const APP_VERSION = "0.1.84";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kwonye/mcpx",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.84",
|
|
4
4
|
"description": "HTTP-first MCP gateway and cross-client installer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dev": "bun run src/cli.ts --",
|
|
46
46
|
"sync-version": "bun scripts/sync-version.mjs",
|
|
47
47
|
"prebuild": "bun run sync-version",
|
|
48
|
-
"build": "bun build src/cli.ts src/core/index.ts src/types.ts --outdir dist --target node --format esm --splitting --external commander --external hono --external zod --external \"@modelcontextprotocol/sdk\" --external \"@iarna/toml\"
|
|
48
|
+
"build": "bun build src/cli.ts src/core/index.ts src/types.ts --outdir dist --target node --format esm --splitting --external commander --external hono --external zod --external \"@modelcontextprotocol/sdk\" --external \"@iarna/toml\" && tsc -p tsconfig.json --emitDeclarationOnly --declaration --declarationMap",
|
|
49
49
|
"prepublishOnly": "bun run build",
|
|
50
50
|
"test": "bun test",
|
|
51
51
|
"test:watch": "bun test --watch"
|
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
56
56
|
"commander": "^14.0.1",
|
|
57
57
|
"hono": "^4.12.14",
|
|
58
|
-
"keytar": "^7.9.0",
|
|
59
58
|
"zod": "^4.1.12"
|
|
60
59
|
},
|
|
61
60
|
"devDependencies": {
|