troxy-cli 1.29.31 → 1.29.32
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/install-mod.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "troxy-cli",
|
|
3
|
-
"version": "1.29.
|
|
3
|
+
"version": "1.29.32",
|
|
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/install-mod.js
CHANGED
|
@@ -18,17 +18,17 @@ export async function installTroxySavingsModToClaudeCode() {
|
|
|
18
18
|
try {
|
|
19
19
|
const settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8'));
|
|
20
20
|
|
|
21
|
-
// Add
|
|
21
|
+
// Add MessageDisplay hook to show usage bar after each response
|
|
22
22
|
if (!settings.hooks) settings.hooks = {};
|
|
23
|
-
if (!settings.hooks.
|
|
23
|
+
if (!settings.hooks.MessageDisplay) settings.hooks.MessageDisplay = [];
|
|
24
24
|
|
|
25
25
|
// Check if already installed
|
|
26
|
-
const alreadyInstalled = settings.hooks.
|
|
26
|
+
const alreadyInstalled = settings.hooks.MessageDisplay.some(h =>
|
|
27
27
|
h.hooks?.[0]?.command?.includes('troxy usage-bar')
|
|
28
28
|
);
|
|
29
29
|
|
|
30
30
|
if (!alreadyInstalled) {
|
|
31
|
-
settings.hooks.
|
|
31
|
+
settings.hooks.MessageDisplay.push({
|
|
32
32
|
matcher: '*',
|
|
33
33
|
hooks: [
|
|
34
34
|
{
|