Skip to content

Commit d547e3b

Browse files
chore(deps): upgrade Effect to rc.115 and Alchemy to beta.78 (#12326)
Co-authored-by: Claude Fable 5 <[email protected]>
1 parent 243e944 commit d547e3b

85 files changed

Lines changed: 1404 additions & 1422 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/desktop/src/app/DesktopConfig.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ const trimNonEmptyOption = (value: string): Option.Option<string> => {
99
};
1010

1111
const trimmedString = (name: string) =>
12-
Config.string(name).pipe(Config.option, Config.map(Option.flatMap(trimNonEmptyOption)));
12+
Config.String(name).pipe(Config.option, Config.map(Option.flatMap(trimNonEmptyOption)));
1313

1414
const optionalBoolean = (name: string) =>
15-
Config.boolean(name).pipe(Config.option, Config.map(Option.getOrElse(() => false)));
15+
Config.Boolean(name).pipe(Config.option, Config.map(Option.getOrElse(() => false)));
1616

1717
const commaSeparatedStrings = (name: string) =>
1818
trimmedString(name).pipe(
@@ -38,15 +38,15 @@ export const DesktopConfig = Config.all({
3838
xdgConfigHome: trimmedString("XDG_CONFIG_HOME"),
3939
xdgDataHome: trimmedString("XDG_DATA_HOME"),
4040
t3Home: trimmedString("T3CODE_HOME"),
41-
devServerUrl: Config.url("VITE_DEV_SERVER_URL").pipe(Config.option),
41+
devServerUrl: Config.URL("VITE_DEV_SERVER_URL").pipe(Config.option),
4242
appUserModelIdOverride: trimmedString("T3CODE_DESKTOP_APP_USER_MODEL_ID"),
4343
devRemoteT3ServerEntryPath: trimmedString("T3CODE_DEV_REMOTE_T3_SERVER_ENTRY_PATH"),
44-
configuredBackendPort: Config.port("T3CODE_PORT").pipe(Config.option),
44+
configuredBackendPort: Config.Port("T3CODE_PORT").pipe(Config.option),
4545
commitHashOverride: trimmedString("T3CODE_COMMIT_HASH"),
4646
desktopLanHostOverride: trimmedString("T3CODE_DESKTOP_LAN_HOST"),
4747
desktopHttpsEndpointUrls: commaSeparatedStrings("T3CODE_DESKTOP_HTTPS_ENDPOINTS"),
4848
otlpTracesUrl: trimmedString("T3CODE_OTLP_TRACES_URL"),
49-
otlpExportIntervalMs: Config.int("T3CODE_OTLP_EXPORT_INTERVAL_MS").pipe(
49+
otlpExportIntervalMs: Config.Int("T3CODE_OTLP_EXPORT_INTERVAL_MS").pipe(
5050
Config.withDefault(10_000),
5151
),
5252
otlpHeaders: Config.schema(OtlpHeadersFromString, "T3CODE_OTLP_HEADERS").pipe(Config.option),
@@ -56,7 +56,7 @@ export const DesktopConfig = Config.all({
5656
appImagePath: trimmedString("APPIMAGE"),
5757
disableAutoUpdate: optionalBoolean("T3CODE_DISABLE_AUTO_UPDATE"),
5858
mockUpdates: optionalBoolean("T3CODE_DESKTOP_MOCK_UPDATES"),
59-
mockUpdateServerPort: Config.port("T3CODE_DESKTOP_MOCK_UPDATE_SERVER_PORT").pipe(
59+
mockUpdateServerPort: Config.Port("T3CODE_DESKTOP_MOCK_UPDATE_SERVER_PORT").pipe(
6060
Config.withDefault(3000),
6161
),
6262
});

‎apps/desktop/src/electron/ElectronProtocol.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import Mime from "@effect/platform-node/Mime";
21
import * as Context from "effect/Context";
32
import * as Effect from "effect/Effect";
43
import * as FileSystem from "effect/FileSystem";
54
import * as Layer from "effect/Layer";
5+
import * as Option from "effect/Option";
66
import * as NodeTimersPromises from "node:timers/promises";
77
import * as Path from "effect/Path";
8+
import * as Mime from "effect/unstable/http/Mime";
89
import * as Ref from "effect/Ref";
910
import * as Schema from "effect/Schema";
1011
import * as Scope from "effect/Scope";
@@ -227,7 +228,9 @@ const serveDesktopAsset = Effect.fn("desktop.protocol.serveAsset")(function* (
227228
const contents = yield* fileSystem.readFile(filePath).pipe(Effect.orElseSucceed(() => null));
228229
if (contents === null) return new Response(null, { status: 404 });
229230
return new Response(request.method === "HEAD" ? null : new Uint8Array(contents), {
230-
headers: { "content-type": Mime.getType(filePath) ?? "application/octet-stream" },
231+
headers: {
232+
"content-type": Option.getOrElse(Mime.getType(filePath), () => "application/octet-stream"),
233+
},
231234
});
232235
});
233236

‎apps/server/integration/NetworkTransferMeasurement.integration.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,9 @@ function countingWsRpcProtocolLayer(input: {
181181
readonly cookie: string;
182182
readonly recorder: WebSocketTransferRecorder;
183183
}) {
184+
// Socket.makeWebSocket only ever passes its `protocols` option here.
184185
const webSocketConstructorLayer = Layer.succeed(Socket.WebSocketConstructor, (url, protocols) =>
185-
input.recorder.connect(url, protocols, input.cookie),
186+
input.recorder.connect(url, protocols as string | string[] | undefined, input.cookie),
186187
);
187188
return RpcClient.layerProtocolSocket().pipe(
188189
Layer.provide(

‎apps/server/integration/orphanedProviderSessionStartup.integration.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import * as Option from "effect/Option";
2121
import * as Stream from "effect/Stream";
2222
import * as SqlClient from "effect/unstable/sql/SqlClient";
2323
import { HttpServer } from "effect/unstable/http";
24+
import * as NetAddress from "effect/unstable/net/NetAddress";
2425

2526
import * as EnvironmentAuth from "../src/auth/EnvironmentAuth.ts";
2627
import * as ServiceLauncherClient from "../src/cloud/serviceLauncherClient.ts";
@@ -104,7 +105,7 @@ const startupDependencies = Layer.mergeAll(
104105
Layer.succeed(
105106
HttpServer.HttpServer,
106107
HttpServer.HttpServer.of({
107-
address: { _tag: "TcpAddress", hostname: "127.0.0.1", port: 3773 },
108+
address: NetAddress.inetAddressFromIpStringUnsafe("127.0.0.1", 3773),
108109
serve: (() => Effect.void) as HttpServer.HttpServer["Service"]["serve"],
109110
}),
110111
),

‎apps/server/package.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"@opencode-ai/sdk": "^1.3.15",
3131
"diff": "8.0.3",
3232
"effect": "catalog:",
33-
"msgpackr-extract": "3.0.4",
3433
"node-pty": "^1.1.0",
3534
"stream-chain": "^4.2.5",
3635
"stream-json": "3.6.0",

‎apps/server/scripts/cli.ts‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const applyDevelopmentIconOverrides = Effect.fn("applyDevelopmentIconOverrides")
7070
const buildCmd = Command.make(
7171
"build",
7272
{
73-
verbose: Flag.boolean("verbose").pipe(Flag.withDefault(false)),
73+
verbose: Flag.Boolean("verbose").pipe(Flag.withDefault(false)),
7474
},
7575
(config) =>
7676
Effect.gen(function* () {
@@ -109,8 +109,8 @@ const buildCmd = Command.make(
109109
const buildExeCmd = Command.make(
110110
"build-exe",
111111
{
112-
verbose: Flag.boolean("verbose").pipe(Flag.withDefault(false)),
113-
target: Flag.string("target").pipe(
112+
verbose: Flag.Boolean("verbose").pipe(Flag.withDefault(false)),
113+
target: Flag.String("target").pipe(
114114
Flag.withDescription(
115115
"Cross-build for <platform>-<arch> in nodejs.org naming (for example darwin-x64); defaults to the host.",
116116
),
@@ -175,14 +175,14 @@ const buildExeCmd = Command.make(
175175
const publishCmd = Command.make(
176176
"publish",
177177
{
178-
packagesDir: Flag.string("packages-dir").pipe(
178+
packagesDir: Flag.String("packages-dir").pipe(
179179
Flag.withDescription("Output dir of scripts/build-npm-platform-packages.ts."),
180180
),
181-
tag: Flag.string("tag").pipe(Flag.withDefault("latest")),
182-
access: Flag.string("access").pipe(Flag.withDefault("public")),
183-
provenance: Flag.boolean("provenance").pipe(Flag.withDefault(false)),
184-
dryRun: Flag.boolean("dry-run").pipe(Flag.withDefault(false)),
185-
verbose: Flag.boolean("verbose").pipe(Flag.withDefault(false)),
181+
tag: Flag.String("tag").pipe(Flag.withDefault("latest")),
182+
access: Flag.String("access").pipe(Flag.withDefault("public")),
183+
provenance: Flag.Boolean("provenance").pipe(Flag.withDefault(false)),
184+
dryRun: Flag.Boolean("dry-run").pipe(Flag.withDefault(false)),
185+
verbose: Flag.Boolean("verbose").pipe(Flag.withDefault(false)),
186186
},
187187
(config) =>
188188
Effect.gen(function* () {

‎apps/server/scripts/migrate-dev-db.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -506,19 +506,19 @@ const formatSize = (bytes: number): string =>
506506
export const migrateDevDbCommand = Command.make(
507507
"migrate-dev-db",
508508
{
509-
projects: Flag.integer("projects").pipe(
509+
projects: Flag.Int("projects").pipe(
510510
Flag.withDefault(5),
511511
Flag.withDescription("How many recently updated projects to keep."),
512512
),
513-
threadsPerProject: Flag.integer("threads-per-project").pipe(
513+
threadsPerProject: Flag.Int("threads-per-project").pipe(
514514
Flag.withDefault(10),
515515
Flag.withDescription("How many recent stopped threads to keep per project."),
516516
),
517-
baseDir: Flag.string("base-dir").pipe(
517+
baseDir: Flag.String("base-dir").pipe(
518518
Flag.optional,
519519
Flag.withDescription("Isolated .t3 directory. Defaults to the current worktree's .t3."),
520520
),
521-
source: Flag.string("source").pipe(
521+
source: Flag.String("source").pipe(
522522
Flag.optional,
523523
Flag.withDescription("Source database. Defaults to ~/.t3/userdata/state.sqlite."),
524524
),

‎apps/server/scripts/t3-sqlite-state.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,17 +248,17 @@ export const runSqliteState = Effect.fn("runSqliteState")(function* (
248248
const t3SqliteStateCommand = Command.make(
249249
"t3-sqlite-state",
250250
{
251-
operation: Argument.choice("operation", SqliteStateOperation.literals).pipe(
251+
operation: Argument.Literals("operation", SqliteStateOperation.literals).pipe(
252252
Argument.withDescription("Run a read-only query or a backed-up fixture mutation."),
253253
),
254-
baseDir: Flag.string("base-dir").pipe(
254+
baseDir: Flag.String("base-dir").pipe(
255255
Flag.withDescription("Explicit T3 base directory containing userdata/state.sqlite."),
256256
),
257-
sql: Flag.string("sql").pipe(
257+
sql: Flag.String("sql").pipe(
258258
Flag.optional,
259259
Flag.withDescription("SQL source supplied directly on the command line."),
260260
),
261-
file: Flag.string("file").pipe(
261+
file: Flag.String("file").pipe(
262262
Flag.optional,
263263
Flag.withDescription("Path to a SQL source file."),
264264
),

‎apps/server/src/assets/GitHubMediaFetch.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import Mime from "@effect/platform-node/Mime";
1+
import * as Mime from "effect/unstable/http/Mime";
22
import { githubMediaFileName } from "@t3tools/shared/githubMedia";
33
import * as Clock from "effect/Clock";
44
import * as Effect from "effect/Effect";
5+
import * as Option from "effect/Option";
56
import * as Redacted from "effect/Redacted";
67
import {
78
FetchHttpClient,
@@ -176,7 +177,7 @@ export const githubMediaResponse = Effect.fn("GitHubMediaFetch.githubMediaRespon
176177
response.headers["content-type"]?.split(";", 1)[0]?.trim().toLowerCase() ?? "";
177178
const contentType = MEDIA_CONTENT_TYPE_PATTERN.test(upstreamType)
178179
? upstreamType
179-
: (Mime.getType(githubMediaFileName(asset.url))?.toLowerCase() ?? "");
180+
: Option.getOrElse(Mime.getType(githubMediaFileName(asset.url)), () => "").toLowerCase();
180181
if (!MEDIA_CONTENT_TYPE_PATTERN.test(contentType)) {
181182
return HttpServerResponse.empty({ status: 415, headers });
182183
}

‎apps/server/src/bin.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ConnectPublicConfigMissingError extends CliError.UserError {
3838
}
3939

4040
const connectUnavailableCommand = Command.make("connect", {
41-
command: Argument.string("command").pipe(Argument.variadic),
41+
command: Argument.String("command").pipe(Argument.variadic),
4242
}).pipe(
4343
Command.withDescription("T3 Connect is unavailable in builds without public configuration."),
4444
Command.unlisted,

0 commit comments

Comments
 (0)