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, 17:00 UTC
chore(lint): enforce schemaStructWithTag (#25095)
Julius Marminge committed
Oct 25, 2026 at 18:18 UTC
c4dbf19e11daf52829afe77e9e32f32d9dc200ef
3 files changed
+3
-8
packages/effect-acp/src/agent.test.ts
+1
-4
@@ -37,10 +37,7 @@ const ExtRequest = jsonRpcRequest("x/test", Schema.Struct({ hello: Schema.String
37
const ExtResponse = jsonRpcResponse(Schema.Struct({ ok: Schema.Boolean }));
38
const DieResponse = Schema.Struct({
39
id: Schema.Number,
40
- error: Schema.Struct({
41
- _tag: Schema.Literal("Cause"),
42
- data: Schema.Tuple([Schema.Struct({ _tag: Schema.Literal("Die") })]),
43
- }),
40
+ error: Schema.TaggedStruct("Cause", { data: Schema.Tuple([Schema.TaggedStruct("Die", {})]) }),
41
});
42
const decodeRequestPermissionRequest = Schema.decodeEffect(
43
Schema.fromJsonString(RequestPermissionRequest),
packages/effect-acp/src/client.test.ts
+1
-4
@@ -53,10 +53,7 @@ const PermissionResponse = jsonRpcResponse(AcpSchema.RequestPermissionResponse);
53
const ErrorResponse = Schema.Struct({ id: Schema.String, error: Schema.Unknown });
54
const DieResponse = Schema.Struct({
55
id: Schema.String,
56
- error: Schema.Struct({
57
- _tag: Schema.Literal("Cause"),
58
- data: Schema.Tuple([Schema.Struct({ _tag: Schema.Literal("Die") })]),
59
- }),
56
+ error: Schema.TaggedStruct("Cause", { data: Schema.Tuple([Schema.TaggedStruct("Die", {})]) }),
57
});
58
const decodePromptRequestLine = Schema.decodeEffect(Schema.fromJsonString(PromptRequest));
59
const XAiPromptCompleteNotification = jsonRpcNotification(
tsconfig.base.json
+1
@@ -24,6 +24,7 @@
24
"namespaceImportPackages": ["@effect/platform-node", "effect"],
25
"effectFn": ["span", "inferred-span", "suggested-span"],
26
"diagnosticSeverity": {
27
+ "schemaStructWithTag": "error",
28
"preferTypedSchemaDecoder": "error",
29
"catchUnfailableEffect": "error",
30
"raceFirstWithSleepToTimeout": "error",