@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.
Files changed (39) hide show
  1. package/dist/{cli-28g7x9rn.js → cli-6wh8qx2y.js} +9 -3
  2. package/dist/{cli-dy7x0zrg.js → cli-6zq2fd6h.js} +1 -1
  3. package/dist/{cli-b0xrqsjc.js → cli-9k3wmag6.js} +286 -363
  4. package/dist/{cli-ct7asw78.js → cli-aawpvhhe.js} +13 -10
  5. package/dist/{cli-1ewrsfj4.js → cli-hh7rthhx.js} +4 -1
  6. package/dist/{cli-etmrz2c4.js → cli-qzzjkt0q.js} +1120 -715
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +352 -88
  9. package/dist/{config-yx5m60fv.js → config-fbgyqmv1.js} +2 -2
  10. package/dist/core/auth-probe.d.ts +6 -1
  11. package/dist/core/auth-probe.d.ts.map +1 -1
  12. package/dist/core/daemon.d.ts.map +1 -1
  13. package/dist/core/identifiers.d.ts +3 -0
  14. package/dist/core/identifiers.d.ts.map +1 -0
  15. package/dist/core/index.d.ts +2 -2
  16. package/dist/core/index.d.ts.map +1 -1
  17. package/dist/core/index.js +22 -6
  18. package/dist/core/marketplace.d.ts.map +1 -1
  19. package/dist/core/oauth.d.ts +77 -2
  20. package/dist/core/oauth.d.ts.map +1 -1
  21. package/dist/core/paths.d.ts +1 -0
  22. package/dist/core/paths.d.ts.map +1 -1
  23. package/dist/core/plugin-cache.d.ts.map +1 -1
  24. package/dist/core/plugin-host.d.ts.map +1 -1
  25. package/dist/core/plugin-lifecycle.d.ts.map +1 -1
  26. package/dist/core/plugin-manager.d.ts.map +1 -1
  27. package/dist/core/plugin-parse.d.ts.map +1 -1
  28. package/dist/core/plugin-projections.d.ts.map +1 -1
  29. package/dist/core/plugin-source.d.ts.map +1 -1
  30. package/dist/core/secrets.d.ts.map +1 -1
  31. package/dist/core/skill-projections.d.ts.map +1 -1
  32. package/dist/core/skills.d.ts.map +1 -1
  33. package/dist/core/update-manager.d.ts.map +1 -1
  34. package/dist/gateway/server.d.ts.map +1 -1
  35. package/dist/{marketplace-pwabb3ea.js → marketplace-zem0m4mw.js} +5 -5
  36. package/dist/{plugin-host-9xcpnehq.js → plugin-host-5jmyt0td.js} +13 -39
  37. package/dist/{plugin-manager-19q55n69.js → plugin-manager-rw05c2x3.js} +4 -4
  38. package/dist/{registry-yvbxcaq6.js → registry-04kfpjh0.js} +2 -2
  39. 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 crypto from "node:crypto";
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 crypto.createHash("sha256").update(value).digest("hex");
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 };
@@ -3,7 +3,7 @@ import {
3
3
  getConfigPath,
4
4
  readJsonFile,
5
5
  writeJsonAtomic
6
- } from "./cli-28g7x9rn.js";
6
+ } from "./cli-6wh8qx2y.js";
7
7
  import {
8
8
  normalizeServerSpecEnabled
9
9
  } from "./cli-s4gspqdf.js";