Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Platform releases use `vX.Y.Z` tags and publish `ghcr.io/tencent/loopforge`. Loo

- On macOS `/bin/bash` 3.2, a missing local image or a failed automatic mirror pull no longer aborts `./start.sh` before the official image pull.
- `./start.sh` and `./start.sh pull` time `ghcr.io` and `ghcr.nju.edu.cn`. Nanjing is used only when the ghcr.io manifest digest was verified and the mirror returned the same digest; the pull is that digest, then tagged back to the name pinned in `compose.yaml`. A missing official digest, a digest mismatch, or a failed mirror pull stays on `ghcr.io`. `MIRROR=ghcr.io` forces the upstream registry; `MIRROR=<host>` still forces that host and does not fall back. Accepting Nanjing, or setting `MIRROR`, trusts that host. The choice is not saved in `.env`. `registry-mirrors` such as `https://docker.nju.edu.cn` only accelerates Docker Hub.
- Docker sandboxes always get `--add-host host.docker.internal:host-gateway`. A native install hands every sandbox an `AGENTFLOW_SESSION_GATEWAY` URL on `host.docker.internal`, but the mapping was only added for conversation and runner-login containers, so `git credential fill` in an SOP run sandbox failed with `lookup host.docker.internal ... no such host` and the 发起 MR agent had to rediscover the docker bridge gateway on every run. The mapping now applies to all sandboxes.

## 0.4.0 — scheduled task history, an MR node in delivery SOPs and agent CLIs in conversation workspaces

Expand Down
4 changes: 2 additions & 2 deletions internal/runtime/docker_cases_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ func TestDockerSandboxUsesRelayNetworkOnlyWhenRequested(t *testing.T) {
t.Fatalf("docker create used the wrong network: %s", args)
}
usesGateway := strings.Contains(args, "\n--add-host\nhost.docker.internal:host-gateway\n")
if usesGateway != (tc.conversation || tc.runnerLoginRelay) {
t.Fatalf("docker create host gateway = %v for %s", usesGateway, tc.name)
if !usesGateway {
t.Fatalf("docker create missing host gateway mapping for %s: %s", tc.name, args)
}
})
}
Expand Down
6 changes: 5 additions & 1 deletion internal/runtime/sandbox_docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,11 @@ func (s *dockerSandbox) start(ctx context.Context, recreate bool) error {
}
}
network := strings.TrimSpace(os.Getenv("AGENTFLOW_DOCKER_NETWORK"))
// Sandboxes reach a native platform through the host-gateway alias:
// AGENTFLOW_SESSION_GATEWAY hands them a host.docker.internal URL, and
// Linux daemons only resolve that name when the container carries the
// mapping. Add it for every sandbox, not only conversation relays.
args = append(args, "--add-host", "host.docker.internal:host-gateway")
if s.requirements.ConversationRoot != "" || s.requirements.RunnerLoginRelay {
_, relayNetwork, err := conversationDockerAccess(ctx)
if err != nil {
Expand All @@ -774,7 +779,6 @@ func (s *dockerSandbox) start(ctx context.Context, recreate bool) error {
if relayNetwork != "" {
network = relayNetwork
}
args = append(args, "--add-host", "host.docker.internal:host-gateway")
}
if network != "" {
args = append(args, "--network", network)
Expand Down