chore: upgrade Effect to rc.118 (#50231)

This commit is contained in:
Kit Langton
2026-10-09 01:36:06 -07:00
committed by GitHub
Unverified
parent c50e39b72b
commit 1aae67e853
411 changed files with 5756 additions and 2161 deletions
+9 -5
View File
@@ -9,7 +9,8 @@ import { AppProcess } from "@opencode/util/process"
import { randomBytes, randomUUID } from "node:crypto"
import { Effect, Option, Redacted, Schema } from "effect"
import { PersistentPty } from "@opencode/schema/persistent-pty"
import { HttpServer } from "effect/unstable/http"
import { HttpServer } from "effect/http"
import { NetAddress } from "effect/net"
import { Env } from "./env"
import { ServiceConfig } from "./services/service-config"
import { RetainedImage } from "./services/retained-image"
@@ -173,14 +174,17 @@ const processEffect = Effect.fnUntraced(function* (options: Options) {
}),
)
if (server === undefined) return
if (serviceOptions !== undefined && config.remote !== undefined && server.address._tag === "TcpAddress") {
const bound = server.address.hostname
if (serviceOptions !== undefined && config.remote !== undefined && NetAddress.isInetAddress(server.address)) {
const bound = NetAddress.formatIp(server.address.address)
// A wildcard bind also listens on loopback, which is all the tunnel needs to reach.
const host = bound === "0.0.0.0" || bound === "::" ? "127.0.0.1" : bound.includes(":") ? `[${bound}]` : bound
const target =
bound === "0.0.0.0" || bound === "::"
? `127.0.0.1:${server.address.port}`
: NetAddress.formatInet(server.address)
yield* Effect.forkScoped(
RemoteTunnel.run({
route: config.remote.route,
target: `${host}:${server.address.port}`,
target,
onURL: (url) => {
remote.urls = url === undefined ? [] : [url]
},