Skip to content

Commit c54a06a

Browse files
authored
Merge pull request #545 from objectstack-ai/copilot/audit-objectstack-protocol
2 parents 2ac5f15 + 0d6a978 commit c54a06a

67 files changed

Lines changed: 1337 additions & 798 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/DEVELOPMENT_PLAN.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ Based on the full audit of 139 `.zod.ts` files (43,746 LOC, 1,089 schemas), the
1313

1414
### Key Metrics Baseline
1515

16-
| Metric | Original | Current | Phase 4 Target |
17-
|---|---|---|---|
18-
| `z.any()` usages | 397 | 9 | 8 (filter operators only) |
19-
| `z.unknown()` usages | 8 | 343 | > 350 |
20-
| `z.infer` coverage | 93% (1,011/1,089) | ~99% | 100% |
21-
| `.describe()` annotations | 5,026 | 5,341 | 5,600 |
22-
| `z.input<>` exports | 0 | 122 | Comprehensive |
23-
| Schema duplications | 13+ pairs | 1 | 0 |
24-
| Runtime logic violations | 2 files | 2 files (deprecated) | 0 (moved to @objectstack/core) |
25-
| Naming violations | 3 | 0 | 0 |
16+
| Metric | Original | Current | Phase 4 Target | Status |
17+
|---|---|---|---|---|
18+
| `z.any()` usages | 397 | 8 | 8 (filter operators only) | |
19+
| `z.unknown()` usages | 8 | 351 | > 350 | |
20+
| `z.infer` coverage | 93% (1,011/1,089) | ~100% (1,055) | 100% | |
21+
| `.describe()` annotations | 5,026 | 5,671 | 5,600 | |
22+
| `z.input<>` exports | 0 | 122 | Comprehensive ||
23+
| Schema duplications | 13+ pairs | 0 | 0 | |
24+
| Runtime logic violations | 2 files | 2 files (deprecated) | 0 (moved to @objectstack/core) ||
25+
| Naming violations | 3 | 0 | 0 ||
2626

2727
---
2828

@@ -537,6 +537,7 @@ formula: z.string().optional()
537537
**Timeline:** 1 week
538538
**Breaking changes:**
539539
- `MetricType` renamed to `LicenseMetricType` in `hub/license.zod.ts`
540+
- `MetricType` renamed to `AggregationMetricType` in `data/analytics.zod.ts`
540541
- `system/service-registry.zod.ts` renamed to `system/core-services.zod.ts`
541542
- `metadata-persistence.zod.ts` property keys changed from snake_case to camelCase
542543
- `$exist` operator renamed to `$exists` in `data/filter.zod.ts`

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

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464
"type": "object",
6565
"properties": {
6666
"buildId": {
67-
"type": "string"
67+
"type": "string",
68+
"description": "Unique build identifier"
6869
},
6970
"status": {
7071
"type": "string",
@@ -73,7 +74,8 @@
7374
"in_progress",
7475
"success",
7576
"failed"
76-
]
77+
],
78+
"description": "Current build status"
7779
},
7880
"progress": {
7981
"type": "number",
@@ -83,11 +85,13 @@
8385
},
8486
"startedAt": {
8587
"type": "string",
86-
"format": "date-time"
88+
"format": "date-time",
89+
"description": "Timestamp when the build started"
8790
},
8891
"completedAt": {
8992
"type": "string",
90-
"format": "date-time"
93+
"format": "date-time",
94+
"description": "Timestamp when the build completed"
9195
},
9296
"duration": {
9397
"type": "number",
@@ -100,7 +104,8 @@
100104
"properties": {
101105
"timestamp": {
102106
"type": "string",
103-
"format": "date-time"
107+
"format": "date-time",
108+
"description": "Log entry timestamp"
104109
},
105110
"level": {
106111
"type": "string",
@@ -109,37 +114,44 @@
109114
"info",
110115
"warn",
111116
"error"
112-
]
117+
],
118+
"description": "Log severity level"
113119
},
114120
"message": {
115-
"type": "string"
121+
"type": "string",
122+
"description": "Log message content"
116123
}
117124
},
118125
"required": [
119126
"timestamp",
120127
"level",
121128
"message"
122129
],
123-
"additionalProperties": false
124-
}
130+
"additionalProperties": false,
131+
"description": "Build log entry"
132+
},
133+
"description": "Build log entries"
125134
},
126135
"error": {
127-
"type": "string"
136+
"type": "string",
137+
"description": "Error message if the build failed"
128138
}
129139
},
130140
"required": [
131141
"buildId",
132142
"status",
133143
"progress"
134144
],
135-
"additionalProperties": false
145+
"additionalProperties": false,
146+
"description": "Build status details"
136147
}
137148
},
138149
"required": [
139150
"success",
140151
"data"
141152
],
142-
"additionalProperties": false
153+
"additionalProperties": false,
154+
"description": "Response containing build status information"
143155
}
144156
},
145157
"$schema": "http://json-schema.org/draft-07/schema#"

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,14 +1606,16 @@
16061606
"timestamp",
16071607
"duration"
16081608
],
1609-
"additionalProperties": false
1609+
"additionalProperties": false,
1610+
"description": "Compilation result"
16101611
}
16111612
},
16121613
"required": [
16131614
"success",
16141615
"data"
16151616
],
1616-
"additionalProperties": false
1617+
"additionalProperties": false,
1618+
"description": "Response containing the compiled manifest result"
16171619
}
16181620
},
16191621
"$schema": "http://json-schema.org/draft-07/schema#"

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"isolation"
6161
],
6262
"additionalProperties": false,
63-
"description": "Runtime instance configuration"
63+
"description": "Runtime configuration for the space"
6464
},
6565
"bom": {
6666
"type": "object",
@@ -196,7 +196,8 @@
196196
"planId",
197197
"status"
198198
],
199-
"additionalProperties": false
199+
"additionalProperties": false,
200+
"description": "Subscription plan configuration"
200201
},
201202
"deployment": {
202203
"type": "object",
@@ -228,15 +229,17 @@
228229
"required": [
229230
"provider"
230231
],
231-
"additionalProperties": false
232+
"additionalProperties": false,
233+
"description": "Deployment settings for the space"
232234
}
233235
},
234236
"required": [
235237
"name",
236238
"slug",
237239
"ownerId"
238240
],
239-
"additionalProperties": false
241+
"additionalProperties": false,
242+
"description": "Request payload for creating a new space"
240243
}
241244
},
242245
"$schema": "http://json-schema.org/draft-07/schema#"

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616
"shared_schema",
1717
"isolated_schema",
1818
"isolated_db"
19-
]
19+
],
20+
"description": "Data isolation level for the tenant"
2021
},
2122
"customizations": {
2223
"type": "object",
2324
"additionalProperties": {},
24-
"description": "Custom configuration values"
25+
"description": "Tenant-specific customizations"
2526
},
2627
"quotas": {
2728
"type": "object",
@@ -42,14 +43,16 @@
4243
"description": "API requests per minute"
4344
}
4445
},
45-
"additionalProperties": false
46+
"additionalProperties": false,
47+
"description": "Resource quotas for the tenant"
4648
}
4749
},
4850
"required": [
4951
"name",
5052
"isolationLevel"
5153
],
52-
"additionalProperties": false
54+
"additionalProperties": false,
55+
"description": "Request payload for creating a new tenant"
5356
}
5457
},
5558
"$schema": "http://json-schema.org/draft-07/schema#"

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@
119119
"timezone"
120120
],
121121
"additionalProperties": false
122+
},
123+
"metadata": {
124+
"type": "object",
125+
"additionalProperties": {},
126+
"description": "Custom metadata key-value pairs for extensibility"
122127
}
123128
},
124129
"required": [

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
"type": "object",
66
"properties": {
77
"buildId": {
8-
"type": "string"
8+
"type": "string",
9+
"description": "Unique build identifier"
910
}
1011
},
1112
"required": [
1213
"buildId"
1314
],
14-
"additionalProperties": false
15+
"additionalProperties": false,
16+
"description": "Request parameters for retrieving build status"
1517
}
1618
},
1719
"$schema": "http://json-schema.org/draft-07/schema#"

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
"type": "object",
66
"properties": {
77
"pluginId": {
8-
"type": "string"
8+
"type": "string",
9+
"description": "Plugin identifier to retrieve"
910
}
1011
},
1112
"required": [
1213
"pluginId"
1314
],
14-
"additionalProperties": false
15+
"additionalProperties": false,
16+
"description": "Request parameters for retrieving marketplace plugin details"
1517
}
1618
},
1719
"$schema": "http://json-schema.org/draft-07/schema#"

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"required": [
1313
"pluginId"
1414
],
15-
"additionalProperties": false
15+
"additionalProperties": false,
16+
"description": "Request parameters for retrieving plugin versions"
1617
}
1718
},
1819
"$schema": "http://json-schema.org/draft-07/schema#"

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

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,39 +64,46 @@
6464
"type": "object",
6565
"properties": {
6666
"pluginId": {
67-
"type": "string"
67+
"type": "string",
68+
"description": "Plugin identifier"
6869
},
6970
"versions": {
7071
"type": "array",
7172
"items": {
7273
"type": "object",
7374
"properties": {
7475
"version": {
75-
"type": "string"
76+
"type": "string",
77+
"description": "Semantic version string"
7678
},
7779
"publishedAt": {
7880
"type": "string",
79-
"format": "date-time"
81+
"format": "date-time",
82+
"description": "Timestamp when this version was published"
8083
},
8184
"deprecated": {
8285
"type": "boolean",
83-
"default": false
86+
"default": false,
87+
"description": "Whether this version is deprecated"
8488
},
8589
"yanked": {
8690
"type": "boolean",
8791
"default": false,
8892
"description": "Whether this version was removed"
8993
},
9094
"changelog": {
91-
"type": "string"
95+
"type": "string",
96+
"description": "Release notes for this version"
9297
}
9398
},
9499
"required": [
95100
"version",
96101
"publishedAt"
97102
],
98-
"additionalProperties": false
99-
}
103+
"additionalProperties": false,
104+
"description": "Version metadata for a plugin release"
105+
},
106+
"description": "List of available versions"
100107
},
101108
"latest": {
102109
"type": "string",
@@ -112,14 +119,16 @@
112119
"versions",
113120
"latest"
114121
],
115-
"additionalProperties": false
122+
"additionalProperties": false,
123+
"description": "Plugin version listing"
116124
}
117125
},
118126
"required": [
119127
"success",
120128
"data"
121129
],
122-
"additionalProperties": false
130+
"additionalProperties": false,
131+
"description": "Response containing plugin version information"
123132
}
124133
},
125134
"$schema": "http://json-schema.org/draft-07/schema#"

0 commit comments

Comments
 (0)