@toolplex/client 0.1.38 → 0.1.39

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.
@@ -50,6 +50,9 @@ function extractPrivateRegistryScope(args) {
50
50
  * - username: the scope without @ (e.g., "tp-user-abc123def45")
51
51
  * - password: the ToolPlex API key (tp_live_xxx or tp_test_xxx)
52
52
  *
53
+ * IMPORTANT: We also clear _authToken to override any expired tokens in the
54
+ * user's ~/.npmrc. This ensures our injected basic auth takes precedence.
55
+ *
53
56
  * @param scope - The scope without @ (e.g., "tp-user-abc123def45")
54
57
  * @param apiKey - The ToolPlex API key
55
58
  */
@@ -66,14 +69,24 @@ function getPrivateRegistryEnv(scope, apiKey) {
66
69
  // Set Basic auth for the registry
67
70
  // npm_config_//host/:_auth maps to //host/:_auth in .npmrc
68
71
  "npm_config_//registry.toolplex.ai/:_auth": auth,
72
+ // Clear any existing _authToken from user's ~/.npmrc to prevent expired tokens
73
+ // from taking precedence over our injected basic auth
74
+ "npm_config_//registry.toolplex.ai/:_authToken": "",
69
75
  };
70
76
  }
71
77
  /**
72
78
  * Get additional args to prepend for private registry packages.
73
79
  * Uses --registry flag which is more reliable than env vars with special chars.
80
+ *
81
+ * IMPORTANT: We use --userconfig=/dev/null to completely ignore the user's ~/.npmrc.
82
+ * This prevents expired tokens in ~/.npmrc from interfering with our injected basic auth.
74
83
  */
75
84
  function getPrivateRegistryArgs() {
76
- return [`--registry=${PRIVATE_REGISTRY_URL}`];
85
+ return [
86
+ `--registry=${PRIVATE_REGISTRY_URL}`,
87
+ // Ignore user's ~/.npmrc to prevent expired _authToken from taking precedence
88
+ `--userconfig=/dev/null`,
89
+ ];
77
90
  }
78
91
  export class ServerManager {
79
92
  constructor() {
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.1.38";
1
+ export declare const version = "0.1.39";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '0.1.38';
1
+ export const version = '0.1.39';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolplex/client",
3
- "version": "0.1.38",
3
+ "version": "0.1.39",
4
4
  "author": "ToolPlex LLC",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "description": "The official ToolPlex client for AI agent tool discovery and execution",