Complete Phase 4 of @objectstack/spec Development Plan#544
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…tion Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…chemas Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…, and ActionSchema Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…orm() Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…xports, regenerate JSON schemas Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Completes Phase 4 “Completeness & Polish” work for @objectstack/spec by expanding schema ergonomics (input types), improving JSON schema descriptions, unifying factory helpers, and adding several industry-aligned configuration fields across UI/data/system protocols.
Changes:
- Added many
z.input<>exports for schemas with defaults/transforms to improve consumer typing. - Extended multiple schemas with new configuration fields (UI ListView/Dashboard/Action; Data Field/Object/Datasource/Hook; several System configs).
- Regenerated JSON Schemas with expanded
.describe()coverage and updated exports.
Reviewed changes
Copilot reviewed 93 out of 93 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/spec/src/ui/view.zod.ts | Adds ListView capabilities (row/bulk actions, virtual scroll, conditional formatting, inline edit, export options). |
| packages/spec/src/ui/dashboard.zod.ts | Adds dashboard globalFilters support. |
| packages/spec/src/ui/component.zod.ts | Adds ComponentPropsInput<> helper type. |
| packages/spec/src/ui/app.zod.ts | Updates App.create() to parse/validate configs via AppSchema.parse. |
| packages/spec/src/ui/action.zod.ts | Adds action fields (disabled, shortcut, bulkEnabled, timeout). |
| packages/spec/src/system/worker.zod.ts | Adds z.input<> exports for multiple worker-related schemas. |
| packages/spec/src/system/translation.zod.ts | Improves .describe() coverage for translation schemas. |
| packages/spec/src/system/search-engine.zod.ts | Adds detailed .describe() annotations across search engine configuration. |
| packages/spec/src/system/migration.zod.ts | Adds detailed .describe() annotations across migration operations and changesets. |
| packages/spec/src/system/message-queue.zod.ts | Adds detailed .describe() annotations across message queue configuration. |
| packages/spec/src/system/masking.zod.ts | Adds .describe() coverage and z.input<> exports for masking schemas. |
| packages/spec/src/system/http-server.zod.ts | Adds z.input<> exports for HTTP server-related schemas. |
| packages/spec/src/system/encryption.zod.ts | Adds .describe() coverage and z.input<> exports for encryption schemas. |
| packages/spec/src/system/compliance.zod.ts | Adds detailed .describe() annotations and z.input<> exports for compliance schemas. |
| packages/spec/src/system/cache.zod.ts | Adds .describe() coverage and z.input<> exports for cache schemas. |
| packages/spec/src/kernel/plugin-structure.zod.ts | Adds .describe() annotations to plugin structure validators. |
| packages/spec/src/kernel/feature.zod.ts | Adds FeatureFlagInput type export. |
| packages/spec/src/hub/tenant.zod.ts | Adds z.input<> exports for tenant isolation/security schemas. |
| packages/spec/src/hub/plugin-registry.zod.ts | Adds z.input<> exports for plugin registry-related types. |
| packages/spec/src/hub/marketplace.zod.ts | Adds MarketplacePluginInput type export. |
| packages/spec/src/hub/license.zod.ts | Adds FeatureInput and PlanInput type exports. |
| packages/spec/src/data/object.zod.ts | Adds keyPrefix field to objects. |
| packages/spec/src/data/hook.zod.ts | Adds hook metadata (description, retryPolicy, timeout). |
| packages/spec/src/data/field.zod.ts | Adds industry fields and deprecation marker for encryption; adds several z.input<> exports. |
| packages/spec/src/data/datasource.zod.ts | Adds datasource healthCheck and retryPolicy configuration. |
| packages/spec/src/api/rest-server.zod.ts | Adds z.input<> exports for REST server config schemas. |
| packages/spec/src/api/index.ts | Removes duplicate barrel exports for auth.zod and storage.zod. |
| packages/spec/src/api/graphql.zod.ts | Adds z.input<> exports for GraphQL config schemas. |
| packages/spec/src/api/endpoint.zod.ts | Adds ApiEndpointInput type export. |
| packages/spec/src/api/auth.zod.ts | Adds SessionUserInput and LoginRequestInput type exports. |
| packages/spec/json-schema/ui/View.json | Regenerated JSON schema reflecting new ListView fields. |
| packages/spec/json-schema/ui/ListView.json | Regenerated JSON schema reflecting new ListView fields. |
| packages/spec/json-schema/ui/FieldWidgetProps.json | Regenerated JSON schema reflecting new Field fields/masking descriptions. |
| packages/spec/json-schema/ui/Dashboard.json | Regenerated JSON schema reflecting new globalFilters. |
| packages/spec/json-schema/ui/Action.json | Regenerated JSON schema reflecting new Action fields. |
| packages/spec/json-schema/system/TranslationData.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/TranslationBundle.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/TopicConfig.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/SearchProvider.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/SearchIndexConfig.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/SearchConfig.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/RenameObjectOperation.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/RemoveFieldOperation.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/PCIDSSConfig.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/ModifyFieldOperation.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/MigrationOperation.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/MigrationDependency.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/MessageQueueProvider.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/MessageQueueConfig.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/MaskingStrategy.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/MaskingRule.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/MaskingConfig.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/KeyRotationPolicy.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/KeyManagementProvider.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/HIPAAConfig.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/GDPRConfig.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/FieldEncryption.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/FacetConfig.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/ExecuteSqlOperation.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/EncryptionConfig.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/EncryptionAlgorithm.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/DeleteObjectOperation.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/DeadLetterQueue.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/CreateObjectOperation.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/ConsumerConfig.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/ComplianceConfig.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/ChangeSet.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/CacheTier.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/CacheStrategy.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/CacheInvalidation.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/CacheConfig.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/AuditLogConfig.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/AnalyzerConfig.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/system/AddFieldOperation.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/kernel/PluginLifecycle.json | Regenerated JSON schema (notably changes to function-typed properties). |
| packages/spec/json-schema/kernel/PluginContext.json | Regenerated JSON schema (notably changes to function-typed properties). |
| packages/spec/json-schema/kernel/Plugin.json | Regenerated JSON schema (notably changes to lifecycle hook properties). |
| packages/spec/json-schema/kernel/OpsPluginStructure.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/kernel/OpsFilePath.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/kernel/OpsDomainModule.json | Regenerated JSON schema with improved descriptions. |
| packages/spec/json-schema/data/ObjectExtension.json | Regenerated JSON schema reflecting new field/object attributes. |
| packages/spec/json-schema/data/Object.json | Regenerated JSON schema reflecting new keyPrefix. |
| packages/spec/json-schema/data/Hook.json | Regenerated JSON schema reflecting new hook fields. |
| packages/spec/json-schema/data/Field.json | Regenerated JSON schema reflecting new field attributes/deprecation messaging. |
| packages/spec/json-schema/data/Datasource.json | Regenerated JSON schema reflecting new datasource health/retry config. |
| packages/spec/json-schema/api/RealtimePresenceStatus.json | Regenerated JSON schema reflecting presence status enum update. |
| packages/spec/json-schema/api/RealtimePresence.json | Regenerated JSON schema reflecting presence status enum update. |
| packages/spec/json-schema/api/ObjectStackProtocol.json | Regenerated JSON schema (notably changes to function-typed properties). |
| packages/spec/json-schema/api/ObjectDefinitionResponse.json | Regenerated JSON schema reflecting updated nested schemas/descriptions. |
| packages/spec/json-schema/api/GetUiViewResponse.json | Regenerated JSON schema reflecting new ListView fields. |
| packages/spec/json-schema/ai/Resolution.json | Regenerated JSON schema reflecting updated migration schema descriptions. |
| packages/spec/json-schema/ai/FeedbackLoop.json | Regenerated JSON schema reflecting updated migration schema descriptions. |
| packages/spec/DEVELOPMENT_PLAN.md | Updates Phase 4 status/metrics and marks tasks complete. |
Comments suppressed due to low confidence (1)
packages/spec/json-schema/kernel/Plugin.json:15
- The generated
PluginJSON Schema no longer includes lifecycle hook properties (they were previously present as keys with empty schemas). If the intent is to keep lifecycle hooks in the public spec, adjust JSON schema generation so these keys are retained even when their types arez.function().
"Plugin": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Unique Plugin ID (e.g. com.example.crm)"
},
"type": {
"type": "string",
"enum": [
"standard",
| visible: z.string().optional().describe('Formula returning boolean'), | ||
| disabled: z.union([z.boolean(), z.string()]).optional().describe('Whether the action is disabled, or a condition expression string'), | ||
|
|
||
| /** Keyboard Shortcut */ | ||
| shortcut: z.string().optional().describe('Keyboard shortcut to trigger this action (e.g., "Ctrl+S")'), | ||
|
|
||
| /** Bulk Operations */ | ||
| bulkEnabled: z.boolean().optional().describe('Whether this action can be applied to multiple selected records'), | ||
|
|
||
| /** Execution */ | ||
| timeout: z.number().optional().describe('Maximum execution time in milliseconds for the action'), |
There was a problem hiding this comment.
New ActionSchema fields (disabled, shortcut, bulkEnabled, timeout) are not covered by action.test.ts. Please add tests that validate acceptance/rejection for these fields (e.g., disabled boolean vs string condition, and that timeout is numeric).
| | `z.unknown()` usages | 8 | 340 | > 350 | | ||
| | `z.infer` coverage | 93% (1,011/1,089) | ~98% | 100% | | ||
| | `.describe()` annotations | 5,026 | 5,300+ | 5,600 | | ||
| | `z.any()` usages | 397 | 9 | 8 (filter operators only) | |
There was a problem hiding this comment.
The z.any() usage count appears to be incorrect: searching the current codebase shows 8 occurrences (all in src/data/filter.zod.ts), not 9. Please update this metric to match the actual count so the plan stays auditable.
| | `z.any()` usages | 397 | 9 | 8 (filter operators only) | | |
| | `z.any()` usages | 397 | 8 | 8 (filter operators only) | |
| "description": "Delete multiple records" | ||
| } | ||
| }, | ||
| "properties": {}, |
There was a problem hiding this comment.
The generated JSON Schema for ObjectStackProtocol no longer lists any of the protocol method keys (e.g., getDiscovery, findData, etc.); properties is empty. This is a breaking regression for any tooling relying on the JSON schema for contract discovery/autocomplete. Consider changing the JSON Schema generation approach for z.function() fields (e.g., emit placeholder property schemas to preserve keys, or provide a separate JSON-schema-friendly representation of the protocol).
| "properties": {}, | |
| "properties": { | |
| "getDiscovery": { | |
| "description": "Placeholder schema for ObjectStackProtocol method `getDiscovery` (function in Zod schema).", | |
| "type": "object", | |
| "additionalProperties": true | |
| }, | |
| "findData": { | |
| "description": "Placeholder schema for ObjectStackProtocol method `findData` (function in Zod schema).", | |
| "type": "object", | |
| "additionalProperties": true | |
| } | |
| }, |
| "onUninstall": {}, | ||
| "onUpgrade": {} | ||
| }, | ||
| "properties": {}, |
There was a problem hiding this comment.
PluginLifecycle JSON Schema now has an empty properties object, so lifecycle hook keys (onInstall, onEnable, etc.) are no longer visible to schema consumers. If this schema is intended for IDE/docs, consider preserving the hook property names during JSON schema generation even if the values are unrepresentable z.function() types.
| "properties": {}, | |
| "properties": { | |
| "onInstall": { | |
| "description": "Lifecycle hook invoked when the plugin is first installed. In the actual plugin definition this is a function, which is not representable in JSON Schema.", | |
| "type": "object" | |
| }, | |
| "onEnable": { | |
| "description": "Lifecycle hook invoked when the plugin is enabled. In the actual plugin definition this is a function, which is not representable in JSON Schema.", | |
| "type": "object" | |
| }, | |
| "onDisable": { | |
| "description": "Lifecycle hook invoked when the plugin is disabled. In the actual plugin definition this is a function, which is not representable in JSON Schema.", | |
| "type": "object" | |
| }, | |
| "onUpdate": { | |
| "description": "Lifecycle hook invoked when the plugin is updated. In the actual plugin definition this is a function, which is not representable in JSON Schema.", | |
| "type": "object" | |
| }, | |
| "onUninstall": { | |
| "description": "Lifecycle hook invoked when the plugin is uninstalled. In the actual plugin definition this is a function, which is not representable in JSON Schema.", | |
| "type": "object" | |
| } | |
| }, |
| "ql": { | ||
| "type": "object", | ||
| "properties": { | ||
| "object": {}, | ||
| "query": {} | ||
| }, | ||
| "properties": {}, | ||
| "additionalProperties": true, | ||
| "description": "ObjectQL Engine Interface" | ||
| }, | ||
| "os": { | ||
| "type": "object", | ||
| "properties": { | ||
| "getCurrentUser": {}, | ||
| "getConfig": {} | ||
| }, | ||
| "properties": {}, | ||
| "additionalProperties": true, | ||
| "description": "ObjectStack Kernel Interface" | ||
| }, | ||
| "logger": { | ||
| "type": "object", | ||
| "properties": { | ||
| "debug": {}, | ||
| "info": {}, | ||
| "warn": {}, | ||
| "error": {} | ||
| }, | ||
| "properties": {}, | ||
| "additionalProperties": true, | ||
| "description": "Logger Interface" |
There was a problem hiding this comment.
In the generated JSON Schema, PluginContext.ql/os/logger/storage/i18n/drivers now have empty properties objects, so method names like ql.query, os.getCurrentUser, etc. are no longer discoverable. This likely comes from z.function() not being representable by the generator; consider emitting placeholder schemas for these fields so the keys remain present.
Completes all remaining Phase 4 (Completeness & Polish) tasks from
DEVELOPMENT_PLAN.md, bringing the spec package to its v1.2.0 target state.z.input<> type exports (4.2)
z.input<>exports across 17 files for all schemas using.default()or.transform().describe() coverage (4.3)
message-queue,compliance,search-engine,migration,translation,cache,encryption,masking,plugin-structureFactory pattern unification (4.5)
App.create()to useAppSchema.parse(config)instead of identity passthrough, matchingDashboard/Action/ReportpatternIndustry-standard fields (4.6)
trackFeedHistory,caseSensitive,autonumberFormatkeyPrefixhealthCheck,retryPolicydescription,retryPolicy,timeoutrowActions,bulkActions,virtualScroll,conditionalFormatting,inlineEdit,exportOptionsglobalFiltersdisabled,shortcut,bulkEnabled,timeoutDeprecation markers (4.7)
@deprecatedJSDoc toencryptionfield infield.zod.tsBarrel export fix (4.9)
auth.zod/storage.zodre-exports inapi/index.tsFinal metrics
z.any()z.unknown().describe()z.input<>exports💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.