@kwonye/mcpx 0.1.100 → 0.1.101
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-28g7x9rn.js → cli-6wh8qx2y.js} +9 -3
- package/dist/{cli-dy7x0zrg.js → cli-6zq2fd6h.js} +1 -1
- package/dist/{cli-b0xrqsjc.js → cli-9k3wmag6.js} +286 -363
- package/dist/{cli-ct7asw78.js → cli-aawpvhhe.js} +13 -10
- package/dist/{cli-1ewrsfj4.js → cli-hh7rthhx.js} +4 -1
- package/dist/{cli-etmrz2c4.js → cli-qzzjkt0q.js} +1120 -715
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +352 -88
- package/dist/{config-yx5m60fv.js → config-fbgyqmv1.js} +2 -2
- package/dist/core/auth-probe.d.ts +6 -1
- package/dist/core/auth-probe.d.ts.map +1 -1
- package/dist/core/daemon.d.ts.map +1 -1
- package/dist/core/identifiers.d.ts +3 -0
- package/dist/core/identifiers.d.ts.map +1 -0
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +22 -6
- package/dist/core/marketplace.d.ts.map +1 -1
- package/dist/core/oauth.d.ts +77 -2
- package/dist/core/oauth.d.ts.map +1 -1
- package/dist/core/paths.d.ts +1 -0
- package/dist/core/paths.d.ts.map +1 -1
- package/dist/core/plugin-cache.d.ts.map +1 -1
- package/dist/core/plugin-host.d.ts.map +1 -1
- package/dist/core/plugin-lifecycle.d.ts.map +1 -1
- package/dist/core/plugin-manager.d.ts.map +1 -1
- package/dist/core/plugin-parse.d.ts.map +1 -1
- package/dist/core/plugin-projections.d.ts.map +1 -1
- package/dist/core/plugin-source.d.ts.map +1 -1
- package/dist/core/secrets.d.ts.map +1 -1
- package/dist/core/skill-projections.d.ts.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/update-manager.d.ts.map +1 -1
- package/dist/gateway/server.d.ts.map +1 -1
- package/dist/{marketplace-pwabb3ea.js → marketplace-zem0m4mw.js} +5 -5
- package/dist/{plugin-host-9xcpnehq.js → plugin-host-5jmyt0td.js} +13 -39
- package/dist/{plugin-manager-19q55n69.js → plugin-manager-rw05c2x3.js} +4 -4
- package/dist/{registry-yvbxcaq6.js → registry-04kfpjh0.js} +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// src/core/paths.ts
|
|
2
|
+
import crypto from "node:crypto";
|
|
2
3
|
import os from "node:os";
|
|
3
4
|
import path from "node:path";
|
|
4
5
|
import fs from "node:fs";
|
|
@@ -59,6 +60,11 @@ function getStagedVersionPath() {
|
|
|
59
60
|
function getUpdateLockPath() {
|
|
60
61
|
return path.join(getUpdatesDir(), ".update.lock");
|
|
61
62
|
}
|
|
63
|
+
function getOAuthLockPath(serverName) {
|
|
64
|
+
const safeName = serverName.toLowerCase().replace(/[^a-z0-9._-]/g, "_").slice(0, 32);
|
|
65
|
+
const hash = crypto.createHash("sha256").update(serverName).digest("hex").slice(0, 12);
|
|
66
|
+
return path.join(getRuntimeDir(), `oauth-${safeName}-${hash}.lock`);
|
|
67
|
+
}
|
|
62
68
|
function getPluginCacheRoot() {
|
|
63
69
|
return path.join(getDataRoot(), "mcpx", "plugins", "cache");
|
|
64
70
|
}
|
|
@@ -99,7 +105,7 @@ function findProjectConfigPath(startDir = process.cwd()) {
|
|
|
99
105
|
// src/util/fs.ts
|
|
100
106
|
import fs2 from "node:fs";
|
|
101
107
|
import path2 from "node:path";
|
|
102
|
-
import
|
|
108
|
+
import crypto2 from "node:crypto";
|
|
103
109
|
function readJsonFile(filePath, fallback) {
|
|
104
110
|
if (!fs2.existsSync(filePath)) {
|
|
105
111
|
return fallback;
|
|
@@ -120,7 +126,7 @@ function writeJsonAtomic(filePath, data) {
|
|
|
120
126
|
fs2.renameSync(tempPath, filePath);
|
|
121
127
|
}
|
|
122
128
|
function sha256(value) {
|
|
123
|
-
return
|
|
129
|
+
return crypto2.createHash("sha256").update(value).digest("hex");
|
|
124
130
|
}
|
|
125
131
|
|
|
126
|
-
export { homeDir, getConfigPath, getSkillsDir, getManagedIndexPath, getSecretsStorePath, getSecretsKeyPath, getPidPath, getLogPath, getGatewayTokenPath, getUpdatesDir, getStagedVersionPath, getUpdateLockPath, getPluginCacheRoot, getPluginDataRoot, getMarketplaceCacheRoot, getMarketplaceUpdateStatePath, getMarketplaceUpdateLockPath, ensureDir, ensureParentDir, findProjectConfigPath, readJsonFile, writeJsonAtomic, sha256 };
|
|
132
|
+
export { homeDir, getConfigPath, getSkillsDir, getManagedIndexPath, getSecretsStorePath, getSecretsKeyPath, getPidPath, getLogPath, getGatewayTokenPath, getUpdatesDir, getStagedVersionPath, getUpdateLockPath, getOAuthLockPath, getPluginCacheRoot, getPluginDataRoot, getMarketplaceCacheRoot, getMarketplaceUpdateStatePath, getMarketplaceUpdateLockPath, ensureDir, ensureParentDir, findProjectConfigPath, readJsonFile, writeJsonAtomic, sha256 };
|