Spaces:
Running
Running
Improve Jupyter security, gateway configurability
Browse files- start.sh +1 -0
- wa-guardian.js +2 -1
start.sh
CHANGED
|
@@ -739,6 +739,7 @@ if [ -f "$EXISTING_CONFIG" ]; then
|
|
| 739 |
'(.channels.whatsapp // {}) as $existingWhatsapp
|
| 740 |
| .gateway.auth.token = $token
|
| 741 |
| .agents.defaults.model = $model
|
|
|
|
| 742 |
| if $fileLogConfigured then .logging.level = $fileLevel else . end
|
| 743 |
| if $consoleLogConfigured then .logging.consoleLevel = $consoleLevel else . end
|
| 744 |
| if $consoleStyleConfigured then .logging.consoleStyle = $consoleStyle else . end
|
|
|
|
| 739 |
'(.channels.whatsapp // {}) as $existingWhatsapp
|
| 740 |
| .gateway.auth.token = $token
|
| 741 |
| .agents.defaults.model = $model
|
| 742 |
+
| .gateway.port = ($desired.gateway.port // .gateway.port)
|
| 743 |
| if $fileLogConfigured then .logging.level = $fileLevel else . end
|
| 744 |
| if $consoleLogConfigured then .logging.consoleLevel = $consoleLevel else . end
|
| 745 |
| if $consoleStyleConfigured then .logging.consoleStyle = $consoleStyle else . end
|
wa-guardian.js
CHANGED
|
@@ -17,7 +17,8 @@ try {
|
|
| 17 |
}
|
| 18 |
const { randomUUID } = require('node:crypto');
|
| 19 |
|
| 20 |
-
const
|
|
|
|
| 21 |
const GATEWAY_TOKEN = process.env.GATEWAY_TOKEN || "huggingclaw";
|
| 22 |
const WHATSAPP_ENABLED = /^true$/i.test(process.env.WHATSAPP_ENABLED || "");
|
| 23 |
const CHECK_INTERVAL = 30000;
|
|
|
|
| 17 |
}
|
| 18 |
const { randomUUID } = require('node:crypto');
|
| 19 |
|
| 20 |
+
const GATEWAY_PORT = Number.parseInt(process.env.GATEWAY_PORT || "7860", 10);
|
| 21 |
+
const GATEWAY_URL = `ws://127.0.0.1:${GATEWAY_PORT}`;
|
| 22 |
const GATEWAY_TOKEN = process.env.GATEWAY_TOKEN || "huggingclaw";
|
| 23 |
const WHATSAPP_ENABLED = /^true$/i.test(process.env.WHATSAPP_ENABLED || "");
|
| 24 |
const CHECK_INTERVAL = 30000;
|