troxy-cli 1.29.20 → 1.29.21
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/package.json +1 -1
- package/src/init.js +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "troxy-cli",
|
|
3
|
-
"version": "1.29.
|
|
3
|
+
"version": "1.29.21",
|
|
4
4
|
"description": "A secure control layer for AI agents: policies across payments, messages, logins, destructive actions, model usage, and secrets, all enforceable from the CLI",
|
|
5
5
|
"homepage": "https://troxy.io",
|
|
6
6
|
"bugs": {
|
package/src/init.js
CHANGED
|
@@ -115,10 +115,12 @@ export async function reprovisionKeyConsumers(key, agentName, proxyOptIn = null,
|
|
|
115
115
|
const entry = JSON.stringify({ command: 'npx', args: ['troxy-cli', 'mcp'], env: { TROXY_API_KEY: key } });
|
|
116
116
|
// execFileSync passes args directly to the process (no shell), so the
|
|
117
117
|
// key can't break out of a quoted string and inject shell commands.
|
|
118
|
-
execFileSync('openclaw', ['mcp', 'set', 'troxy', entry], { stdio: 'ignore' });
|
|
118
|
+
execFileSync('openclaw', ['mcp', 'set', 'troxy', entry], { stdio: ['ignore', 'ignore', 'pipe'] });
|
|
119
119
|
console.log(` • OpenClaw ✓`);
|
|
120
120
|
} catch (err) {
|
|
121
|
-
|
|
121
|
+
// err.message embeds the full argv, key included: never print it.
|
|
122
|
+
const reason = err.stderr?.toString().trim().split('\n').pop() || `exit code ${err.status}`;
|
|
123
|
+
console.log(` • OpenClaw ✗ (${reason.replaceAll(key, key.substring(0, 12) + '...')})`);
|
|
122
124
|
}
|
|
123
125
|
}
|
|
124
126
|
// Claude Desktop's Code tab runs the same Claude Code engine under the
|