From 59f62f6405f24cfc4fcb343157a21690661ba048 Mon Sep 17 00:00:00 2001 From: 0x5487 Date: Thu, 19 Feb 2026 13:54:06 +0800 Subject: [PATCH] chore: revert other PR content from this branch --- README.ja.md | 4 ---- README.md | 4 ---- README.pt-br.md | 4 ---- README.zh.md | 4 ---- config/config.example.json | 2 +- pkg/config/config.go | 2 +- pkg/config/config_test.go | 4 ++-- 7 files changed, 4 insertions(+), 20 deletions(-) diff --git a/README.ja.md b/README.ja.md index 70ba458e9..7da16565f 100644 --- a/README.ja.md +++ b/README.ja.md @@ -133,10 +133,6 @@ vim config/config.json # DISCORD_BOT_TOKEN, プロバイダーの API キ # 3. ビルドと起動 docker compose --profile gateway up -d -> [!TIP] -> **Docker ユーザー**: デフォルトでは、Gateway は `127.0.0.1` でリッスンしており、ホストからアクセスできません。ヘルスチェックエンドポイントにアクセスしたり、ポートを公開したりする必要がある場合は、環境変数で `PICOCLAW_GATEWAY_HOST=0.0.0.0` を設定するか、`config.json` を更新してください。 - - # 4. ログ確認 docker compose logs -f picoclaw-gateway diff --git a/README.md b/README.md index 01c81b20b..d6a3d5696 100644 --- a/README.md +++ b/README.md @@ -165,10 +165,6 @@ vim config/config.json # Set DISCORD_BOT_TOKEN, API keys, etc. # 3. Build & Start docker compose --profile gateway up -d -> [!TIP] -> **Docker Users**: By default, the Gateway listens on `127.0.0.1` which is not accessible from the host. If you need to access the health endpoints or expose ports, set `PICOCLAW_GATEWAY_HOST=0.0.0.0` in your environment or update `config.json`. - - # 4. Check logs docker compose logs -f picoclaw-gateway diff --git a/README.pt-br.md b/README.pt-br.md index 171a6557b..fa73465dd 100644 --- a/README.pt-br.md +++ b/README.pt-br.md @@ -172,10 +172,6 @@ vim config/config.json # Configure DISCORD_BOT_TOKEN, API keys, etc. # 3. Build & Iniciar docker compose --profile gateway up -d -> [!TIP] -> **Usuários Docker**: Por padrão, o Gateway ouve em `127.0.0.1`, o que não é acessível a partir do host. Se você precisar acessar os endpoints de integridade ou expor portas, defina `PICOCLAW_GATEWAY_HOST=0.0.0.0` em seu ambiente ou atualize o `config.json`. - - # 4. Ver logs docker compose logs -f picoclaw-gateway diff --git a/README.zh.md b/README.zh.md index 434805f93..f751a5a97 100644 --- a/README.zh.md +++ b/README.zh.md @@ -170,10 +170,6 @@ vim config/config.json # 设置 DISCORD_BOT_TOKEN, API keys 等 # 3. 構建並啟動 docker compose --profile gateway up -d -> [!TIP] -> **Docker 用戶**: 預設情況下,Gateway 監聽 `127.0.0.1`,這在容器內無法從外部訪問。如果您需要透過端口映射訪問健康檢查接口,請在環境變量中設置 `PICOCLAW_GATEWAY_HOST=0.0.0.0` 或修改 `config.json`。 - - # 4. 查看日志 docker compose logs -f picoclaw-gateway diff --git a/config/config.example.json b/config/config.example.json index 07f052a98..37c2bcd81 100644 --- a/config/config.example.json +++ b/config/config.example.json @@ -142,7 +142,7 @@ "monitor_usb": true }, "gateway": { - "host": "127.0.0.1", + "host": "0.0.0.0", "port": 18790 } } diff --git a/pkg/config/config.go b/pkg/config/config.go index 0e68a053f..682996bd6 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -413,7 +413,7 @@ func DefaultConfig() *Config { ShengSuanYun: ProviderConfig{}, }, Gateway: GatewayConfig{ - Host: "127.0.0.1", + Host: "0.0.0.0", Port: 18790, }, Tools: ToolsConfig{ diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index b4a39cc8b..47916d155 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -246,7 +246,7 @@ func TestDefaultConfig_Temperature(t *testing.T) { func TestDefaultConfig_Gateway(t *testing.T) { cfg := DefaultConfig() - if cfg.Gateway.Host != "127.0.0.1" { + if cfg.Gateway.Host != "0.0.0.0" { t.Error("Gateway host should have default value") } if cfg.Gateway.Port == 0 { @@ -343,7 +343,7 @@ func TestConfig_Complete(t *testing.T) { if cfg.Agents.Defaults.MaxToolIterations == 0 { t.Error("MaxToolIterations should not be zero") } - if cfg.Gateway.Host != "127.0.0.1" { + if cfg.Gateway.Host != "0.0.0.0" { t.Error("Gateway host should have default value") } if cfg.Gateway.Port == 0 {