Skip to content

Commit 1f2a79f

Browse files
Copilothotlong
andcommitted
Phase 3: Type Safety Hardening - bulk z.any() → z.unknown() migration
- 3.1: Replaced z.record(z.string(), z.any()) → z.record(z.string(), z.unknown()) across all .zod.ts files - 3.2: Tightened id fields in data-engine.zod.ts to z.union([z.string(), z.number()]) - 3.3a: Updated kernel/plugin.zod.ts metadata/events records (service methods kept as z.any()) - 3.3b: Replaced z.promise(z.any()) and z.function().args(z.any()) in data/driver.zod.ts - 3.3c: Replaced z.promise(z.any()) returns and z.record data patterns in data-engine.zod.ts - 3.3d: Replaced payload, handler, filter, transform z.any() in kernel/events.zod.ts - 3.3e: Replaced config-related z.any() in kernel/manifest.zod.ts - 3.4: Replaced z.array(z.any()) in UI schemas (component, app, view) - 3.5: Deprecated location field in ui/action.zod.ts with z.unknown() - Also migrated standalone z.any() for data fields across ai/, api/, system/, automation/, shared/ Final counts: z.any()=62 (down from 394), z.unknown()=340 Remaining z.any() are legitimate: service methods, filter operators, lifecycle hooks All 3073 tests pass, build succeeds Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent c3d0cf2 commit 1f2a79f

112 files changed

Lines changed: 403 additions & 340 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.

packages/spec/json-schema/ai/ModelRegistry.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,8 @@
320320
"type": "string"
321321
},
322322
"enum": {
323-
"type": "array"
323+
"type": "array",
324+
"items": {}
324325
}
325326
},
326327
"additionalProperties": false

packages/spec/json-schema/ai/PromptTemplate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@
7070
"type": "string"
7171
},
7272
"enum": {
73-
"type": "array"
73+
"type": "array",
74+
"items": {}
7475
}
7576
},
7677
"additionalProperties": false

packages/spec/json-schema/ai/PromptVariable.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
"type": "string"
4141
},
4242
"enum": {
43-
"type": "array"
43+
"type": "array",
44+
"items": {}
4445
}
4546
},
4647
"additionalProperties": false

packages/spec/json-schema/api/AnalyticsSqlResponse.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@
6767
"type": "string"
6868
},
6969
"params": {
70-
"type": "array"
70+
"type": "array",
71+
"items": {}
7172
}
7273
},
7374
"required": [

packages/spec/json-schema/api/ApiDiscoveryResponse.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
},
145145
"enum": {
146146
"type": "array",
147+
"items": {},
147148
"description": "Allowed values"
148149
},
149150
"default": {

packages/spec/json-schema/api/ApiEndpointRegistration.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
},
9898
"enum": {
9999
"type": "array",
100+
"items": {},
100101
"description": "Allowed values"
101102
},
102103
"default": {

packages/spec/json-schema/api/ApiParameter.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
},
5252
"enum": {
5353
"type": "array",
54+
"items": {},
5455
"description": "Allowed values"
5556
},
5657
"default": {

packages/spec/json-schema/api/ApiRegistry.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@
159159
},
160160
"enum": {
161161
"type": "array",
162+
"items": {},
162163
"description": "Allowed values"
163164
},
164165
"default": {
@@ -709,6 +710,7 @@
709710
},
710711
"enum": {
711712
"type": "array",
713+
"items": {},
712714
"description": "Allowed values"
713715
},
714716
"default": {
@@ -1266,6 +1268,7 @@
12661268
},
12671269
"enum": {
12681270
"type": "array",
1271+
"items": {},
12691272
"description": "Allowed values"
12701273
},
12711274
"default": {

packages/spec/json-schema/api/ApiRegistryEntry.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@
139139
},
140140
"enum": {
141141
"type": "array",
142+
"items": {},
142143
"description": "Allowed values"
143144
},
144145
"default": {

packages/spec/json-schema/api/AppDefinitionResponse.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,12 @@
354354
},
355355
"objects": {
356356
"type": "array",
357+
"items": {},
357358
"description": "Objects belonging to this app"
358359
},
359360
"apis": {
360361
"type": "array",
362+
"items": {},
361363
"description": "Custom APIs belonging to this app"
362364
}
363365
},

0 commit comments

Comments
 (0)