@kwonye/mcpx 0.1.80 → 0.1.83

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.
@@ -2,11 +2,11 @@ import {
2
2
  loadConfig,
3
3
  loadMergedConfig,
4
4
  saveConfig
5
- } from "./cli-0ztrmp65.js";
5
+ } from "./cli-bq7zsrv6.js";
6
6
  import {
7
7
  SecretsManager,
8
8
  ensureGatewayToken
9
- } from "./cli-ma89vavk.js";
9
+ } from "./cli-gtf6cpsx.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-08mgt3c8.js";
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
- const callbackServer = http.createServer();
2114
- const port = await listen(callbackServer);
2115
- const redirectUrl = `http://127.0.0.1:${port}/callback`;
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
- await closeServer(callbackServer);
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.80";
2211
+ var APP_VERSION = "0.1.83";
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
- const tokenCount = tokenCounts[name];
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),
@@ -2,11 +2,11 @@ import {
2
2
  loadConfig,
3
3
  loadMergedConfig,
4
4
  saveConfig
5
- } from "./cli-0ztrmp65.js";
5
+ } from "./cli-bq7zsrv6.js";
6
6
  import {
7
7
  SecretsManager,
8
8
  ensureGatewayToken
9
- } from "./cli-ma89vavk.js";
9
+ } from "./cli-gtf6cpsx.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-08mgt3c8.js";
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
- const callbackServer = http.createServer();
2114
- const port = await listen(callbackServer);
2115
- const redirectUrl = `http://127.0.0.1:${port}/callback`;
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
- await closeServer(callbackServer);
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
- const tokenCount = tokenCounts[name];
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),
@@ -3,7 +3,7 @@ import {
3
3
  getConfigPath,
4
4
  readJsonFile,
5
5
  writeJsonAtomic
6
- } from "./cli-08mgt3c8.js";
6
+ } from "./cli-zbbeadz8.js";
7
7
  import {
8
8
  normalizeServerSpecEnabled
9
9
  } from "./cli-s4gspqdf.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  ensureParentDir,
3
3
  getGatewayTokenPath,
4
- getSecretNamesPath,
4
+ getSecretsKeyPath,
5
+ getSecretsStorePath,
5
6
  readJsonFile,
6
7
  writeJsonAtomic
7
- } from "./cli-08mgt3c8.js";
8
+ } from "./cli-zbbeadz8.js";
8
9
  import {
9
- __require,
10
10
  normalizeServerSpecEnabled
11
11
  } from "./cli-s4gspqdf.js";
12
12
 
@@ -68,12 +68,6 @@ function ensureGatewayToken(config, secrets) {
68
68
  return fileValue;
69
69
  }
70
70
  } catch {}
71
- const keychainValue = secrets.getSecret(secretName);
72
- if (keychainValue) {
73
- ensureParentDir(tokenPath);
74
- fs.writeFileSync(tokenPath, keychainValue, { mode: 384 });
75
- return keychainValue;
76
- }
77
71
  const token = crypto.randomBytes(32).toString("base64url");
78
72
  ensureParentDir(tokenPath);
79
73
  fs.writeFileSync(tokenPath, token, { mode: 384 });
@@ -85,9 +79,6 @@ function rotateGatewayToken(config, secrets) {
85
79
  const tokenPath = getGatewayTokenPath(secretName);
86
80
  ensureParentDir(tokenPath);
87
81
  fs.writeFileSync(tokenPath, token, { mode: 384 });
88
- try {
89
- secrets.setSecret(secretName, token);
90
- } catch {}
91
82
  return token;
92
83
  }
93
84
  function registerProject(globalConfig, projectPath, name) {
@@ -109,93 +100,117 @@ function unregisterProject(globalConfig, projectPath) {
109
100
  // src/core/secrets.ts
110
101
  import crypto2 from "node:crypto";
111
102
  import fs2 from "node:fs";
112
- var keytarSync = null;
113
- try {
114
- const keytar = (()=>{throw new Error("Cannot require module "+"../node_modules/keytar/lib/keytar.js");})();
115
- keytarSync = keytar;
116
- } catch {
117
- keytarSync = null;
103
+ var ALGORITHM = "aes-256-gcm";
104
+ function loadKey(keyPath) {
105
+ try {
106
+ const stored = fs2.readFileSync(keyPath, "utf8").trim();
107
+ return Buffer.from(stored, "base64");
108
+ } catch (err) {
109
+ if (err.code !== "ENOENT")
110
+ throw err;
111
+ }
112
+ ensureParentDir(keyPath);
113
+ const key = crypto2.randomBytes(32);
114
+ try {
115
+ fs2.writeFileSync(keyPath, key.toString("base64") + `
116
+ `, { flag: "wx", mode: 384 });
117
+ } catch (err) {
118
+ if (err.code === "EEXIST") {
119
+ const stored = fs2.readFileSync(keyPath, "utf8").trim();
120
+ return Buffer.from(stored, "base64");
121
+ }
122
+ throw err;
123
+ }
124
+ return key;
118
125
  }
119
- function parseSecretRef(ref) {
120
- if (!ref.startsWith("secret://")) {
126
+ function readSecretsData(storePath, keyPath) {
127
+ const envelope = readJsonFile(storePath, null);
128
+ if (!envelope || envelope.version !== 1 || envelope.algorithm !== ALGORITHM)
129
+ return null;
130
+ try {
131
+ const key = loadKey(keyPath);
132
+ const iv = Buffer.from(envelope.iv, "base64");
133
+ const authTag = Buffer.from(envelope.authTag, "base64");
134
+ const ciphertext = Buffer.from(envelope.ciphertext, "base64");
135
+ const decipher = crypto2.createDecipheriv(ALGORITHM, key, iv);
136
+ decipher.setAuthTag(authTag);
137
+ const decrypted = Buffer.concat([decipher.update(ciphertext), decipher.final()]);
138
+ return JSON.parse(decrypted.toString("utf8"));
139
+ } catch {
121
140
  return null;
122
141
  }
142
+ }
143
+ function buildEnvelope(keyPath, data) {
144
+ const key = loadKey(keyPath);
145
+ const iv = crypto2.randomBytes(12);
146
+ const cipher = crypto2.createCipheriv(ALGORITHM, key, iv);
147
+ const plaintext = JSON.stringify(data);
148
+ const encrypted = Buffer.concat([cipher.update(plaintext, "utf8"), cipher.final()]);
149
+ return {
150
+ version: 1,
151
+ algorithm: ALGORITHM,
152
+ iv: iv.toString("base64"),
153
+ authTag: cipher.getAuthTag().toString("base64"),
154
+ ciphertext: encrypted.toString("base64")
155
+ };
156
+ }
157
+ function parseSecretRef(ref) {
158
+ if (!ref.startsWith("secret://"))
159
+ return null;
123
160
  const name = ref.slice("secret://".length);
124
161
  return name.length > 0 ? name : null;
125
162
  }
126
163
 
127
164
  class SecretsManager {
128
- service;
129
- nameIndexPath;
130
- constructor(service = "mcpx", nameIndexPath = getSecretNamesPath()) {
131
- this.service = service;
132
- this.nameIndexPath = nameIndexPath;
133
- }
134
- loadNameIndex() {
135
- return readJsonFile(this.nameIndexPath, { names: [] });
136
- }
137
- saveNameIndex(index) {
138
- const deduped = Array.from(new Set(index.names)).sort();
139
- writeJsonAtomic(this.nameIndexPath, { names: deduped });
140
- }
141
- trackSecretName(name) {
142
- const index = this.loadNameIndex();
143
- if (!index.names.includes(name)) {
144
- index.names.push(name);
145
- this.saveNameIndex(index);
146
- }
165
+ storePath;
166
+ keyPath;
167
+ constructor(storePath = getSecretsStorePath(), keyPath = getSecretsKeyPath()) {
168
+ this.storePath = storePath;
169
+ this.keyPath = keyPath;
147
170
  }
148
- untrackSecretName(name) {
149
- const index = this.loadNameIndex();
150
- index.names = index.names.filter((entry) => entry !== name);
151
- this.saveNameIndex(index);
171
+ readStore() {
172
+ const data = readSecretsData(this.storePath, this.keyPath);
173
+ return data?.secrets ?? null;
174
+ }
175
+ recoverCorruptStore() {
176
+ try {
177
+ if (fs2.existsSync(this.storePath)) {
178
+ fs2.renameSync(this.storePath, `${this.storePath}.corrupt-${Date.now()}`);
179
+ }
180
+ } catch {}
152
181
  }
153
182
  listSecretNames() {
154
- return this.loadNameIndex().names;
183
+ return Object.keys(this.readStore() ?? {}).sort();
155
184
  }
156
185
  setSecret(name, value) {
157
- if (keytarSync) {
158
- keytarSync.setPassword(this.service, name, value);
159
- } else {
160
- throw new Error("Secret storage is unavailable: keytar native addon failed to load. " + "Install libsecret (Linux) or ensure Xcode CLI tools (macOS), then reinstall dependencies.");
186
+ let map = this.readStore();
187
+ if (map === null) {
188
+ this.recoverCorruptStore();
189
+ map = {};
161
190
  }
162
- this.trackSecretName(name);
191
+ map[name] = value;
192
+ const envelope = buildEnvelope(this.keyPath, { secrets: map });
193
+ writeJsonAtomic(this.storePath, envelope);
163
194
  }
164
195
  removeSecret(name) {
165
- if (keytarSync) {
166
- try {
167
- keytarSync.deletePassword(this.service, name);
168
- } catch {}
169
- }
170
- this.untrackSecretName(name);
196
+ const map = this.readStore() ?? {};
197
+ delete map[name];
198
+ const envelope = buildEnvelope(this.keyPath, { secrets: map });
199
+ writeJsonAtomic(this.storePath, envelope);
171
200
  }
172
201
  getSecret(name) {
173
202
  const envOverride = process.env[`MCPX_SECRET_${name}`];
174
- if (envOverride && envOverride.length > 0) {
203
+ if (envOverride && envOverride.length > 0)
175
204
  return envOverride;
176
- }
177
- if (!keytarSync) {
178
- return null;
179
- }
180
- try {
181
- const value = keytarSync.getPassword(this.service, name);
182
- if (typeof value === "string" && value.length > 0) {
183
- return value;
184
- }
185
- return null;
186
- } catch {
187
- return null;
188
- }
205
+ return (this.readStore() ?? {})[name] ?? null;
189
206
  }
190
207
  resolveMaybeSecret(value) {
191
208
  const secretName = parseSecretRef(value);
192
- if (!secretName) {
209
+ if (!secretName)
193
210
  return value;
194
- }
195
211
  const secret = this.getSecret(secretName);
196
- if (!secret) {
212
+ if (!secret)
197
213
  throw new Error(`Secret not found: ${secretName}`);
198
- }
199
214
  return secret;
200
215
  }
201
216
  rotateLocalToken(secretName = "local_gateway_token") {
@@ -29,8 +29,11 @@ function getSkillsDir() {
29
29
  function getManagedIndexPath() {
30
30
  return path.join(getDataRoot(), "mcpx", "managed-index.json");
31
31
  }
32
- function getSecretNamesPath() {
33
- return path.join(getDataRoot(), "mcpx", "secret-names.json");
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, getSecretNamesPath, getPidPath, getLogPath, getGatewayTokenPath, getUpdatesDir, getStagedVersionPath, getUpdateLockPath, ensureDir, ensureParentDir, findProjectConfigPath, readJsonFile, writeJsonAtomic, sha256 };
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":";AAo2DA,wBAAsB,MAAM,CAAC,IAAI,WAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAmE/D"}
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-wcxyqz7g.js";
41
+ } from "./cli-039cpsb5.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-0ztrmp65.js";
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-ma89vavk.js";
59
+ } from "./cli-gtf6cpsx.js";
60
60
  import {
61
61
  getConfigPath,
62
- getManagedIndexPath
63
- } from "./cli-08mgt3c8.js";
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
- const keytar = __require(path.join(__dirname, "..", "node_modules", "keytar", "lib", "keytar.js"));
1963
- try {
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
- if (process.platform === "linux") {
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-p8tjffpa.js");
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-b3cetq7x.js");
2319
+ const { registerProject: registerProject2 } = await import("./registry-ae9sqbyf.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-b3cetq7x.js");
2350
+ const { unregisterProject: unregisterProject2 } = await import("./registry-ae9sqbyf.js");
2362
2351
  unregisterProject2(globalConfig, resolvedPath);
2363
2352
  saveConfig(globalConfig);
2364
2353
  process.stdout.write(`Unregistered project "${entry.name}" (${resolvedPath}) from the global configuration.
@@ -6,8 +6,8 @@ import {
6
6
  resolveActiveConfig,
7
7
  saveConfig,
8
8
  saveProjectConfig
9
- } from "./cli-0ztrmp65.js";
10
- import"./cli-08mgt3c8.js";
9
+ } from "./cli-bq7zsrv6.js";
10
+ import"./cli-zbbeadz8.js";
11
11
  import"./cli-s4gspqdf.js";
12
12
  export {
13
13
  saveProjectConfig,
@@ -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";
@@ -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,C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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"}
@@ -41,7 +41,7 @@ import {
41
41
  stopDaemon,
42
42
  syncAllClients,
43
43
  toSecretRef
44
- } from "../cli-wcxyqz7g.js";
44
+ } from "../cli-039cpsb5.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-0ztrmp65.js";
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-ma89vavk.js";
65
+ } from "../cli-gtf6cpsx.js";
66
66
  import {
67
67
  getConfigPath,
68
68
  getManagedIndexPath
69
- } from "../cli-08mgt3c8.js";
69
+ } from "../cli-zbbeadz8.js";
70
70
  import"../cli-s4gspqdf.js";
71
71
  export {
72
72
  updateServer,
@@ -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 declare function runOAuthLogin(serverName: string, spec: HttpServerSpec, secrets: SecretsManager, openUrl: (url: string) => void | Promise<void>, configPath?: string): Promise<{
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
  }>;
@@ -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,EAAE,MAAM,cAAc,CAAC;AA6B9C,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAK9D;AAkMD,wBAAsB,aAAa,CACjC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EAC9C,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,IAAI,CAAA;CAAE,CAAC,CAiCnD;AAED,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,cAAc,EACvB,OAAO,GAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAO,GACvC,OAAO,CAAC,MAAM,CAAC,CAiCjB"}
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,EAAE,MAAM,cAAc,CAAC;AA6B9C,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAK9D;AAoOD,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7E;AAED,wBAAsB,aAAa,CACjC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EAC9C,UAAU,CAAC,EAAE,MAAM,EACnB,YAAY,CAAC,EAAE,iBAAiB,GAC/B,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,IAAI,CAAA;CAAE,CAAC,CAkDnD;AAED,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,cAAc,EACvB,OAAO,GAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAO,GACvC,OAAO,CAAC,MAAM,CAAC,CAiCjB"}
@@ -5,7 +5,8 @@ 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 getSecretNamesPath(): string;
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;
@@ -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,kBAAkB,IAAI,MAAM,CAE3C;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE/C;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAEtD;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,SAAgB,GAAG,MAAM,GAAG,IAAI,CAc7E;AAED,wBAAgB,eAAe,CAAC,QAAQ,SAAgB,GAAG,MAAM,GAAG,IAAI,CAGvE"}
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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gB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,UAAQ,GAAG,IAAI,CAMlF;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAQ7F;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAUzF;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAMpE;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,GAAG,MAAM,CAyBtF;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,GAAG,MAAM,CAStF;AAED,wBAAgB,eAAe,CAAC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAUlG;AAED,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAIrF"}
@@ -1,11 +1,9 @@
1
1
  export declare class SecretsManager {
2
- private readonly service;
3
- private readonly nameIndexPath;
4
- constructor(service?: string, nameIndexPath?: string);
5
- private loadNameIndex;
6
- private saveNameIndex;
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":"AAqCA,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAA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AAE,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"}
@@ -9,8 +9,8 @@ import {
9
9
  unregisterProject,
10
10
  updateServer,
11
11
  validateServerName
12
- } from "./cli-ma89vavk.js";
13
- import"./cli-08mgt3c8.js";
12
+ } from "./cli-gtf6cpsx.js";
13
+ import"./cli-zbbeadz8.js";
14
14
  import"./cli-s4gspqdf.js";
15
15
  export {
16
16
  validateServerName,
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const APP_VERSION = "0.1.80";
1
+ export declare const APP_VERSION = "0.1.83";
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.80",
3
+ "version": "0.1.83",
4
4
  "description": "HTTP-first MCP gateway and cross-client installer",
5
5
  "keywords": [
6
6
  "mcp",
@@ -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": {