The best way to control Claude Code, Codex and more from any computer or phone
chore(lint): enforce eslint/no-unused-vars (#25100)
Julius Marminge committed
Oct 25, 2026 at 18:18 UTC
a320762cbcabeb4be5ffdd9cec3a52d02d7a5787
73 files changed
+20
-651
apps/desktop/src/app/DesktopClerk.test.ts
-2
@@ -28,8 +28,6 @@ vi.mock("@clerk/electron", () => ({
28
vi.mock("@clerk/electron/storage", () => ({
29
storage: storageMock,
30
}));
31
-
32
-import * as Option from "effect/Option";
31
import * as Exit from "effect/Exit";
32
import * as FileSystem from "effect/FileSystem";
33
import * as ElectronApp from "../electron/ElectronApp.ts";
apps/desktop/src/app/DesktopWebLinks.test.ts
-1
@@ -3,7 +3,6 @@ import { assert, describe, it } from "@effect/vitest";
3
import * as NodeEvents from "node:events";
4
import * as Effect from "effect/Effect";
5
import * as Layer from "effect/Layer";
6
-import * as Option from "effect/Option";
6
7
import * as ElectronWindow from "../electron/ElectronWindow.ts";
8
import { WEB_LINK_OPEN_CHANNEL } from "../ipc/channels.ts";
apps/mobile/src/features/connection/ConnectionsNewRouteScreen.tsx
-1
@@ -32,7 +32,6 @@ import { SymbolView } from "../../components/ui/AppSymbol";
32
import { hasCloudPublicConfig } from "../cloud/publicConfig";
33
import { CloudEnvironmentRows } from "./CloudEnvironmentRows";
34
import { splitEnvironmentSections } from "./environmentSections";
35
-import { openSettings } from "../settings/settings-navigation";
35
import { leaveSettingsPage } from "../settings/settings-navigation";
36
import { workspaceHasColumns } from "../workspace/workspace-selection-store";
37
apps/mobile/src/features/home/HomeScreen.tsx
+1
-4
@@ -9,10 +9,7 @@ import {
9
type EnvironmentProject,
10
type EnvironmentThreadShell,
11
} from "@t3tools/client-runtime/state/shell";
12
-import {
13
- threadSearchMatchKey,
14
- type EnvironmentThreadSearchMatch,
15
-} from "@t3tools/client-runtime/state/thread-search";
12
+import { threadSearchMatchKey } from "@t3tools/client-runtime/state/thread-search";
13
import { type EnvironmentId, type SidebarProjectGroupingMode } from "@t3tools/contracts";
14
import { useAtomValue } from "@effect/atom-react";
15
import { useFocusEffect } from "@react-navigation/native";
apps/mobile/src/features/settings/scheduled-task-editor.tsx
-1
@@ -7,7 +7,6 @@ import {
7
createDraft,
8
scheduledTaskDefaultModel,
9
hasScheduledTaskDraftChanges,
10
- type ScheduledTaskDraft,
10
} from "./scheduledTaskDraft";
11
import { useSettingsEnvironmentFilter } from "./settings-environment-filter";
12
import { settingsTargetsForProject } from "./settings-environment-filter.logic";
apps/mobile/src/features/showcase/ShowcaseCaptureCoordinator.tsx
-1
@@ -126,7 +126,6 @@ function EnabledShowcaseCaptureCoordinator(props: { readonly pathname: string })
126
}
127
128
let cancelled = false;
129
- let lastOutcome: string | null = null;
129
void retryShowcaseOperation(async () => applyNativeShowcaseOrientation(orientation), {
130
isCancelled: () => cancelled,
131
}).then((applied) => {
apps/mobile/src/features/threads/ThreadDetailScreen.tsx
+1
-5
@@ -11,11 +11,7 @@ import * as Dialog from "../../components/ui/Dialog";
11
import { useAtomMount, useAtomValue } from "@effect/atom-react";
12
import { parseThreadKey, threadKey } from "@t3tools/client-runtime/state/entities";
13
import { createThreadVisitTracker } from "@t3tools/client-runtime/state/thread-visits";
14
-import {
15
- useChildThreadInputs,
16
- useThreadReportedModelSelection,
17
- useThreadShell,
18
-} from "../../state/entities";
14
+import { useChildThreadInputs, useThreadReportedModelSelection } from "../../state/entities";
15
import { UsageLimitRecoveryCard } from "./UsageLimitRecoveryCard";
16
import { ChatGptUsageLimitNotice } from "./ChatGptUsageLimitNotice";
17
import { useFocusEffect, useNavigation } from "@react-navigation/native";
apps/mobile/src/features/threads/ThreadFeed.tsx
+3
-27
@@ -69,7 +69,6 @@ import {
69
type CodexArtifactTemplate,
70
} from "@t3tools/shared/codexArtifactTemplates";
71
import { resolveAssetUrl } from "@t3tools/client-runtime/state/assets";
72
-import { isMarkdownFileLinkLabel } from "@t3tools/shared/markdownLinks";
72
import { formatAttachmentSize } from "@t3tools/client-runtime/state/attachments";
73
import {
74
executeAtomQuery,
@@ -95,7 +94,6 @@ import { useNativeWorkspaceColumnsSupported } from "../../native/NativeWorkspace
94
import { useDeviceType } from "../../native/native-layout-metrics";
95
import { isDuoDevice } from "../../lib/device-type";
96
import {
98
- createContext,
97
memo,
98
useCallback,
99
useContext,
@@ -111,16 +109,13 @@ import {
109
type RefObject,
110
} from "react";
111
import {
114
- ActivityIndicator,
112
Image,
113
Platform,
114
type LayoutChangeEvent,
115
type NativeScrollEvent,
116
type NativeSyntheticEvent,
117
Pressable,
121
- ScrollView,
118
StyleSheet,
123
- Text as NativeText,
119
type ColorValue,
120
useWindowDimensions,
121
View,
@@ -144,10 +139,8 @@ import { IOS_NAV_BAR_HEIGHT } from "../../lib/layoutMetrics";
139
import { FONT_FAMILIES } from "../../lib/fontFamilies";
140
import { scopedThreadKey } from "../../lib/scopedEntities";
141
import { copyTextWithHaptic } from "../../lib/copyTextWithHaptic";
147
-import { tryOpenExternalUrl } from "../../lib/openExternalUrl";
142
import { downloadAndShareAttachment } from "../../lib/attachmentDownload";
143
import { hasWideMarkdownBlock } from "../../lib/wideMarkdownBlocks";
150
-import { faviconUrlForOrigin } from "@t3tools/shared/favicon";
144
import {
145
SelectableMarkdownText,
146
type MarkdownFileContextMenu,
@@ -160,14 +153,8 @@ import {
153
154
import { AppText as Text } from "../../components/ui/AppText";
155
import { VideoPreviewModal, type VideoPreviewSource } from "../../components/VideoPreviewModal";
163
-import { MediaVideoPlayer } from "../../components/MediaVideoPlayer";
156
import { markdownFileEmbedLabel, resolveMarkdownMediaPreview } from "../../lib/markdownMedia";
165
-import {
166
- attachmentVideoPreviewSource,
167
- mediaVideoPreviewUri,
168
- mediaVideoThumbnailKey,
169
- type MediaVideoPreviewSource,
170
-} from "../../lib/videoPreviewSource";
157
+import { attachmentVideoPreviewSource } from "../../lib/videoPreviewSource";
158
import { CopyTextButton } from "./CopyTextButton";
159
import { getReviewSectionIdForCheckpoint } from "../review/reviewModel";
160
import { setReviewSelectedSectionId } from "../review/reviewState";
@@ -187,15 +174,11 @@ import {
174
type LayoutVariant,
175
} from "../../lib/layout";
176
import { uuidv4 } from "../../lib/uuid";
190
-import {
191
- resolveMarkdownFontSizes,
192
- resolveNativeMarkdownTypography,
193
-} from "../../lib/appearancePreferences";
177
+import { resolveNativeMarkdownTypography } from "../../lib/appearancePreferences";
178
import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider";
179
import { PierreEntryIcon } from "../../components/PierreEntryIcon";
180
import {
181
normalizeNativeMarkdownUrl,
198
- resolveMarkdownInlineCodePresentation,
182
resolveMarkdownLinkPresentation,
183
} from "../../lib/markdownLinks";
184
import {
@@ -234,7 +217,6 @@ import {
217
appendGuestPendingMessages,
218
appendPendingThreadMessages,
219
isCompactionCommandFeedEntry,
237
- type PendingThreadFeedEntry,
220
type ThreadFeedRow,
221
} from "./pending-thread-feed";
222
import type { QueuedThreadMessage } from "../../state/thread-outbox-model";
@@ -242,12 +224,7 @@ import { resolveThreadFeedFixedItemSize } from "./thread-feed-item-size";
224
import { htmlRenderFrameHeight } from "@t3tools/shared/htmlRender";
225
import { htmlRenderRowHeight, ThreadHtmlRender } from "./HtmlRenderWebView";
226
import { ThreadMcpApp } from "./McpAppWebView";
245
-import {
246
- assetEnvironment,
247
- useAssetUrl,
248
- useAssetUrlState,
249
- useRefreshAssetUrl,
250
-} from "../../state/assets";
227
+import { assetEnvironment, useAssetUrl, useRefreshAssetUrl } from "../../state/assets";
228
import { useAtomQueryRunner } from "../../state/use-atom-query-runner";
229
import { readEnvironmentScope, usePreparedConnection } from "../../state/session";
230
import { projectEnvironment } from "../../state/projects";
@@ -435,7 +412,6 @@ function AssistantForkButton(props: {
412
sourceItemId: props.projectedItem.sourceItemId,
413
});
414
const forkFromRun = useAtomCommand(threadEnvironment.forkFromRun, "fork from response");
438
- const navigation = useNavigation();
415
const selectDetail = useSelectWorkspaceDetail();
416
const [busy, setBusy] = useState(false);
417
const canFork = canForkProjectedAssistantItem({
apps/mobile/src/features/threads/ThreadMarkdownImage.tsx
+1
-1
@@ -4,7 +4,7 @@ import { Image } from "expo-image";
4
import { createContext, useContext, useEffect, useEffectEvent, useId, useState } from "react";
5
import { fetch } from "expo/fetch";
6
import { parse, SvgAst, type JsxAST } from "react-native-svg";
7
-import { ActivityIndicator, Pressable, StyleSheet, View, type ViewStyle } from "react-native";
7
+import { Pressable, StyleSheet, View, type ViewStyle } from "react-native";
8
9
import { AppActivityIndicator } from "../../components/ui/AppActivityIndicator";
10
import { useFilePreviewGallery } from "../../components/FilePreviewGallery";
apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
+1
-4
@@ -7,10 +7,7 @@ import type {
7
EnvironmentProject,
8
EnvironmentThreadShell,
9
} from "@t3tools/client-runtime/state/shell";
10
-import {
11
- threadSearchMatchKey,
12
- type EnvironmentThreadSearchMatch,
13
-} from "@t3tools/client-runtime/state/thread-search";
10
+import { threadSearchMatchKey } from "@t3tools/client-runtime/state/thread-search";
11
import { AnimatedLegendList } from "@legendapp/list/reanimated";
12
import { THREAD_SIDEBAR_ROW_LAYOUT } from "./threadListAnimations";
13
import type { MenuAction } from "@react-native-menu/menu";
apps/mobile/src/features/workspace/WorkspaceSectionToolbar.tsx
-2
@@ -1,4 +1,3 @@
1
-import { useNavigation } from "@react-navigation/native";
1
import { selectedNavigationTab, visibleNavigationTabs } from "./navigation-tab-order";
2
import { Toolbar } from "../../components/ui/Toolbar";
3
import { useControlTheme } from "../../components/ui/useControlTheme";
@@ -20,7 +19,6 @@ export function WorkspaceTabToolbarButtons() {
19
const hidden = useHiddenNavigationTabs();
20
const workspace = useWorkspaceTabs()!;
21
const selectTab = useSelectWorkspaceTab();
23
- const navigation = useNavigation();
22
const selected = selectedNavigationTab(
23
order,
24
workspace.state.selectedTab,
apps/mobile/src/features/workspace/WorkspaceSidebarTabs.ios.tsx
-2
@@ -1,4 +1,3 @@
1
-import { useNavigation } from "@react-navigation/native";
1
import { selectedNavigationTab, visibleNavigationTabs } from "./navigation-tab-order";
2
import { requireNativeView } from "expo";
3
import type { NativeSyntheticEvent, ViewProps } from "react-native";
@@ -29,7 +28,6 @@ export function WorkspaceSidebarTabs(props: {
28
const order = useNavigationTabOrder();
29
const hidden = useHiddenNavigationTabs();
30
const tabs = [...visibleNavigationTabs(order, hidden), "settings" as const];
32
- const navigation = useNavigation();
31
const selectTab = useSelectWorkspaceTab();
32
const { colors, colorScheme } = useControlTheme();
33
// UIKit loses accessible names when updating nil-titled items in place.
apps/mobile/src/lib/android-workspace-navigation.test.ts
-1
@@ -6,7 +6,6 @@ import {
6
type AndroidWorkspaceNavigationTab,
7
} from "../features/workspace/android-workspace-tabs";
8
import {
9
- androidWorkspaceNavigationState,
9
linkedThreadStep,
10
parentThreadIsBelow,
11
resetAndroidWorkspace,
apps/mobile/src/native/T3ComposerEditor.native.tsx
+1
-1
@@ -14,7 +14,7 @@ import {
14
type Ref,
15
} from "react";
16
import type { NativeSyntheticEvent, ViewProps } from "react-native";
17
-import { Image, Platform, StyleSheet } from "react-native";
17
+import { Platform, StyleSheet } from "react-native";
18
19
import {
20
composerChipSizeSuffix,
apps/mobile/src/native/createV5StackNavigator.ios.tsx
+1
-3
@@ -23,15 +23,13 @@ import {
23
import { use, useCallback, useRef, useState, type ComponentProps } from "react";
24
import { WorkspaceSlotOptionsContext, slotScreenOptions } from "./v5-workspace-context";
25
import { StyleSheet, View } from "react-native";
26
-import { FormSheet, Stack } from "react-native-screens";
26
+import { Stack } from "react-native-screens";
27
import { NativeScrollEdgeEffectsContext } from "./NativeScrollViewMarker";
28
import { V5StackHeader } from "./V5StackHeader.ios";
29
import type { AppNativeStackNavigationOptions } from "./StackHeader";
30
import { NativeColumnContent } from "./NativeColumnContent.ios";
31
import {
32
nativeStackPopAction,
33
- nativeWorkspacePopAction,
34
- nativeWorkspacePopCount,
33
partitionStackPresentations,
34
reconcileStackScreens,
35
} from "./workspace-stack-projection";
apps/server/src/auth/http.ts
-1
@@ -25,7 +25,6 @@ import * as Clock from "effect/Clock";
25
import * as DateTime from "effect/DateTime";
26
import * as Effect from "effect/Effect";
27
import * as Schema from "effect/Schema";
28
-import { identity } from "effect/Function";
28
import * as Layer from "effect/Layer";
29
import * as Cookies from "effect/http/Cookies";
30
import * as HttpEffect from "effect/http/HttpEffect";
apps/server/src/checkpointing/Utils.ts
+1
-19
@@ -1,5 +1,5 @@
1
import * as Base64Url from "effect/encoding/Base64Url";
2
-import { CheckpointRef, ProjectId, type ThreadId } from "@t3tools/contracts";
2
+import { CheckpointRef, type ThreadId } from "@t3tools/contracts";
3
4
const CHECKPOINT_REFS_PREFIX = "refs/t3/checkpoints";
5
@@ -8,21 +8,3 @@ export function checkpointRefForThreadTurn(threadId: ThreadId, turnCount: number
8
`${CHECKPOINT_REFS_PREFIX}/${Base64Url.encode(threadId)}/turn/${turnCount}`,
9
);
10
}
11
-
12
-function resolveThreadWorkspaceCwd(input: {
13
- readonly thread: {
14
- readonly projectId: ProjectId;
15
- readonly worktreePath: string | null;
16
- };
17
- readonly projects: ReadonlyArray<{
18
- readonly id: ProjectId;
19
- readonly workspaceRoot: string;
20
- }>;
21
-}): string | undefined {
22
- const worktreeCwd = input.thread.worktreePath ?? undefined;
23
- if (worktreeCwd) {
24
- return worktreeCwd;
25
- }
26
-
27
- return input.projects.find((project) => project.id === input.thread.projectId)?.workspaceRoot;
28
-}
apps/server/src/cloud/http.test.ts
-1
@@ -13,7 +13,6 @@ import {
13
} from "@t3tools/contracts/relay";
14
import * as Effect from "effect/Effect";
15
import * as Layer from "effect/Layer";
16
-import * as Option from "effect/Option";
16
import * as Schema from "effect/Schema";
17
import { HttpClient, HttpServer } from "effect/http";
18
import * as Etag from "effect/http/Etag";
apps/server/src/guest/GuestShareService.test.ts
-1
@@ -22,7 +22,6 @@ import * as FileSystem from "effect/FileSystem";
22
import * as Fiber from "effect/Fiber";
23
import * as Layer from "effect/Layer";
24
import * as Ref from "effect/Ref";
25
-import * as Option from "effect/Option";
25
import * as Stream from "effect/Stream";
26
import * as TestClock from "effect/testing/TestClock";
27
apps/server/src/guest/http.ts
+1
-1
@@ -85,7 +85,7 @@ const itemParam = Effect.map(HttpServerRequest.HttpServerRequest, (request) =>
85
);
86
87
/** Server-sent events with a heartbeat, never cached or buffered on the way. */
88
-const eventStreamResponse = <A, I>(
88
+const eventStreamResponse = <A>(
89
events: Stream.Stream<A>,
90
encode: (event: A) => Effect.Effect<string, Schema.SchemaError>,
91
) => {
apps/server/src/mcp/McpDeviceToolkit.test.ts
-1
@@ -9,7 +9,6 @@ import {
9
} from "@t3tools/contracts";
10
import * as Effect from "effect/Effect";
11
import * as Layer from "effect/Layer";
12
-import * as Option from "effect/Option";
12
import { McpSchema, McpServer } from "effect/ai";
13
14
import * as ServerConfig from "../config.ts";
apps/server/src/mcp/McpSessionRegistry.ts
-6
@@ -213,12 +213,6 @@ export const layer = Layer.effect(McpSessionRegistry, make);
213
export const touchActiveMcpThread = (threadId: ThreadId): Effect.Effect<void> =>
214
activeMcpSessionRegistry ? activeMcpSessionRegistry.touch(threadId) : Effect.void;
215
216
-const revokeActiveMcpThread = (threadId: ThreadId): Effect.Effect<void> =>
217
- activeMcpSessionRegistry ? activeMcpSessionRegistry.revokeThread(threadId) : Effect.void;
218
-
219
-const revokeAllActiveMcpCredentials = (): Effect.Effect<void> =>
220
- activeMcpSessionRegistry ? activeMcpSessionRegistry.revokeAll : Effect.void;
221
-
216
export const __testing = {
217
make: makeWithOptions,
218
};
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts
-26
@@ -919,22 +919,6 @@ function replayQueryRunnerError(
919
});
920
}
921
922
-const makeClaudeAgentSdkReplayQueryRunner = Effect.fn("ClaudeAgentSdkReplayQueryRunner.layer")(
923
- function* (
924
- transcript: ClaudeAgentSdkReplayTranscript,
925
- options: { readonly replayGate?: ProviderReplayGate } = {},
926
- ) {
927
- const queryRunner = makeReplayQueryRunner(transcript, options);
928
- yield* Effect.addFinalizer(() =>
929
- Effect.sync(() => {
930
- queryRunner.assertComplete();
931
- }),
932
- );
933
-
934
- return replayQueryRunnerService(transcript, queryRunner);
935
- },
936
-);
937
-
922
function replayQueryRunnerService(
923
transcript: ClaudeAgentSdkReplayTranscript,
924
queryRunner: ClaudeQueryRunner,
@@ -953,16 +937,6 @@ function replayQueryRunnerService(
937
});
938
}
939
956
-function layerClaudeAgentSdkReplayQueryRunner(
957
- transcript: ClaudeAgentSdkReplayTranscript,
958
- options: { readonly replayGate?: ProviderReplayGate } = {},
959
-): Layer.Layer<ClaudeAdapterV2.ClaudeAgentSdkQueryRunner> {
960
- return Layer.effect(
961
- ClaudeAdapterV2.ClaudeAgentSdkQueryRunner,
962
- makeClaudeAgentSdkReplayQueryRunner(transcript, options),
963
- );
964
-}
965
-
940
function layerClaudeAgentSdkReplay(
941
transcript: ClaudeAgentSdkReplayTranscript,
942
options: {
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts
-37
@@ -10965,40 +10965,3 @@ export const ClaudeAdapterV2Driver: ProviderAdapterDriver<
10965
defaultConfig: (): ClaudeSettings => DEFAULT_CLAUDE_SETTINGS,
10966
create: (input) => createClaudeAdapterV2(input, {}),
10967
};
10968
-
10969
-const makeDefaultClaudeAdapterV2 = Effect.fn("ClaudeAdapterV2.layer")(function* () {
10970
- const fileSystem = yield* FileSystem.FileSystem;
10971
- const path = yield* Path.Path;
10972
- const crypto = yield* Crypto.Crypto;
10973
- const hostEnvironment = yield* HostProcess.Environment;
10974
- const idAllocator = yield* IdAllocator.IdAllocatorV2;
10975
- const queryRunner = yield* ClaudeAgentSdkQueryRunner;
10976
- const serverConfig = yield* ServerConfig.ServerConfig;
10977
- const continuationRequests = yield* ProviderContinuationRequests.ProviderContinuationRequests;
10978
-
10979
- return yield* makeClaudeAdapterV2({
10980
- instanceId: CLAUDE_DEFAULT_INSTANCE_ID,
10981
- settings: DEFAULT_CLAUDE_SETTINGS,
10982
- environment: hostEnvironment,
10983
- attachmentsDir: serverConfig.attachmentsDir,
10984
- fileSystem,
10985
- path,
10986
- crypto,
10987
- idAllocator,
10988
- queryRunner,
10989
- continuationRequests,
10990
- });
10991
-});
10992
-
10993
-const layer: Layer.Layer<
10994
- ProviderAdapter.ProviderAdapterV2,
10995
- never,
10996
- | ChildProcessSpawner.ChildProcessSpawner
10997
- | ClaudeAgentSdkQueryRunner
10998
- | Crypto.Crypto
10999
- | FileSystem.FileSystem
11000
- | IdAllocator.IdAllocatorV2
11001
- | McpProviderSessions.McpProviderSessions
11002
- | Path.Path
11003
- | ServerConfig.ServerConfig
11004
-> = Layer.effect(ProviderAdapter.ProviderAdapterV2, makeDefaultClaudeAdapterV2());
apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts
-75
@@ -1406,47 +1406,6 @@ export const makeCodexAppServerSpawnCommand = Effect.fn(
1406
});
1407
});
1408
1409
-const layerCodexAppServerClientFactoryCommand = (
1410
- options: CodexClient.CodexAppServerClientOptions & {
1411
- readonly command: string;
1412
- readonly args?: ReadonlyArray<string>;
1413
- readonly cwd?: string;
1414
- readonly env?: NodeJS.ProcessEnv;
1415
- },
1416
-): Layer.Layer<CodexAppServerClientFactory, never, ChildProcessSpawner.ChildProcessSpawner> =>
1417
- Layer.effect(
1418
- CodexAppServerClientFactory,
1419
- Effect.gen(function* () {
1420
- const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
1421
- return CodexAppServerClientFactory.of({
1422
- open: Effect.fn("CodexAdapterV2.open")(function* (input) {
1423
- const scope = yield* Scope.Scope;
1424
- const command = yield* makeCodexAppServerSpawnCommand({
1425
- command: options.command,
1426
- args: [...(options.args ?? [])],
1427
- ...(options.cwd === undefined ? {} : { cwd: options.cwd }),
1428
- ...(options.env === undefined ? {} : { env: options.env, extendEnv: true }),
1429
- });
1430
- const handle = yield* spawner.spawn(command).pipe(
1431
- Effect.provideService(Scope.Scope, scope),
1432
- Effect.mapError(
1433
- (cause) =>
1434
- new ProviderAdapter.ProviderAdapterOpenSessionError({
1435
- driver: CODEX_PROVIDER,
1436
- providerSessionId: input.providerSessionId,
1437
- cause,
1438
- }),
1439
- ),
1440
- );
1441
- const context = yield* Layer.build(CodexClient.layerChildProcess(handle, options));
1442
- return yield* Effect.service(CodexClient.CodexAppServerClient).pipe(
1443
- Effect.provide(context),
1444
- );
1445
- }),
1446
- });
1447
- }),
1448
- );
1449
-
1409
export function makeCodexAppServerProtocolLogger(input: {
1410
readonly nativeEventLogger: ProviderEventLoggers.EventNdjsonLogger | undefined;
1411
readonly threadId: ThreadId;
@@ -1642,40 +1601,6 @@ export const CodexAdapterV2Driver: ProviderAdapterDriver<CodexSettings, CodexAda
1601
create: createCodexAdapterV2,
1602
};
1603
1645
-const layer: Layer.Layer<
1646
- ProviderAdapter.ProviderAdapterV2,
1647
- never,
1648
- | CodexAppServerClientFactory
1649
- | Crypto.Crypto
1650
- | FileSystem.FileSystem
1651
- | IdAllocator.IdAllocatorV2
1652
- | McpProviderSessions.McpProviderSessions
1653
- | ServerConfig
1654
-> = Layer.effect(
1655
- ProviderAdapter.ProviderAdapterV2,
1656
- Effect.gen(function* () {
1657
- const clientFactory = yield* CodexAppServerClientFactory;
1658
- const continuationRequests = yield* ProviderContinuationRequests.ProviderContinuationRequests;
1659
- const crypto = yield* Crypto.Crypto;
1660
- const fileSystem = yield* FileSystem.FileSystem;
1661
- const hostEnvironment = yield* HostProcess.Environment;
1662
- const idAllocator = yield* IdAllocator.IdAllocatorV2;
1663
- const serverConfig = yield* ServerConfig;
1664
-
1665
- return yield* makeCodexAdapterV2({
1666
- instanceId: CODEX_DEFAULT_INSTANCE_ID,
1667
- settings: DEFAULT_CODEX_SETTINGS,
1668
- environment: hostEnvironment,
1669
- clientFactory,
1670
- crypto,
1671
- fileSystem,
1672
- idAllocator,
1673
- serverConfig,
1674
- continuationRequests,
1675
- });
1676
- }),
1677
-);
1678
-
1604
export interface CodexAdapterV2Options {
1605
readonly instanceId: ProviderInstanceId;
1606
readonly settings: CodexSettings;
apps/server/src/orchestration-v2/CheckpointRestoreSafety.test.ts
-1
@@ -12,7 +12,6 @@ import {
12
import * as Effect from "effect/Effect";
13
import * as FileSystem from "effect/FileSystem";
14
import * as Layer from "effect/Layer";
15
-import * as Option from "effect/Option";
15
import * as Path from "effect/Path";
16
import * as ServerConfig from "../config.ts";
17
import * as ServerSettings from "../serverSettings.ts";
apps/server/src/orchestration-v2/EffectWorker.ts
-4
@@ -916,7 +916,3 @@ export const runDaemonWithOptions = (options: OrchestrationEffectDaemonOptions =
916
);
917
918
export const runDaemon = runDaemonWithOptions();
919
-
920
-const layerDaemon: Layer.Layer<never, never, OrchestrationEffectWorkerV2> = Layer.effectDiscard(
921
- runDaemon.pipe(Effect.forkScoped),
922
-);
apps/server/src/orchestration-v2/Orchestrator.ts
-130
@@ -12560,133 +12560,3 @@ export const layer: Layer.Layer<
12560
> = Layer.effect(OrchestratorV2, makeOrchestrator()).pipe(
12561
Layer.provide(ThreadCommandExecutor.layer),
12562
);
12563
-
12564
-const layerUnavailable: Layer.Layer<OrchestratorV2> = Layer.succeed(
12565
- OrchestratorV2,
12566
- OrchestratorV2.of({
12567
- resumeQueuedRuns: Effect.fail(
12568
- new OrchestratorDispatchError({
12569
- commandId: CommandId.make("command:system:resume-queued-runs"),
12570
- commandType: "message.dispatch",
12571
- cause: "Orchestration V2 live runtime is not configured.",
12572
- }),
12573
- ),
12574
- recoverDelegatedTasks: Effect.void,
12575
- recoverDelegatedTask: () => Effect.void,
12576
- delegatedTaskResultPending: () => Effect.succeed(false),
12577
- restartContinuationPending: () => Effect.succeed(false),
12578
- awaitRestartContinuation: () => Effect.void,
12579
- autoArmLimitRecovery: (input) =>
12580
- Effect.fail(new OrchestratorProjectionError({ threadId: input.threadId })),
12581
- dispatch: (command) =>
12582
- Effect.fail(
12583
- new OrchestratorDispatchError({
12584
- commandId: command.commandId,
12585
- commandType: command.type,
12586
- cause: "Orchestration V2 live runtime is not configured.",
12587
- }),
12588
- ),
12589
- searchThreadStream: (input) =>
12590
- Stream.fail(new OrchestratorProjectionError({ threadId: input.threadId })),
12591
- searchThread: (input) =>
12592
- Effect.fail(new OrchestratorProjectionError({ threadId: input.threadId })),
12593
- getThreadHistoryPage: (threadId) => Effect.fail(new OrchestratorProjectionError({ threadId })),
12594
- getTimelinePage: (threadId) => Effect.fail(new OrchestratorProjectionError({ threadId })),
12595
- getMessageCount: (threadId) => Effect.fail(new OrchestratorProjectionError({ threadId })),
12596
- getTurnItem: ({ threadId }) => Effect.fail(new OrchestratorProjectionError({ threadId })),
12597
- getThreadRecords: (threadId) => Effect.fail(new OrchestratorProjectionError({ threadId })),
12598
- getThreadProjection: (threadId) =>
12599
- Effect.fail(
12600
- new OrchestratorProjectionError({
12601
- threadId,
12602
- cause: "Orchestration V2 live runtime is not configured.",
12603
- }),
12604
- ),
12605
- getCheckpointContext: (threadId) =>
12606
- Effect.fail(
12607
- new OrchestratorProjectionError({
12608
- threadId,
12609
- cause: "Orchestration V2 live runtime is not configured.",
12610
- }),
12611
- ),
12612
- getThreadSnapshot: (threadId) =>
12613
- Effect.fail(
12614
- new OrchestratorProjectionError({
12615
- threadId,
12616
- cause: "Orchestration V2 live runtime is not configured.",
12617
- }),
12618
- ),
12619
- getThreadSnapshotWindow: (threadId) =>
12620
- Effect.fail(
12621
- new OrchestratorProjectionError({
12622
- threadId,
12623
- cause: "Orchestration V2 live runtime is not configured.",
12624
- }),
12625
- ),
12626
- getShellSnapshot: () =>
12627
- Effect.fail(
12628
- new OrchestratorProjectionError({
12629
- threadId: ThreadId.make("thread:shell"),
12630
- cause: "Orchestration V2 live runtime is not configured.",
12631
- }),
12632
- ),
12633
- listActiveSubagentThreadIds: () =>
12634
- Effect.fail(
12635
- new OrchestratorProjectionError({
12636
- threadId: ThreadId.make("thread:shell"),
12637
- cause: "Orchestration V2 live runtime is not configured.",
12638
- }),
12639
- ),
12640
- listOlderSettledThreads: () =>
12641
- Effect.fail(
12642
- new OrchestratorProjectionError({
12643
- threadId: ThreadId.make("thread:shell"),
12644
- cause: "Orchestration V2 live runtime is not configured.",
12645
- }),
12646
- ),
12647
- readShellSnapshot: () =>
12648
- Effect.fail(
12649
- new OrchestratorProjectionError({
12650
- threadId: ThreadId.make("thread:shell"),
12651
- cause: "Orchestration V2 live runtime is not configured.",
12652
- }),
12653
- ),
12654
- getThreadShell: (threadId) =>
12655
- Effect.fail(
12656
- new OrchestratorProjectionError({
12657
- threadId,
12658
- cause: "Orchestration V2 live runtime is not configured.",
12659
- }),
12660
- ),
12661
- findGuestShareThreadId: () =>
12662
- Effect.fail(
12663
- new OrchestratorProjectionError({
12664
- threadId: ThreadId.make("thread:shell"),
12665
- cause: "Orchestration V2 live runtime is not configured.",
12666
- }),
12667
- ),
12668
- getThreadEventSequence: (threadId) =>
12669
- Effect.fail(
12670
- new OrchestratorProjectionError({
12671
- threadId,
12672
- cause: "Orchestration V2 live runtime is not configured.",
12673
- }),
12674
- ),
12675
- streamStoredEvents: Stream.fail(
12676
- new OrchestratorDomainEventStreamError({
12677
- cause: "Orchestration V2 live runtime is not configured.",
12678
- }),
12679
- ),
12680
- streamStoredEventsFrom: () =>
12681
- Stream.fail(
12682
- new OrchestratorDomainEventStreamError({
12683
- cause: "Orchestration V2 live runtime is not configured.",
12684
- }),
12685
- ),
12686
- streamDomainEvents: Stream.fail(
12687
- new OrchestratorDomainEventStreamError({
12688
- cause: "Orchestration V2 live runtime is not configured.",
12689
- }),
12690
- ),
12691
- } satisfies OrchestratorV2Shape),
12692
-);
apps/server/src/orchestration-v2/ProjectionControlReads.test.ts
-1
@@ -18,7 +18,6 @@ import {
18
import * as DateTime from "effect/DateTime";
19
import * as Effect from "effect/Effect";
20
import * as Layer from "effect/Layer";
21
-import * as Option from "effect/Option";
21
import * as SqlClient from "effect/sql/SqlClient";
22
import * as SqlitePersistence from "../persistence/Sqlite.ts";
23
import * as ProjectionStore from "./ProjectionStore.ts";
apps/server/src/orchestration-v2/ProviderAdapterRegistry.ts
-18
@@ -342,21 +342,3 @@ export function layerFromDrivers<R>(input: {
342
),
343
) as Layer.Layer<ProviderAdapterRegistryV2, ProviderAdapterRegistryBuildError, R>;
344
}
345
-
346
-const layerFromProviderAdapter: Layer.Layer<
347
- ProviderAdapterRegistryV2,
348
- never,
349
- ProviderAdapter.ProviderAdapterV2
350
-> = Layer.effect(
351
- ProviderAdapterRegistryV2,
352
- Effect.gen(function* () {
353
- const adapter = yield* ProviderAdapter.ProviderAdapterV2;
354
- return ProviderAdapterRegistryV2.of({
355
- get: (instanceId) =>
356
- adapter.instanceId === instanceId
357
- ? Effect.succeed(adapter)
358
- : Effect.fail(new ProviderAdapterRegistryLookupError({ instanceId })),
359
- list: () => Effect.succeed([adapter.instanceId]),
360
- } satisfies ProviderAdapterRegistryV2Shape);
361
- }),
362
-);
apps/server/src/orchestration-v2/ProviderTurnStartService.testkit.ts
-1
@@ -1,6 +1,5 @@
1
import * as Effect from "effect/Effect";
2
import * as Layer from "effect/Layer";
3
-import * as Option from "effect/Option";
3
4
import * as GitWorkflow from "../git/GitWorkflowService.ts";
5
import * as ProjectService from "../project/ProjectService.ts";
apps/server/src/orchestration-v2/ProviderTurnStartService.ts
-3
@@ -22,7 +22,6 @@ import * as Option from "effect/Option";
22
import * as Path from "effect/Path";
23
import * as Predicate from "effect/Predicate";
24
import * as Schema from "effect/Schema";
25
-import * as HostProcess from "@t3tools/shared/HostProcess";
25
26
import * as ServerConfig from "../config.ts";
27
import { withWorkspaceLease } from "../workspace/workspaceLease.ts";
@@ -121,8 +120,6 @@ export const layer: Layer.Layer<
120
const idAllocator = yield* IdAllocator.IdAllocatorV2;
121
const fileSystem = yield* FileSystem.FileSystem;
122
const path = yield* Path.Path;
124
- const serverConfig = yield* ServerConfig.ServerConfig;
125
- const serverSettings = yield* ServerSettings.ServerSettingsService;
123
const gitWorkflow = yield* GitWorkflowService.GitWorkflowService;
124
const projects = yield* ProjectService.ProjectService;
125
const providerAuth = yield* ProviderAuthService.ProviderAuthService;
apps/server/src/orchestration-v2/RuntimePolicy.test.ts
-1
@@ -11,7 +11,6 @@ import {
11
import * as DateTime from "effect/DateTime";
12
import * as Effect from "effect/Effect";
13
import * as Layer from "effect/Layer";
14
-import * as Option from "effect/Option";
14
import * as Stream from "effect/Stream";
15
16
import type { ProviderInstance } from "@t3tools/provider-core/server/driver";
apps/server/src/orchestration-v2/RuntimeRequestService.test.ts
-1
@@ -9,7 +9,6 @@ import {
9
import * as DateTime from "effect/DateTime";
10
import * as Effect from "effect/Effect";
11
import * as Layer from "effect/Layer";
12
-import * as Option from "effect/Option";
12
13
import type * as ProviderAdapter from "@t3tools/provider-core/server/ProviderAdapter";
14
import * as ProjectionStore from "./ProjectionStore.ts";
apps/server/src/orchestration-v2/ThreadPullRequestService.ts
-3
@@ -13,7 +13,6 @@ import * as Context from "effect/Context";
13
import * as Crypto from "effect/Crypto";
14
import * as Effect from "effect/Effect";
15
import * as FileSystem from "effect/FileSystem";
16
-import * as Layer from "effect/Layer";
16
import * as Option from "effect/Option";
17
import * as Schedule from "effect/Schedule";
18
import type * as Scope from "effect/Scope";
@@ -401,5 +400,3 @@ export const make = Effect.gen(function* () {
400
401
return { start, drain: worker.drain } satisfies ThreadPullRequestServiceV2["Service"];
402
});
404
-
405
-const layer = Layer.effect(ThreadPullRequestServiceV2, make);
apps/server/src/orchestration-v2/runtimeLayer.test.ts
-1
@@ -37,7 +37,6 @@ import * as Deferred from "effect/Deferred";
37
import * as Fiber from "effect/Fiber";
38
import * as Layer from "effect/Layer";
39
import * as Path from "effect/Path";
40
-import * as Option from "effect/Option";
40
import * as Queue from "effect/Queue";
41
import * as Stream from "effect/Stream";
42
import * as TestClock from "effect/testing/TestClock";
apps/server/src/orchestration-v2/testkit/fixtures/shared.ts
-14
@@ -1384,20 +1384,6 @@ export function assertUserMessagesInclude(
1384
}
1385
}
1386
1387
-function assertUserMessagesExclude(
1388
- projection: OrchestrationV2ThreadProjection,
1389
- rejectedTexts: ReadonlyArray<string>,
1390
-) {
1391
- for (const rejectedText of rejectedTexts) {
1392
- assert.isFalse(
1393
- projection.turnItems.some(
1394
- (item) => item.type === "user_message" && item.text.includes(rejectedText),
1395
- ),
1396
- `expected user input to exclude ${JSON.stringify(rejectedText)}`,
1397
- );
1398
- }
1399
-}
1400
-
1387
export function assertVisibleUserMessagesInclude(
1388
projection: OrchestrationV2ThreadProjection,
1389
expectedTexts: ReadonlyArray<string>,
apps/server/src/provider/AntigravityAuth.ts
+1
-1
@@ -300,7 +300,7 @@ export const makeAntigravityAuth = Effect.fn("makeAntigravityAuth")(function* <
300
);
301
yield* options.onAuthenticated(started, runtime);
302
},
303
- (effect, flow, stopSessions) =>
303
+ (effect, flow, _stopSessions) =>
304
effect.pipe(
305
Effect.scoped,
306
Effect.timeoutOrElse({
apps/server/src/provider/ProviderAuthService.ts
-1
@@ -12,7 +12,6 @@ import * as Context from "effect/Context";
12
import * as Effect from "effect/Effect";
13
import * as Function from "effect/Function";
14
import * as Layer from "effect/Layer";
15
-import type * as Scope from "effect/Scope";
15
import * as Stream from "effect/Stream";
16
import * as Semaphore from "effect/Semaphore";
17
apps/server/src/scheduledTasks/Schedule.ts
-20
@@ -71,23 +71,3 @@ export function isMissedFixedTimeRun(
71
if (schedule.type !== "fixed_time") return false;
72
return DateTime.toEpochMillis(now) - DateTime.toEpochMillis(dueAt) > MISSED_FIXED_TIME_GRACE_MS;
73
}
74
-
75
-function describeSchedule(schedule: ScheduledTaskSchedule): string {
76
- if (schedule.type === "webhook") return "On webhook";
77
- if (schedule.type === "interval") {
78
- const minutes = schedule.everyMs / MINUTE_MS;
79
- if (Number.isInteger(minutes)) {
80
- return `Every ${minutes === 1 ? "minute" : `${minutes} minutes`}`;
81
- }
82
- return `Every ${Math.round(schedule.everyMs / 1000)} seconds`;
83
- }
84
-
85
- const weekdayCount = schedule.weekdays?.length ?? 0;
86
- const days =
87
- weekdayCount === 0
88
- ? "day"
89
- : weekdayCount === 5 && schedule.weekdays?.every((day) => day >= 1 && day <= 5)
90
- ? "weekday"
91
- : "selected day";
92
- return `At ${schedule.timeOfDay} every ${days}`;
93
-}
apps/server/src/serverRuntimeStartup.ts
-2
@@ -716,5 +716,3 @@ const make = Effect.fn("serverRuntimeStartup.make")(function* (options?: Startup
716
717
export const layerWithOptions = (options?: StartupOptions) =>
718
Layer.effect(ServerRuntimeStartup, make(options));
719
-
720
-const layer = layerWithOptions();
apps/server/src/telemetry/AnalyticsService.ts
-2
@@ -317,5 +317,3 @@ export const make = Effect.gen(function* () {
317
});
318
319
export const layer = Layer.effect(AnalyticsService, make);
320
-
321
-const layerTest = AnalyticsService.layerTest;
apps/server/src/usage/UsageService.ts
-26
@@ -152,32 +152,6 @@ export class UsageService extends Context.Service<
152
}
153
>()("t3/usage/UsageService") {}
154
155
-const EMPTY_PRICING: UsagePricing = {
156
- status: "unavailable",
157
- source: LITELLM_RATES_URL,
158
- fetchedAt: null,
159
- knownModels: 0,
160
-};
161
-
162
-const layerTest = Layer.succeed(
163
- UsageService,
164
- UsageService.of({
165
- readSummary: (input) =>
166
- Effect.succeed({
167
- contractVersion: USAGE_CONTRACT_VERSION,
168
- readAt: "1970-01-01T00:00:00.000Z",
169
- timeZone: input.timeZone,
170
- sinceDay: input.sinceDay,
171
- untilDay: input.untilDay,
172
- buckets: [],
173
- sources: [],
174
- pricing: EMPTY_PRICING,
175
- scanDurationMs: 0,
176
- }),
177
- refreshRates: Effect.succeed(EMPTY_PRICING),
178
- }),
179
-);
180
-
155
export const make = Effect.gen(function* () {
156
const fileSystem = yield* FileSystem.FileSystem;
157
const path = yield* Path.Path;
apps/server/src/ws.ts
-4
@@ -7,14 +7,12 @@ import * as DateTime from "effect/DateTime";
7
import * as Duration from "effect/Duration";
8
import * as Base64 from "effect/encoding/Base64";
9
import * as Effect from "effect/Effect";
10
-import * as Fiber from "effect/Fiber";
10
import * as FileSystem from "effect/FileSystem";
11
import * as Layer from "effect/Layer";
12
import * as Option from "effect/Option";
13
import * as Path from "effect/Path";
14
import * as Queue from "effect/Queue";
15
import * as Ref from "effect/Ref";
17
-import * as Schedule from "effect/Schedule";
16
import * as Schema from "effect/Schema";
17
import * as Result from "effect/Result";
18
import * as Stream from "effect/Stream";
@@ -217,7 +215,6 @@ import * as ProjectService from "./project/ProjectService.ts";
215
import { threadWorkspaceRoot } from "./project/threadWorkspaceRoot.ts";
216
import * as ManagedProjectFolders from "./project/ManagedProjectFolders.ts";
217
import { projectMutationOperation } from "./project/ProjectMutation.ts";
220
-import * as ProjectSetupScriptRunner from "./project/ProjectSetupScriptRunner.ts";
218
import * as ProjectCloneTracker from "./project/ProjectCloneTracker.ts";
219
import * as RepositoryIdentityResolver from "./project/RepositoryIdentityResolver.ts";
220
import * as WorktreeSetupTracker from "./project/WorktreeSetupTracker.ts";
@@ -1308,7 +1305,6 @@ export const layerWsRpc = (
1305
);
1306
const usage = yield* UsageService.UsageService;
1307
const usageLimitSources = yield* UsageLimitSources.UsageLimitSources;
1311
- const projectSetupScriptRunner = yield* ProjectSetupScriptRunner.ProjectSetupScriptRunner;
1308
const worktreeSetupTracker = yield* WorktreeSetupTracker.WorktreeSetupTracker;
1309
const projectCloneTracker = yield* ProjectCloneTracker.ProjectCloneTracker;
1310
const repositoryIdentityResolver =
apps/web/src/components/LegacySidebar.tsx
+1
-1
@@ -208,7 +208,7 @@ import { useCopyToClipboard } from "~/hooks/useCopyToClipboard";
208
import { useIsMobile } from "~/hooks/useMediaQuery";
209
import { CommandDialogTrigger } from "./ui/command";
210
import { useClientSettings, updateClientSettings } from "~/hooks/useSettings";
211
-import { primaryServerKeybindingsAtom, serverEnvironment } from "../state/server";
211
+import { primaryServerKeybindingsAtom } from "../state/server";
212
import { appAtomRegistry } from "../rpc/atomRegistry";
213
import { canShareWithGuestAtom } from "./chat/guestShareAvailability";
214
import { openGuestShareDialog } from "./chat/guestShareDialogState";
apps/web/src/components/Sidebar.tsx
+1
-1
@@ -132,7 +132,7 @@ import {
132
useQuietThreadShells,
133
} from "../state/entities";
134
import { environmentPresentations } from "../state/presentation";
135
-import { primaryServerKeybindingsAtom, serverEnvironment } from "../state/server";
135
+import { primaryServerKeybindingsAtom } from "../state/server";
136
import { environmentProjects } from "../state/projects";
137
import { threadEnvironment } from "../state/threads";
138
import { useOlderSettledShelf, useOlderSettledShelfGrowth } from "../state/olderSettledShelf";
apps/web/src/components/chat/ChatHeader.tsx
-1
@@ -24,7 +24,6 @@ import { toastManager } from "../ui/toast";
24
import { useThreadActionMenu } from "~/hooks/useThreadActionMenu";
25
import { readLocalApi } from "~/localApi";
26
import { threadEnvironment } from "../../state/threads";
27
-import { serverEnvironment } from "../../state/server";
27
import { canShareWithGuestAtom } from "./guestShareAvailability";
28
import { useAtomValue } from "@effect/atom-react";
29
import { useOrchestrationCommand } from "../../state/use-orchestration-command";
apps/web/src/components/preview/PreviewPanelShell.tsx
-3
@@ -6,8 +6,6 @@ import {
6
useRef,
7
useState,
8
} from "react";
9
-
10
-import { isElectron } from "~/env";
9
import {
10
type PreviewPanelInlineSize,
11
usePreviewPanelInlineSize,
@@ -54,7 +52,6 @@ function PreviewPanelShellFrame(
52
hostRef?: RefObject<HTMLDivElement | null>;
53
},
54
) {
57
- const useDragRegion = isElectron && props.mode !== "sheet" && props.mode !== "embedded";
55
const isInline = props.mode === "inline";
56
const collapsible = isInline && props.open !== undefined;
57
const open = props.open ?? true;
apps/web/src/components/pullRequest/pullRequestDetail.logic.ts
-2
@@ -4,7 +4,6 @@ import {
4
type ChangeRequestTerminology,
5
} from "@t3tools/client-runtime/source-control-clients";
6
import * as Schema from "effect/Schema";
7
-
7
import {
8
GitCommandError,
9
PullRequestDetail,
@@ -13,7 +12,6 @@ import {
12
type PullRequestActor,
13
type PullRequestBaseComparison,
14
type PullRequestCheck,
16
- type PullRequestChecks,
15
type PullRequestChecksState as ContractPullRequestChecksState,
16
type PullRequestComment,
17
type PullRequestCommit,
apps/web/src/components/settings/ProviderSettingsPanel.logic.ts
-1
@@ -1,7 +1,6 @@
1
import type { EnvironmentConnectionPhase } from "@t3tools/client-runtime/connection";
2
import {
3
AuthProvidersManageScope,
4
- type AuthSessionState,
4
type EnvironmentId,
5
type ProjectId,
6
type ProjectSettingsOverrides,
apps/web/src/lib/terminalContext.ts
-20
@@ -53,26 +53,6 @@ export function filterTerminalContextsWithText<T extends { text: string }>(
53
return contexts.filter((context) => hasTerminalContextText(context));
54
}
55
56
-function normalizeTerminalContextSelection(
57
- selection: TerminalContextSelection,
58
-): TerminalContextSelection | null {
59
- const text = normalizeTerminalContextText(selection.text);
60
- const terminalId = selection.terminalId.trim();
61
- const terminalLabel = selection.terminalLabel.trim();
62
- if (text.length === 0 || terminalId.length === 0 || terminalLabel.length === 0) {
63
- return null;
64
- }
65
- const lineStart = Math.max(1, Math.floor(selection.lineStart));
66
- const lineEnd = Math.max(lineStart, Math.floor(selection.lineEnd));
67
- return {
68
- terminalId,
69
- terminalLabel,
70
- lineStart,
71
- lineEnd,
72
- text,
73
- };
74
-}
75
-
56
function formatTerminalContextRange(selection: { lineStart: number; lineEnd: number }): string {
57
return selection.lineStart === selection.lineEnd
58
? `line ${selection.lineStart}`
apps/web/src/types.ts
-1
@@ -19,7 +19,6 @@ import type {
19
import type {
20
EnvironmentProject,
21
EnvironmentThreadShell,
22
- ThreadRunSummary,
22
ThreadRuntimeSummary,
23
} from "@t3tools/client-runtime/state/shell";
24
import type { ThreadCheckpointSummary } from "@t3tools/client-runtime/state/thread-checkpoints";
infra/relay/src/http/Api.ts
-1
@@ -66,7 +66,6 @@ import * as DpopProofs from "../auth/DpopProofs.ts";
66
import * as RelayTokens from "../auth/RelayTokens.ts";
67
import * as EnvironmentCredentials from "../environments/EnvironmentCredentials.ts";
68
import * as EnvironmentLinks from "../environments/EnvironmentLinks.ts";
69
-import * as HookForwarder from "../hooks/HookForwarder.ts";
69
import * as HeldHooks from "../hooks/HeldHooks.ts";
70
import * as HookInbox from "../hooks/HookInbox.ts";
71
import * as LiveActivities from "../agentActivity/LiveActivities.ts";
infra/relay/src/previewTunnelSweep.test.ts
-1
@@ -1,7 +1,6 @@
1
import { describe, expect, it } from "@effect/vitest";
2
import * as Effect from "effect/Effect";
3
import * as Exit from "effect/Exit";
4
-import * as Layer from "effect/Layer";
4
import * as Redacted from "effect/Redacted";
5
import * as HttpClient from "effect/http/HttpClient";
6
import * as HttpClientResponse from "effect/http/HttpClientResponse";
packages/client-runtime/src/authorization/remote.test.ts
-1
@@ -1,6 +1,5 @@
1
import { describe, expect, it } from "@effect/vitest";
2
import * as Effect from "effect/Effect";
3
-import * as Option from "effect/Option";
3
import * as Schema from "effect/Schema";
4
5
import { EnvironmentAuthInvalidError } from "@t3tools/contracts";
packages/client-runtime/src/state/filesystem.ts
-1
@@ -1,6 +1,5 @@
1
import {
2
AuthFilesystemReadScope,
3
- type AuthSessionState,
3
type FilesystemBrowseEntry,
4
WS_METHODS,
5
sessionGrantsScope,
packages/client-runtime/src/state/sharedSettings.ts
-1
@@ -1,5 +1,4 @@
1
import type {
2
- EnvironmentId,
2
ExecutionEnvironmentCapabilities,
3
ServerSettings,
4
ServerSettingsPatch,
packages/client-runtime/src/state/threadSort.ts
-2
@@ -1,8 +1,6 @@
1
import type { ProjectId } from "@t3tools/contracts";
2
import type { SidebarProjectSortOrder, SidebarThreadSortOrder } from "@t3tools/contracts/settings";
3
import type { EnvironmentThreadShell } from "./models.ts";
4
-import * as Arr from "effect/Array";
5
-import * as Order from "effect/Order";
4
5
export interface ThreadSortInput {
6
readonly createdAt: string;
packages/client-runtime/src/state/usageAccess.ts
-1
@@ -1,6 +1,5 @@
1
import {
2
AuthDiagnosticsReadScope,
3
- type AuthSessionState,
3
sessionGrantsScope,
4
type SessionGrantInput,
5
} from "@t3tools/contracts";
packages/client-runtime/src/work-log/presentation.ts
-4
@@ -234,10 +234,6 @@ function asRecord(value: unknown): Record<string, unknown> | null {
234
: null;
235
}
236
237
-function nonEmptyString(value: unknown): string | null {
238
- return typeof value === "string" && value.trim().length > 0 ? value : null;
239
-}
240
-
237
function workLogEntryIsToolLike(entry: WorkLogPresentationEntry): boolean {
238
if (entry.tone === "tool" || entry.tone === "thinking" || entry.tone === "error") return true;
239
if (entry.command !== undefined && entry.command.trim().length > 0) return true;
packages/provider-acp/src/server/nativeLogging.ts
+1
-33
@@ -1,5 +1,5 @@
1
import type { ProviderDriverKind, ThreadId } from "@t3tools/contracts";
2
-import { causeErrorTag, errorTag } from "@t3tools/shared/observability";
2
+import { causeErrorTag } from "@t3tools/shared/observability";
3
import * as Cause from "effect/Cause";
4
import * as Crypto from "effect/Crypto";
5
import * as DateTime from "effect/DateTime";
@@ -15,38 +15,6 @@ import type * as AcpSessionRuntime from "./AcpSessionRuntime.ts";
15
16
const transientProtocolUpdates = new Set(["agent_message_chunk", "agent_thought_chunk"]);
17
18
-function structuralMethod(value: string): string {
19
- return value.length <= 128 && /^[A-Za-z][A-Za-z0-9._:/-]*$/.test(value) ? value : "unknown";
20
-}
21
-
22
-function summarizePayload(payload: unknown): Readonly<Record<string, unknown>> {
23
- if (payload === null) return { valueType: "null" };
24
- if (typeof payload === "string") {
25
- return { valueType: "string", byteLength: new TextEncoder().encode(payload).byteLength };
26
- }
27
- if (payload instanceof Uint8Array) {
28
- return { valueType: "bytes", byteLength: payload.byteLength };
29
- }
30
- if (Array.isArray(payload)) {
31
- return { valueType: "array", itemCount: payload.length };
32
- }
33
- if (typeof payload !== "object") {
34
- return { valueType: typeof payload };
35
- }
36
-
37
- try {
38
- const record = payload as Record<string, unknown>;
39
- return {
40
- valueType: "object",
41
- fieldCount: Object.keys(record).length,
42
- ...(typeof record._tag === "string" ? { messageTag: errorTag(record) } : {}),
43
- ...(typeof record.tag === "string" ? { method: structuralMethod(record.tag) } : {}),
44
- };
45
- } catch {
46
- return { valueType: "object" };
47
- }
48
-}
49
-
18
function formatRequestLogPayload(event: AcpSessionRuntime.AcpSessionRequestLogEvent) {
19
return {
20
method: structuralProtocolMethod(event.method),
packages/provider-core/src/server/snapshotProbe.test.ts
-1
@@ -3,7 +3,6 @@ import type { ModelCapabilities } from "@t3tools/contracts";
3
import * as HostProcess from "@t3tools/shared/HostProcess";
4
import { createModelCapabilities } from "@t3tools/shared/model";
5
import * as Effect from "effect/Effect";
6
-import * as Layer from "effect/Layer";
6
import * as Sink from "effect/Sink";
7
import * as Stream from "effect/Stream";
8
import * as ChildProcess from "effect/process/ChildProcess";
packages/provider-cursor/src/server/auth.ts
+1
-1
@@ -246,7 +246,7 @@ export const makeCursorAuth = Effect.fn("makeCursorAuth")(function* (options: Cu
246
}).pipe(Effect.uninterruptible),
247
);
248
},
249
- (effect, flow, stopSessions) =>
249
+ (effect, flow, _stopSessions) =>
250
effect.pipe(
251
Effect.scoped,
252
Effect.timeoutOrElse({
packages/provider-cursor/src/server/credentialStore.test.ts
-7
@@ -11,13 +11,6 @@ import * as Layer from "effect/Layer";
11
import { makeCursorCredentialStore } from "./credentialStore.ts";
12
13
const layerHost = Layer.provideMerge(TestProviderHost.layer(), NodeServices.layer);
14
-
15
-const legacyCredentials = {
16
- version: 1 as const,
17
- backendUrl: "https://api.cursor.com",
18
- apiKey: "test-only-legacy-key",
19
- createdAtMs: 100,
20
-};
14
const legacyFileText = `{
15
"version": 1,
16
"backendUrl": "https://api.cursor.com",
packages/provider-grok/src/server/adapter.ts
-38
@@ -18,7 +18,6 @@ import * as Crypto from "effect/Crypto";
18
import * as Effect from "effect/Effect";
19
import * as FileSystem from "effect/FileSystem";
20
import * as Path from "effect/Path";
21
-import * as Layer from "effect/Layer";
21
import * as Schema from "effect/Schema";
22
import type * as Scope from "effect/Scope";
23
import * as ChildProcessSpawner from "effect/process/ChildProcessSpawner";
@@ -407,40 +406,3 @@ export const GrokAdapterV2Driver: ProviderAdapterDriver<GrokSettings, GrokAdapte
406
),
407
),
408
};
410
-
411
-const layer: Layer.Layer<
412
- ProviderAdapter.ProviderAdapterV2,
413
- never,
414
- | Path.Path
415
- | ChildProcessSpawner.ChildProcessSpawner
416
- | Crypto.Crypto
417
- | FileSystem.FileSystem
418
- | IdAllocator.IdAllocatorV2
419
- | McpProviderSessions.McpProviderSessions
420
- | ProviderEventLoggers.ProviderEventLoggers
421
- | ProviderHost.ProviderHost
422
-> = Layer.effect(
423
- ProviderAdapter.ProviderAdapterV2,
424
- Effect.gen(function* () {
425
- const hostEnvironment = yield* HostProcess.Environment;
426
- const hostPlatform = yield* HostProcess.Platform;
427
- const selfInvocation = yield* resolveSelfInvocation();
428
- const providerEventLoggers = yield* ProviderEventLoggers.ProviderEventLoggers;
429
- const continuationRequests = yield* ProviderContinuationRequests.ProviderContinuationRequests;
430
- const makeNativeLogger = yield* makeAcpNativeLoggerFactory();
431
- return yield* makeGrokAdapterV2({
432
- instanceId: GROK_DEFAULT_INSTANCE_ID,
433
- settings: DEFAULT_GROK_SETTINGS,
434
- environment: hostEnvironment,
435
- hostPlatform,
436
- selfInvocation,
437
- continuationRequests,
438
- nativeLogging: (threadId) =>
439
- makeNativeLogger({
440
- nativeEventLogger: providerEventLoggers.native,
441
- provider: GROK_PROVIDER,
442
- threadId,
443
- }),
444
- });
445
- }),
446
-);
packages/provider-grok/src/server/xaiAcpExtension.ts
-5
@@ -1554,8 +1554,3 @@ export const makeXAiPromptCompletionRuntime = Effect.fn("makeXAiPromptCompletion
1554
} satisfies AcpSessionRuntime.AcpSessionRuntime["Service"];
1555
},
1556
);
1557
-
1558
-function promptResponseHasMissingXAiStopReason(response: EffectAcpSchema.PromptResponse): boolean {
1559
- const meta = response._meta;
1560
- return meta !== null && typeof meta === "object" && meta[xAiStopReasonMissingMetaKey] === true;
1561
-}
packages/provider-muse/src/server/adapter.ts
-1
@@ -30,7 +30,6 @@ import * as Cause from "effect/Cause";
30
import * as DateTime from "effect/DateTime";
31
import * as Deferred from "effect/Deferred";
32
import * as Effect from "effect/Effect";
33
-import * as Option from "effect/Option";
33
import * as FileSystem from "effect/FileSystem";
34
import * as Queue from "effect/Queue";
35
import * as Schema from "effect/Schema";
packages/provider-opencode/src/server/adapter.ts
-18
@@ -44,7 +44,6 @@ import * as Duration from "effect/Duration";
44
import * as Effect from "effect/Effect";
45
import * as Exit from "effect/Exit";
46
import * as Fiber from "effect/Fiber";
47
-import * as Layer from "effect/Layer";
47
import * as Option from "effect/Option";
48
import * as Queue from "effect/Queue";
49
import * as Random from "effect/Random";
@@ -3715,20 +3714,3 @@ export const OpenCodeAdapterV2Driver: ProviderAdapterDriver<
3714
),
3715
),
3716
};
3718
-
3719
-const layer: Layer.Layer<ProviderAdapter.ProviderAdapterV2, never, OpenCodeAdapterV2DriverEnv> =
3720
- Layer.effect(
3721
- ProviderAdapter.ProviderAdapterV2,
3722
- Effect.gen(function* () {
3723
- const hostEnvironment = yield* HostProcess.Environment;
3724
- const providerEventLoggers = yield* ProviderEventLoggers.ProviderEventLoggers;
3725
- return yield* makeOpenCodeAdapterV2({
3726
- instanceId: OPENCODE_DEFAULT_INSTANCE_ID,
3727
- settings: DEFAULT_OPENCODE_SETTINGS,
3728
- environment: hostEnvironment,
3729
- ...(providerEventLoggers.native === undefined
3730
- ? {}
3731
- : { nativeEventLogger: providerEventLoggers.native }),
3732
- });
3733
- }),
3734
- );
packages/provider-opencode/src/server/v2/adapter.ts
-1
@@ -45,7 +45,6 @@ import * as Effect from "effect/Effect";
45
import * as Hex from "effect/encoding/Hex";
46
import * as Exit from "effect/Exit";
47
import * as FileSystem from "effect/FileSystem";
48
-import * as Option from "effect/Option";
48
import * as Queue from "effect/Queue";
49
import * as Schedule from "effect/Schedule";
50
import * as Scope from "effect/Scope";
packages/provider-pi/src/server/adapter.test.ts
-1
@@ -22,7 +22,6 @@ import {
22
import * as Cause from "effect/Cause";
23
import * as DateTime from "effect/DateTime";
24
import * as Deferred from "effect/Deferred";
25
-import * as Duration from "effect/Duration";
25
import * as Effect from "effect/Effect";
26
import * as Exit from "effect/Exit";
27
import * as Fiber from "effect/Fiber";
packages/provider-pi/src/server/adapter.ts
-18
@@ -4,7 +4,6 @@ import { getModelSelectionStringOptionValue } from "@t3tools/shared/model";
4
import { readToolOutputImage } from "@t3tools/shared/toolOutput";
5
import * as Predicate from "effect/Predicate";
6
import {
7
- defaultInstanceIdForDriver,
7
ProviderDriverKind,
8
type ChatAttachment,
9
type ModelSelection,
@@ -32,7 +31,6 @@ import * as Duration from "effect/Duration";
31
import * as Effect from "effect/Effect";
32
import * as FileSystem from "effect/FileSystem";
33
import * as Fiber from "effect/Fiber";
35
-import * as Layer from "effect/Layer";
34
import * as Queue from "effect/Queue";
35
import * as Schema from "effect/Schema";
36
import * as Semaphore from "effect/Semaphore";
@@ -76,7 +74,6 @@ import { PI_FILE_CHANGE_TOOLS } from "./mcpExtensionSource.ts";
74
75
export const PI_PROVIDER = ProviderDriverKind.make("pi");
76
const PI_DRIVER_KIND = PI_PROVIDER;
79
-const PI_DEFAULT_INSTANCE_ID = defaultInstanceIdForDriver(PI_DRIVER_KIND);
77
const DEFAULT_PI_SETTINGS = Schema.decodeSync(PiSettings)({});
78
79
// Inherit Pi's configured defaultProvider/defaultModel without calling set_model.
@@ -3335,18 +3332,3 @@ export const PiAdapterV2Driver: ProviderAdapterDriver<PiSettings, PiAdapterV2Dri
3332
),
3333
),
3334
};
3338
-
3339
-const layer: Layer.Layer<ProviderAdapter.ProviderAdapterV2, never, PiAdapterV2DriverEnv> =
3340
- Layer.effect(
3341
- ProviderAdapter.ProviderAdapterV2,
3342
- Effect.gen(function* () {
3343
- const hostEnvironment = yield* HostProcess.Environment;
3344
- const continuationRequests = yield* ProviderContinuationRequests.ProviderContinuationRequests;
3345
- return yield* makePiAdapterV2({
3346
- instanceId: PI_DEFAULT_INSTANCE_ID,
3347
- settings: DEFAULT_PI_SETTINGS,
3348
- environment: hostEnvironment,
3349
- continuationRequests,
3350
- });
3351
- }),
3352
- );
packages/shared/src/model.test.ts
-27
@@ -33,33 +33,6 @@ const codexCaps: ModelCapabilities = createModelCapabilities({
33
],
34
});
35
36
-const claudeCaps: ModelCapabilities = createModelCapabilities({
37
- optionDescriptors: [
38
- {
39
- id: "effort",
40
- label: "Reasoning",
41
- type: "select",
42
- options: [
43
- { id: "medium", label: "Medium" },
44
- { id: "high", label: "High", isDefault: true },
45
- { id: "ultrathink", label: "Ultrathink" },
46
- ],
47
- currentValue: "high",
48
- promptInjectedValues: ["ultrathink"],
49
- },
50
- {
51
- id: "contextWindow",
52
- label: "Context Window",
53
- type: "select",
54
- options: [
55
- { id: "200k", label: "200k" },
56
- { id: "1m", label: "1M", isDefault: true },
57
- ],
58
- currentValue: "1m",
59
- },
60
- ],
61
-});
62
-
36
describe("descriptor helpers", () => {
37
it("builds dispatch options only from explicit selections", () => {
38
const descriptors = getProviderOptionDescriptors({
vite.config.ts
+4
@@ -216,6 +216,10 @@ export default defineConfig({
216
perf: "warn",
217
},
218
rules: {
219
+ "eslint/no-unused-vars": [
220
+ "error",
221
+ { argsIgnorePattern: "^_", varsIgnorePattern: "^_", caughtErrorsIgnorePattern: "^_" },
222
+ ],
223
"eslint/no-unsafe-optional-chaining": "error",
224
"eslint/no-unneeded-ternary": "error",
225
"unicorn/no-useless-fallback-in-spread": "error",