clawhq-bridge 1.0.1 → 1.0.2
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/bin/clawhq-bridge.js +13 -0
- package/package.json +1 -1
package/bin/clawhq-bridge.js
CHANGED
|
@@ -110,6 +110,12 @@ async function setup(setupCode) {
|
|
|
110
110
|
].join('\n');
|
|
111
111
|
|
|
112
112
|
fs.writeFileSync(path.join(BRIDGE_DIR, '.env'), envContent);
|
|
113
|
+
process.env.CLAWHQ_URL = CLAWHQ_API;
|
|
114
|
+
process.env.ACCESS_TOKEN = creds.accessToken;
|
|
115
|
+
process.env.AGENT_ID = creds.agentId;
|
|
116
|
+
process.env.OPENCLAW_PORT = String(port);
|
|
117
|
+
process.env.OPENCLAW_TOKEN = ocConfig ? ocConfig.token : '';
|
|
118
|
+
process.env.OPENCLAW_SESSION_KEY = sessionKey;
|
|
113
119
|
console.log('✅ Config saved');
|
|
114
120
|
|
|
115
121
|
// 4. Start bridge
|
|
@@ -162,6 +168,13 @@ async function setupWithToken(bridgeToken) {
|
|
|
162
168
|
].join('\n');
|
|
163
169
|
|
|
164
170
|
fs.writeFileSync(path.join(BRIDGE_DIR, '.env'), envContent);
|
|
171
|
+
// Also set in process.env so startBridge picks them up
|
|
172
|
+
process.env.CLAWHQ_URL = CLAWHQ_API;
|
|
173
|
+
process.env.ACCESS_TOKEN = creds.accessToken;
|
|
174
|
+
process.env.AGENT_ID = creds.agentId;
|
|
175
|
+
process.env.OPENCLAW_PORT = String(port);
|
|
176
|
+
process.env.OPENCLAW_TOKEN = ocConfig ? ocConfig.token : '';
|
|
177
|
+
process.env.OPENCLAW_SESSION_KEY = sessionKey;
|
|
165
178
|
console.log('✅ Config saved');
|
|
166
179
|
|
|
167
180
|
console.log('');
|