@claw-link/gateway-host 0.3.13 → 0.3.14
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/config.js +10 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claw-link/gateway-host",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.14",
|
|
4
4
|
"description": "ClawLink Host Gateway — a secure, outbound-only worker that bridges a local agent CLI (OpenClaw, Hermes, Claude, Codex, Cursor) to your ClawLink agents. No inbound ports; authenticated per-agent by a Host Token.",
|
|
5
5
|
"homepage": "https://claw-link.co",
|
|
6
6
|
"bin": {
|
package/src/config.js
CHANGED
|
@@ -15,7 +15,7 @@ const CONFIG_PATH = path.join(HOME_DIR, 'config.json');
|
|
|
15
15
|
// only ever paste a Host Token. Override only for a self-hosted ClawLink (env var).
|
|
16
16
|
const DEFAULT_BRIDGE_URL =
|
|
17
17
|
process.env.CLAWLINK_BRIDGE_URL ||
|
|
18
|
-
'https://
|
|
18
|
+
'https://npenvdghczcfvfvwrtwx.supabase.co/functions/v1/host-bridge';
|
|
19
19
|
|
|
20
20
|
// Runtimes whose CLI runs inside a project WORKSPACE directory (coding agents).
|
|
21
21
|
// OpenClaw (HTTP) and Hermes (~/.hermes context) don't need one.
|
|
@@ -52,7 +52,15 @@ function defaultConfig() {
|
|
|
52
52
|
function load() {
|
|
53
53
|
if (!fs.existsSync(CONFIG_PATH)) return null;
|
|
54
54
|
const raw = fs.readFileSync(CONFIG_PATH, 'utf8');
|
|
55
|
-
|
|
55
|
+
const cfg = JSON.parse(raw);
|
|
56
|
+
// One-time migration: the original Supabase project (rgzinqbdnesinmbshgtc) was retired after a
|
|
57
|
+
// quota exhaustion — repoint any stored bridge URL at the current instance automatically so
|
|
58
|
+
// existing installs recover on their next start/update without manual config edits.
|
|
59
|
+
if (cfg && typeof cfg.bridge_url === 'string' && cfg.bridge_url.includes('rgzinqbdnesinmbshgtc') && !process.env.CLAWLINK_BRIDGE_URL) {
|
|
60
|
+
cfg.bridge_url = DEFAULT_BRIDGE_URL;
|
|
61
|
+
try { save(cfg); } catch { /* best effort — corrected in memory regardless */ }
|
|
62
|
+
}
|
|
63
|
+
return cfg;
|
|
56
64
|
}
|
|
57
65
|
|
|
58
66
|
function save(cfg) {
|