The best way to control Claude Code, Codex and more from any computer or phone
Simplify workspace package builds and deps (#2676)
Julius Marminge committed
May 13, 2026 at 21:35 UTC
f92e1e1b06ec5ba78ce66849cf288a3a45e54bb0
16 files changed
+106
-130
apps/desktop/package.json
+4
-6
@@ -16,6 +16,10 @@
16
},
17
"dependencies": {
18
"@effect/platform-node": "catalog:",
19
+ "@t3tools/contracts": "workspace:*",
20
+ "@t3tools/shared": "workspace:*",
21
+ "@t3tools/ssh": "workspace:*",
22
+ "@t3tools/tailscale": "workspace:*",
23
"effect": "catalog:",
24
"electron": "41.5.0",
25
"electron-updater": "^6.6.2"
@@ -23,13 +27,7 @@
27
"devDependencies": {
28
"@effect/language-service": "catalog:",
29
"@effect/vitest": "catalog:",
26
- "@t3tools/client-runtime": "workspace:*",
27
- "@t3tools/contracts": "workspace:*",
28
- "@t3tools/shared": "workspace:*",
29
- "@t3tools/ssh": "workspace:*",
30
- "@t3tools/tailscale": "workspace:*",
30
"@types/node": "catalog:",
32
- "effect-acp": "workspace:*",
31
"tsdown": "catalog:",
32
"typescript": "catalog:",
33
"vitest": "catalog:"
apps/desktop/src/backend/DesktopServerExposure.ts
+1
-1
@@ -3,7 +3,7 @@ import * as NodeOS from "node:os";
3
import {
4
createAdvertisedEndpoint,
5
type CreateAdvertisedEndpointInput,
6
-} from "@t3tools/client-runtime";
6
+} from "@t3tools/shared/advertisedEndpoint";
7
import type {
8
AdvertisedEndpoint,
9
AdvertisedEndpointProvider,
apps/desktop/src/backend/tailscaleEndpointProvider.ts
+1
-1
@@ -1,4 +1,4 @@
1
-import { createAdvertisedEndpoint } from "@t3tools/client-runtime";
1
+import { createAdvertisedEndpoint } from "@t3tools/shared/advertisedEndpoint";
2
import type { AdvertisedEndpoint, AdvertisedEndpointProvider } from "@t3tools/contracts";
3
import {
4
buildTailscaleHttpsBaseUrl,
apps/desktop/tsdown.config.ts
+1
-1
@@ -12,7 +12,7 @@ export default defineConfig([
12
...shared,
13
entry: ["src/main.ts"],
14
clean: true,
15
- noExternal: (id) => id.startsWith("@t3tools/") || id.startsWith("effect-acp"),
15
+ noExternal: (id) => id.startsWith("@t3tools/"),
16
},
17
{
18
...shared,
apps/server/package.json
+2
-2
@@ -20,13 +20,13 @@
20
"build:bundle": "tsdown",
21
"start": "node dist/bin.mjs",
22
"typecheck": "tsc --noEmit",
23
- "test": "vitest run",
24
- "test:process-reaper": "vitest run src/server.test.ts src/provider/Layers/ClaudeAdapter.test.ts src/provider/Layers/ProviderSessionDirectory.test.ts src/provider/Layers/ProviderSessionReaper.test.ts src/provider/Layers/CodexAdapter.test.ts"
23
+ "test": "vitest run"
24
},
25
"dependencies": {
26
"@anthropic-ai/claude-agent-sdk": "^0.2.111",
27
"@effect/platform-bun": "catalog:",
28
"@effect/platform-node": "catalog:",
29
+ "@effect/platform-node-shared": "catalog:",
30
"@effect/sql-sqlite-bun": "catalog:",
31
"@opencode-ai/sdk": "^1.3.15",
32
"@pierre/diffs": "catalog:",
apps/server/tsdown.config.ts
+3
-5
@@ -1,15 +1,13 @@
1
import { defineConfig } from "tsdown";
2
3
+const internalPackagePrefixes = ["@t3tools/", "effect-acp", "effect-codex-app-server"];
4
+
5
export default defineConfig({
6
entry: ["src/bin.ts"],
5
- format: ["esm", "cjs"],
6
- checks: {
7
- legacyCjs: false,
8
- },
7
outDir: "dist",
8
sourcemap: true,
9
clean: true,
12
- noExternal: (id) => id.startsWith("@t3tools/") || id.startsWith("effect-acp"),
10
+ noExternal: (id) => internalPackagePrefixes.some((prefix) => id.startsWith(prefix)),
11
inlineOnly: false,
12
banner: {
13
js: "#!/usr/bin/env node\n",
bun.lock
+5
-13
@@ -20,6 +20,10 @@
20
"version": "0.0.23",
21
"dependencies": {
22
"@effect/platform-node": "catalog:",
23
+ "@t3tools/contracts": "workspace:*",
24
+ "@t3tools/shared": "workspace:*",
25
+ "@t3tools/ssh": "workspace:*",
26
+ "@t3tools/tailscale": "workspace:*",
27
"effect": "catalog:",
28
"electron": "41.5.0",
29
"electron-updater": "^6.6.2",
@@ -27,13 +31,7 @@
31
"devDependencies": {
32
"@effect/language-service": "catalog:",
33
"@effect/vitest": "catalog:",
30
- "@t3tools/client-runtime": "workspace:*",
31
- "@t3tools/contracts": "workspace:*",
32
- "@t3tools/shared": "workspace:*",
33
- "@t3tools/ssh": "workspace:*",
34
- "@t3tools/tailscale": "workspace:*",
34
"@types/node": "catalog:",
36
- "effect-acp": "workspace:*",
35
"tsdown": "catalog:",
36
"typescript": "catalog:",
37
"vitest": "catalog:",
@@ -60,6 +58,7 @@
58
"@anthropic-ai/claude-agent-sdk": "^0.2.111",
59
"@effect/platform-bun": "catalog:",
60
"@effect/platform-node": "catalog:",
61
+ "@effect/platform-node-shared": "catalog:",
62
"@effect/sql-sqlite-bun": "catalog:",
63
"@opencode-ai/sdk": "^1.3.15",
64
"@pierre/diffs": "catalog:",
@@ -153,7 +152,6 @@
152
},
153
"packages/client-runtime": {
154
"name": "@t3tools/client-runtime",
156
- "version": "0.0.0-alpha.1",
155
"dependencies": {
156
"@t3tools/contracts": "workspace:*",
157
"effect": "catalog:",
@@ -173,7 +171,6 @@
171
"devDependencies": {
172
"@effect/language-service": "catalog:",
173
"@effect/vitest": "catalog:",
176
- "tsdown": "catalog:",
174
"typescript": "catalog:",
175
"vitest": "catalog:",
176
},
@@ -188,7 +185,6 @@
185
"@effect/openapi-generator": "catalog:",
186
"@effect/platform-node": "catalog:",
187
"@effect/vitest": "catalog:",
191
- "tsdown": "catalog:",
188
"typescript": "catalog:",
189
"vitest": "catalog:",
190
},
@@ -203,14 +199,12 @@
199
"@effect/openapi-generator": "catalog:",
200
"@effect/platform-node": "catalog:",
201
"@effect/vitest": "catalog:",
206
- "tsdown": "catalog:",
202
"typescript": "catalog:",
203
"vitest": "catalog:",
204
},
205
},
206
"packages/shared": {
207
"name": "@t3tools/shared",
213
- "version": "0.0.0-alpha.1",
208
"dependencies": {
209
"@t3tools/contracts": "workspace:*",
210
"effect": "catalog:",
@@ -226,7 +220,6 @@
220
},
221
"packages/ssh": {
222
"name": "@t3tools/ssh",
229
- "version": "0.0.0-alpha.1",
223
"dependencies": {
224
"@t3tools/contracts": "workspace:*",
225
"@t3tools/shared": "workspace:*",
@@ -243,7 +236,6 @@
236
},
237
"packages/tailscale": {
238
"name": "@t3tools/tailscale",
246
- "version": "0.0.0-alpha.1",
239
"dependencies": {
240
"@effect/platform-node": "catalog:",
241
"effect": "catalog:",
packages/client-runtime/package.json
+1
-1
@@ -1,6 +1,5 @@
1
{
2
"name": "@t3tools/client-runtime",
3
- "version": "0.0.0-alpha.1",
3
"private": true,
4
"type": "module",
5
"exports": {
@@ -15,6 +14,7 @@
14
},
15
"dependencies": {
16
"@t3tools/contracts": "workspace:*",
17
+ "@t3tools/shared": "workspace:*",
18
"effect": "catalog:"
19
},
20
"devDependencies": {
packages/client-runtime/src/advertisedEndpoint.ts
+1
-78
@@ -1,78 +1 @@
1
-import type {
2
- AdvertisedEndpoint,
3
- AdvertisedEndpointHostedHttpsCompatibility,
4
- AdvertisedEndpointProvider,
5
- AdvertisedEndpointReachability,
6
- AdvertisedEndpointSource,
7
- AdvertisedEndpointStatus,
8
-} from "@t3tools/contracts";
9
-
10
-export interface CreateAdvertisedEndpointInput {
11
- readonly id: string;
12
- readonly label: string;
13
- readonly provider: AdvertisedEndpointProvider;
14
- readonly httpBaseUrl: string;
15
- readonly reachability: AdvertisedEndpointReachability;
16
- readonly hostedHttpsCompatibility?: AdvertisedEndpointHostedHttpsCompatibility;
17
- readonly desktopCompatibility?: "compatible" | "unknown";
18
- readonly source: AdvertisedEndpointSource;
19
- readonly status?: AdvertisedEndpointStatus;
20
- readonly isDefault?: boolean;
21
- readonly description?: string;
22
-}
23
-
24
-export function normalizeHttpBaseUrl(rawValue: string): string {
25
- const url = new URL(rawValue);
26
- if (url.protocol === "ws:") {
27
- url.protocol = "http:";
28
- } else if (url.protocol === "wss:") {
29
- url.protocol = "https:";
30
- }
31
-
32
- if (url.protocol !== "http:" && url.protocol !== "https:") {
33
- throw new Error(`Endpoint must use HTTP or HTTPS. Received ${url.protocol}`);
34
- }
35
-
36
- url.pathname = "/";
37
- url.search = "";
38
- url.hash = "";
39
- return url.toString();
40
-}
41
-
42
-export function deriveWsBaseUrl(httpBaseUrl: string): string {
43
- const url = new URL(normalizeHttpBaseUrl(httpBaseUrl));
44
- url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
45
- return url.toString();
46
-}
47
-
48
-export function classifyHostedHttpsCompatibility(
49
- httpBaseUrl: string,
50
- fallback: AdvertisedEndpointHostedHttpsCompatibility = "unknown",
51
-): AdvertisedEndpointHostedHttpsCompatibility {
52
- const url = new URL(normalizeHttpBaseUrl(httpBaseUrl));
53
- if (url.protocol === "http:") {
54
- return "mixed-content-blocked";
55
- }
56
- return fallback === "mixed-content-blocked" ? "unknown" : fallback;
57
-}
58
-
59
-export function createAdvertisedEndpoint(input: CreateAdvertisedEndpointInput): AdvertisedEndpoint {
60
- const httpBaseUrl = normalizeHttpBaseUrl(input.httpBaseUrl);
61
- return {
62
- id: input.id,
63
- label: input.label,
64
- provider: input.provider,
65
- httpBaseUrl,
66
- wsBaseUrl: deriveWsBaseUrl(httpBaseUrl),
67
- reachability: input.reachability,
68
- compatibility: {
69
- hostedHttpsApp:
70
- input.hostedHttpsCompatibility ?? classifyHostedHttpsCompatibility(httpBaseUrl),
71
- desktopApp: input.desktopCompatibility ?? "compatible",
72
- },
73
- source: input.source,
74
- status: input.status ?? "available",
75
- ...(input.isDefault === undefined ? {} : { isDefault: input.isDefault }),
76
- ...(input.description === undefined ? {} : { description: input.description }),
77
- };
78
-}
1
+export * from "@t3tools/shared/advertisedEndpoint";
packages/contracts/package.json
+5
-13
@@ -6,24 +6,17 @@
6
"dist"
7
],
8
"type": "module",
9
- "main": "./dist/index.cjs",
10
- "module": "./dist/index.mjs",
11
- "types": "./src/index.ts",
9
"exports": {
13
- "./settings": {
14
- "types": "./src/settings.ts",
15
- "import": "./src/settings.ts",
16
- "require": "./src/settings.ts"
17
- },
10
".": {
11
"types": "./src/index.ts",
20
- "import": "./src/index.ts",
21
- "require": "./dist/index.cjs"
12
+ "import": "./src/index.ts"
13
+ },
14
+ "./settings": {
15
+ "types": "./src/settings.ts",
16
+ "import": "./src/settings.ts"
17
}
18
},
19
"scripts": {
25
- "dev": "tsdown src/index.ts --format esm,cjs --dts --watch --clean",
26
- "build": "tsdown src/index.ts --format esm,cjs --dts --clean",
20
"typecheck": "tsc --noEmit",
21
"test": "vitest run"
22
},
@@ -33,7 +26,6 @@
26
"devDependencies": {
27
"@effect/language-service": "catalog:",
28
"@effect/vitest": "catalog:",
36
- "tsdown": "catalog:",
29
"typescript": "catalog:",
30
"vitest": "catalog:"
31
}
packages/effect-acp/package.json
-3
@@ -33,8 +33,6 @@
33
}
34
},
35
"scripts": {
36
- "dev": "tsdown src/client.ts src/agent.ts src/_generated/schema.gen.ts src/rpc.ts src/protocol.ts src/terminal.ts --format esm,cjs --dts --watch --clean",
37
- "build": "tsdown src/client.ts src/agent.ts src/_generated/schema.gen.ts src/rpc.ts src/protocol.ts src/terminal.ts --format esm,cjs --dts --clean",
36
"typecheck": "tsc --noEmit",
37
"test": "vitest run",
38
"generate": "bun run scripts/generate.ts"
@@ -47,7 +45,6 @@
45
"@effect/openapi-generator": "catalog:",
46
"@effect/platform-node": "catalog:",
47
"@effect/vitest": "catalog:",
50
- "tsdown": "catalog:",
48
"typescript": "catalog:",
49
"vitest": "catalog:"
50
}
packages/effect-codex-app-server/package.json
-3
@@ -25,8 +25,6 @@
25
}
26
},
27
"scripts": {
28
- "dev": "tsdown src/client.ts src/rpc.ts src/protocol.ts src/schema.ts --format esm,cjs --dts --watch --clean",
29
- "build": "tsdown src/client.ts src/rpc.ts src/protocol.ts src/schema.ts --format esm,cjs --dts --clean",
28
"typecheck": "tsc --noEmit",
29
"test": "vitest run",
30
"generate": "bun run scripts/generate.ts",
@@ -40,7 +38,6 @@
38
"@effect/openapi-generator": "catalog:",
39
"@effect/platform-node": "catalog:",
40
"@effect/vitest": "catalog:",
43
- "tsdown": "catalog:",
41
"typescript": "catalog:",
42
"vitest": "catalog:"
43
}
packages/shared/package.json
+4
-1
@@ -1,6 +1,5 @@
1
{
2
"name": "@t3tools/shared",
3
- "version": "0.0.0-alpha.1",
3
"private": true,
4
"type": "module",
5
"exports": {
@@ -8,6 +7,10 @@
7
"types": "./src/model.ts",
8
"import": "./src/model.ts"
9
},
10
+ "./advertisedEndpoint": {
11
+ "types": "./src/advertisedEndpoint.ts",
12
+ "import": "./src/advertisedEndpoint.ts"
13
+ },
14
"./git": {
15
"types": "./src/git.ts",
16
"import": "./src/git.ts"
packages/shared/src/advertisedEndpoint.ts
new
+78
@@ -0,0 +1,78 @@
1
+import type {
2
+ AdvertisedEndpoint,
3
+ AdvertisedEndpointHostedHttpsCompatibility,
4
+ AdvertisedEndpointProvider,
5
+ AdvertisedEndpointReachability,
6
+ AdvertisedEndpointSource,
7
+ AdvertisedEndpointStatus,
8
+} from "@t3tools/contracts";
9
+
10
+export interface CreateAdvertisedEndpointInput {
11
+ readonly id: string;
12
+ readonly label: string;
13
+ readonly provider: AdvertisedEndpointProvider;
14
+ readonly httpBaseUrl: string;
15
+ readonly reachability: AdvertisedEndpointReachability;
16
+ readonly hostedHttpsCompatibility?: AdvertisedEndpointHostedHttpsCompatibility;
17
+ readonly desktopCompatibility?: "compatible" | "unknown";
18
+ readonly source: AdvertisedEndpointSource;
19
+ readonly status?: AdvertisedEndpointStatus;
20
+ readonly isDefault?: boolean;
21
+ readonly description?: string;
22
+}
23
+
24
+export function normalizeHttpBaseUrl(rawValue: string): string {
25
+ const url = new URL(rawValue);
26
+ if (url.protocol === "ws:") {
27
+ url.protocol = "http:";
28
+ } else if (url.protocol === "wss:") {
29
+ url.protocol = "https:";
30
+ }
31
+
32
+ if (url.protocol !== "http:" && url.protocol !== "https:") {
33
+ throw new Error(`Endpoint must use HTTP or HTTPS. Received ${url.protocol}`);
34
+ }
35
+
36
+ url.pathname = "/";
37
+ url.search = "";
38
+ url.hash = "";
39
+ return url.toString();
40
+}
41
+
42
+export function deriveWsBaseUrl(httpBaseUrl: string): string {
43
+ const url = new URL(normalizeHttpBaseUrl(httpBaseUrl));
44
+ url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
45
+ return url.toString();
46
+}
47
+
48
+export function classifyHostedHttpsCompatibility(
49
+ httpBaseUrl: string,
50
+ fallback: AdvertisedEndpointHostedHttpsCompatibility = "unknown",
51
+): AdvertisedEndpointHostedHttpsCompatibility {
52
+ const url = new URL(normalizeHttpBaseUrl(httpBaseUrl));
53
+ if (url.protocol === "http:") {
54
+ return "mixed-content-blocked";
55
+ }
56
+ return fallback === "mixed-content-blocked" ? "unknown" : fallback;
57
+}
58
+
59
+export function createAdvertisedEndpoint(input: CreateAdvertisedEndpointInput): AdvertisedEndpoint {
60
+ const httpBaseUrl = normalizeHttpBaseUrl(input.httpBaseUrl);
61
+ return {
62
+ id: input.id,
63
+ label: input.label,
64
+ provider: input.provider,
65
+ httpBaseUrl,
66
+ wsBaseUrl: deriveWsBaseUrl(httpBaseUrl),
67
+ reachability: input.reachability,
68
+ compatibility: {
69
+ hostedHttpsApp:
70
+ input.hostedHttpsCompatibility ?? classifyHostedHttpsCompatibility(httpBaseUrl),
71
+ desktopApp: input.desktopCompatibility ?? "compatible",
72
+ },
73
+ source: input.source,
74
+ status: input.status ?? "available",
75
+ ...(input.isDefault === undefined ? {} : { isDefault: input.isDefault }),
76
+ ...(input.description === undefined ? {} : { description: input.description }),
77
+ };
78
+}
packages/ssh/package.json
-1
@@ -1,6 +1,5 @@
1
{
2
"name": "@t3tools/ssh",
3
- "version": "0.0.0-alpha.1",
3
"private": true,
4
"type": "module",
5
"exports": {
packages/tailscale/package.json
-1
@@ -1,6 +1,5 @@
1
{
2
"name": "@t3tools/tailscale",
3
- "version": "0.0.0-alpha.1",
3
"private": true,
4
"type": "module",
5
"exports": {