The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 22, 14:30 UTC
fix(desktop): packaged server ships zod for @cursor/sdk 1.0.38 (#25841)
Co-authored-by: jason chien <3936511+jason5545@users.noreply.github.com>
Jui-Chen Chien committed
Oct 27, 2026 at 18:48 UTC
7c3b3b3605efa695e9948051b569937fc1482c0f
3 files changed
+50
-1
apps/server/package.json
+2
-1
@@ -69,7 +69,8 @@
69
"stream-json": "3.6.0",
70
"undici": "catalog:",
71
"yaml": "catalog:",
72
- "yauzl": "^3.4.0"
72
+ "yauzl": "^3.4.0",
73
+ "zod": "^4.6.5"
74
},
75
"devDependencies": {
76
"@effect/graphql-generator": "catalog:",
pnpm-lock.yaml
+3
@@ -916,6 +916,9 @@ importers:
916
yauzl:
917
specifier: ^3.4.0
918
version: 3.4.0
919
+ zod:
920
+ specifier: ^4.6.5
921
+ version: 4.6.5
922
devDependencies:
923
'@effect/graphql-generator':
924
specifier: 'catalog:'
scripts/lib/cli-external-packages.test.ts
+45
@@ -12,6 +12,7 @@ import { findEsmImportsOfExternalPackages } from "./cli-executable-imports.ts";
12
import {
13
isRuntimeExternalCliDependency,
14
findInlinedExternalPackages,
15
+ selectCliRuntimeExternalDependencies,
16
shouldBundleCliDependency,
17
} from "./cli-external-packages.ts";
18
@@ -20,6 +21,9 @@ const PackageManifest = Schema.Struct({
21
dependencies: Schema.optional(Schema.Record(Schema.String, Schema.String)),
22
optionalDependencies: Schema.optional(Schema.Record(Schema.String, Schema.String)),
23
peerDependencies: Schema.optional(Schema.Record(Schema.String, Schema.String)),
24
+ peerDependenciesMeta: Schema.optional(
25
+ Schema.Record(Schema.String, Schema.Struct({ optional: Schema.optional(Schema.Boolean) })),
26
+ ),
27
});
28
type PackageManifest = typeof PackageManifest.Type;
29
@@ -120,6 +124,47 @@ it.layer(NodeServices.layer)("external package dependency closure", (it) => {
124
);
125
}),
126
);
127
+
128
+ // The stage installs only externals the server lists, so a required peer must be reachable from them.
129
+ it.effect("stages a provider for every required peer of a staged external", () =>
130
+ Effect.gen(function* () {
131
+ const fileSystem = yield* FileSystem.FileSystem;
132
+ const path = yield* Path.Path;
133
+ const installed = yield* readInstalledPackages;
134
+ const server = decodeManifest(
135
+ yield* fileSystem.readFileString(
136
+ path.resolve(
137
+ path.dirname(NodeURL.fileURLToPath(import.meta.url)),
138
+ "../../apps/server/package.json",
139
+ ),
140
+ ),
141
+ );
142
+
143
+ const staged = new Set<string>();
144
+ const queue = Object.keys(selectCliRuntimeExternalDependencies(server.dependencies ?? {}));
145
+ for (const name of queue) {
146
+ if (staged.has(name)) continue;
147
+ staged.add(name);
148
+ const manifest = installed.get(name);
149
+ queue.push(
150
+ ...Object.keys({ ...manifest?.dependencies, ...manifest?.optionalDependencies }),
151
+ );
152
+ }
153
+
154
+ const missing = [...staged].flatMap((name) => {
155
+ const manifest = installed.get(name);
156
+ return Object.keys(manifest?.peerDependencies ?? {})
157
+ .filter((peer) => !manifest?.peerDependenciesMeta?.[peer]?.optional && !staged.has(peer))
158
+ .map((peer) => `${name} -> ${peer}`);
159
+ });
160
+
161
+ assert.deepStrictEqual(
162
+ missing,
163
+ [],
164
+ `these peers of staged external packages are missing from the packaged app; add them to apps/server dependencies: ${missing.join(", ")}`,
165
+ );
166
+ }),
167
+ );
168
});
169
170
describe("findInlinedExternalPackages", () => {