@objectstack/spec 16.0.0 → 16.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -2
- package/api-surface.json +12 -0
- package/dist/cloud/index.js.map +1 -1
- package/dist/cloud/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +63 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +62 -1
- package/dist/index.mjs.map +1 -1
- package/dist/kernel/index.d.mts +1 -1
- package/dist/kernel/index.d.ts +1 -1
- package/dist/kernel/index.js +63 -0
- package/dist/kernel/index.js.map +1 -1
- package/dist/kernel/index.mjs +62 -1
- package/dist/kernel/index.mjs.map +1 -1
- package/dist/{platform-capabilities-hh9EmpbP.d.mts → platform-capabilities-BlaonORh.d.mts} +71 -1
- package/dist/{platform-capabilities-hh9EmpbP.d.ts → platform-capabilities-BlaonORh.d.ts} +71 -1
- package/dist/system/index.js.map +1 -1
- package/dist/system/index.mjs.map +1 -1
- package/dist/ui/index.d.mts +117 -117
- package/dist/ui/index.d.ts +117 -117
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs.map +1 -1
- package/json-schema/ai/AIKnowledge.json +2 -2
- package/json-schema/ai/AIModelConfig.json +2 -2
- package/json-schema/ai/AITool.json +2 -2
- package/json-schema/ai/AIUsageRecord.json +2 -2
- package/json-schema/ai/Agent.json +2 -2
- package/json-schema/ai/BlueprintApp.json +2 -2
- package/json-schema/ai/BlueprintDashboard.json +2 -2
- package/json-schema/ai/BlueprintField.json +2 -2
- package/json-schema/ai/BlueprintNavItem.json +2 -2
- package/json-schema/ai/BlueprintObject.json +2 -2
- package/json-schema/ai/BlueprintSeed.json +2 -2
- package/json-schema/ai/BlueprintView.json +2 -2
- package/json-schema/ai/BlueprintWidgetCondition.json +2 -2
- package/json-schema/ai/CodeContent.json +2 -2
- package/json-schema/ai/ConversationAnalytics.json +2 -2
- package/json-schema/ai/ConversationContext.json +2 -2
- package/json-schema/ai/ConversationMessage.json +2 -2
- package/json-schema/ai/ConversationSession.json +2 -2
- package/json-schema/ai/ConversationSummary.json +2 -2
- package/json-schema/ai/EmbeddingModel.json +2 -2
- package/json-schema/ai/FileContent.json +2 -2
- package/json-schema/ai/FileKnowledgeSource.json +2 -2
- package/json-schema/ai/FunctionCall.json +2 -2
- package/json-schema/ai/HttpKnowledgeSource.json +2 -2
- package/json-schema/ai/ImageContent.json +2 -2
- package/json-schema/ai/KnowledgeChunk.json +2 -2
- package/json-schema/ai/KnowledgeDocument.json +2 -2
- package/json-schema/ai/KnowledgeHit.json +2 -2
- package/json-schema/ai/KnowledgeRefreshPolicy.json +2 -2
- package/json-schema/ai/KnowledgeSource.json +2 -2
- package/json-schema/ai/KnowledgeSourceKind.json +2 -2
- package/json-schema/ai/MCPApprovalPolicy.json +2 -2
- package/json-schema/ai/MCPServerRef.json +2 -2
- package/json-schema/ai/MCPToolBinding.json +2 -2
- package/json-schema/ai/MCPTransport.json +2 -2
- package/json-schema/ai/MessageContent.json +2 -2
- package/json-schema/ai/MessageContentType.json +2 -2
- package/json-schema/ai/MessagePruningEvent.json +2 -2
- package/json-schema/ai/MessageRole.json +2 -2
- package/json-schema/ai/ModelCapability.json +2 -2
- package/json-schema/ai/ModelConfig.json +2 -2
- package/json-schema/ai/ModelLimits.json +2 -2
- package/json-schema/ai/ModelPricing.json +2 -2
- package/json-schema/ai/ModelProvider.json +2 -2
- package/json-schema/ai/ModelRegistry.json +2 -2
- package/json-schema/ai/ModelRegistryEntry.json +2 -2
- package/json-schema/ai/ModelSelectionCriteria.json +2 -2
- package/json-schema/ai/ObjectKnowledgeSource.json +2 -2
- package/json-schema/ai/PromptTemplate.json +2 -2
- package/json-schema/ai/PromptVariable.json +2 -2
- package/json-schema/ai/Skill.json +2 -2
- package/json-schema/ai/SkillTriggerCondition.json +2 -2
- package/json-schema/ai/SolutionBlueprint.json +2 -2
- package/json-schema/ai/SolutionBlueprintStrict.json +2 -2
- package/json-schema/ai/StructuredOutputConfig.json +2 -2
- package/json-schema/ai/StructuredOutputFormat.json +2 -2
- package/json-schema/ai/TextContent.json +2 -2
- package/json-schema/ai/TokenBudgetConfig.json +2 -2
- package/json-schema/ai/TokenBudgetStrategy.json +2 -2
- package/json-schema/ai/TokenUsage.json +2 -2
- package/json-schema/ai/TokenUsageStats.json +2 -2
- package/json-schema/ai/Tool.json +2 -2
- package/json-schema/ai/ToolCall.json +2 -2
- package/json-schema/ai/ToolCategory.json +2 -2
- package/json-schema/ai/TransformPipelineStep.json +2 -2
- package/json-schema/ai/VectorStore.json +2 -2
- package/json-schema/ai/VectorStoreProvider.json +2 -2
- package/json-schema/api/AckMessage.json +2 -2
- package/json-schema/api/AiInsightsRequest.json +2 -2
- package/json-schema/api/AiInsightsResponse.json +2 -2
- package/json-schema/api/AiNlqRequest.json +2 -2
- package/json-schema/api/AiNlqResponse.json +2 -2
- package/json-schema/api/AiSuggestRequest.json +2 -2
- package/json-schema/api/AiSuggestResponse.json +2 -2
- package/json-schema/api/AnalyticsEndpoint.json +2 -2
- package/json-schema/api/AnalyticsMetadataResponse.json +2 -2
- package/json-schema/api/AnalyticsQueryRequest.json +2 -2
- package/json-schema/api/AnalyticsResultResponse.json +2 -2
- package/json-schema/api/AnalyticsSqlResponse.json +2 -2
- package/json-schema/api/ApiChangelogEntry.json +2 -2
- package/json-schema/api/ApiDiscoveryQuery.json +2 -2
- package/json-schema/api/ApiDiscoveryResponse.json +2 -2
- package/json-schema/api/ApiDocumentationConfig.json +2 -2
- package/json-schema/api/ApiEndpoint.json +2 -2
- package/json-schema/api/ApiEndpointRegistration.json +2 -2
- package/json-schema/api/ApiError.json +2 -2
- package/json-schema/api/ApiMapping.json +2 -2
- package/json-schema/api/ApiMetadata.json +2 -2
- package/json-schema/api/ApiParameter.json +2 -2
- package/json-schema/api/ApiProtocolType.json +2 -2
- package/json-schema/api/ApiRegistry.json +2 -2
- package/json-schema/api/ApiRegistryEntry.json +2 -2
- package/json-schema/api/ApiResponse.json +2 -2
- package/json-schema/api/ApiRoutes.json +2 -2
- package/json-schema/api/ApiTestCollection.json +2 -2
- package/json-schema/api/ApiTestRequest.json +2 -2
- package/json-schema/api/ApiTestingUiConfig.json +2 -2
- package/json-schema/api/ApiTestingUiType.json +2 -2
- package/json-schema/api/AppDefinitionResponse.json +2 -2
- package/json-schema/api/AuthEndpoint.json +2 -2
- package/json-schema/api/AuthFeaturesConfig.json +2 -2
- package/json-schema/api/AuthProvider.json +2 -2
- package/json-schema/api/AuthProviderInfo.json +2 -2
- package/json-schema/api/AutomationActionsResponse.json +2 -2
- package/json-schema/api/AutomationApiErrorCode.json +2 -2
- package/json-schema/api/AutomationFlowPathParams.json +2 -2
- package/json-schema/api/AutomationRunPathParams.json +2 -2
- package/json-schema/api/AutomationTriggerRequest.json +2 -2
- package/json-schema/api/AutomationTriggerResponse.json +2 -2
- package/json-schema/api/BasePresence.json +2 -2
- package/json-schema/api/BaseResponse.json +2 -2
- package/json-schema/api/BatchConfig.json +2 -2
- package/json-schema/api/BatchDataRequest.json +2 -2
- package/json-schema/api/BatchDataResponse.json +2 -2
- package/json-schema/api/BatchEndpointsConfig.json +2 -2
- package/json-schema/api/BatchLoadingStrategy.json +2 -2
- package/json-schema/api/BatchOperationResult.json +2 -2
- package/json-schema/api/BatchOperationType.json +2 -2
- package/json-schema/api/BatchOptions.json +2 -2
- package/json-schema/api/BatchRecord.json +2 -2
- package/json-schema/api/BatchUpdateRequest.json +2 -2
- package/json-schema/api/BatchUpdateResponse.json +2 -2
- package/json-schema/api/BulkRequest.json +2 -2
- package/json-schema/api/BulkResponse.json +2 -2
- package/json-schema/api/CacheControl.json +2 -2
- package/json-schema/api/CacheDirective.json +2 -2
- package/json-schema/api/CacheInvalidationRequest.json +2 -2
- package/json-schema/api/CacheInvalidationResponse.json +2 -2
- package/json-schema/api/CacheInvalidationTarget.json +2 -2
- package/json-schema/api/Callback.json +2 -2
- package/json-schema/api/CheckPermissionRequest.json +2 -2
- package/json-schema/api/CheckPermissionResponse.json +2 -2
- package/json-schema/api/CodeGenerationTemplate.json +2 -2
- package/json-schema/api/CompleteChunkedUploadRequest.json +2 -2
- package/json-schema/api/CompleteChunkedUploadResponse.json +2 -2
- package/json-schema/api/CompleteUploadRequest.json +2 -2
- package/json-schema/api/ConceptListResponse.json +2 -2
- package/json-schema/api/ConflictResolutionStrategy.json +2 -2
- package/json-schema/api/CreateDataRequest.json +2 -2
- package/json-schema/api/CreateDataResponse.json +2 -2
- package/json-schema/api/CreateExportJobRequest.json +2 -2
- package/json-schema/api/CreateExportJobResponse.json +2 -2
- package/json-schema/api/CreateFlowRequest.json +2 -2
- package/json-schema/api/CreateFlowResponse.json +2 -2
- package/json-schema/api/CreateImportJobRequest.json +2 -2
- package/json-schema/api/CreateImportJobResponse.json +2 -2
- package/json-schema/api/CreateManyDataRequest.json +2 -2
- package/json-schema/api/CreateManyDataResponse.json +2 -2
- package/json-schema/api/CreateRequest.json +2 -2
- package/json-schema/api/CreateViewRequest.json +2 -2
- package/json-schema/api/CreateViewResponse.json +2 -2
- package/json-schema/api/CrossObjectBatchOperation.json +2 -2
- package/json-schema/api/CrossObjectBatchRequest.json +2 -2
- package/json-schema/api/CrossObjectBatchResponse.json +2 -2
- package/json-schema/api/CrudEndpointPattern.json +2 -2
- package/json-schema/api/CrudEndpointsConfig.json +2 -2
- package/json-schema/api/CrudOperation.json +2 -2
- package/json-schema/api/CursorMessage.json +2 -2
- package/json-schema/api/CursorPosition.json +2 -2
- package/json-schema/api/DataEvent.json +2 -2
- package/json-schema/api/DataEventType.json +2 -2
- package/json-schema/api/DataLoaderConfig.json +2 -2
- package/json-schema/api/DeduplicationStrategy.json +2 -2
- package/json-schema/api/DeleteDataRequest.json +2 -2
- package/json-schema/api/DeleteDataResponse.json +2 -2
- package/json-schema/api/DeleteFlowRequest.json +2 -2
- package/json-schema/api/DeleteFlowResponse.json +2 -2
- package/json-schema/api/DeleteManyDataRequest.json +2 -2
- package/json-schema/api/DeleteManyDataResponse.json +2 -2
- package/json-schema/api/DeleteManyRequest.json +2 -2
- package/json-schema/api/DeleteMetaItemRequest.json +2 -2
- package/json-schema/api/DeleteMetaItemResponse.json +2 -2
- package/json-schema/api/DeleteResponse.json +2 -2
- package/json-schema/api/DeleteViewRequest.json +2 -2
- package/json-schema/api/DeleteViewResponse.json +2 -2
- package/json-schema/api/DeviceRequestResponse.json +2 -2
- package/json-schema/api/DeviceTokenResponse.json +2 -2
- package/json-schema/api/DisablePackageRequest.json +2 -2
- package/json-schema/api/DisablePackageResponse.json +2 -2
- package/json-schema/api/Discovery.json +2 -2
- package/json-schema/api/DispatcherConfig.json +2 -2
- package/json-schema/api/DispatcherErrorCode.json +2 -2
- package/json-schema/api/DispatcherErrorResponse.json +2 -2
- package/json-schema/api/DispatcherRoute.json +2 -2
- package/json-schema/api/DocumentState.json +2 -2
- package/json-schema/api/ETag.json +2 -2
- package/json-schema/api/EditMessage.json +2 -2
- package/json-schema/api/EditOperation.json +2 -2
- package/json-schema/api/EditOperationType.json +2 -2
- package/json-schema/api/EmailPasswordConfigPublic.json +2 -2
- package/json-schema/api/EnablePackageRequest.json +2 -2
- package/json-schema/api/EnablePackageResponse.json +2 -2
- package/json-schema/api/EndpointRegistry.json +2 -2
- package/json-schema/api/EnhancedApiError.json +2 -2
- package/json-schema/api/ErrorCategory.json +2 -2
- package/json-schema/api/ErrorHandlingConfig.json +2 -2
- package/json-schema/api/ErrorMessage.json +2 -2
- package/json-schema/api/ErrorResponse.json +2 -2
- package/json-schema/api/EventFilter.json +2 -2
- package/json-schema/api/EventFilterCondition.json +2 -2
- package/json-schema/api/EventMessage.json +2 -2
- package/json-schema/api/EventPattern.json +2 -2
- package/json-schema/api/EventSubscription.json +2 -2
- package/json-schema/api/ExportFormat.json +2 -2
- package/json-schema/api/ExportImportTemplate.json +2 -2
- package/json-schema/api/ExportJobProgress.json +2 -2
- package/json-schema/api/ExportJobStatus.json +2 -2
- package/json-schema/api/ExportJobSummary.json +2 -2
- package/json-schema/api/ExportRequest.json +2 -2
- package/json-schema/api/FederationEntity.json +2 -2
- package/json-schema/api/FederationEntityKey.json +2 -2
- package/json-schema/api/FederationExternalField.json +2 -2
- package/json-schema/api/FederationGateway.json +2 -2
- package/json-schema/api/FederationProvides.json +2 -2
- package/json-schema/api/FederationRequires.json +2 -2
- package/json-schema/api/FieldError.json +2 -2
- package/json-schema/api/FieldMappingEntry.json +2 -2
- package/json-schema/api/FileTypeValidation.json +2 -2
- package/json-schema/api/FileUploadResponse.json +2 -2
- package/json-schema/api/FilterOperator.json +2 -2
- package/json-schema/api/FindDataRequest.json +2 -2
- package/json-schema/api/FindDataResponse.json +2 -2
- package/json-schema/api/FlowSummary.json +2 -2
- package/json-schema/api/GeneratedApiDocumentation.json +2 -2
- package/json-schema/api/GeneratedEndpoint.json +2 -2
- package/json-schema/api/GetAnalyticsMetaRequest.json +2 -2
- package/json-schema/api/GetAuthConfigResponse.json +2 -2
- package/json-schema/api/GetDataRequest.json +2 -2
- package/json-schema/api/GetDataResponse.json +2 -2
- package/json-schema/api/GetDiscoveryRequest.json +2 -2
- package/json-schema/api/GetDiscoveryResponse.json +2 -2
- package/json-schema/api/GetEffectivePermissionsRequest.json +2 -2
- package/json-schema/api/GetEffectivePermissionsResponse.json +2 -2
- package/json-schema/api/GetExportJobDownloadRequest.json +2 -2
- package/json-schema/api/GetExportJobDownloadResponse.json +2 -2
- package/json-schema/api/GetFieldLabelsRequest.json +2 -2
- package/json-schema/api/GetFieldLabelsResponse.json +2 -2
- package/json-schema/api/GetFlowRequest.json +2 -2
- package/json-schema/api/GetFlowResponse.json +2 -2
- package/json-schema/api/GetInstalledPackageRequest.json +2 -2
- package/json-schema/api/GetInstalledPackageResponse.json +2 -2
- package/json-schema/api/GetLocalesRequest.json +2 -2
- package/json-schema/api/GetLocalesResponse.json +2 -2
- package/json-schema/api/GetMetaItemCachedRequest.json +2 -2
- package/json-schema/api/GetMetaItemCachedResponse.json +2 -2
- package/json-schema/api/GetMetaItemRequest.json +2 -2
- package/json-schema/api/GetMetaItemResponse.json +2 -2
- package/json-schema/api/GetMetaItemsRequest.json +2 -2
- package/json-schema/api/GetMetaItemsResponse.json +2 -2
- package/json-schema/api/GetMetaTypesRequest.json +2 -2
- package/json-schema/api/GetMetaTypesResponse.json +2 -2
- package/json-schema/api/GetNotificationPreferencesRequest.json +2 -2
- package/json-schema/api/GetNotificationPreferencesResponse.json +2 -2
- package/json-schema/api/GetObjectPermissionsRequest.json +2 -2
- package/json-schema/api/GetObjectPermissionsResponse.json +2 -2
- package/json-schema/api/GetPackageRequest.json +2 -2
- package/json-schema/api/GetPackageResponse.json +2 -2
- package/json-schema/api/GetPresenceRequest.json +2 -2
- package/json-schema/api/GetPresenceResponse.json +2 -2
- package/json-schema/api/GetPresignedUrlRequest.json +2 -2
- package/json-schema/api/GetRunRequest.json +2 -2
- package/json-schema/api/GetRunResponse.json +2 -2
- package/json-schema/api/GetTranslationsRequest.json +2 -2
- package/json-schema/api/GetTranslationsResponse.json +2 -2
- package/json-schema/api/GetUiViewRequest.json +2 -2
- package/json-schema/api/GetUiViewResponse.json +2 -2
- package/json-schema/api/GetViewRequest.json +2 -2
- package/json-schema/api/GetViewResponse.json +2 -2
- package/json-schema/api/GetWorkflowConfigRequest.json +2 -2
- package/json-schema/api/GetWorkflowConfigResponse.json +2 -2
- package/json-schema/api/GetWorkflowStateRequest.json +2 -2
- package/json-schema/api/GetWorkflowStateResponse.json +2 -2
- package/json-schema/api/GraphQLConfig.json +2 -2
- package/json-schema/api/GraphQLDataLoaderConfig.json +2 -2
- package/json-schema/api/GraphQLDirectiveConfig.json +2 -2
- package/json-schema/api/GraphQLDirectiveLocation.json +2 -2
- package/json-schema/api/GraphQLMutationConfig.json +2 -2
- package/json-schema/api/GraphQLPersistedQuery.json +2 -2
- package/json-schema/api/GraphQLQueryAdapter.json +2 -2
- package/json-schema/api/GraphQLQueryComplexity.json +2 -2
- package/json-schema/api/GraphQLQueryConfig.json +2 -2
- package/json-schema/api/GraphQLQueryDepthLimit.json +2 -2
- package/json-schema/api/GraphQLRateLimit.json +2 -2
- package/json-schema/api/GraphQLResolverConfig.json +2 -2
- package/json-schema/api/GraphQLScalarType.json +2 -2
- package/json-schema/api/GraphQLSubscriptionConfig.json +2 -2
- package/json-schema/api/GraphQLTypeConfig.json +2 -2
- package/json-schema/api/HandlerStatus.json +2 -2
- package/json-schema/api/HttpFindQueryParams.json +2 -2
- package/json-schema/api/HttpMethod.json +2 -2
- package/json-schema/api/HttpStatusCode.json +2 -2
- package/json-schema/api/IdRequest.json +2 -2
- package/json-schema/api/ImportJobProgress.json +2 -2
- package/json-schema/api/ImportJobResults.json +2 -2
- package/json-schema/api/ImportJobStatus.json +2 -2
- package/json-schema/api/ImportJobSummary.json +2 -2
- package/json-schema/api/ImportMapping.json +2 -2
- package/json-schema/api/ImportRequest.json +2 -2
- package/json-schema/api/ImportResponse.json +2 -2
- package/json-schema/api/ImportRowResult.json +2 -2
- package/json-schema/api/ImportValidationConfig.json +2 -2
- package/json-schema/api/ImportValidationMode.json +2 -2
- package/json-schema/api/ImportValidationResult.json +2 -2
- package/json-schema/api/ImportWriteMode.json +2 -2
- package/json-schema/api/InitiateChunkedUploadRequest.json +2 -2
- package/json-schema/api/InitiateChunkedUploadResponse.json +2 -2
- package/json-schema/api/InstallPackageRequest.json +2 -2
- package/json-schema/api/InstallPackageResponse.json +2 -2
- package/json-schema/api/ListExportJobsRequest.json +2 -2
- package/json-schema/api/ListExportJobsResponse.json +2 -2
- package/json-schema/api/ListFlowsRequest.json +2 -2
- package/json-schema/api/ListFlowsResponse.json +2 -2
- package/json-schema/api/ListImportJobsRequest.json +2 -2
- package/json-schema/api/ListImportJobsResponse.json +2 -2
- package/json-schema/api/ListInstalledPackagesRequest.json +2 -2
- package/json-schema/api/ListInstalledPackagesResponse.json +2 -2
- package/json-schema/api/ListNotificationsRequest.json +2 -2
- package/json-schema/api/ListNotificationsResponse.json +2 -2
- package/json-schema/api/ListPackagesRequest.json +2 -2
- package/json-schema/api/ListPackagesResponse.json +2 -2
- package/json-schema/api/ListRecordResponse.json +2 -2
- package/json-schema/api/ListRunsRequest.json +2 -2
- package/json-schema/api/ListRunsResponse.json +2 -2
- package/json-schema/api/ListViewsRequest.json +2 -2
- package/json-schema/api/ListViewsResponse.json +2 -2
- package/json-schema/api/LoginRequest.json +2 -2
- package/json-schema/api/LoginType.json +2 -2
- package/json-schema/api/MarkAllNotificationsReadRequest.json +2 -2
- package/json-schema/api/MarkAllNotificationsReadResponse.json +2 -2
- package/json-schema/api/MarkNotificationsReadRequest.json +2 -2
- package/json-schema/api/MarkNotificationsReadResponse.json +2 -2
- package/json-schema/api/MetadataBulkRegisterRequest.json +2 -2
- package/json-schema/api/MetadataBulkResponse.json +2 -2
- package/json-schema/api/MetadataBulkUnregisterRequest.json +2 -2
- package/json-schema/api/MetadataCacheRequest.json +2 -2
- package/json-schema/api/MetadataCacheResponse.json +2 -2
- package/json-schema/api/MetadataDeleteResponse.json +2 -2
- package/json-schema/api/MetadataDependenciesResponse.json +2 -2
- package/json-schema/api/MetadataDependentsResponse.json +2 -2
- package/json-schema/api/MetadataEffectiveResponse.json +2 -2
- package/json-schema/api/MetadataEndpointsConfig.json +2 -2
- package/json-schema/api/MetadataEvent.json +2 -2
- package/json-schema/api/MetadataEventType.json +2 -2
- package/json-schema/api/MetadataExistsResponse.json +2 -2
- package/json-schema/api/MetadataExportRequest.json +2 -2
- package/json-schema/api/MetadataExportResponse.json +2 -2
- package/json-schema/api/MetadataImportRequest.json +2 -2
- package/json-schema/api/MetadataImportResponse.json +2 -2
- package/json-schema/api/MetadataItemResponse.json +2 -2
- package/json-schema/api/MetadataListResponse.json +2 -2
- package/json-schema/api/MetadataNamesResponse.json +2 -2
- package/json-schema/api/MetadataOverlayResponse.json +2 -2
- package/json-schema/api/MetadataOverlaySaveRequest.json +2 -2
- package/json-schema/api/MetadataQueryRequest.json +2 -2
- package/json-schema/api/MetadataQueryResponse.json +2 -2
- package/json-schema/api/MetadataRegisterRequest.json +2 -2
- package/json-schema/api/MetadataTypeInfoResponse.json +2 -2
- package/json-schema/api/MetadataTypesResponse.json +2 -2
- package/json-schema/api/MetadataValidateRequest.json +2 -2
- package/json-schema/api/MetadataValidateResponse.json +2 -2
- package/json-schema/api/ModificationResult.json +2 -2
- package/json-schema/api/Notification.json +2 -2
- package/json-schema/api/NotificationPreferences.json +2 -2
- package/json-schema/api/ODataConfig.json +2 -2
- package/json-schema/api/ODataError.json +2 -2
- package/json-schema/api/ODataFilterFunction.json +2 -2
- package/json-schema/api/ODataFilterOperator.json +2 -2
- package/json-schema/api/ODataMetadata.json +2 -2
- package/json-schema/api/ODataQuery.json +2 -2
- package/json-schema/api/ODataQueryAdapter.json +2 -2
- package/json-schema/api/ODataResponse.json +2 -2
- package/json-schema/api/ObjectDefinitionResponse.json +2 -2
- package/json-schema/api/ObjectQLReference.json +2 -2
- package/json-schema/api/OpenApi31Extensions.json +2 -2
- package/json-schema/api/OpenApiGenerationConfig.json +2 -2
- package/json-schema/api/OpenApiSecurityScheme.json +2 -2
- package/json-schema/api/OpenApiServer.json +2 -2
- package/json-schema/api/OpenApiSpec.json +2 -2
- package/json-schema/api/OperatorMapping.json +2 -2
- package/json-schema/api/PackageApiErrorCode.json +2 -2
- package/json-schema/api/PackageInstallRequest.json +2 -2
- package/json-schema/api/PackageInstallResponse.json +2 -2
- package/json-schema/api/PackagePathParams.json +2 -2
- package/json-schema/api/PackageRollbackRequest.json +2 -2
- package/json-schema/api/PackageRollbackResponse.json +2 -2
- package/json-schema/api/PackageUpgradeRequest.json +2 -2
- package/json-schema/api/PackageUpgradeResponse.json +2 -2
- package/json-schema/api/PingMessage.json +2 -2
- package/json-schema/api/PongMessage.json +2 -2
- package/json-schema/api/PresenceMessage.json +2 -2
- package/json-schema/api/PresenceState.json +2 -2
- package/json-schema/api/PresenceStatus.json +2 -2
- package/json-schema/api/PresenceUpdate.json +2 -2
- package/json-schema/api/PresignedUrlResponse.json +2 -2
- package/json-schema/api/QueryAdapterConfig.json +2 -2
- package/json-schema/api/QueryAdapterTarget.json +2 -2
- package/json-schema/api/QueryOptimizationConfig.json +2 -2
- package/json-schema/api/RealtimeConfig.json +2 -2
- package/json-schema/api/RealtimeConnectRequest.json +2 -2
- package/json-schema/api/RealtimeConnectResponse.json +2 -2
- package/json-schema/api/RealtimeDisconnectRequest.json +2 -2
- package/json-schema/api/RealtimeDisconnectResponse.json +2 -2
- package/json-schema/api/RealtimeEvent.json +2 -2
- package/json-schema/api/RealtimeEventType.json +2 -2
- package/json-schema/api/RealtimePresence.json +2 -2
- package/json-schema/api/RealtimeRecordAction.json +2 -2
- package/json-schema/api/RealtimeSubscribeRequest.json +2 -2
- package/json-schema/api/RealtimeSubscribeResponse.json +2 -2
- package/json-schema/api/RealtimeUnsubscribeRequest.json +2 -2
- package/json-schema/api/RealtimeUnsubscribeResponse.json +2 -2
- package/json-schema/api/RecordData.json +2 -2
- package/json-schema/api/RefreshTokenRequest.json +2 -2
- package/json-schema/api/RegisterDeviceRequest.json +2 -2
- package/json-schema/api/RegisterDeviceResponse.json +2 -2
- package/json-schema/api/RegisterRequest.json +2 -2
- package/json-schema/api/RequestValidationConfig.json +2 -2
- package/json-schema/api/ResolveDependenciesRequest.json +2 -2
- package/json-schema/api/ResolveDependenciesResponse.json +2 -2
- package/json-schema/api/ResponseEnvelopeConfig.json +2 -2
- package/json-schema/api/RestApiConfig.json +2 -2
- package/json-schema/api/RestApiEndpoint.json +2 -2
- package/json-schema/api/RestApiPluginConfig.json +2 -2
- package/json-schema/api/RestApiRouteCategory.json +2 -2
- package/json-schema/api/RestApiRouteRegistration.json +2 -2
- package/json-schema/api/RestQueryAdapter.json +2 -2
- package/json-schema/api/RestServerConfig.json +2 -2
- package/json-schema/api/RetryStrategy.json +2 -2
- package/json-schema/api/RouteCategory.json +2 -2
- package/json-schema/api/RouteCoverageEntry.json +2 -2
- package/json-schema/api/RouteCoverageReport.json +2 -2
- package/json-schema/api/RouteDefinition.json +2 -2
- package/json-schema/api/RouteGenerationConfig.json +2 -2
- package/json-schema/api/RouteHealthEntry.json +2 -2
- package/json-schema/api/RouteHealthReport.json +2 -2
- package/json-schema/api/RouterConfig.json +2 -2
- package/json-schema/api/SaveMetaItemRequest.json +2 -2
- package/json-schema/api/SaveMetaItemResponse.json +2 -2
- package/json-schema/api/ScheduleExportRequest.json +2 -2
- package/json-schema/api/ScheduleExportResponse.json +2 -2
- package/json-schema/api/ScheduledExport.json +2 -2
- package/json-schema/api/SchemaDefinition.json +2 -2
- package/json-schema/api/ServiceInfo.json +2 -2
- package/json-schema/api/ServiceSelfInfo.json +2 -2
- package/json-schema/api/ServiceStatus.json +2 -2
- package/json-schema/api/Session.json +2 -2
- package/json-schema/api/SessionResponse.json +2 -2
- package/json-schema/api/SessionUser.json +2 -2
- package/json-schema/api/SetPresenceRequest.json +2 -2
- package/json-schema/api/SetPresenceResponse.json +2 -2
- package/json-schema/api/SimpleCursorPosition.json +2 -2
- package/json-schema/api/SimplePresenceState.json +2 -2
- package/json-schema/api/SingleRecordResponse.json +2 -2
- package/json-schema/api/StandardErrorCode.json +2 -2
- package/json-schema/api/SubgraphConfig.json +2 -2
- package/json-schema/api/SubscribeMessage.json +2 -2
- package/json-schema/api/Subscription.json +2 -2
- package/json-schema/api/SubscriptionEvent.json +2 -2
- package/json-schema/api/ToggleFlowRequest.json +2 -2
- package/json-schema/api/ToggleFlowResponse.json +2 -2
- package/json-schema/api/TransportProtocol.json +2 -2
- package/json-schema/api/TriggerFlowRequest.json +2 -2
- package/json-schema/api/TriggerFlowResponse.json +2 -2
- package/json-schema/api/UndoImportJobResponse.json +2 -2
- package/json-schema/api/UninstallPackageApiRequest.json +2 -2
- package/json-schema/api/UninstallPackageApiResponse.json +2 -2
- package/json-schema/api/UninstallPackageRequest.json +2 -2
- package/json-schema/api/UninstallPackageResponse.json +2 -2
- package/json-schema/api/UnregisterDeviceRequest.json +2 -2
- package/json-schema/api/UnregisterDeviceResponse.json +2 -2
- package/json-schema/api/UnsubscribeMessage.json +2 -2
- package/json-schema/api/UnsubscribeRequest.json +2 -2
- package/json-schema/api/UpdateDataRequest.json +2 -2
- package/json-schema/api/UpdateDataResponse.json +2 -2
- package/json-schema/api/UpdateFlowRequest.json +2 -2
- package/json-schema/api/UpdateFlowResponse.json +2 -2
- package/json-schema/api/UpdateManyDataRequest.json +2 -2
- package/json-schema/api/UpdateManyDataResponse.json +2 -2
- package/json-schema/api/UpdateManyRequest.json +2 -2
- package/json-schema/api/UpdateNotificationPreferencesRequest.json +2 -2
- package/json-schema/api/UpdateNotificationPreferencesResponse.json +2 -2
- package/json-schema/api/UpdateRequest.json +2 -2
- package/json-schema/api/UpdateViewRequest.json +2 -2
- package/json-schema/api/UpdateViewResponse.json +2 -2
- package/json-schema/api/UploadArtifactRequest.json +2 -2
- package/json-schema/api/UploadArtifactResponse.json +2 -2
- package/json-schema/api/UploadChunkRequest.json +2 -2
- package/json-schema/api/UploadChunkResponse.json +2 -2
- package/json-schema/api/UploadProgress.json +2 -2
- package/json-schema/api/UserProfileResponse.json +2 -2
- package/json-schema/api/ValidationMode.json +2 -2
- package/json-schema/api/VersionDefinition.json +2 -2
- package/json-schema/api/VersionNegotiationResponse.json +2 -2
- package/json-schema/api/VersionStatus.json +2 -2
- package/json-schema/api/VersioningConfig.json +2 -2
- package/json-schema/api/VersioningStrategy.json +2 -2
- package/json-schema/api/WebSocketConfig.json +2 -2
- package/json-schema/api/WebSocketEvent.json +2 -2
- package/json-schema/api/WebSocketMessage.json +2 -2
- package/json-schema/api/WebSocketMessageType.json +2 -2
- package/json-schema/api/WebSocketPresenceStatus.json +2 -2
- package/json-schema/api/WebSocketServerConfig.json +2 -2
- package/json-schema/api/WebhookConfig.json +2 -2
- package/json-schema/api/WebhookEvent.json +2 -2
- package/json-schema/api/WellKnownCapabilities.json +2 -2
- package/json-schema/api/WorkflowState.json +2 -2
- package/json-schema/api/WorkflowTransitionRequest.json +2 -2
- package/json-schema/api/WorkflowTransitionResponse.json +2 -2
- package/json-schema/automation/ActionCategory.json +2 -2
- package/json-schema/automation/ActionDescriptor.json +2 -2
- package/json-schema/automation/ActionParadigm.json +2 -2
- package/json-schema/automation/ActionRef.json +2 -2
- package/json-schema/automation/ApprovalDecision.json +2 -2
- package/json-schema/automation/ApprovalEscalation.json +2 -2
- package/json-schema/automation/ApprovalNodeApprover.json +2 -2
- package/json-schema/automation/ApprovalNodeConfig.json +2 -2
- package/json-schema/automation/ApproverType.json +2 -2
- package/json-schema/automation/AuthField.json +2 -2
- package/json-schema/automation/Authentication.json +2 -2
- package/json-schema/automation/AuthenticationType.json +2 -2
- package/json-schema/automation/BpmnDiagnostic.json +2 -2
- package/json-schema/automation/BpmnElementMapping.json +2 -2
- package/json-schema/automation/BpmnExportOptions.json +2 -2
- package/json-schema/automation/BpmnImportOptions.json +2 -2
- package/json-schema/automation/BpmnInteropResult.json +2 -2
- package/json-schema/automation/BpmnUnmappedStrategy.json +2 -2
- package/json-schema/automation/BpmnVersion.json +2 -2
- package/json-schema/automation/Checkpoint.json +2 -2
- package/json-schema/automation/ConcurrencyPolicy.json +2 -2
- package/json-schema/automation/ConflictResolution.json +2 -2
- package/json-schema/automation/Connector.json +2 -2
- package/json-schema/automation/ConnectorCategory.json +2 -2
- package/json-schema/automation/ConnectorInstance.json +2 -2
- package/json-schema/automation/ConnectorOperation.json +2 -2
- package/json-schema/automation/ConnectorTrigger.json +2 -2
- package/json-schema/automation/DataDestinationConfig.json +2 -2
- package/json-schema/automation/DataSourceConfig.json +2 -2
- package/json-schema/automation/DataSyncConfig.json +2 -2
- package/json-schema/automation/ETLDestination.json +2 -2
- package/json-schema/automation/ETLEndpointType.json +2 -2
- package/json-schema/automation/ETLPipeline.json +2 -2
- package/json-schema/automation/ETLPipelineRun.json +2 -2
- package/json-schema/automation/ETLRunStatus.json +2 -2
- package/json-schema/automation/ETLSource.json +2 -2
- package/json-schema/automation/ETLSyncMode.json +2 -2
- package/json-schema/automation/ETLTransformation.json +2 -2
- package/json-schema/automation/ETLTransformationType.json +2 -2
- package/json-schema/automation/Event.json +2 -2
- package/json-schema/automation/ExecutionError.json +2 -2
- package/json-schema/automation/ExecutionErrorSeverity.json +2 -2
- package/json-schema/automation/ExecutionLog.json +2 -2
- package/json-schema/automation/ExecutionStatus.json +2 -2
- package/json-schema/automation/ExecutionStepLog.json +2 -2
- package/json-schema/automation/Flow.json +2 -2
- package/json-schema/automation/FlowEdge.json +2 -2
- package/json-schema/automation/FlowNode.json +2 -2
- package/json-schema/automation/FlowNodeAction.json +2 -2
- package/json-schema/automation/FlowRegion.json +2 -2
- package/json-schema/automation/FlowVariable.json +2 -2
- package/json-schema/automation/FlowVersionHistory.json +2 -2
- package/json-schema/automation/GuardRef.json +2 -2
- package/json-schema/automation/LoopConfig.json +2 -2
- package/json-schema/automation/NodeExecutorDescriptor.json +2 -2
- package/json-schema/automation/OAuth2Config.json +2 -2
- package/json-schema/automation/OperationParameter.json +2 -2
- package/json-schema/automation/OperationType.json +2 -2
- package/json-schema/automation/ParallelBranch.json +2 -2
- package/json-schema/automation/ParallelConfig.json +2 -2
- package/json-schema/automation/RetryPolicy.json +2 -2
- package/json-schema/automation/ScheduleState.json +2 -2
- package/json-schema/automation/StateMachine.json +2 -2
- package/json-schema/automation/StateNode.json +2 -2
- package/json-schema/automation/SyncDirection.json +2 -2
- package/json-schema/automation/SyncExecutionResult.json +2 -2
- package/json-schema/automation/SyncExecutionStatus.json +2 -2
- package/json-schema/automation/SyncMode.json +2 -2
- package/json-schema/automation/TimeRelativeTrigger.json +2 -2
- package/json-schema/automation/Transition.json +2 -2
- package/json-schema/automation/TryCatchConfig.json +2 -2
- package/json-schema/automation/WaitEventType.json +2 -2
- package/json-schema/automation/WaitExecutorConfig.json +2 -2
- package/json-schema/automation/WaitResumePayload.json +2 -2
- package/json-schema/automation/WaitTimeoutBehavior.json +2 -2
- package/json-schema/automation/Webhook.json +2 -2
- package/json-schema/automation/WebhookReceiver.json +2 -2
- package/json-schema/automation/WebhookTriggerType.json +2 -2
- package/json-schema/cloud/AnalyticsTimeRange.json +2 -2
- package/json-schema/cloud/AppDiscoveryRequest.json +2 -2
- package/json-schema/cloud/AppDiscoveryResponse.json +2 -2
- package/json-schema/cloud/AppSubscription.json +2 -2
- package/json-schema/cloud/ArtifactDownloadResponse.json +2 -2
- package/json-schema/cloud/ArtifactReference.json +2 -2
- package/json-schema/cloud/CreateListingRequest.json +2 -2
- package/json-schema/cloud/CreatePackageRequest.json +2 -2
- package/json-schema/cloud/CreatePackageVersionRequest.json +2 -2
- package/json-schema/cloud/CuratedCollection.json +2 -2
- package/json-schema/cloud/Environment.json +2 -2
- package/json-schema/cloud/EnvironmentCredential.json +2 -2
- package/json-schema/cloud/EnvironmentCredentialStatus.json +2 -2
- package/json-schema/cloud/EnvironmentDriver.json +2 -2
- package/json-schema/cloud/EnvironmentMember.json +2 -2
- package/json-schema/cloud/EnvironmentPackageInstallation.json +2 -2
- package/json-schema/cloud/EnvironmentPackageStatus.json +2 -2
- package/json-schema/cloud/EnvironmentRole.json +2 -2
- package/json-schema/cloud/EnvironmentStatus.json +2 -2
- package/json-schema/cloud/EnvironmentType.json +2 -2
- package/json-schema/cloud/EnvironmentVisibility.json +2 -2
- package/json-schema/cloud/FeaturedListing.json +2 -2
- package/json-schema/cloud/InstallPackageToEnvironmentRequest.json +2 -2
- package/json-schema/cloud/InstalledAppSummary.json +2 -2
- package/json-schema/cloud/ListEnvironmentPackagesResponse.json +2 -2
- package/json-schema/cloud/ListInstalledAppsRequest.json +2 -2
- package/json-schema/cloud/ListInstalledAppsResponse.json +2 -2
- package/json-schema/cloud/ListReviewsRequest.json +2 -2
- package/json-schema/cloud/ListReviewsResponse.json +2 -2
- package/json-schema/cloud/ListingActionRequest.json +2 -2
- package/json-schema/cloud/ListingStatus.json +2 -2
- package/json-schema/cloud/MarketplaceCategory.json +2 -2
- package/json-schema/cloud/MarketplaceHealthMetrics.json +2 -2
- package/json-schema/cloud/MarketplaceInstallRequest.json +2 -2
- package/json-schema/cloud/MarketplaceInstallResponse.json +2 -2
- package/json-schema/cloud/MarketplaceListing.json +2 -2
- package/json-schema/cloud/MarketplaceSearchRequest.json +2 -2
- package/json-schema/cloud/MarketplaceSearchResponse.json +2 -2
- package/json-schema/cloud/Package.json +2 -2
- package/json-schema/cloud/PackageCategory.json +2 -2
- package/json-schema/cloud/PackageDependency.json +2 -2
- package/json-schema/cloud/PackageInstallation.json +2 -2
- package/json-schema/cloud/PackageInstallationStatus.json +2 -2
- package/json-schema/cloud/PackageLocale.json +2 -2
- package/json-schema/cloud/PackageManifest.json +2 -2
- package/json-schema/cloud/PackagePublisher.json +2 -2
- package/json-schema/cloud/PackageSubmission.json +2 -2
- package/json-schema/cloud/PackageTranslation.json +2 -2
- package/json-schema/cloud/PackageTranslations.json +2 -2
- package/json-schema/cloud/PackageVersion.json +2 -2
- package/json-schema/cloud/PackageVersionStatus.json +2 -2
- package/json-schema/cloud/PackageVisibility.json +2 -2
- package/json-schema/cloud/PolicyAction.json +2 -2
- package/json-schema/cloud/PolicyViolationType.json +2 -2
- package/json-schema/cloud/PricingModel.json +2 -2
- package/json-schema/cloud/ProvisionEnvironmentRequest.json +2 -2
- package/json-schema/cloud/ProvisionEnvironmentResponse.json +2 -2
- package/json-schema/cloud/ProvisionOrganizationRequest.json +2 -2
- package/json-schema/cloud/ProvisionOrganizationResponse.json +2 -2
- package/json-schema/cloud/ProvisionTenantRequest.json +2 -2
- package/json-schema/cloud/ProvisionTenantResponse.json +2 -2
- package/json-schema/cloud/PublishPackageVersionRequest.json +2 -2
- package/json-schema/cloud/Publisher.json +2 -2
- package/json-schema/cloud/PublisherProfile.json +2 -2
- package/json-schema/cloud/PublisherVerification.json +2 -2
- package/json-schema/cloud/PublishingAnalyticsRequest.json +2 -2
- package/json-schema/cloud/PublishingAnalyticsResponse.json +2 -2
- package/json-schema/cloud/RecommendationReason.json +2 -2
- package/json-schema/cloud/RecommendedApp.json +2 -2
- package/json-schema/cloud/RejectionReason.json +2 -2
- package/json-schema/cloud/ReleaseChannel.json +2 -2
- package/json-schema/cloud/ReviewCriterion.json +2 -2
- package/json-schema/cloud/ReviewDecision.json +2 -2
- package/json-schema/cloud/ReviewModerationStatus.json +2 -2
- package/json-schema/cloud/RollbackEnvironmentPackageRequest.json +2 -2
- package/json-schema/cloud/Sha256Digest.json +2 -2
- package/json-schema/cloud/SubmissionReview.json +2 -2
- package/json-schema/cloud/SubmitReviewRequest.json +2 -2
- package/json-schema/cloud/SubscriptionStatus.json +2 -2
- package/json-schema/cloud/TemplateManifest.json +2 -2
- package/json-schema/cloud/TenantContext.json +2 -2
- package/json-schema/cloud/TenantDatabase.json +2 -2
- package/json-schema/cloud/TenantDatabaseStatus.json +2 -2
- package/json-schema/cloud/TenantIdentificationSource.json +2 -2
- package/json-schema/cloud/TenantPlan.json +2 -2
- package/json-schema/cloud/TenantRoutingConfig.json +2 -2
- package/json-schema/cloud/TimeSeriesPoint.json +2 -2
- package/json-schema/cloud/TrendingListing.json +2 -2
- package/json-schema/cloud/UpdateListingRequest.json +2 -2
- package/json-schema/cloud/UpdatePackageRequest.json +2 -2
- package/json-schema/cloud/UpdatePackageVersionRequest.json +2 -2
- package/json-schema/cloud/UpgradeEnvironmentPackageRequest.json +2 -2
- package/json-schema/cloud/UserReview.json +2 -2
- package/json-schema/cloud/VersionRelease.json +2 -2
- package/json-schema/data/Address.json +2 -2
- package/json-schema/data/AggregationFunction.json +2 -2
- package/json-schema/data/AggregationMetricType.json +2 -2
- package/json-schema/data/AggregationNode.json +2 -2
- package/json-schema/data/AggregationPipeline.json +2 -2
- package/json-schema/data/AggregationStage.json +2 -2
- package/json-schema/data/AnalyticsQuery.json +2 -2
- package/json-schema/data/ApiMethod.json +2 -2
- package/json-schema/data/BaseEngineOptions.json +2 -2
- package/json-schema/data/ComputedFieldCache.json +2 -2
- package/json-schema/data/ConditionalValidation.json +2 -2
- package/json-schema/data/ConsistencyLevel.json +2 -2
- package/json-schema/data/CrossFieldValidation.json +2 -2
- package/json-schema/data/Cube.json +2 -2
- package/json-schema/data/CubeJoin.json +2 -2
- package/json-schema/data/CurrencyConfig.json +2 -2
- package/json-schema/data/CurrencyValue.json +2 -2
- package/json-schema/data/DataEngineAggregateOptions.json +2 -2
- package/json-schema/data/DataEngineAggregateRequest.json +2 -2
- package/json-schema/data/DataEngineBatchRequest.json +2 -2
- package/json-schema/data/DataEngineCountOptions.json +2 -2
- package/json-schema/data/DataEngineCountRequest.json +2 -2
- package/json-schema/data/DataEngineDeleteOptions.json +2 -2
- package/json-schema/data/DataEngineDeleteRequest.json +2 -2
- package/json-schema/data/DataEngineExecuteRequest.json +2 -2
- package/json-schema/data/DataEngineFilter.json +2 -2
- package/json-schema/data/DataEngineFindOneRequest.json +2 -2
- package/json-schema/data/DataEngineFindRequest.json +2 -2
- package/json-schema/data/DataEngineInsertOptions.json +2 -2
- package/json-schema/data/DataEngineInsertRequest.json +2 -2
- package/json-schema/data/DataEngineQueryOptions.json +2 -2
- package/json-schema/data/DataEngineRequest.json +2 -2
- package/json-schema/data/DataEngineSort.json +2 -2
- package/json-schema/data/DataEngineUpdateOptions.json +2 -2
- package/json-schema/data/DataEngineUpdateRequest.json +2 -2
- package/json-schema/data/DataEngineVectorFindRequest.json +2 -2
- package/json-schema/data/DataQualityRules.json +2 -2
- package/json-schema/data/DataTypeMapping.json +2 -2
- package/json-schema/data/Datasource.json +2 -2
- package/json-schema/data/DatasourceCapabilities.json +2 -2
- package/json-schema/data/DateGranularity.json +2 -2
- package/json-schema/data/DateMacroPlaceholder.json +2 -2
- package/json-schema/data/DateMacroToken.json +2 -2
- package/json-schema/data/Dimension.json +2 -2
- package/json-schema/data/DimensionType.json +2 -2
- package/json-schema/data/Document.json +2 -2
- package/json-schema/data/DocumentTemplate.json +2 -2
- package/json-schema/data/DocumentValidationSchema.json +2 -2
- package/json-schema/data/DocumentVersion.json +2 -2
- package/json-schema/data/DriverCapabilities.json +2 -2
- package/json-schema/data/DriverConfig.json +2 -2
- package/json-schema/data/DriverDefinition.json +2 -2
- package/json-schema/data/DriverOptions.json +2 -2
- package/json-schema/data/DriverType.json +2 -2
- package/json-schema/data/ESignatureConfig.json +2 -2
- package/json-schema/data/EngineAggregateOptions.json +2 -2
- package/json-schema/data/EngineCountOptions.json +2 -2
- package/json-schema/data/EngineDeleteOptions.json +2 -2
- package/json-schema/data/EngineQueryOptions.json +2 -2
- package/json-schema/data/EngineUpdateOptions.json +2 -2
- package/json-schema/data/EqualityOperator.json +2 -2
- package/json-schema/data/ExpressionBody.json +2 -2
- package/json-schema/data/ExternalCatalog.json +2 -2
- package/json-schema/data/ExternalColumn.json +2 -2
- package/json-schema/data/ExternalDataSource.json +2 -2
- package/json-schema/data/ExternalDatasourceSettings.json +2 -2
- package/json-schema/data/ExternalFieldMapping.json +2 -2
- package/json-schema/data/ExternalLookup.json +2 -2
- package/json-schema/data/ExternalTable.json +2 -2
- package/json-schema/data/FeedFilterMode.json +2 -2
- package/json-schema/data/FeedItemType.json +2 -2
- package/json-schema/data/Field.json +2 -2
- package/json-schema/data/FieldMapping.json +2 -2
- package/json-schema/data/FieldNode.json +2 -2
- package/json-schema/data/FieldReference.json +2 -2
- package/json-schema/data/FieldType.json +2 -2
- package/json-schema/data/FilterCondition.json +2 -2
- package/json-schema/data/FormatValidation.json +2 -2
- package/json-schema/data/FullTextSearch.json +2 -2
- package/json-schema/data/GroupByNode.json +2 -2
- package/json-schema/data/HookBody.json +2 -2
- package/json-schema/data/HookBodyCapability.json +2 -2
- package/json-schema/data/HookContext.json +2 -2
- package/json-schema/data/HookEvent.json +2 -2
- package/json-schema/data/Index.json +2 -2
- package/json-schema/data/JSONValidation.json +2 -2
- package/json-schema/data/JoinNode.json +2 -2
- package/json-schema/data/JoinStrategy.json +2 -2
- package/json-schema/data/JoinType.json +2 -2
- package/json-schema/data/Lifecycle.json +2 -2
- package/json-schema/data/LifecycleClass.json +2 -2
- package/json-schema/data/LocationCoordinates.json +2 -2
- package/json-schema/data/Mapping.json +2 -2
- package/json-schema/data/Metric.json +2 -2
- package/json-schema/data/ModeSchema.json +2 -2
- package/json-schema/data/NoSQLDataTypeMapping.json +2 -2
- package/json-schema/data/NoSQLDatabaseType.json +2 -2
- package/json-schema/data/NoSQLDriverConfig.json +2 -2
- package/json-schema/data/NoSQLIndex.json +2 -2
- package/json-schema/data/NoSQLIndexType.json +2 -2
- package/json-schema/data/NoSQLOperationType.json +2 -2
- package/json-schema/data/NoSQLQueryOptions.json +2 -2
- package/json-schema/data/NoSQLTransactionOptions.json +2 -2
- package/json-schema/data/Object.json +2 -2
- package/json-schema/data/ObjectAccessConfig.json +2 -2
- package/json-schema/data/ObjectCapabilities.json +2 -2
- package/json-schema/data/ObjectDependencyGraph.json +2 -2
- package/json-schema/data/ObjectDependencyNode.json +2 -2
- package/json-schema/data/ObjectExtension.json +2 -2
- package/json-schema/data/ObjectExternalBinding.json +2 -2
- package/json-schema/data/ObjectFieldGroup.json +2 -2
- package/json-schema/data/ObjectOwnershipEnum.json +2 -2
- package/json-schema/data/ObjectRequiredPermissions.json +2 -2
- package/json-schema/data/PerOperationRequiredPermissions.json +2 -2
- package/json-schema/data/PoolConfig.json +2 -2
- package/json-schema/data/Query.json +2 -2
- package/json-schema/data/QueryFilter.json +2 -2
- package/json-schema/data/ReferenceResolution.json +2 -2
- package/json-schema/data/ReferenceResolutionError.json +2 -2
- package/json-schema/data/ReplicationConfig.json +2 -2
- package/json-schema/data/RowCrudActionOverride.json +2 -2
- package/json-schema/data/SQLDialect.json +2 -2
- package/json-schema/data/SQLDriverConfig.json +2 -2
- package/json-schema/data/SSLConfig.json +2 -2
- package/json-schema/data/ScriptBody.json +2 -2
- package/json-schema/data/ScriptValidation.json +2 -2
- package/json-schema/data/Seed.json +2 -2
- package/json-schema/data/SeedIdentity.json +2 -2
- package/json-schema/data/SeedLoadResult.json +2 -2
- package/json-schema/data/SeedLoaderConfig.json +2 -2
- package/json-schema/data/SeedLoaderRequest.json +2 -2
- package/json-schema/data/SeedLoaderResult.json +2 -2
- package/json-schema/data/SeedMode.json +2 -2
- package/json-schema/data/SelectOption.json +2 -2
- package/json-schema/data/SetOperator.json +2 -2
- package/json-schema/data/ShardingConfig.json +2 -2
- package/json-schema/data/SortNode.json +2 -2
- package/json-schema/data/SpecialOperator.json +2 -2
- package/json-schema/data/StateMachineValidation.json +2 -2
- package/json-schema/data/StringOperator.json +2 -2
- package/json-schema/data/TenancyConfig.json +2 -2
- package/json-schema/data/TimeUpdateInterval.json +2 -2
- package/json-schema/data/TransformType.json +2 -2
- package/json-schema/data/ValidationRule.json +2 -2
- package/json-schema/data/WindowFunction.json +2 -2
- package/json-schema/data/WindowFunctionNode.json +2 -2
- package/json-schema/data/WindowSpec.json +2 -2
- package/json-schema/identity/Account.json +2 -2
- package/json-schema/identity/ApiKey.json +2 -2
- package/json-schema/identity/EvalUser.json +2 -2
- package/json-schema/identity/Invitation.json +2 -2
- package/json-schema/identity/InvitationStatus.json +2 -2
- package/json-schema/identity/Member.json +2 -2
- package/json-schema/identity/Organization.json +2 -2
- package/json-schema/identity/Position.json +2 -2
- package/json-schema/identity/SCIMAddress.json +2 -2
- package/json-schema/identity/SCIMBulkOperation.json +2 -2
- package/json-schema/identity/SCIMBulkRequest.json +2 -2
- package/json-schema/identity/SCIMBulkResponse.json +2 -2
- package/json-schema/identity/SCIMBulkResponseOperation.json +2 -2
- package/json-schema/identity/SCIMEmail.json +2 -2
- package/json-schema/identity/SCIMEnterpriseUser.json +2 -2
- package/json-schema/identity/SCIMError.json +2 -2
- package/json-schema/identity/SCIMGroup.json +2 -2
- package/json-schema/identity/SCIMGroupReference.json +2 -2
- package/json-schema/identity/SCIMListResponse.json +2 -2
- package/json-schema/identity/SCIMMemberReference.json +2 -2
- package/json-schema/identity/SCIMMeta.json +2 -2
- package/json-schema/identity/SCIMName.json +2 -2
- package/json-schema/identity/SCIMPatchOperation.json +2 -2
- package/json-schema/identity/SCIMPatchRequest.json +2 -2
- package/json-schema/identity/SCIMPhoneNumber.json +2 -2
- package/json-schema/identity/SCIMUser.json +2 -2
- package/json-schema/identity/Session.json +2 -2
- package/json-schema/identity/User.json +2 -2
- package/json-schema/identity/VerificationToken.json +2 -2
- package/json-schema/integration/AckMode.json +2 -2
- package/json-schema/integration/ApiVersionConfig.json +2 -2
- package/json-schema/integration/BuildConfig.json +2 -2
- package/json-schema/integration/CdcConfig.json +2 -2
- package/json-schema/integration/CircuitBreakerConfig.json +2 -2
- package/json-schema/integration/ConflictResolution.json +2 -2
- package/json-schema/integration/Connector.json +2 -2
- package/json-schema/integration/ConnectorAction.json +2 -2
- package/json-schema/integration/ConnectorHealth.json +2 -2
- package/json-schema/integration/ConnectorInstanceAPIKeyAuth.json +2 -2
- package/json-schema/integration/ConnectorInstanceAuth.json +2 -2
- package/json-schema/integration/ConnectorInstanceBasicAuth.json +2 -2
- package/json-schema/integration/ConnectorInstanceBearerAuth.json +2 -2
- package/json-schema/integration/ConnectorInstanceNoAuth.json +2 -2
- package/json-schema/integration/ConnectorStatus.json +2 -2
- package/json-schema/integration/ConnectorTrigger.json +2 -2
- package/json-schema/integration/ConnectorType.json +2 -2
- package/json-schema/integration/ConsumerConfig.json +2 -2
- package/json-schema/integration/DataSyncConfig.json +2 -2
- package/json-schema/integration/DatabaseConnector.json +2 -2
- package/json-schema/integration/DatabasePoolConfig.json +2 -2
- package/json-schema/integration/DatabaseProvider.json +2 -2
- package/json-schema/integration/DatabaseTable.json +2 -2
- package/json-schema/integration/DeclarativeConnectorEntry.json +2 -2
- package/json-schema/integration/DeliveryGuarantee.json +2 -2
- package/json-schema/integration/DeploymentConfig.json +2 -2
- package/json-schema/integration/DlqConfig.json +2 -2
- package/json-schema/integration/DomainConfig.json +2 -2
- package/json-schema/integration/EdgeFunctionConfig.json +2 -2
- package/json-schema/integration/EnvironmentVariables.json +2 -2
- package/json-schema/integration/ErrorCategory.json +2 -2
- package/json-schema/integration/ErrorMappingConfig.json +2 -2
- package/json-schema/integration/ErrorMappingRule.json +2 -2
- package/json-schema/integration/FieldMapping.json +2 -2
- package/json-schema/integration/FileAccessPattern.json +2 -2
- package/json-schema/integration/FileFilterConfig.json +2 -2
- package/json-schema/integration/FileMetadataConfig.json +2 -2
- package/json-schema/integration/FileStorageConnector.json +2 -2
- package/json-schema/integration/FileStorageProvider.json +2 -2
- package/json-schema/integration/FileVersioningConfig.json +2 -2
- package/json-schema/integration/GitHubActionsWorkflow.json +2 -2
- package/json-schema/integration/GitHubCommitConfig.json +2 -2
- package/json-schema/integration/GitHubConnector.json +2 -2
- package/json-schema/integration/GitHubIssueTracking.json +2 -2
- package/json-schema/integration/GitHubProvider.json +2 -2
- package/json-schema/integration/GitHubPullRequestConfig.json +2 -2
- package/json-schema/integration/GitHubReleaseConfig.json +2 -2
- package/json-schema/integration/GitHubRepository.json +2 -2
- package/json-schema/integration/GitRepositoryConfig.json +2 -2
- package/json-schema/integration/HealthCheckConfig.json +2 -2
- package/json-schema/integration/MessageFormat.json +2 -2
- package/json-schema/integration/MessageQueueConnector.json +2 -2
- package/json-schema/integration/MessageQueueProvider.json +2 -2
- package/json-schema/integration/MultipartUploadConfig.json +2 -2
- package/json-schema/integration/ProducerConfig.json +2 -2
- package/json-schema/integration/RateLimitConfig.json +2 -2
- package/json-schema/integration/RateLimitStrategy.json +2 -2
- package/json-schema/integration/RetryConfig.json +2 -2
- package/json-schema/integration/RetryStrategy.json +2 -2
- package/json-schema/integration/SaasConnector.json +2 -2
- package/json-schema/integration/SaasObjectType.json +2 -2
- package/json-schema/integration/SaasProvider.json +2 -2
- package/json-schema/integration/SslConfig.json +2 -2
- package/json-schema/integration/StorageBucket.json +2 -2
- package/json-schema/integration/SyncStrategy.json +2 -2
- package/json-schema/integration/TopicQueue.json +2 -2
- package/json-schema/integration/VercelConnector.json +2 -2
- package/json-schema/integration/VercelFramework.json +2 -2
- package/json-schema/integration/VercelMonitoring.json +2 -2
- package/json-schema/integration/VercelProject.json +2 -2
- package/json-schema/integration/VercelProvider.json +2 -2
- package/json-schema/integration/VercelTeam.json +2 -2
- package/json-schema/integration/WebhookConfig.json +2 -2
- package/json-schema/integration/WebhookEvent.json +2 -2
- package/json-schema/integration/WebhookSignatureAlgorithm.json +2 -2
- package/json-schema/kernel/ActivationEvent.json +2 -2
- package/json-schema/kernel/AdvancedPluginLifecycleConfig.json +2 -2
- package/json-schema/kernel/ArtifactChecksum.json +2 -2
- package/json-schema/kernel/ArtifactFileEntry.json +2 -2
- package/json-schema/kernel/ArtifactSignature.json +2 -2
- package/json-schema/kernel/BreakingChange.json +2 -2
- package/json-schema/kernel/CLICommandContribution.json +2 -2
- package/json-schema/kernel/CapabilityConformanceLevel.json +2 -2
- package/json-schema/kernel/ClusterCapabilityConfig.json +2 -2
- package/json-schema/kernel/ClusterDriver.json +2 -2
- package/json-schema/kernel/ClusterTenantIsolation.json +2 -2
- package/json-schema/kernel/CompatibilityLevel.json +2 -2
- package/json-schema/kernel/CompatibilityMatrixEntry.json +2 -2
- package/json-schema/kernel/CustomizationOrigin.json +2 -2
- package/json-schema/kernel/CustomizationPolicy.json +2 -2
- package/json-schema/kernel/DeadLetterQueueEntry.json +2 -2
- package/json-schema/kernel/DependencyConflict.json +2 -2
- package/json-schema/kernel/DependencyGraph.json +2 -2
- package/json-schema/kernel/DependencyGraphNode.json +2 -2
- package/json-schema/kernel/DependencyResolutionResult.json +2 -2
- package/json-schema/kernel/DependencyStatusEnum.json +2 -2
- package/json-schema/kernel/DeprecationNotice.json +2 -2
- package/json-schema/kernel/DevFixtureConfig.json +2 -2
- package/json-schema/kernel/DevPluginConfig.json +2 -2
- package/json-schema/kernel/DevPluginPreset.json +2 -2
- package/json-schema/kernel/DevServiceOverride.json +2 -2
- package/json-schema/kernel/DevToolsConfig.json +2 -2
- package/json-schema/kernel/DisablePackageRequest.json +2 -2
- package/json-schema/kernel/DisablePackageResponse.json +2 -2
- package/json-schema/kernel/DistributedStateConfig.json +2 -2
- package/json-schema/kernel/DynamicLoadRequest.json +2 -2
- package/json-schema/kernel/DynamicLoadingConfig.json +2 -2
- package/json-schema/kernel/DynamicPluginOperation.json +2 -2
- package/json-schema/kernel/DynamicPluginResult.json +2 -2
- package/json-schema/kernel/DynamicUnloadRequest.json +2 -2
- package/json-schema/kernel/EnablePackageRequest.json +2 -2
- package/json-schema/kernel/EnablePackageResponse.json +2 -2
- package/json-schema/kernel/Event.json +2 -2
- package/json-schema/kernel/EventBusConfig.json +2 -2
- package/json-schema/kernel/EventClusterOptions.json +2 -2
- package/json-schema/kernel/EventDeliverySemantics.json +2 -2
- package/json-schema/kernel/EventHandler.json +2 -2
- package/json-schema/kernel/EventLogEntry.json +2 -2
- package/json-schema/kernel/EventMessageQueueConfig.json +2 -2
- package/json-schema/kernel/EventMetadata.json +2 -2
- package/json-schema/kernel/EventPersistence.json +2 -2
- package/json-schema/kernel/EventPhase.json +2 -2
- package/json-schema/kernel/EventPriority.json +2 -2
- package/json-schema/kernel/EventQueueConfig.json +2 -2
- package/json-schema/kernel/EventReplayConfig.json +2 -2
- package/json-schema/kernel/EventRoute.json +2 -2
- package/json-schema/kernel/EventScope.json +2 -2
- package/json-schema/kernel/EventSourcingConfig.json +2 -2
- package/json-schema/kernel/EventTypeDefinition.json +2 -2
- package/json-schema/kernel/EventWebhookConfig.json +2 -2
- package/json-schema/kernel/ExecutionContext.json +2 -2
- package/json-schema/kernel/ExtensionPoint.json +2 -2
- package/json-schema/kernel/FeatureFlag.json +2 -2
- package/json-schema/kernel/FeatureStrategy.json +2 -2
- package/json-schema/kernel/FieldChange.json +2 -2
- package/json-schema/kernel/GetPackageRequest.json +2 -2
- package/json-schema/kernel/GetPackageResponse.json +2 -2
- package/json-schema/kernel/GracefulDegradation.json +2 -2
- package/json-schema/kernel/HealthStatus.json +2 -2
- package/json-schema/kernel/HookRegisteredEvent.json +2 -2
- package/json-schema/kernel/HookTriggeredEvent.json +2 -2
- package/json-schema/kernel/HotReloadConfig.json +2 -2
- package/json-schema/kernel/InstallPackageRequest.json +2 -2
- package/json-schema/kernel/InstallPackageResponse.json +2 -2
- package/json-schema/kernel/InstalledPackage.json +2 -2
- package/json-schema/kernel/KernelContext.json +2 -2
- package/json-schema/kernel/KernelEventBase.json +2 -2
- package/json-schema/kernel/KernelReadyEvent.json +2 -2
- package/json-schema/kernel/KernelSecurityPolicy.json +2 -2
- package/json-schema/kernel/KernelSecurityScanResult.json +2 -2
- package/json-schema/kernel/KernelSecurityVulnerability.json +2 -2
- package/json-schema/kernel/KernelShutdownEvent.json +2 -2
- package/json-schema/kernel/ListPackagesRequest.json +2 -2
- package/json-schema/kernel/ListPackagesResponse.json +2 -2
- package/json-schema/kernel/Manifest.json +2 -2
- package/json-schema/kernel/ManifestPermissions.json +2 -2
- package/json-schema/kernel/MergeConflict.json +2 -2
- package/json-schema/kernel/MergeResult.json +2 -2
- package/json-schema/kernel/MergeStrategyConfig.json +2 -2
- package/json-schema/kernel/MetadataBulkRegisterRequest.json +2 -2
- package/json-schema/kernel/MetadataBulkResult.json +2 -2
- package/json-schema/kernel/MetadataCategoryEnum.json +2 -2
- package/json-schema/kernel/MetadataChangeOperation.json +2 -2
- package/json-schema/kernel/MetadataChangeType.json +2 -2
- package/json-schema/kernel/MetadataCollectionInfo.json +2 -2
- package/json-schema/kernel/MetadataDependency.json +2 -2
- package/json-schema/kernel/MetadataDiffItem.json +2 -2
- package/json-schema/kernel/MetadataEvent.json +2 -2
- package/json-schema/kernel/MetadataExportOptions.json +2 -2
- package/json-schema/kernel/MetadataFallbackStrategy.json +2 -2
- package/json-schema/kernel/MetadataFormat.json +2 -2
- package/json-schema/kernel/MetadataImportOptions.json +2 -2
- package/json-schema/kernel/MetadataLoadOptions.json +2 -2
- package/json-schema/kernel/MetadataLoadResult.json +2 -2
- package/json-schema/kernel/MetadataLoaderContract.json +2 -2
- package/json-schema/kernel/MetadataLock.json +2 -2
- package/json-schema/kernel/MetadataLockSource.json +2 -2
- package/json-schema/kernel/MetadataManagerConfig.json +2 -2
- package/json-schema/kernel/MetadataOverlay.json +2 -2
- package/json-schema/kernel/MetadataPluginConfig.json +2 -2
- package/json-schema/kernel/MetadataPluginManifest.json +2 -2
- package/json-schema/kernel/MetadataProvenance.json +2 -2
- package/json-schema/kernel/MetadataQuery.json +2 -2
- package/json-schema/kernel/MetadataQueryResult.json +2 -2
- package/json-schema/kernel/MetadataSaveOptions.json +2 -2
- package/json-schema/kernel/MetadataSaveResult.json +2 -2
- package/json-schema/kernel/MetadataStats.json +2 -2
- package/json-schema/kernel/MetadataType.json +2 -2
- package/json-schema/kernel/MetadataTypeRegistryEntry.json +2 -2
- package/json-schema/kernel/MetadataValidationResult.json +2 -2
- package/json-schema/kernel/MetadataWatchEvent.json +2 -2
- package/json-schema/kernel/MultiVersionSupport.json +2 -2
- package/json-schema/kernel/NamespaceConflictError.json +2 -2
- package/json-schema/kernel/NamespaceRegistryEntry.json +2 -2
- package/json-schema/kernel/OclifPluginConfig.json +2 -2
- package/json-schema/kernel/OpsDomainModule.json +2 -2
- package/json-schema/kernel/OpsFilePath.json +2 -2
- package/json-schema/kernel/OpsPluginStructure.json +2 -2
- package/json-schema/kernel/PackageArtifact.json +2 -2
- package/json-schema/kernel/PackageDependency.json +2 -2
- package/json-schema/kernel/PackageDependencyConflict.json +2 -2
- package/json-schema/kernel/PackageDependencyResolutionResult.json +2 -2
- package/json-schema/kernel/PackageStatusEnum.json +2 -2
- package/json-schema/kernel/PermissionAction.json +2 -2
- package/json-schema/kernel/PermissionScope.json +2 -2
- package/json-schema/kernel/PluginCaching.json +2 -2
- package/json-schema/kernel/PluginCapability.json +2 -2
- package/json-schema/kernel/PluginCapabilityManifest.json +2 -2
- package/json-schema/kernel/PluginCodeSplitting.json +2 -2
- package/json-schema/kernel/PluginCompatibilityMatrix.json +2 -2
- package/json-schema/kernel/PluginDependency.json +2 -2
- package/json-schema/kernel/PluginDependencyResolution.json +2 -2
- package/json-schema/kernel/PluginDependencyResolutionResult.json +2 -2
- package/json-schema/kernel/PluginDiscoveryConfig.json +2 -2
- package/json-schema/kernel/PluginDiscoverySource.json +2 -2
- package/json-schema/kernel/PluginDynamicImport.json +2 -2
- package/json-schema/kernel/PluginEngines.json +2 -2
- package/json-schema/kernel/PluginErrorEvent.json +2 -2
- package/json-schema/kernel/PluginEventBase.json +2 -2
- package/json-schema/kernel/PluginHealthCheck.json +2 -2
- package/json-schema/kernel/PluginHealthReport.json +2 -2
- package/json-schema/kernel/PluginHealthStatus.json +2 -2
- package/json-schema/kernel/PluginHotReload.json +2 -2
- package/json-schema/kernel/PluginInitialization.json +2 -2
- package/json-schema/kernel/PluginInstallConfig.json +2 -2
- package/json-schema/kernel/PluginIntegrity.json +2 -2
- package/json-schema/kernel/PluginInterface.json +2 -2
- package/json-schema/kernel/PluginLifecycleEventType.json +2 -2
- package/json-schema/kernel/PluginLifecyclePhaseEvent.json +2 -2
- package/json-schema/kernel/PluginLoadingConfig.json +2 -2
- package/json-schema/kernel/PluginLoadingEvent.json +2 -2
- package/json-schema/kernel/PluginLoadingState.json +2 -2
- package/json-schema/kernel/PluginLoadingStrategy.json +2 -2
- package/json-schema/kernel/PluginMetadata.json +2 -2
- package/json-schema/kernel/PluginPackaging.json +2 -2
- package/json-schema/kernel/PluginPerformanceMonitoring.json +2 -2
- package/json-schema/kernel/PluginPermission.json +2 -2
- package/json-schema/kernel/PluginPermissionSet.json +2 -2
- package/json-schema/kernel/PluginPermissions.json +2 -2
- package/json-schema/kernel/PluginPreloadConfig.json +2 -2
- package/json-schema/kernel/PluginProvenance.json +2 -2
- package/json-schema/kernel/PluginQualityMetrics.json +2 -2
- package/json-schema/kernel/PluginRegisteredEvent.json +2 -2
- package/json-schema/kernel/PluginRegistryEntry.json +2 -2
- package/json-schema/kernel/PluginRuntime.json +2 -2
- package/json-schema/kernel/PluginSandboxing.json +2 -2
- package/json-schema/kernel/PluginSearchFilters.json +2 -2
- package/json-schema/kernel/PluginSecurityManifest.json +2 -2
- package/json-schema/kernel/PluginSource.json +2 -2
- package/json-schema/kernel/PluginStartupResult.json +2 -2
- package/json-schema/kernel/PluginStateSnapshot.json +2 -2
- package/json-schema/kernel/PluginStatistics.json +2 -2
- package/json-schema/kernel/PluginTrustLevel.json +2 -2
- package/json-schema/kernel/PluginTrustScore.json +2 -2
- package/json-schema/kernel/PluginUpdateStrategy.json +2 -2
- package/json-schema/kernel/PluginVendor.json +2 -2
- package/json-schema/kernel/PluginVersionMetadata.json +2 -2
- package/json-schema/kernel/PreviewModeConfig.json +2 -2
- package/json-schema/kernel/ProtocolFeature.json +2 -2
- package/json-schema/kernel/ProtocolReference.json +2 -2
- package/json-schema/kernel/ProtocolVersion.json +2 -2
- package/json-schema/kernel/RealTimeNotificationConfig.json +2 -2
- package/json-schema/kernel/RequiredAction.json +2 -2
- package/json-schema/kernel/ResolvedDependency.json +2 -2
- package/json-schema/kernel/ResourceType.json +2 -2
- package/json-schema/kernel/RollbackPackageRequest.json +2 -2
- package/json-schema/kernel/RollbackPackageResponse.json +2 -2
- package/json-schema/kernel/RuntimeConfig.json +2 -2
- package/json-schema/kernel/RuntimeMode.json +2 -2
- package/json-schema/kernel/SBOM.json +2 -2
- package/json-schema/kernel/SBOMEntry.json +2 -2
- package/json-schema/kernel/SandboxConfig.json +2 -2
- package/json-schema/kernel/ScopeConfig.json +2 -2
- package/json-schema/kernel/ScopeInfo.json +2 -2
- package/json-schema/kernel/SecurityPolicy.json +2 -2
- package/json-schema/kernel/SecurityScanResult.json +2 -2
- package/json-schema/kernel/SecurityVulnerability.json +2 -2
- package/json-schema/kernel/SemanticVersion.json +2 -2
- package/json-schema/kernel/ServiceClusterAnnotations.json +2 -2
- package/json-schema/kernel/ServiceClusterScope.json +2 -2
- package/json-schema/kernel/ServiceFactoryRegistration.json +2 -2
- package/json-schema/kernel/ServiceLeaderStrategy.json +2 -2
- package/json-schema/kernel/ServiceMetadata.json +2 -2
- package/json-schema/kernel/ServiceRegisteredEvent.json +2 -2
- package/json-schema/kernel/ServiceRegistryConfig.json +2 -2
- package/json-schema/kernel/ServiceScopeType.json +2 -2
- package/json-schema/kernel/ServiceUnregisteredEvent.json +2 -2
- package/json-schema/kernel/StartupOptions.json +2 -2
- package/json-schema/kernel/StartupOrchestrationResult.json +2 -2
- package/json-schema/kernel/TenantRuntimeContext.json +2 -2
- package/json-schema/kernel/UninstallPackageRequest.json +2 -2
- package/json-schema/kernel/UninstallPackageResponse.json +2 -2
- package/json-schema/kernel/UpgradeContext.json +2 -2
- package/json-schema/kernel/UpgradeImpactLevel.json +2 -2
- package/json-schema/kernel/UpgradePackageRequest.json +2 -2
- package/json-schema/kernel/UpgradePackageResponse.json +2 -2
- package/json-schema/kernel/UpgradePhase.json +2 -2
- package/json-schema/kernel/UpgradePlan.json +2 -2
- package/json-schema/kernel/UpgradeSnapshot.json +2 -2
- package/json-schema/kernel/ValidationError.json +2 -2
- package/json-schema/kernel/ValidationResult.json +2 -2
- package/json-schema/kernel/ValidationWarning.json +2 -2
- package/json-schema/kernel/VersionConstraint.json +2 -2
- package/json-schema/kernel/VulnerabilitySeverity.json +2 -2
- package/json-schema/objectstack.json +3581 -3581
- package/json-schema/openapi.json +1 -1
- package/json-schema/qa/TestAction.json +2 -2
- package/json-schema/qa/TestActionType.json +2 -2
- package/json-schema/qa/TestAssertion.json +2 -2
- package/json-schema/qa/TestAssertionType.json +2 -2
- package/json-schema/qa/TestContext.json +2 -2
- package/json-schema/qa/TestScenario.json +2 -2
- package/json-schema/qa/TestStep.json +2 -2
- package/json-schema/qa/TestSuite.json +2 -2
- package/json-schema/security/AccessMatrix.json +2 -2
- package/json-schema/security/AccessMatrixEntry.json +2 -2
- package/json-schema/security/AdminScope.json +2 -2
- package/json-schema/security/AuthzPosture.json +2 -2
- package/json-schema/security/CapabilityDeclaration.json +2 -2
- package/json-schema/security/CriteriaSharingRule.json +2 -2
- package/json-schema/security/ExplainDecision.json +2 -2
- package/json-schema/security/ExplainLayer.json +2 -2
- package/json-schema/security/ExplainMatchedRule.json +2 -2
- package/json-schema/security/ExplainOperation.json +2 -2
- package/json-schema/security/ExplainRecordAttribution.json +2 -2
- package/json-schema/security/ExplainRequest.json +2 -2
- package/json-schema/security/FieldPermission.json +2 -2
- package/json-schema/security/OWDModel.json +2 -2
- package/json-schema/security/ObjectAccessScope.json +2 -2
- package/json-schema/security/ObjectPermission.json +2 -2
- package/json-schema/security/OwnerSharingRule.json +2 -2
- package/json-schema/security/PermissionSet.json +2 -2
- package/json-schema/security/RLSEvaluationResult.json +2 -2
- package/json-schema/security/RLSOperation.json +2 -2
- package/json-schema/security/RLSUserContext.json +2 -2
- package/json-schema/security/RowLevelSecurityPolicy.json +2 -2
- package/json-schema/security/ShareRecipientType.json +2 -2
- package/json-schema/security/SharingLevel.json +2 -2
- package/json-schema/security/SharingRule.json +2 -2
- package/json-schema/security/SharingRuleType.json +2 -2
- package/json-schema/security/Territory.json +2 -2
- package/json-schema/security/TerritoryModel.json +2 -2
- package/json-schema/security/TerritoryType.json +2 -2
- package/json-schema/shared/AggregationFunctionEnum.json +2 -2
- package/json-schema/shared/AppName.json +2 -2
- package/json-schema/shared/BaseMetadataRecord.json +2 -2
- package/json-schema/shared/CacheStrategyEnum.json +2 -2
- package/json-schema/shared/CorsConfig.json +2 -2
- package/json-schema/shared/CronExpressionInput.json +2 -2
- package/json-schema/shared/EventName.json +2 -2
- package/json-schema/shared/Expression.json +2 -2
- package/json-schema/shared/ExpressionDialect.json +2 -2
- package/json-schema/shared/ExpressionInput.json +2 -2
- package/json-schema/shared/ExpressionMeta.json +2 -2
- package/json-schema/shared/FieldMapping.json +2 -2
- package/json-schema/shared/FieldName.json +2 -2
- package/json-schema/shared/FlowName.json +2 -2
- package/json-schema/shared/HttpMethod.json +2 -2
- package/json-schema/shared/HttpRequest.json +2 -2
- package/json-schema/shared/IsolationLevelEnum.json +2 -2
- package/json-schema/shared/MetadataFormat.json +2 -2
- package/json-schema/shared/MutationEventEnum.json +2 -2
- package/json-schema/shared/ObjectName.json +2 -2
- package/json-schema/shared/Predicate.json +2 -2
- package/json-schema/shared/PredicateInput.json +2 -2
- package/json-schema/shared/Protection.json +2 -2
- package/json-schema/shared/RateLimitConfig.json +2 -2
- package/json-schema/shared/RoleName.json +2 -2
- package/json-schema/shared/SnakeCaseIdentifier.json +2 -2
- package/json-schema/shared/SortDirectionEnum.json +2 -2
- package/json-schema/shared/SortItem.json +2 -2
- package/json-schema/shared/StaticMount.json +2 -2
- package/json-schema/shared/SystemIdentifier.json +2 -2
- package/json-schema/shared/TemplateExpressionInput.json +2 -2
- package/json-schema/shared/TransformType.json +2 -2
- package/json-schema/shared/ViewName.json +2 -2
- package/json-schema/studio/ActionContribution.json +2 -2
- package/json-schema/studio/ActionLocation.json +2 -2
- package/json-schema/studio/ActivationEvent.json +2 -2
- package/json-schema/studio/CommandContribution.json +2 -2
- package/json-schema/studio/ERDiagramConfig.json +2 -2
- package/json-schema/studio/ERLayoutAlgorithm.json +2 -2
- package/json-schema/studio/ERNodeDisplay.json +2 -2
- package/json-schema/studio/FieldEditorConfig.json +2 -2
- package/json-schema/studio/FieldGroup.json +2 -2
- package/json-schema/studio/FieldPropertySection.json +2 -2
- package/json-schema/studio/FlowBuilderConfig.json +2 -2
- package/json-schema/studio/FlowCanvasEdge.json +2 -2
- package/json-schema/studio/FlowCanvasEdgeStyle.json +2 -2
- package/json-schema/studio/FlowCanvasNode.json +2 -2
- package/json-schema/studio/FlowLayoutAlgorithm.json +2 -2
- package/json-schema/studio/FlowLayoutDirection.json +2 -2
- package/json-schema/studio/FlowNodeRenderDescriptor.json +2 -2
- package/json-schema/studio/FlowNodeShape.json +2 -2
- package/json-schema/studio/MetadataIconContribution.json +2 -2
- package/json-schema/studio/MetadataViewerContribution.json +2 -2
- package/json-schema/studio/ObjectDesignerConfig.json +2 -2
- package/json-schema/studio/ObjectDesignerDefaultView.json +2 -2
- package/json-schema/studio/ObjectFilter.json +2 -2
- package/json-schema/studio/ObjectListDisplayMode.json +2 -2
- package/json-schema/studio/ObjectManagerConfig.json +2 -2
- package/json-schema/studio/ObjectPreviewConfig.json +2 -2
- package/json-schema/studio/ObjectPreviewTab.json +2 -2
- package/json-schema/studio/ObjectSortField.json +2 -2
- package/json-schema/studio/PanelContribution.json +2 -2
- package/json-schema/studio/PanelLocation.json +2 -2
- package/json-schema/studio/RelationshipDisplay.json +2 -2
- package/json-schema/studio/RelationshipMapperConfig.json +2 -2
- package/json-schema/studio/SidebarGroupContribution.json +2 -2
- package/json-schema/studio/StudioPluginContributions.json +2 -2
- package/json-schema/studio/StudioPluginManifest.json +2 -2
- package/json-schema/studio/ViewMode.json +2 -2
- package/json-schema/system/AccessControlConfig.json +2 -2
- package/json-schema/system/ActionResultDialogTranslation.json +2 -2
- package/json-schema/system/AddFieldOperation.json +2 -2
- package/json-schema/system/AdvancedAuthConfig.json +2 -2
- package/json-schema/system/AnalyzerConfig.json +2 -2
- package/json-schema/system/AppCompatibilityCheck.json +2 -2
- package/json-schema/system/AppInstallRequest.json +2 -2
- package/json-schema/system/AppInstallResult.json +2 -2
- package/json-schema/system/AppManifest.json +2 -2
- package/json-schema/system/AppTranslationBundle.json +2 -2
- package/json-schema/system/AuditConfig.json +2 -2
- package/json-schema/system/AuditEvent.json +2 -2
- package/json-schema/system/AuditEventActor.json +2 -2
- package/json-schema/system/AuditEventChange.json +2 -2
- package/json-schema/system/AuditEventFilter.json +2 -2
- package/json-schema/system/AuditEventSeverity.json +2 -2
- package/json-schema/system/AuditEventTarget.json +2 -2
- package/json-schema/system/AuditEventType.json +2 -2
- package/json-schema/system/AuditRetentionPolicy.json +2 -2
- package/json-schema/system/AuditStorageConfig.json +2 -2
- package/json-schema/system/AuthConfig.json +2 -2
- package/json-schema/system/AuthPluginConfig.json +2 -2
- package/json-schema/system/AuthProviderConfig.json +2 -2
- package/json-schema/system/AwarenessEvent.json +2 -2
- package/json-schema/system/AwarenessSession.json +2 -2
- package/json-schema/system/AwarenessUpdate.json +2 -2
- package/json-schema/system/AwarenessUserState.json +2 -2
- package/json-schema/system/BackupConfig.json +2 -2
- package/json-schema/system/BackupRetention.json +2 -2
- package/json-schema/system/BackupStrategy.json +2 -2
- package/json-schema/system/BatchProgress.json +2 -2
- package/json-schema/system/Book.json +2 -2
- package/json-schema/system/BookAudience.json +2 -2
- package/json-schema/system/BookGroup.json +2 -2
- package/json-schema/system/BookInclude.json +2 -2
- package/json-schema/system/BookNode.json +2 -2
- package/json-schema/system/BucketConfig.json +2 -2
- package/json-schema/system/CRDTMergeResult.json +2 -2
- package/json-schema/system/CRDTState.json +2 -2
- package/json-schema/system/CRDTType.json +2 -2
- package/json-schema/system/CacheAvalanchePrevention.json +2 -2
- package/json-schema/system/CacheConfig.json +2 -2
- package/json-schema/system/CacheConsistency.json +2 -2
- package/json-schema/system/CacheInvalidation.json +2 -2
- package/json-schema/system/CacheStrategy.json +2 -2
- package/json-schema/system/CacheTier.json +2 -2
- package/json-schema/system/CacheWarmup.json +2 -2
- package/json-schema/system/ChangeImpact.json +2 -2
- package/json-schema/system/ChangePriority.json +2 -2
- package/json-schema/system/ChangeRequest.json +2 -2
- package/json-schema/system/ChangeSchema.json +2 -2
- package/json-schema/system/ChangeSet.json +2 -2
- package/json-schema/system/ChangeStatus.json +2 -2
- package/json-schema/system/ChangeType.json +2 -2
- package/json-schema/system/CollaborationMode.json +2 -2
- package/json-schema/system/CollaborationSession.json +2 -2
- package/json-schema/system/CollaborationSessionConfig.json +2 -2
- package/json-schema/system/CollaborativeCursor.json +2 -2
- package/json-schema/system/ComplianceAuditRequirement.json +2 -2
- package/json-schema/system/ComplianceEncryptionRequirement.json +2 -2
- package/json-schema/system/ComplianceFramework.json +2 -2
- package/json-schema/system/ConsoleDestinationConfig.json +2 -2
- package/json-schema/system/ConsumerConfig.json +2 -2
- package/json-schema/system/CoreServiceName.json +2 -2
- package/json-schema/system/CounterOperation.json +2 -2
- package/json-schema/system/CoverageBreakdownEntry.json +2 -2
- package/json-schema/system/CreateObjectOperation.json +2 -2
- package/json-schema/system/CronSchedule.json +2 -2
- package/json-schema/system/CursorColorPreset.json +2 -2
- package/json-schema/system/CursorSelection.json +2 -2
- package/json-schema/system/CursorStyle.json +2 -2
- package/json-schema/system/CursorUpdate.json +2 -2
- package/json-schema/system/DataClassification.json +2 -2
- package/json-schema/system/DataClassificationPolicy.json +2 -2
- package/json-schema/system/DatabaseLevelIsolationStrategy.json +2 -2
- package/json-schema/system/DatabaseProvider.json +2 -2
- package/json-schema/system/DeadLetterQueue.json +2 -2
- package/json-schema/system/DeleteObjectOperation.json +2 -2
- package/json-schema/system/DeployBundle.json +2 -2
- package/json-schema/system/DeployDiff.json +2 -2
- package/json-schema/system/DeployManifest.json +2 -2
- package/json-schema/system/DeployStatusEnum.json +2 -2
- package/json-schema/system/DeployValidationIssue.json +2 -2
- package/json-schema/system/DeployValidationResult.json +2 -2
- package/json-schema/system/DisasterRecoveryPlan.json +2 -2
- package/json-schema/system/DistributedCacheConfig.json +2 -2
- package/json-schema/system/Doc.json +2 -2
- package/json-schema/system/EmailAddressConfig.json +2 -2
- package/json-schema/system/EmailAndPasswordConfig.json +2 -2
- package/json-schema/system/EmailProvider.json +2 -2
- package/json-schema/system/EmailServiceConfig.json +2 -2
- package/json-schema/system/EmailTemplate.json +2 -2
- package/json-schema/system/EmailTemplateDefinition.json +2 -2
- package/json-schema/system/EmailTemplateDefinitionCategory.json +2 -2
- package/json-schema/system/EmailTemplateDefinitionVariable.json +2 -2
- package/json-schema/system/EmailVerificationConfig.json +2 -2
- package/json-schema/system/EncryptionAlgorithm.json +2 -2
- package/json-schema/system/EncryptionConfig.json +2 -2
- package/json-schema/system/EnvironmentArtifact.json +2 -2
- package/json-schema/system/EnvironmentArtifactChecksum.json +2 -2
- package/json-schema/system/EnvironmentArtifactFunction.json +2 -2
- package/json-schema/system/EnvironmentArtifactFunctionLanguageEnum.json +2 -2
- package/json-schema/system/EnvironmentArtifactHashAlgorithmEnum.json +2 -2
- package/json-schema/system/EnvironmentArtifactManifest.json +2 -2
- package/json-schema/system/EnvironmentArtifactMetadata.json +2 -2
- package/json-schema/system/EnvironmentArtifactPayloadRef.json +2 -2
- package/json-schema/system/EnvironmentArtifactRequirement.json +2 -2
- package/json-schema/system/ExecuteSqlOperation.json +2 -2
- package/json-schema/system/ExtendedLogLevel.json +2 -2
- package/json-schema/system/ExternalServiceDestinationConfig.json +2 -2
- package/json-schema/system/FacetConfig.json +2 -2
- package/json-schema/system/FailoverConfig.json +2 -2
- package/json-schema/system/FailoverMode.json +2 -2
- package/json-schema/system/Feature.json +2 -2
- package/json-schema/system/FieldEncryption.json +2 -2
- package/json-schema/system/FieldTranslation.json +2 -2
- package/json-schema/system/FileDestinationConfig.json +2 -2
- package/json-schema/system/FileMetadata.json +2 -2
- package/json-schema/system/GCounter.json +2 -2
- package/json-schema/system/HistogramBucketConfig.json +2 -2
- package/json-schema/system/HttpDestinationConfig.json +2 -2
- package/json-schema/system/HttpServerConfig.json +2 -2
- package/json-schema/system/InAppNotification.json +2 -2
- package/json-schema/system/Incident.json +2 -2
- package/json-schema/system/IncidentCategory.json +2 -2
- package/json-schema/system/IncidentNotificationMatrix.json +2 -2
- package/json-schema/system/IncidentNotificationRule.json +2 -2
- package/json-schema/system/IncidentResponsePhase.json +2 -2
- package/json-schema/system/IncidentResponsePolicy.json +2 -2
- package/json-schema/system/IncidentSeverity.json +2 -2
- package/json-schema/system/IncidentStatus.json +2 -2
- package/json-schema/system/IntervalSchedule.json +2 -2
- package/json-schema/system/Job.json +2 -2
- package/json-schema/system/JobExecution.json +2 -2
- package/json-schema/system/JobExecutionStatus.json +2 -2
- package/json-schema/system/KernelServiceMap.json +2 -2
- package/json-schema/system/KeyManagementProvider.json +2 -2
- package/json-schema/system/KeyRotationPolicy.json +2 -2
- package/json-schema/system/LWWRegister.json +2 -2
- package/json-schema/system/LevelIsolationStrategySchema.json +2 -2
- package/json-schema/system/License.json +2 -2
- package/json-schema/system/LicenseMetricType.json +2 -2
- package/json-schema/system/LifecycleAction.json +2 -2
- package/json-schema/system/LifecyclePolicyConfig.json +2 -2
- package/json-schema/system/LifecyclePolicyRule.json +2 -2
- package/json-schema/system/Locale.json +2 -2
- package/json-schema/system/LogDestination.json +2 -2
- package/json-schema/system/LogDestinationType.json +2 -2
- package/json-schema/system/LogEnrichmentConfig.json +2 -2
- package/json-schema/system/LogEntry.json +2 -2
- package/json-schema/system/LogFormat.json +2 -2
- package/json-schema/system/LogLevel.json +2 -2
- package/json-schema/system/LoggerConfig.json +2 -2
- package/json-schema/system/LoggingConfig.json +2 -2
- package/json-schema/system/MaskingVisibilityRule.json +2 -2
- package/json-schema/system/MessageFormat.json +2 -2
- package/json-schema/system/MessageQueueConfig.json +2 -2
- package/json-schema/system/MessageQueueProvider.json +2 -2
- package/json-schema/system/MetadataCollectionInfo.json +2 -2
- package/json-schema/system/MetadataDiffResult.json +2 -2
- package/json-schema/system/MetadataExportOptions.json +2 -2
- package/json-schema/system/MetadataFallbackStrategy.json +2 -2
- package/json-schema/system/MetadataFormat.json +2 -2
- package/json-schema/system/MetadataHistoryQueryOptions.json +2 -2
- package/json-schema/system/MetadataHistoryQueryResult.json +2 -2
- package/json-schema/system/MetadataHistoryRecord.json +2 -2
- package/json-schema/system/MetadataHistoryRetentionPolicy.json +2 -2
- package/json-schema/system/MetadataImportOptions.json +2 -2
- package/json-schema/system/MetadataLoadOptions.json +2 -2
- package/json-schema/system/MetadataLoadResult.json +2 -2
- package/json-schema/system/MetadataLoaderContract.json +2 -2
- package/json-schema/system/MetadataManagerConfig.json +2 -2
- package/json-schema/system/MetadataRecord.json +2 -2
- package/json-schema/system/MetadataSaveOptions.json +2 -2
- package/json-schema/system/MetadataSaveResult.json +2 -2
- package/json-schema/system/MetadataScope.json +2 -2
- package/json-schema/system/MetadataSource.json +2 -2
- package/json-schema/system/MetadataState.json +2 -2
- package/json-schema/system/MetadataStats.json +2 -2
- package/json-schema/system/MetadataWatchEvent.json +2 -2
- package/json-schema/system/MetricAggregationConfig.json +2 -2
- package/json-schema/system/MetricAggregationType.json +2 -2
- package/json-schema/system/MetricDataPoint.json +2 -2
- package/json-schema/system/MetricDefinition.json +2 -2
- package/json-schema/system/MetricExportConfig.json +2 -2
- package/json-schema/system/MetricLabels.json +2 -2
- package/json-schema/system/MetricType.json +2 -2
- package/json-schema/system/MetricUnit.json +2 -2
- package/json-schema/system/MetricsConfig.json +2 -2
- package/json-schema/system/MiddlewareConfig.json +2 -2
- package/json-schema/system/MiddlewareType.json +2 -2
- package/json-schema/system/MigrationDependency.json +2 -2
- package/json-schema/system/MigrationOperation.json +2 -2
- package/json-schema/system/MigrationPlan.json +2 -2
- package/json-schema/system/MigrationStatement.json +2 -2
- package/json-schema/system/ModifyFieldOperation.json +2 -2
- package/json-schema/system/MultipartUploadConfig.json +2 -2
- package/json-schema/system/MutualTLSConfig.json +2 -2
- package/json-schema/system/NotificationChannel.json +2 -2
- package/json-schema/system/NotificationConfig.json +2 -2
- package/json-schema/system/ORSet.json +2 -2
- package/json-schema/system/ORSetElement.json +2 -2
- package/json-schema/system/OTComponent.json +2 -2
- package/json-schema/system/OTOperation.json +2 -2
- package/json-schema/system/OTOperationType.json +2 -2
- package/json-schema/system/OTTransformResult.json +2 -2
- package/json-schema/system/ObjectMetadata.json +2 -2
- package/json-schema/system/ObjectStorageConfig.json +2 -2
- package/json-schema/system/ObjectTranslationData.json +2 -2
- package/json-schema/system/ObjectTranslationNode.json +2 -2
- package/json-schema/system/OidcProviderConfig.json +2 -2
- package/json-schema/system/OidcProvidersConfig.json +2 -2
- package/json-schema/system/OnceSchedule.json +2 -2
- package/json-schema/system/OpenTelemetryCompatibility.json +2 -2
- package/json-schema/system/OtelExporterType.json +2 -2
- package/json-schema/system/PNCounter.json +2 -2
- package/json-schema/system/PackagePublishResult.json +2 -2
- package/json-schema/system/Plan.json +2 -2
- package/json-schema/system/PresignedUrlConfig.json +2 -2
- package/json-schema/system/ProvisioningStep.json +2 -2
- package/json-schema/system/PushNotification.json +2 -2
- package/json-schema/system/QueueConfig.json +2 -2
- package/json-schema/system/QuotaEnforcementResult.json +2 -2
- package/json-schema/system/RPO.json +2 -2
- package/json-schema/system/RTO.json +2 -2
- package/json-schema/system/RegistryConfig.json +2 -2
- package/json-schema/system/RegistrySyncPolicy.json +2 -2
- package/json-schema/system/RegistryUpstream.json +2 -2
- package/json-schema/system/RemoveFieldOperation.json +2 -2
- package/json-schema/system/RenameObjectOperation.json +2 -2
- package/json-schema/system/ResolvedSettingValue.json +2 -2
- package/json-schema/system/RetryPolicy.json +2 -2
- package/json-schema/system/RollbackPlan.json +2 -2
- package/json-schema/system/RouteHandlerMetadata.json +2 -2
- package/json-schema/system/RowLevelIsolationStrategy.json +2 -2
- package/json-schema/system/SMSTemplate.json +2 -2
- package/json-schema/system/SamplingDecision.json +2 -2
- package/json-schema/system/SamplingStrategyType.json +2 -2
- package/json-schema/system/Schedule.json +2 -2
- package/json-schema/system/SearchConfig.json +2 -2
- package/json-schema/system/SearchIndexConfig.json +2 -2
- package/json-schema/system/SearchProvider.json +2 -2
- package/json-schema/system/SecurityContextConfig.json +2 -2
- package/json-schema/system/SecurityEventCorrelation.json +2 -2
- package/json-schema/system/ServerCapabilities.json +2 -2
- package/json-schema/system/ServerEvent.json +2 -2
- package/json-schema/system/ServerEventType.json +2 -2
- package/json-schema/system/ServerStatus.json +2 -2
- package/json-schema/system/ServiceConfig.json +2 -2
- package/json-schema/system/ServiceCriticality.json +2 -2
- package/json-schema/system/ServiceLevelIndicator.json +2 -2
- package/json-schema/system/ServiceLevelObjective.json +2 -2
- package/json-schema/system/ServiceStatus.json +2 -2
- package/json-schema/system/SettingsActionResult.json +2 -2
- package/json-schema/system/SettingsChangeEvent.json +2 -2
- package/json-schema/system/SettingsManifest.json +2 -2
- package/json-schema/system/SettingsNamespacePayload.json +2 -2
- package/json-schema/system/SocialProviderConfig.json +2 -2
- package/json-schema/system/Span.json +2 -2
- package/json-schema/system/SpanAttributeValue.json +2 -2
- package/json-schema/system/SpanAttributes.json +2 -2
- package/json-schema/system/SpanEvent.json +2 -2
- package/json-schema/system/SpanKind.json +2 -2
- package/json-schema/system/SpanLink.json +2 -2
- package/json-schema/system/SpanStatus.json +2 -2
- package/json-schema/system/Specifier.json +2 -2
- package/json-schema/system/SpecifierHandler.json +2 -2
- package/json-schema/system/SpecifierOption.json +2 -2
- package/json-schema/system/SpecifierScope.json +2 -2
- package/json-schema/system/SpecifierType.json +2 -2
- package/json-schema/system/StorageAcl.json +2 -2
- package/json-schema/system/StorageClass.json +2 -2
- package/json-schema/system/StorageConnection.json +2 -2
- package/json-schema/system/StorageProvider.json +2 -2
- package/json-schema/system/StorageScope.json +2 -2
- package/json-schema/system/StructuredLogEntry.json +2 -2
- package/json-schema/system/SupplierAssessmentStatus.json +2 -2
- package/json-schema/system/SupplierRiskLevel.json +2 -2
- package/json-schema/system/SupplierSecurityAssessment.json +2 -2
- package/json-schema/system/SupplierSecurityPolicy.json +2 -2
- package/json-schema/system/SupplierSecurityRequirement.json +2 -2
- package/json-schema/system/SuspiciousActivityRule.json +2 -2
- package/json-schema/system/Task.json +2 -2
- package/json-schema/system/TaskExecutionResult.json +2 -2
- package/json-schema/system/TaskPriority.json +2 -2
- package/json-schema/system/TaskRetryPolicy.json +2 -2
- package/json-schema/system/TaskStatus.json +2 -2
- package/json-schema/system/Tenant.json +2 -2
- package/json-schema/system/TenantConnectionConfig.json +2 -2
- package/json-schema/system/TenantIsolationConfig.json +2 -2
- package/json-schema/system/TenantIsolationLevel.json +2 -2
- package/json-schema/system/TenantPlan.json +2 -2
- package/json-schema/system/TenantProvisioningRequest.json +2 -2
- package/json-schema/system/TenantProvisioningResult.json +2 -2
- package/json-schema/system/TenantProvisioningStatusEnum.json +2 -2
- package/json-schema/system/TenantQuota.json +2 -2
- package/json-schema/system/TenantRegion.json +2 -2
- package/json-schema/system/TenantSecurityPolicy.json +2 -2
- package/json-schema/system/TenantUsage.json +2 -2
- package/json-schema/system/TextCRDTOperation.json +2 -2
- package/json-schema/system/TextCRDTState.json +2 -2
- package/json-schema/system/TimeSeries.json +2 -2
- package/json-schema/system/TimeSeriesDataPoint.json +2 -2
- package/json-schema/system/TopicConfig.json +2 -2
- package/json-schema/system/TraceContext.json +2 -2
- package/json-schema/system/TraceContextPropagation.json +2 -2
- package/json-schema/system/TraceFlags.json +2 -2
- package/json-schema/system/TracePropagationFormat.json +2 -2
- package/json-schema/system/TraceSamplingConfig.json +2 -2
- package/json-schema/system/TraceState.json +2 -2
- package/json-schema/system/TracingConfig.json +2 -2
- package/json-schema/system/TrainingCategory.json +2 -2
- package/json-schema/system/TrainingCompletionStatus.json +2 -2
- package/json-schema/system/TrainingCourse.json +2 -2
- package/json-schema/system/TrainingPlan.json +2 -2
- package/json-schema/system/TrainingRecord.json +2 -2
- package/json-schema/system/TranslationBundle.json +2 -2
- package/json-schema/system/TranslationConfig.json +2 -2
- package/json-schema/system/TranslationCoverageResult.json +2 -2
- package/json-schema/system/TranslationData.json +2 -2
- package/json-schema/system/TranslationDiffItem.json +2 -2
- package/json-schema/system/TranslationDiffStatus.json +2 -2
- package/json-schema/system/TranslationFileOrganization.json +2 -2
- package/json-schema/system/UserActivityStatus.json +2 -2
- package/json-schema/system/VectorClock.json +2 -2
- package/json-schema/system/WorkerStats.json +2 -2
- package/json-schema/ui/AIChatWindowProps.json +2 -2
- package/json-schema/ui/Action.json +2 -2
- package/json-schema/ui/ActionAi.json +2 -2
- package/json-schema/ui/ActionLocation.json +2 -2
- package/json-schema/ui/ActionNavItem.json +2 -2
- package/json-schema/ui/ActionParam.json +2 -2
- package/json-schema/ui/ActionType.json +2 -2
- package/json-schema/ui/AddRecordConfig.json +2 -2
- package/json-schema/ui/Animation.json +2 -2
- package/json-schema/ui/AnimationTrigger.json +2 -2
- package/json-schema/ui/App.json +2 -2
- package/json-schema/ui/AppBranding.json +2 -2
- package/json-schema/ui/AppContextSelector.json +2 -2
- package/json-schema/ui/AppearanceConfig.json +2 -2
- package/json-schema/ui/AriaProps.json +2 -2
- package/json-schema/ui/BorderRadius.json +2 -2
- package/json-schema/ui/BreakpointColumnMap.json +2 -2
- package/json-schema/ui/BreakpointName.json +2 -2
- package/json-schema/ui/BreakpointOrderMap.json +2 -2
- package/json-schema/ui/Breakpoints.json +2 -2
- package/json-schema/ui/CalendarConfig.json +2 -2
- package/json-schema/ui/ChartAnnotation.json +2 -2
- package/json-schema/ui/ChartAxis.json +2 -2
- package/json-schema/ui/ChartConfig.json +2 -2
- package/json-schema/ui/ChartInteraction.json +2 -2
- package/json-schema/ui/ChartSeries.json +2 -2
- package/json-schema/ui/ChartType.json +2 -2
- package/json-schema/ui/ColorPalette.json +2 -2
- package/json-schema/ui/ColumnSummary.json +2 -2
- package/json-schema/ui/ComponentAnimation.json +2 -2
- package/json-schema/ui/ComponentNavItem.json +2 -2
- package/json-schema/ui/ConflictResolution.json +2 -2
- package/json-schema/ui/Dashboard.json +2 -2
- package/json-schema/ui/DashboardHeader.json +2 -2
- package/json-schema/ui/DashboardHeaderAction.json +2 -2
- package/json-schema/ui/DashboardNavItem.json +2 -2
- package/json-schema/ui/DashboardWidget.json +2 -2
- package/json-schema/ui/Dataset.json +2 -2
- package/json-schema/ui/DatasetDimension.json +2 -2
- package/json-schema/ui/DatasetMeasure.json +2 -2
- package/json-schema/ui/DateFormat.json +2 -2
- package/json-schema/ui/DensityMode.json +2 -2
- package/json-schema/ui/DerivedMeasureOp.json +2 -2
- package/json-schema/ui/DndConfig.json +2 -2
- package/json-schema/ui/DragConstraint.json +2 -2
- package/json-schema/ui/DragHandle.json +2 -2
- package/json-schema/ui/DragItem.json +2 -2
- package/json-schema/ui/DropEffect.json +2 -2
- package/json-schema/ui/DropZone.json +2 -2
- package/json-schema/ui/EasingFunction.json +2 -2
- package/json-schema/ui/ElementButtonProps.json +2 -2
- package/json-schema/ui/ElementDataSource.json +2 -2
- package/json-schema/ui/ElementFilterProps.json +2 -2
- package/json-schema/ui/ElementFormProps.json +2 -2
- package/json-schema/ui/ElementImageProps.json +2 -2
- package/json-schema/ui/ElementMetadataViewerProps.json +2 -2
- package/json-schema/ui/ElementNumberProps.json +2 -2
- package/json-schema/ui/ElementRecordPickerProps.json +2 -2
- package/json-schema/ui/ElementTextInputProps.json +2 -2
- package/json-schema/ui/ElementTextProps.json +2 -2
- package/json-schema/ui/EmbedConfig.json +2 -2
- package/json-schema/ui/EvictionPolicy.json +2 -2
- package/json-schema/ui/FocusManagement.json +2 -2
- package/json-schema/ui/FocusTrapConfig.json +2 -2
- package/json-schema/ui/FormButtonConfig.json +2 -2
- package/json-schema/ui/FormField.json +2 -2
- package/json-schema/ui/FormSection.json +2 -2
- package/json-schema/ui/FormView.json +2 -2
- package/json-schema/ui/GalleryConfig.json +2 -2
- package/json-schema/ui/GanttConfig.json +2 -2
- package/json-schema/ui/GanttQuickFilter.json +2 -2
- package/json-schema/ui/GestureConfig.json +2 -2
- package/json-schema/ui/GestureType.json +2 -2
- package/json-schema/ui/GlobalFilter.json +2 -2
- package/json-schema/ui/GlobalFilterOptionsFrom.json +2 -2
- package/json-schema/ui/GroupNavItem.json +2 -2
- package/json-schema/ui/GroupingConfig.json +2 -2
- package/json-schema/ui/GroupingField.json +2 -2
- package/json-schema/ui/HttpMethod.json +2 -2
- package/json-schema/ui/HttpRequest.json +2 -2
- package/json-schema/ui/I18nLabel.json +2 -2
- package/json-schema/ui/I18nObject.json +2 -2
- package/json-schema/ui/InterfacePageConfig.json +2 -2
- package/json-schema/ui/JoinedReportBlock.json +2 -2
- package/json-schema/ui/KanbanConfig.json +2 -2
- package/json-schema/ui/KeyboardNavigationConfig.json +2 -2
- package/json-schema/ui/KeyboardShortcut.json +2 -2
- package/json-schema/ui/ListChartConfig.json +2 -2
- package/json-schema/ui/ListColumn.json +2 -2
- package/json-schema/ui/ListView.json +2 -2
- package/json-schema/ui/LocaleConfig.json +2 -2
- package/json-schema/ui/LongPressGestureConfig.json +2 -2
- package/json-schema/ui/MotionConfig.json +2 -2
- package/json-schema/ui/NavigationArea.json +2 -2
- package/json-schema/ui/NavigationConfig.json +2 -2
- package/json-schema/ui/NavigationContribution.json +2 -2
- package/json-schema/ui/NavigationItem.json +2 -2
- package/json-schema/ui/NavigationMode.json +2 -2
- package/json-schema/ui/Notification.json +2 -2
- package/json-schema/ui/NotificationAction.json +2 -2
- package/json-schema/ui/NotificationConfig.json +2 -2
- package/json-schema/ui/NotificationPosition.json +2 -2
- package/json-schema/ui/NotificationSeverity.json +2 -2
- package/json-schema/ui/NotificationType.json +2 -2
- package/json-schema/ui/NumberFormat.json +2 -2
- package/json-schema/ui/ObjectListView.json +2 -2
- package/json-schema/ui/ObjectNavItem.json +2 -2
- package/json-schema/ui/ObjectUserFilters.json +2 -2
- package/json-schema/ui/OfflineCacheConfig.json +2 -2
- package/json-schema/ui/OfflineConfig.json +2 -2
- package/json-schema/ui/OfflineStrategy.json +2 -2
- package/json-schema/ui/Page.json +2 -2
- package/json-schema/ui/PageAccordionProps.json +2 -2
- package/json-schema/ui/PageCardProps.json +2 -2
- package/json-schema/ui/PageComponent.json +2 -2
- package/json-schema/ui/PageComponentType.json +2 -2
- package/json-schema/ui/PageHeaderProps.json +2 -2
- package/json-schema/ui/PageNavItem.json +2 -2
- package/json-schema/ui/PageRegion.json +2 -2
- package/json-schema/ui/PageTabsProps.json +2 -2
- package/json-schema/ui/PageTransition.json +2 -2
- package/json-schema/ui/PageType.json +2 -2
- package/json-schema/ui/PageVariable.json +2 -2
- package/json-schema/ui/PaginationConfig.json +2 -2
- package/json-schema/ui/PerformanceConfig.json +2 -2
- package/json-schema/ui/PersistStorage.json +2 -2
- package/json-schema/ui/PinchGestureConfig.json +2 -2
- package/json-schema/ui/PluralRule.json +2 -2
- package/json-schema/ui/Portal.json +2 -2
- package/json-schema/ui/PortalActionNavItem.json +2 -2
- package/json-schema/ui/PortalAnonymousEntry.json +2 -2
- package/json-schema/ui/PortalAnonymousRoute.json +2 -2
- package/json-schema/ui/PortalAuthMode.json +2 -2
- package/json-schema/ui/PortalDashboardNavItem.json +2 -2
- package/json-schema/ui/PortalLayout.json +2 -2
- package/json-schema/ui/PortalNavItem.json +2 -2
- package/json-schema/ui/PortalRateLimit.json +2 -2
- package/json-schema/ui/PortalSeo.json +2 -2
- package/json-schema/ui/PortalTheme.json +2 -2
- package/json-schema/ui/PortalUrlNavItem.json +2 -2
- package/json-schema/ui/PortalViewNavItem.json +2 -2
- package/json-schema/ui/RecordActivityProps.json +2 -2
- package/json-schema/ui/RecordChatterProps.json +2 -2
- package/json-schema/ui/RecordDetailsProps.json +2 -2
- package/json-schema/ui/RecordHighlightsField.json +2 -2
- package/json-schema/ui/RecordHighlightsProps.json +2 -2
- package/json-schema/ui/RecordPathProps.json +2 -2
- package/json-schema/ui/RecordRelatedListProps.json +2 -2
- package/json-schema/ui/Report.json +2 -2
- package/json-schema/ui/ReportChart.json +2 -2
- package/json-schema/ui/ReportColumn.json +2 -2
- package/json-schema/ui/ReportGrouping.json +2 -2
- package/json-schema/ui/ReportNavItem.json +2 -2
- package/json-schema/ui/ReportType.json +2 -2
- package/json-schema/ui/ResponsiveConfig.json +2 -2
- package/json-schema/ui/ResponsiveStyles.json +2 -2
- package/json-schema/ui/RowColorConfig.json +2 -2
- package/json-schema/ui/RowHeight.json +2 -2
- package/json-schema/ui/SelectionConfig.json +2 -2
- package/json-schema/ui/Shadow.json +2 -2
- package/json-schema/ui/SharingConfig.json +2 -2
- package/json-schema/ui/Spacing.json +2 -2
- package/json-schema/ui/StyleMap.json +2 -2
- package/json-schema/ui/SwipeDirection.json +2 -2
- package/json-schema/ui/SwipeGestureConfig.json +2 -2
- package/json-schema/ui/SyncConfig.json +2 -2
- package/json-schema/ui/Theme.json +2 -2
- package/json-schema/ui/ThemeMode.json +2 -2
- package/json-schema/ui/TimelineConfig.json +2 -2
- package/json-schema/ui/TouchInteraction.json +2 -2
- package/json-schema/ui/TouchTargetConfig.json +2 -2
- package/json-schema/ui/TransitionConfig.json +2 -2
- package/json-schema/ui/TransitionPreset.json +2 -2
- package/json-schema/ui/TreeConfig.json +2 -2
- package/json-schema/ui/Typography.json +2 -2
- package/json-schema/ui/UrlNavItem.json +2 -2
- package/json-schema/ui/UserActionsConfig.json +2 -2
- package/json-schema/ui/UserFilterField.json +2 -2
- package/json-schema/ui/UserFilters.json +2 -2
- package/json-schema/ui/View.json +2 -2
- package/json-schema/ui/ViewData.json +2 -2
- package/json-schema/ui/ViewFilterRule.json +2 -2
- package/json-schema/ui/ViewItem.json +2 -2
- package/json-schema/ui/ViewItemName.json +2 -2
- package/json-schema/ui/ViewKind.json +2 -2
- package/json-schema/ui/ViewScope.json +2 -2
- package/json-schema/ui/ViewSharing.json +2 -2
- package/json-schema/ui/ViewTab.json +2 -2
- package/json-schema/ui/VisualizationType.json +2 -2
- package/json-schema/ui/WcagContrastLevel.json +2 -2
- package/json-schema/ui/WidgetActionType.json +2 -2
- package/json-schema/ui/WidgetColorVariant.json +2 -2
- package/json-schema/ui/WidgetEvent.json +2 -2
- package/json-schema/ui/WidgetLifecycle.json +2 -2
- package/json-schema/ui/WidgetManifest.json +2 -2
- package/json-schema/ui/WidgetProperty.json +2 -2
- package/json-schema/ui/WidgetSource.json +2 -2
- package/json-schema/ui/ZIndex.json +2 -2
- package/package.json +3 -3
- package/src/ui/portal.zod.ts +1 -1
package/dist/ui/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/shared/lazy-schema.ts","../../src/ui/i18n.zod.ts","../../src/ui/chart.zod.ts","../../src/ui/responsive.zod.ts","../../src/shared/identifiers.zod.ts","../../src/shared/expression.zod.ts","../../src/ui/sharing.zod.ts","../../src/kernel/metadata-protection.zod.ts","../../src/shared/protection.zod.ts","../../src/ui/app.zod.ts","../../src/shared/visibility.ts","../../src/data/filter.zod.ts","../../src/data/field.zod.ts","../../src/shared/http.zod.ts","../../src/ui/view.zod.ts","../../src/ui/dashboard.zod.ts","../../src/ui/report.zod.ts","../../src/data/query.zod.ts","../../src/ui/dataset.zod.ts","../../src/ui/report.form.ts","../../src/ui/view.form.ts","../../src/ui/app.form.ts","../../src/ui/dashboard.form.ts","../../src/ui/dataset.form.ts","../../src/ui/action.form.ts","../../src/ui/page.form.ts","../../src/data/hook-body.zod.ts","../../src/kernel/public-auth-features.ts","../../src/ui/action.zod.ts","../../src/shared/enums.zod.ts","../../src/ui/page.zod.ts","../../src/ui/widget.zod.ts","../../src/data/feed.zod.ts","../../src/ui/component.zod.ts","../../src/ui/react-blocks.ts","../../src/ui/touch.zod.ts","../../src/ui/keyboard.zod.ts","../../src/ui/theme.zod.ts","../../src/ui/offline.zod.ts","../../src/ui/animation.zod.ts","../../src/ui/notification.zod.ts","../../src/ui/dnd.zod.ts","../../src/ui/portal.zod.ts"],"names":["z"],"mappings":";;;;;AAoBO,SAAS,WAAmC,OAAA,EAAqB;AACtE,EAAA,IAAI,OAAO,OAAA,KAAY,WAAA,IAAe,OAAA,CAAQ,GAAA,EAAK,qBAAqB,GAAA,EAAK;AAC3E,IAAA,OAAO,OAAA,EAAQ;AAAA,EACjB;AAEA,EAAA,IAAI,MAAA;AACJ,EAAA,MAAM,UAAU,MAAS;AACvB,IAAA,IAAI,MAAA,KAAW,MAAA,EAAW,MAAA,GAAS,OAAA,EAAQ;AAC3C,IAAA,OAAO,MAAA;AAAA,EACT,CAAA;AAEA,EAAA,MAAM,MAAA,GAAS,SAAS,OAAA,GAAU;AAAA,EAAC,CAAA;AAwBnC,EAAA,IAAI,SAAA;AACJ,EAAA,MAAM,aAAA,GAAgB,CAAC,IAAA,KAAgC;AACrD,IAAA,MAAM,UAAW,IAAA,CAAuD,IAAA;AACxE,IAAA,IAAI,CAAC,OAAA,IAAW,OAAO,OAAA,CAAQ,sBAAsB,UAAA,EAAY;AAC/D,MAAA,OAAO,OAAA;AAAA,IACT;AACA,IAAA,MAAM,WAAW,OAAA,CAAQ,iBAAA;AACzB,IAAA,OAAO,MAAA,CAAO,OAAO,OAAA,EAAmB;AAAA,MACtC,iBAAA,EAAmB;AAAA,QACjB,UAAA,EAAY,IAAA;AAA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MAAA;AAAA,QACrB,OAAA,EACE;AAAA,OAGH,CAAA;AAAA,IACH;AAAA,EACF,CAAC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQH,cAAA,EAAgB,2BAA2B,QAAA,EAAS;AAAA;AAAA,EAIpD,YAAYA,CAAAA,CAAE,KAAA,CAAM,mBAAmB,CAAA,CACpC,SAAS,qEAAqE,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjF,YAAA,EAAcA,EAAE,MAAA,CAAO;AAAA,IACrB,OAAA,EAASA,CAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,IAC7B,SAAA,EAAWA,CAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,IAC/B,aAAA,EAAe,0BAA0B,QAAA;AAAS,GACnD,CAAA,CAAE,QAAA,EAAS,CAAE,SAAS,qDAAqD,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ5E,YAAYA,CAAAA,CAAE,OAAA,GAAU,QAAA,EAAS,CAAE,QAAQ,KAAK,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMhD,qBAAqBA,CAAAA,CAAE,KAAA,CAAMA,EAAE,MAAA,EAAQ,EAAE,QAAA,EAAS;AAAA;AAAA,EAGlD,QAAQA,CAAAA,CAAE,OAAA,GAAU,QAAA,EAAS,CAAE,QAAQ,IAAI;AAC7C,CAAC,CAAA,CAAE,QAAA,CAAS,uWAAkW,CAAC;AAMxW,IAAM,MAAA,GAAS;AAAA,EACpB,MAAA,EAAQ,CAAC,MAAA,KAAiD,YAAA,CAAa,MAAM,MAAM;AACrF;AAEO,SAAS,aAAa,MAAA,EAA8C;AACzE,EAAA,OAAO,YAAA,CAAa,MAAM,MAAM,CAAA;AAClC","file":"index.mjs","sourcesContent":["// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { z } from 'zod';\n\n/**\n * Wrap a Zod schema constructor so its body is only evaluated on first use.\n *\n * Why: building Zod schemas at module-load creates millions of closures that\n * dominate dev-server RSS even though most schemas are never parsed in a\n * given session. Wrapping the constructor in a Proxy defers allocation until\n * the first property access (`.parse`, `.shape`, `._def`, etc.) and reuses\n * a single cached instance thereafter.\n *\n * Type system: the returned Proxy is structurally indistinguishable from the\n * underlying ZodType, so `z.infer<typeof X>` and `.parse()` callers do not\n * need to change.\n *\n * Emergency rollback: set `OS_EAGER_SCHEMAS=1` to evaluate the\n * factory immediately and bypass the Proxy entirely.\n */\nexport function lazySchema<T extends z.ZodTypeAny>(factory: () => T): T {\n if (typeof process !== 'undefined' && process.env?.OS_EAGER_SCHEMAS === '1') {\n return factory();\n }\n\n let cached: T | undefined;\n const resolve = (): T => {\n if (cached === undefined) cached = factory();\n return cached;\n };\n\n const target = function lazyZod() {} as unknown as T;\n\n /**\n * Memoised `_zod` facade (one per proxy — `_zod.run` is the parse hot path).\n *\n * Why it exists: zod's `toJSONSchema` traversal keys its `seen` map on the\n * node object it was handed — this Proxy, wherever the schema is referenced\n * lazily (a `z.lazy(() => X)` recursion getter, or a direct conversion\n * root). But zod's per-type JSON-Schema hooks close over the REAL instance\n * at construction time (`inst._zod.processJSONSchema = (ctx, …) =>\n * pipeProcessor(inst, ctx, …)`), and the wrapper-type processors\n * (pipe/lazy/optional/default/…) then resolve `ctx.seen.get(inst)` — which\n * misses when the entry was keyed on the Proxy, crashing with\n * `Cannot set properties of undefined (setting 'ref')`. Plain-object\n * schemas never look themselves up, which kept this latent until ADR-0089\n * D3a turned FormFieldSchema / PageComponentSchema into\n * `.strict().transform(…)` pipes.\n *\n * The facade prototype-delegates every `_zod` read to the real internals,\n * wrapping only `processJSONSchema` to alias the Proxy's `seen` entry onto\n * the real instance before delegating, so both identities resolve to the\n * same entry. If the real instance was already traversed under its own\n * identity it keeps its entry (alias, never clobber).\n */\n let zodFacade: object | undefined;\n const makeZodFacade = (real: T): object | undefined => {\n const realZod = (real as unknown as { _zod?: Record<string, unknown> })._zod;\n if (!realZod || typeof realZod.processJSONSchema !== 'function') {\n return realZod;\n }\n const delegate = realZod.processJSONSchema as (...a: unknown[]) => unknown;\n return Object.create(realZod as object, {\n processJSONSchema: {\n enumerable: true,\n value: (ctx: { seen?: Map<unknown, unknown> }, json: unknown, params: unknown) => {\n const seen = ctx?.seen;\n if (seen && typeof seen.get === 'function') {\n const entry = seen.get(proxy);\n if (entry !== undefined && !seen.has(real)) seen.set(real, entry);\n }\n return delegate(ctx, json, params);\n },\n },\n }) as object;\n };\n\n const proxy = new Proxy(target as object, {\n get(_t, prop) {\n const real = resolve() as unknown as Record<PropertyKey, unknown>;\n if (prop === '_zod') {\n zodFacade ??= makeZodFacade(real as unknown as T);\n return zodFacade;\n }\n const value = real[prop];\n if (typeof value === 'function') {\n return (value as (...a: unknown[]) => unknown).bind(real);\n }\n return value;\n },\n set(_t, prop, value) {\n const real = resolve() as unknown as Record<PropertyKey, unknown>;\n real[prop] = value;\n return true;\n },\n has(_t, prop) {\n return prop in (resolve() as object);\n },\n ownKeys() {\n return Reflect.ownKeys(resolve() as object);\n },\n getOwnPropertyDescriptor(_t, prop) {\n return Reflect.getOwnPropertyDescriptor(resolve() as object, prop);\n },\n getPrototypeOf() {\n return Reflect.getPrototypeOf(resolve() as object);\n },\n });\n\n return proxy as T;\n}\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * I18n Object Schema\n * Structured internationalization label with translation key and parameters.\n * \n * @example\n * ```typescript\n * const label: I18nObject = {\n * key: 'views.task_list.label',\n * defaultValue: 'Task List',\n * params: { count: 5 },\n * };\n * ```\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const I18nObjectSchema = lazySchema(() => z.object({\n /** Translation key (e.g., \"views.task_list.label\", \"apps.crm.description\") */\n key: z.string().describe('Translation key (e.g., \"views.task_list.label\")'),\n\n /** Default value when translation is not available */\n defaultValue: z.string().optional().describe('Fallback value when translation key is not found'),\n\n /** Interpolation parameters for dynamic translations */\n params: z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])).optional().describe('Interpolation parameters (e.g., { count: 5 })'),\n}));\n\nexport type I18nObject = z.infer<typeof I18nObjectSchema>;\n\n/**\n * I18n Label Schema\n * \n * A plain string label for display purposes.\n * i18n translation keys are auto-generated by the framework at registration time\n * based on a standardized naming convention (e.g., `apps.<packageId>.<name>.label`).\n * Developers only need to provide the default-language string; translations are\n * managed through translation files, not inline i18n objects.\n * \n * @example\n * ```typescript\n * const label: I18nLabel = \"All Active\";\n * ```\n */\nexport const I18nLabelSchema = lazySchema(() => z.string().describe('Display label (plain string; i18n keys are auto-generated by the framework)'));\n\nexport type I18nLabel = z.infer<typeof I18nLabelSchema>;\n\n/**\n * ARIA Accessibility Properties Schema\n * \n * Common ARIA attributes for UI components to support screen readers\n * and assistive technologies.\n * \n * Aligned with WAI-ARIA 1.2 specification.\n * \n * @see https://www.w3.org/TR/wai-aria-1.2/\n * \n * @example\n * ```typescript\n * const aria: AriaProps = {\n * ariaLabel: 'Close dialog',\n * ariaDescribedBy: 'dialog-description',\n * role: 'dialog',\n * };\n * ```\n */\nexport const AriaPropsSchema = lazySchema(() => z.object({\n /** Accessible label for screen readers */\n ariaLabel: I18nLabelSchema.optional().describe('Accessible label for screen readers (WAI-ARIA aria-label)'),\n\n /** ID of element that describes this component */\n ariaDescribedBy: z.string().optional().describe('ID of element providing additional description (WAI-ARIA aria-describedby)'),\n\n /** WAI-ARIA role override */\n role: z.string().optional().describe('WAI-ARIA role attribute (e.g., \"dialog\", \"navigation\", \"alert\")'),\n}).describe('ARIA accessibility attributes'));\n\nexport type AriaProps = z.infer<typeof AriaPropsSchema>;\n\n/**\n * Plural Rule Schema\n *\n * Defines plural forms for a translation key, following ICU MessageFormat / i18next conventions.\n * Supports zero, one, two, few, many, other forms per CLDR plural rules.\n *\n * @see https://unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules\n *\n * @example\n * ```typescript\n * const plural: PluralRule = {\n * key: 'items.count',\n * zero: 'No items',\n * one: '{count} item',\n * other: '{count} items',\n * };\n * ```\n */\nexport const PluralRuleSchema = lazySchema(() => z.object({\n /** Translation key for the plural form */\n key: z.string().describe('Translation key'),\n /** Form for zero quantity */\n zero: z.string().optional().describe('Zero form (e.g., \"No items\")'),\n /** Form for singular (1) */\n one: z.string().optional().describe('Singular form (e.g., \"{count} item\")'),\n /** Form for dual (2) — used in Arabic, Welsh, etc. */\n two: z.string().optional().describe('Dual form (e.g., \"{count} items\" for exactly 2)'),\n /** Form for few (2-4 in Slavic languages) */\n few: z.string().optional().describe('Few form (e.g., for 2-4 in some languages)'),\n /** Form for many (5+ in Slavic languages) */\n many: z.string().optional().describe('Many form (e.g., for 5+ in some languages)'),\n /** Default/fallback form */\n other: z.string().describe('Default plural form (e.g., \"{count} items\")'),\n}).describe('ICU plural rules for a translation key'));\n\nexport type PluralRule = z.infer<typeof PluralRuleSchema>;\n\n/**\n * Number Format Schema\n *\n * Defines number formatting rules for localization.\n *\n * @example\n * ```typescript\n * const format: NumberFormat = {\n * style: 'currency',\n * currency: 'USD',\n * minimumFractionDigits: 2,\n * };\n * ```\n */\nexport const NumberFormatSchema = lazySchema(() => z.object({\n style: z.enum(['decimal', 'currency', 'percent', 'unit']).default('decimal')\n .describe('Number formatting style'),\n currency: z.string().optional().describe('ISO 4217 currency code (e.g., \"USD\", \"EUR\")'),\n unit: z.string().optional().describe('Unit for unit formatting (e.g., \"kilometer\", \"liter\")'),\n minimumFractionDigits: z.number().optional().describe('Minimum number of fraction digits'),\n maximumFractionDigits: z.number().optional().describe('Maximum number of fraction digits'),\n useGrouping: z.boolean().optional().describe('Whether to use grouping separators (e.g., 1,000)'),\n}).describe('Number formatting rules'));\n\nexport type NumberFormat = z.infer<typeof NumberFormatSchema>;\n\n/**\n * Date Format Schema\n *\n * Defines date/time formatting rules for localization.\n *\n * @example\n * ```typescript\n * const format: DateFormat = {\n * dateStyle: 'medium',\n * timeStyle: 'short',\n * timeZone: 'America/New_York',\n * };\n * ```\n */\nexport const DateFormatSchema = lazySchema(() => z.object({\n dateStyle: z.enum(['full', 'long', 'medium', 'short']).optional()\n .describe('Date display style'),\n timeStyle: z.enum(['full', 'long', 'medium', 'short']).optional()\n .describe('Time display style'),\n timeZone: z.string().optional().describe('IANA time zone (e.g., \"America/New_York\")'),\n hour12: z.boolean().optional().describe('Use 12-hour format'),\n}).describe('Date/time formatting rules'));\n\nexport type DateFormat = z.infer<typeof DateFormatSchema>;\n\n/**\n * Locale Configuration Schema\n *\n * Defines a complete locale configuration including language code,\n * fallback chain, and formatting preferences.\n *\n * @example\n * ```typescript\n * const locale: LocaleConfig = {\n * code: 'zh-CN',\n * fallbackChain: ['zh-TW', 'en'],\n * direction: 'ltr',\n * numberFormat: { style: 'decimal', useGrouping: true },\n * dateFormat: { dateStyle: 'medium', timeStyle: 'short' },\n * };\n * ```\n */\nexport const LocaleConfigSchema = lazySchema(() => z.object({\n /** BCP 47 language code (e.g., \"en-US\", \"zh-CN\", \"ar-SA\") */\n code: z.string().describe('BCP 47 language code (e.g., \"en-US\", \"zh-CN\")'),\n\n /** Ordered fallback chain for missing translations */\n fallbackChain: z.array(z.string()).optional()\n .describe('Fallback language codes in priority order (e.g., [\"zh-TW\", \"en\"])'),\n\n /** Text direction */\n direction: z.enum(['ltr', 'rtl']).default('ltr')\n .describe('Text direction: left-to-right or right-to-left'),\n\n /** Default number formatting */\n numberFormat: NumberFormatSchema.optional().describe('Default number formatting rules'),\n\n /** Default date formatting */\n dateFormat: DateFormatSchema.optional().describe('Default date/time formatting rules'),\n}).describe('Locale configuration'));\n\nexport type LocaleConfig = z.infer<typeof LocaleConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\n\n/**\n * Unified Chart Type Taxonomy\n * \n * Shared by Dashboard and Report widgets.\n * Provides a comprehensive set of chart types for data visualization.\n */\n\n/**\n * Chart Type Enum\n * Categorized by visualization purpose\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const ChartTypeSchema = lazySchema(() => z.enum([\n // Comparison\n 'bar',\n 'horizontal-bar',\n 'column',\n\n // Trend\n 'line',\n 'area',\n\n // Distribution\n 'pie',\n 'donut',\n 'funnel',\n\n // Relationship\n 'scatter',\n\n // Composition\n 'treemap',\n 'sankey',\n\n // Performance (single value — metric/kpi render a number; gauge/solid-gauge/\n // bullet are honest single-value variants pending a real dial/target renderer)\n 'gauge',\n 'solid-gauge',\n 'metric',\n 'kpi',\n 'bullet',\n\n // Advanced\n 'radar',\n\n // Tabular\n 'table',\n 'pivot',\n]));\n\n// NOTE: the taxonomy lists only chart families the default Recharts renderer\n// draws DISTINCTLY. Two groups are intentionally absent:\n//\n// 1. Families requiring data/dependencies the platform does not model — OHLC\n// (candlestick/stock), per-record distributions (box-plot/violin), geo\n// (choropleth/bubble-map/gl-map), or extra renderers (sunburst, heatmap,\n// word-cloud, waterfall).\n// 2. VARIANTS that only render as their base chart, so advertising them lies\n// about the output: grouped-bar / stacked-bar / bi-polar-bar (→ bar, no\n// multi-series grouping/stacking), stacked-area (→ area), step-line / spline\n// (→ line), pyramid (→ funnel), bubble (→ scatter, no size encoding).\n//\n// Both can return via an opt-in renderer once there is a real renderer and a\n// data model to back them. (`metric`/`kpi` are kept as honest single-value\n// synonyms; `gauge`/`solid-gauge`/`bullet` render a value today and gain a dial\n// when a gauge renderer lands.)\n\nexport type ChartType = z.infer<typeof ChartTypeSchema>;\n\n/**\n * Chart Axis Schema\n * Definition for X and Y axes\n */\nexport const ChartAxisSchema = lazySchema(() => z.object({\n /** Data field to map to this axis */\n field: z.string().describe('Data field key'),\n \n /** Axis title */\n title: I18nLabelSchema.optional().describe('Axis display title'),\n\n /** Value formatting (d3-format or similar) */\n format: z.string().optional().describe('Value format string (e.g., \"$0,0.00\")'),\n \n /** Axis scale settings */\n min: z.number().optional().describe('Minimum value'),\n max: z.number().optional().describe('Maximum value'),\n stepSize: z.number().optional().describe('Step size for ticks'),\n \n /** Appearance */\n showGridLines: z.boolean().default(true),\n position: z.enum(['left', 'right', 'top', 'bottom']).optional().describe('Axis position'),\n \n /** Logarithmic scale */\n logarithmic: z.boolean().default(false),\n}));\n\n/**\n * Chart Series Schema\n * Defines a single data series in the chart\n */\nexport const ChartSeriesSchema = lazySchema(() => z.object({\n /** Field name for values */\n name: z.string().describe('Field name or series identifier'),\n \n /** Display label */\n label: I18nLabelSchema.optional().describe('Series display label'),\n \n /** Series type override (combo charts) */\n type: ChartTypeSchema.optional().describe('Override chart type for this series'),\n \n /** Specific color */\n color: z.string().optional().describe('Series color (hex/rgb/token)'),\n \n /** Stacking group */\n stack: z.string().optional().describe('Stack identifier to group series'),\n \n /** Axis binding */\n yAxis: z.enum(['left', 'right']).default('left').describe('Bind to specific Y-Axis'),\n\n /**\n * Series role.\n *\n * - `'primary'` (default) — normal styling using the chart palette.\n * - `'comparison'` — secondary period-over-period overlay; renderers\n * render it muted (lower opacity, dashed stroke for line/area,\n * lighter fill for bars) so it visually backgrounds against the\n * primary series. Pair with `DashboardWidget.compareTo` on data-\n * bound charts; for hand-authored series, set it directly.\n */\n variant: z.enum(['primary', 'comparison']).default('primary').optional().describe('Series visual role'),\n\n /** Override stroke dash pattern (e.g. \"4 4\" for dashed lines). */\n dashArray: z.string().optional().describe('SVG stroke-dasharray override'),\n\n /** Override series opacity (0–1). */\n opacity: z.number().min(0).max(1).optional().describe('Series opacity override'),\n}));\n\n/**\n * Chart Annotation Schema\n * Static lines or regions to highlight data\n */\nexport const ChartAnnotationSchema = lazySchema(() => z.object({\n type: z.enum(['line', 'region']).default('line'),\n axis: z.enum(['x', 'y']).default('y'),\n value: z.union([z.number(), z.string()]).describe('Start value'),\n endValue: z.union([z.number(), z.string()]).optional().describe('End value for regions'),\n color: z.string().optional(),\n label: I18nLabelSchema.optional(),\n style: z.enum(['solid', 'dashed', 'dotted']).default('dashed'),\n}));\n\n/**\n * Chart Interaction Schema\n */\nexport const ChartInteractionSchema = lazySchema(() => z.object({\n tooltips: z.boolean().default(true),\n zoom: z.boolean().default(false),\n brush: z.boolean().default(false),\n clickAction: z.string().optional().describe('Action ID to trigger on click'),\n}));\n\n/**\n * Chart Configuration Base\n * Common configuration for all chart types\n */\nexport const ChartConfigSchema = lazySchema(() => z.object({\n /** Chart Type */\n type: ChartTypeSchema,\n \n /** Titles */\n title: I18nLabelSchema.optional().describe('Chart title'),\n subtitle: I18nLabelSchema.optional().describe('Chart subtitle'),\n description: I18nLabelSchema.optional().describe('Accessibility description'),\n \n /** Axes Mapping */\n xAxis: ChartAxisSchema.optional().describe('X-Axis configuration'),\n yAxis: z.array(ChartAxisSchema).optional().describe('Y-Axis configuration (support dual axis)'),\n \n /** Series Configuration */\n series: z.array(ChartSeriesSchema).optional().describe('Defined series configuration'),\n \n /** Appearance. Either a positional palette (string[]) applied per category in\n * order, or a value→color map ({ value: color }, kanban-style). A value→color\n * map — and a select/lookup dimension's option colors — take precedence over\n * the positional palette per category, so semantic charts (health, status)\n * paint their own colors instead of the generic palette. */\n colors: z.union([\n z.array(z.string()),\n z.record(z.string(), z.string()),\n ]).optional().describe('Color palette (string[]) or value→color map ({ value: color })'),\n height: z.number().optional().describe('Fixed height in pixels'),\n \n /** Components */\n showLegend: z.boolean().default(true).describe('Display legend'),\n showDataLabels: z.boolean().default(false).describe('Display data labels'),\n \n /** Annotations & Reference Lines */\n annotations: z.array(ChartAnnotationSchema).optional(),\n \n /** Interactions */\n interaction: ChartInteractionSchema.optional(),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\nexport type ChartConfig = z.infer<typeof ChartConfigSchema>;\nexport type ChartAxis = z.infer<typeof ChartAxisSchema>;\nexport type ChartSeries = z.infer<typeof ChartSeriesSchema>;\nexport type ChartAnnotation = z.infer<typeof ChartAnnotationSchema>;\nexport type ChartInteraction = z.infer<typeof ChartInteractionSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * Breakpoint Name Enum\n * Matches the breakpoint names defined in theme.zod.ts BreakpointsSchema.\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const BreakpointName = z.enum(['xs', 'sm', 'md', 'lg', 'xl', '2xl']);\n\nexport type BreakpointName = z.infer<typeof BreakpointName>;\n\n/**\n * Responsive Configuration Schema\n *\n * Provides responsive layout configuration for UI components.\n * Maps breakpoint names to layout behavior (columns, visibility, order).\n *\n * Aligned with theme.zod.ts BreakpointsSchema for a unified responsive system.\n *\n * @example\n * ```typescript\n * const config: ResponsiveConfig = {\n * columns: { xs: 12, sm: 6, lg: 4 },\n * hiddenOn: ['xs'],\n * order: { xs: 2, lg: 1 },\n * };\n * ```\n */\n/**\n * Breakpoint Column Map Schema\n * Maps breakpoint names to grid column counts (1-12).\n * All entries are optional — only specified breakpoints are configured.\n */\nexport const BreakpointColumnMapSchema = lazySchema(() => z.object({\n xs: z.number().min(1).max(12).optional(),\n sm: z.number().min(1).max(12).optional(),\n md: z.number().min(1).max(12).optional(),\n lg: z.number().min(1).max(12).optional(),\n xl: z.number().min(1).max(12).optional(),\n '2xl': z.number().min(1).max(12).optional(),\n}).describe('Grid columns per breakpoint (1-12)'));\n\n/**\n * Breakpoint Order Map Schema\n * Maps breakpoint names to display order numbers.\n * All entries are optional — only specified breakpoints are configured.\n */\nexport const BreakpointOrderMapSchema = lazySchema(() => z.object({\n xs: z.number().optional(),\n sm: z.number().optional(),\n md: z.number().optional(),\n lg: z.number().optional(),\n xl: z.number().optional(),\n '2xl': z.number().optional(),\n}).describe('Display order per breakpoint'));\n\nexport const ResponsiveConfigSchema = lazySchema(() => z.object({\n /** Minimum breakpoint for visibility */\n breakpoint: BreakpointName.optional()\n .describe('Minimum breakpoint for visibility'),\n\n /** Hide on specific breakpoints */\n hiddenOn: z.array(BreakpointName).optional()\n .describe('Hide on these breakpoints'),\n\n /** Grid columns per breakpoint (1-12 column grid) */\n columns: BreakpointColumnMapSchema.optional().describe('Grid columns per breakpoint'),\n\n /** Display order per breakpoint */\n order: BreakpointOrderMapSchema.optional().describe('Display order per breakpoint'),\n}).describe('Responsive layout configuration'));\n\nexport type ResponsiveConfig = z.infer<typeof ResponsiveConfigSchema>;\n\n/**\n * Style Map Schema (ADR-0065)\n *\n * A CSS property → value map (camelCase keys, e.g. `flexDirection`). Values are\n * arbitrary CSS strings/numbers but authors should prefer design tokens\n * (`var(--space-6)`, `var(--surface)`) for consistency and AI-safety.\n */\nexport const StyleMapSchema = lazySchema(() =>\n z.record(z.string(), z.union([z.string(), z.number()]))\n .describe('CSS property → value map (camelCase keys; design tokens encouraged)'));\n\nexport type StyleMap = z.infer<typeof StyleMapSchema>;\n\n/**\n * Responsive Styles Schema (ADR-0065)\n *\n * Per-breakpoint CSS-property maps for the SDUI scoped-styling model. Compiled\n * to **id-scoped CSS at render** (objectui `SchemaRenderer`) — build-independent,\n * collision-free, responsive-correct. Desktop-first: `large` is the\n * unconditional base; `medium`/`small`/`xsmall` are `max-width` overrides.\n *\n * Distinct from {@link ResponsiveConfigSchema}, which configures *layout* (grid\n * columns / visibility / order) on the Tailwind `xs..2xl` axis. This styles a\n * node's own box; that arranges a node within a grid.\n */\nexport const ResponsiveStylesSchema = lazySchema(() => z.object({\n large: StyleMapSchema.optional().describe('Unconditional base (desktop-first)'),\n medium: StyleMapSchema.optional().describe('Applied at ≤ medium breakpoint'),\n small: StyleMapSchema.optional().describe('Applied at ≤ small breakpoint'),\n xsmall: StyleMapSchema.optional().describe('Applied at ≤ xsmall breakpoint'),\n}).describe('Per-breakpoint scoped style maps (ADR-0065)'));\n\nexport type ResponsiveStyles = z.infer<typeof ResponsiveStylesSchema>;\n\n/**\n * Performance Configuration Schema\n *\n * Defines performance optimization settings for UI components\n * such as lazy loading, virtual scrolling, and caching.\n *\n * @example\n * ```typescript\n * const perf: PerformanceConfig = {\n * lazyLoad: true,\n * virtualScroll: { enabled: true, itemHeight: 40, overscan: 5 },\n * cacheStrategy: 'stale-while-revalidate',\n * prefetch: true,\n * };\n * ```\n */\nexport const PerformanceConfigSchema = lazySchema(() => z.object({\n /** Enable lazy loading for this component */\n lazyLoad: z.boolean().optional()\n .describe('Enable lazy loading (defer rendering until visible)'),\n\n /** Virtual scrolling configuration for large datasets */\n virtualScroll: z.object({\n enabled: z.boolean().default(false).describe('Enable virtual scrolling'),\n itemHeight: z.number().optional().describe('Fixed item height in pixels (for estimation)'),\n overscan: z.number().optional().describe('Number of extra items to render outside viewport'),\n }).optional().describe('Virtual scrolling configuration'),\n\n /** Client-side caching strategy */\n cacheStrategy: z.enum([\n 'none',\n 'cache-first',\n 'network-first',\n 'stale-while-revalidate',\n ]).optional().describe('Client-side data caching strategy'),\n\n /** Enable data prefetching */\n prefetch: z.boolean().optional()\n .describe('Prefetch data before component is visible'),\n\n /** Maximum number of items to render before pagination */\n pageSize: z.number().optional()\n .describe('Number of items per page for pagination'),\n\n /** Debounce interval for user interactions (ms) */\n debounceMs: z.number().optional()\n .describe('Debounce interval for user interactions in milliseconds'),\n}).describe('Performance optimization configuration'));\n\nexport type PerformanceConfig = z.infer<typeof PerformanceConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * System Identifier Schema\n * \n * Universal naming convention for all machine identifiers (API Names) in ObjectStack.\n * Enforces lowercase with underscores or dots to ensure:\n * - Cross-platform compatibility (case-insensitive filesystems)\n * - URL-friendliness (no encoding needed)\n * - Database consistency (no collation issues)\n * - Security (no case-sensitivity bugs in permission checks)\n * \n * **Applies to all metadata that acts as a machine identifier:**\n * - Object names (tables/collections)\n * - Field names\n * - Role names\n * - Permission set names\n * - Action/trigger names\n * - Event keys\n * - App IDs\n * - Menu/page IDs\n * - Select option values\n * - Workflow names\n * - Webhook names\n * \n * **Naming Convention Summary:**\n * | Type | Pattern | Example |\n * |------|---------|---------|\n * | Machine ID | snake_case | `crm_account`, `btn_submit`, `role_admin` |\n * | Event keys | dot.notation | `user.login`, `order.created` |\n * | Labels | Any case | `Client Account`, `Submit Form` |\n * \n * @example Valid identifiers\n * - 'account'\n * - 'crm_account'\n * - 'user_profile'\n * - 'order.created' (for events)\n * - 'api_v2_endpoint'\n * \n * @example Invalid identifiers (will be rejected)\n * - 'Account' (uppercase)\n * - 'CrmAccount' (camelCase)\n * - 'crm-account' (kebab-case - use underscore instead)\n * - 'user profile' (spaces)\n */\nimport { lazySchema } from './lazy-schema';\nexport const SystemIdentifierSchema = lazySchema(() => z\n .string()\n .min(2, { message: 'System identifier must be at least 2 characters' })\n .regex(/^[a-z][a-z0-9_.]*$/, {\n message:\n 'System identifier must be lowercase, starting with a letter, and may contain letters, numbers, underscores, or dots (e.g., \"user_profile\" or \"order.created\")',\n })\n .describe('System identifier (lowercase with underscores or dots)'));\n\n/**\n * Strict Snake Case Identifier\n * \n * More restrictive than SystemIdentifierSchema - only allows underscores (no dots).\n * Use this for identifiers that should NOT contain dots (e.g., database table/column names).\n * \n * @example Valid\n * - 'account'\n * - 'crm_account'\n * - 'user_profile'\n * \n * @example Invalid\n * - 'user.profile' (dots not allowed)\n * - 'UserProfile' (uppercase)\n */\nexport const SnakeCaseIdentifierSchema = lazySchema(() => z\n .string()\n .min(2, { message: 'Identifier must be at least 2 characters' })\n .regex(/^[a-z][a-z0-9_]*$/, {\n message:\n 'Identifier must be lowercase snake_case, starting with a letter, and may contain only letters, numbers, and underscores (e.g., \"user_profile\")',\n })\n .describe('Snake case identifier (lowercase with underscores only)'));\n\n/**\n * Event Name Identifier\n * \n * Specialized identifier for event names that encourages dot notation.\n * Used in event-driven systems, message queues, and webhooks.\n * \n * Pattern: `namespace.action` or `entity.event_type`\n * \n * @example Valid\n * - 'user.created'\n * - 'order.paid'\n * - 'user.login_success'\n * - 'alarm.high_cpu'\n * \n * @example Invalid\n * - 'UserCreated' (camelCase)\n * - 'user_created' (should use dots for namespacing)\n */\nexport const EventNameSchema = lazySchema(() => z\n .string()\n .min(3, { message: 'Event name must be at least 3 characters' })\n .regex(/^[a-z][a-z0-9_.]*$/, {\n message:\n 'Event name must be lowercase with dots for namespacing (e.g., \"user.created\", \"order.paid\")',\n })\n .describe('Event name (lowercase with dot notation for namespacing)'));\n\n/**\n * Type Exports\n */\nexport type SystemIdentifier = z.infer<typeof SystemIdentifierSchema>;\nexport type SnakeCaseIdentifier = z.infer<typeof SnakeCaseIdentifierSchema>;\nexport type EventName = z.infer<typeof EventNameSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * # Expression Protocol\n *\n * Canonical wire format for all \"expression\"-shaped metadata across ObjectStack\n * (formula fields, predicates, conditions, criteria, visibility rules, seed\n * dynamic values, …).\n *\n * The persisted form is `{ dialect, source }` (and, after `objectstack\n * compile` normalization, `{ dialect, ast }`). String-only shorthand is\n * accepted at *input* time for developer ergonomics; build emits the canonical\n * envelope.\n *\n * ## Dialects\n *\n * | dialect | engine | use |\n * |:---|:---|:---|\n * | `cel` | `@objectstack/formula` (cel-js + ObjectStack stdlib) | formulas, predicates, seed dynamic values |\n * | `js` | sandboxed L2 hook bodies (`isolated-vm` / `quickjs`) | mapping, hook bodies |\n * | `cron` | `cron-parser` | job schedules |\n *\n * SQL fragments (analytics joins, partial indexes) are intentionally **not**\n * routed through this schema — they stay driver-native because their security\n * posture and portability story differ.\n *\n * @see content/docs/concepts/north-star.mdx §8 \"No private expression DSL\"\n */\n\n/**\n * Supported expression dialects.\n *\n * `js` was declared here but never shipped as an expression engine — it existed\n * only as a registry stub with no author helper (`cel`/`F`/`P` → CEL, `tmpl` →\n * template, `cron` → cron; nothing ever emitted `js`). Procedural JavaScript is\n * the L2 authoring surface — the sandboxed, capability-gated\n * `ScriptBody { language: 'js' }` in hook/action bodies — not an L1 expression\n * dialect. Retired in #3278; see ADR-0058 addendum.\n */\nexport const ExpressionDialect = z.enum(['cel', 'cron', 'template']);\nexport type ExpressionDialect = z.infer<typeof ExpressionDialect>;\n\n/**\n * Authorship metadata for an expression. Optional but encouraged for AI-\n * generated artifacts so audit/explanation tooling has something to render.\n */\nexport const ExpressionMetaSchema = z.object({\n /** Human-readable rationale (often AI-emitted). */\n rationale: z.string().optional(),\n /** Identifier of the agent / tool that produced this expression. */\n generatedBy: z.string().optional(),\n});\nexport type ExpressionMeta = z.infer<typeof ExpressionMetaSchema>;\n\n/**\n * Canonical Expression envelope.\n *\n * Phase 1 (M9.1): `source` is the canonical persisted form. `ast` is reserved\n * and accepted as opaque structured value — `objectstack compile` will fill it\n * in M9.2 with the engine's parsed AST so the artifact carries an AST-only\n * representation.\n *\n * Phase 2 (M9.2+): `ast` becomes required in build output; `source` is kept\n * only for round-trip / debug.\n */\nexport const ExpressionSchema = z.object({\n /** Which engine evaluates `source` / `ast`. */\n dialect: ExpressionDialect,\n /** Surface syntax. Required while `ast` is not yet populated. */\n source: z.string().min(1).optional(),\n /**\n * Engine-native AST. Opaque at the spec layer; each engine validates its own\n * shape. For `dialect: 'cel'` this is the cel-js parsed AST node.\n */\n ast: z.unknown().optional(),\n /** Optional authorship metadata. */\n meta: ExpressionMetaSchema.optional(),\n}).refine(e => e.source !== undefined || e.ast !== undefined, {\n message: 'Expression requires at least one of `source` or `ast`',\n});\nexport type Expression = z.infer<typeof ExpressionSchema>;\n\n/**\n * Author-time input shape: a bare string is shorthand for `{ dialect: 'cel',\n * source }`. Engines that need other dialects must use the full envelope.\n *\n * Build (`objectstack compile`) normalizes this union to `Expression` so the\n * persisted artifact never contains the bare-string form.\n */\nexport const ExpressionInputSchema = z.union([\n z.string().min(1).transform((source): Expression => ({ dialect: 'cel', source })),\n ExpressionSchema,\n]);\nexport type ExpressionInput = z.input<typeof ExpressionInputSchema>;\n\n/**\n * Cron-typed input shape: a bare string is shorthand for `{ dialect: 'cron',\n * source }` (not `cel`). Use this for `schedule` / `cronExpression` fields so\n * authors can write `'0 9 * * 1-5'` without manually wrapping.\n */\nexport const CronExpressionInputSchema = z.union([\n z.string().min(1).transform((source): Expression => ({ dialect: 'cron', source })),\n ExpressionSchema,\n]);\nexport type CronExpressionInput = z.input<typeof CronExpressionInputSchema>;\n\n/**\n * Template-typed input shape: a bare string is shorthand for\n * `{ dialect: 'template', source }`. Use this for notification subjects/bodies,\n * titleFormat, prompt templates — anything with `{{var}}` interpolation.\n */\nexport const TemplateExpressionInputSchema = z.union([\n z.string().min(1).transform((source): Expression => ({ dialect: 'template', source })),\n ExpressionSchema,\n]);\nexport type TemplateExpressionInput = z.input<typeof TemplateExpressionInputSchema>;\n\n/**\n * Predicate — an Expression whose evaluation is expected to be boolean.\n * Spec layer cannot enforce return type at parse time; this alias exists for\n * intent documentation and future runtime type-check wiring.\n */\nexport const PredicateSchema = ExpressionSchema;\nexport type Predicate = z.infer<typeof PredicateSchema>;\n\nexport const PredicateInputSchema = ExpressionInputSchema;\nexport type PredicateInput = z.input<typeof PredicateInputSchema>;\n\n/**\n * Construct an Expression literal from a CEL source string. Used by DX\n * shorthand (`cel\\`...\\``) and by codegen tools.\n */\nexport function expression(source: string, dialect: ExpressionDialect = 'cel', meta?: ExpressionMeta): Expression {\n return { dialect, source, ...(meta ? { meta } : {}) };\n}\n\n/**\n * Tagged-template helpers for inline expression authoring.\n *\n * ```ts\n * import { cel, F, P } from '@objectstack/spec';\n *\n * const f = { formula: F`record.amount * 0.1` };\n * const v = { visible: P`record.status == \"open\"` };\n * const d = { close_date: cel`now() + duration(\"P30D\")` };\n * ```\n *\n * Each helper produces an {@link Expression} envelope with `dialect: 'cel'`\n * and the rendered template string as `source`. The CLI `objectstack compile`\n * step (M9.2) parses these into ASTs at build time so the persisted artifact\n * is dialect-AST only.\n */\nfunction renderTemplate(strings: TemplateStringsArray, values: readonly unknown[]): string {\n if (values.length === 0) return strings[0] ?? '';\n let out = strings[0] ?? '';\n for (let i = 0; i < values.length; i++) {\n const v = values[i];\n // Inline literal substitution. Strings get JSON-escaped so `${name}` for\n // `name = 'O\\'Brien'` produces a valid CEL string literal. Numbers and\n // booleans render as their toString. Anything exotic should be passed via\n // the variable scope (record/input) rather than interpolated.\n if (typeof v === 'string') out += JSON.stringify(v);\n else if (typeof v === 'number' || typeof v === 'boolean') out += String(v);\n else if (v === null || v === undefined) out += 'null';\n else out += JSON.stringify(v);\n out += strings[i + 1] ?? '';\n }\n return out;\n}\n\n/** Tagged template — produces a CEL Expression envelope. */\nexport function cel(strings: TemplateStringsArray, ...values: unknown[]): Expression {\n return { dialect: 'cel', source: renderTemplate(strings, values) };\n}\n\n/** Formula alias of {@link cel} — semantic shorthand for computed-field formulas. */\nexport const F = cel;\n\n/** Predicate alias of {@link cel} — semantic shorthand for boolean conditions. */\nexport const P = cel;\n\n/**\n * Tagged template — produces a Mustache-template Expression envelope. Use for\n * notification subjects, prompt bodies, titleFormat strings, etc. Variable\n * scope is the same as CEL (`{{record.x}}`, `{{os.user.id}}`).\n */\nexport function tmpl(strings: TemplateStringsArray, ...values: unknown[]): Expression {\n // Templates do not get JSON.stringify on substitution — interpolation happens\n // at evaluate time via `{{path}}` markers, so we keep raw substitutions here.\n let out = strings[0] ?? '';\n for (let i = 0; i < values.length; i++) {\n out += String(values[i]);\n out += strings[i + 1] ?? '';\n }\n return { dialect: 'template', source: out };\n}\n\n/** Tagged template — produces a cron Expression envelope. */\nexport function cron(strings: TemplateStringsArray, ...values: unknown[]): Expression {\n let out = strings[0] ?? '';\n for (let i = 0; i < values.length; i++) {\n out += String(values[i]);\n out += strings[i + 1] ?? '';\n }\n return { dialect: 'cron', source: out };\n}\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\n/**\n * @module ui/sharing\n *\n * Sharing & Embedding Protocol\n *\n * Defines schemas for public link sharing, embed configuration,\n * domain restrictions, and password protection for apps, pages, and forms.\n */\n\nimport { z } from 'zod';\n\n/**\n * Sharing Config Schema\n * Configuration for public sharing of an app, page, or form.\n * Supports public links, password protection, domain restrictions, and expiration.\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const SharingConfigSchema = lazySchema(() => z.object({\n enabled: z.boolean().default(false).describe('Enable public sharing'),\n publicLink: z.string().optional().describe('Generated public share URL'),\n password: z.string().optional().describe('Password required to access shared link'),\n allowedDomains: z.array(z.string()).optional()\n .describe('Restrict access to specific email domains (e.g. [\"example.com\"])'),\n expiresAt: z.string().optional()\n .describe('Expiration date/time in ISO 8601 format'),\n allowAnonymous: z.boolean().optional().default(false)\n .describe('Allow access without authentication'),\n}));\n\n/**\n * Embed Config Schema\n * Configuration for iframe embedding of an app, page, or form.\n * Supports origin restrictions, display options, and responsive sizing.\n */\nexport const EmbedConfigSchema = lazySchema(() => z.object({\n enabled: z.boolean().default(false).describe('Enable iframe embedding'),\n allowedOrigins: z.array(z.string()).optional()\n .describe('Allowed iframe parent origins (e.g. [\"https://example.com\"])'),\n width: z.string().optional().default('100%').describe('Embed width (CSS value)'),\n height: z.string().optional().default('600px').describe('Embed height (CSS value)'),\n showHeader: z.boolean().optional().default(true).describe('Show interface header in embed'),\n showNavigation: z.boolean().optional().default(false).describe('Show navigation in embed'),\n responsive: z.boolean().optional().default(true).describe('Enable responsive resizing'),\n}));\n\n// Type Exports\nexport type SharingConfig = z.infer<typeof SharingConfigSchema>;\nexport type EmbedConfig = z.infer<typeof EmbedConfigSchema>;\n","// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * # Metadata Protection Model — Phase 1 (ADR-0010)\n *\n * Phase 1 introduces the **item-level lock** (`_lock`) and the\n * provenance / package tags that drive it. Later phases extend this\n * file with the path-level (`_frozenPaths`) and package-level\n * (`metadataDefaults`) layers; the wire shapes here are forward-\n * compatible with those additions.\n *\n * Wire / runtime contract:\n * - `_lock` — 4-state enum, controls overlay / delete actions.\n * - `_lockReason` — short, user-visible explanation surfaced in\n * `403 item_locked` errors and on Studio tooltips.\n * - `_lockSource` — which layer set the lock (Phase 1 only emits\n * `'artifact'`; `'package'` and `'env-forced'`\n * are reserved for Phase 3/2 respectively).\n * - `_provenance` — `'package'` for loader-introduced items,\n * `'org'` for tenant-authored, `'env-forced'`\n * reserved for emergency overrides.\n * - `_packageId` / `_packageVersion` — denormalised from the\n * registry tag so consumers don't need a second\n * round-trip to inspect provenance.\n *\n * See `docs/adr/0010-metadata-protection-model.md` for the full\n * design (industry references, 4-layer model, audit trail).\n */\n\n// ─────────────────────────────────────────────────────────────────────\n// Enums\n// ─────────────────────────────────────────────────────────────────────\n\n/**\n * 4-state lock enum.\n *\n * | Value | Save (PUT / publish / rollback) | Delete |\n * |---------------|---------------------------------|--------|\n * | `none` | allow | allow |\n * | `no-overlay` | **deny** (403 item_locked) | allow |\n * | `no-delete` | allow | **deny** |\n * | `full` | **deny** | **deny** |\n *\n * `allowRuntimeCreate` for **brand-new** items is governed by the\n * type-level L1 registry flag and is never affected by `_lock`\n * (which describes an existing item). See ADR-0010 §3.3.\n */\nexport const MetadataLockSchema = z.enum(['none', 'no-overlay', 'no-delete', 'full']);\nexport type MetadataLock = z.infer<typeof MetadataLockSchema>;\n\n/** Where the `_lock` declaration came from. Reserved enum for forward compatibility. */\nexport const MetadataLockSourceSchema = z.enum(['artifact', 'package', 'env-forced']);\nexport type MetadataLockSource = z.infer<typeof MetadataLockSourceSchema>;\n\n/** Where the metadata item originated. */\nexport const MetadataProvenanceSchema = z.enum(['package', 'org', 'env-forced']);\nexport type MetadataProvenance = z.infer<typeof MetadataProvenanceSchema>;\n\n// ─────────────────────────────────────────────────────────────────────\n// Mixin — raw shape that schemas spread into themselves\n// ─────────────────────────────────────────────────────────────────────\n\n/**\n * Raw shape spliced into each metadata Zod schema that wants to expose\n * the optional protection envelope to its TS authors. Implemented as a\n * Zod raw shape (not a wrapping schema) so it composes with the\n * existing `z.object({ ... })` patterns without needing to introduce\n * a refinement layer.\n *\n * Usage:\n * ```ts\n * const AppSchema = z.object({\n * name: z.string(),\n * // …\n * ...MetadataProtectionFields,\n * });\n * ```\n */\nexport const MetadataProtectionFields = {\n /**\n * Per-item lock declaration. Defaults to `'none'` when omitted.\n * Enforced by the runtime protocol on save / publish / rollback /\n * delete. See ADR-0010 §3.3.\n */\n _lock: MetadataLockSchema.optional().describe(\n 'Item-level lock — controls overlay & delete (ADR-0010).',\n ),\n\n /**\n * Short, user-visible explanation surfaced in `403 item_locked`\n * error envelopes and Studio tooltips. Keep < 200 chars.\n */\n _lockReason: z.string().max(500).optional().describe(\n 'Human-readable reason shown when a write is refused by _lock.',\n ),\n\n /**\n * Which layer asserted the lock — Phase 1 only emits `'artifact'`.\n * Reserved for Phase 2/3 (`'package'`, `'env-forced'`).\n */\n _lockSource: MetadataLockSourceSchema.optional().describe(\n 'Layer that set _lock (artifact | package | env-forced).',\n ),\n\n /**\n * `'package'` — introduced by a loader from npm-package source.\n * `'org'` — authored by a tenant via the metadata API.\n * `'env-forced'` — emergency overrides via the unlock list.\n */\n _provenance: MetadataProvenanceSchema.optional().describe(\n 'Origin of the item (package | org | env-forced).',\n ),\n\n /** Owning package machine id (e.g. `com.objectstack.setup`). */\n _packageId: z.string().optional().describe('Owning package machine id.'),\n\n /** Owning package semver. */\n _packageVersion: z.string().optional().describe('Owning package version.'),\n\n /**\n * Optional URL the Studio lock banner links to for more context.\n * Populated by the loader from the author-facing\n * `protection.docsUrl` field — see `shared/protection.zod.ts`.\n */\n _lockDocsUrl: z.string().optional().describe(\n 'Optional documentation link surfaced next to _lockReason.',\n ),\n} as const;\n\n// ─────────────────────────────────────────────────────────────────────\n// Helpers\n// ─────────────────────────────────────────────────────────────────────\n\n/**\n * Read the protection envelope off any candidate item. Safe to call\n * on `undefined`, primitives, or items that have no protection fields\n * at all — returns a fully-defaulted record.\n */\nexport function extractProtection(item: unknown): {\n lock: MetadataLock;\n lockReason: string | undefined;\n lockSource: MetadataLockSource | undefined;\n lockDocsUrl: string | undefined;\n provenance: MetadataProvenance | undefined;\n packageId: string | undefined;\n packageVersion: string | undefined;\n} {\n const empty = {\n lock: 'none' as MetadataLock,\n lockReason: undefined,\n lockSource: undefined,\n lockDocsUrl: undefined,\n provenance: undefined,\n packageId: undefined,\n packageVersion: undefined,\n };\n if (!item || typeof item !== 'object') return empty;\n const rec = item as Record<string, unknown>;\n const lockRaw = rec['_lock'];\n const lock = typeof lockRaw === 'string' && MetadataLockSchema.options.includes(lockRaw as MetadataLock)\n ? (lockRaw as MetadataLock)\n : 'none';\n const lockReason = typeof rec['_lockReason'] === 'string' ? (rec['_lockReason'] as string) : undefined;\n const lockSource = typeof rec['_lockSource'] === 'string'\n && MetadataLockSourceSchema.options.includes(rec['_lockSource'] as MetadataLockSource)\n ? (rec['_lockSource'] as MetadataLockSource)\n : undefined;\n const lockDocsUrl = typeof rec['_lockDocsUrl'] === 'string' ? (rec['_lockDocsUrl'] as string) : undefined;\n const provenance = typeof rec['_provenance'] === 'string'\n && MetadataProvenanceSchema.options.includes(rec['_provenance'] as MetadataProvenance)\n ? (rec['_provenance'] as MetadataProvenance)\n : undefined;\n const packageId = typeof rec['_packageId'] === 'string' ? (rec['_packageId'] as string) : undefined;\n const packageVersion = typeof rec['_packageVersion'] === 'string' ? (rec['_packageVersion'] as string) : undefined;\n return { lock, lockReason, lockSource, lockDocsUrl, provenance, packageId, packageVersion };\n}\n\n/**\n * Decide whether a write-style operation (PUT / publish / rollback)\n * is allowed under the given lock state.\n *\n * Returns `null` on allow. Returns a structured refusal envelope when\n * the lock blocks the operation; the protocol layer turns that into a\n * `403 item_locked` HTTP error.\n */\nexport function evaluateLockForWrite(lock: MetadataLock): { code: 'item_locked'; reason: string } | null {\n if (lock === 'no-overlay' || lock === 'full') {\n return { code: 'item_locked', reason: `Write refused — _lock=${lock}` };\n }\n return null;\n}\n\n/** Counterpart of {@link evaluateLockForWrite} for delete operations. */\nexport function evaluateLockForDelete(lock: MetadataLock): { code: 'item_locked'; reason: string } | null {\n if (lock === 'no-delete' || lock === 'full') {\n return { code: 'item_locked', reason: `Delete refused — _lock=${lock}` };\n }\n return null;\n}\n\n/**\n * Derive the read-side flags Studio needs to render the UI. The\n * `editable` / `deletable` / `resettable` triple is what the\n * `GET /meta/:type/:name` response carries in Phase 1. See ADR-0010 §5.\n */\nexport function resolveLockState(item: unknown, artifactBacked: boolean): {\n lock: MetadataLock;\n lockReason: string | undefined;\n lockSource: MetadataLockSource | undefined;\n lockDocsUrl: string | undefined;\n provenance: MetadataProvenance | undefined;\n packageId: string | undefined;\n packageVersion: string | undefined;\n editable: boolean;\n deletable: boolean;\n resettable: boolean;\n} {\n const p = extractProtection(item);\n const editable = p.lock !== 'no-overlay' && p.lock !== 'full';\n const deletable = p.lock !== 'no-delete' && p.lock !== 'full';\n // Reset only makes sense when there is something to reset *to* —\n // i.e. the artifact is package-backed and an overlay can be peeled\n // off. Phase 3 will surface this through a dedicated endpoint; for\n // Phase 1 we publish the boolean so Studio can pre-disable the\n // button when artifactBacked is false.\n const resettable = artifactBacked;\n return { ...p, editable, deletable, resettable };\n}\n","// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.\n\n/**\n * # Package-level metadata protection (ADR-0010 §3.7 — Phase 4.3)\n *\n * Public, type-safe author surface for package authors to declare\n * how much of one of their metadata items the runtime (and the\n * tenant's Studio) is allowed to mutate. Internally this is what\n * gets translated into the `_lock` / `_lockReason` / `_lockDocsUrl`\n * private envelope (`kernel/metadata-protection.zod.ts`) that the\n * protocol layer enforces.\n *\n * Why two layers?\n * - **`protection`** is the *author DX* surface — typed, validated,\n * and discoverable via IntelliSense on every `*.app.ts` /\n * `*.object.ts` / `*.view.ts` etc.\n * - **`_lock` envelope** is the *runtime* surface — strips off the\n * protection block on load and stamps the private fields so the\n * persistence and overlay layers don't drag the author-facing\n * block through every `sys_metadata` overlay diff.\n *\n * Example:\n * ```ts\n * export const SETUP_APP: App = {\n * name: 'setup',\n * label: 'Setup',\n * protection: {\n * lock: 'full',\n * reason: 'Core admin UI shipped by @objectstack/platform-objects.',\n * docsUrl: 'https://docs.objectstack.ai/adr/0010-metadata-protection',\n * },\n * // ...\n * };\n * ```\n *\n * The loader (`metadata/plugin.ts` + `objectql/registry.ts`) calls\n * {@link applyProtection} to translate this block into the private\n * `_lock` envelope at registration time. Authors should NEVER set\n * the underscored fields directly — they are an implementation\n * detail.\n *\n * See also:\n * - ADR-0010 §3.7 — Future work → now implemented.\n * - `kernel/metadata-protection.zod.ts` — the runtime envelope.\n */\n\nimport { z } from 'zod';\nimport {\n MetadataLockSchema,\n type MetadataLock,\n} from '../kernel/metadata-protection.zod';\n\n/**\n * Public protection block authored by package developers. Optional on\n * every lockable metadata type — omit to leave the item fully\n * overlay-editable and overlay-deletable (default behaviour).\n *\n * The shape is intentionally *small*: only the fields that have a\n * meaningful UX impact in Studio are exposed. Internal bookkeeping\n * (provenance, packageId, packageVersion) is auto-populated by the\n * loader and must not be supplied here.\n */\nexport const ProtectionSchema = z.object({\n /**\n * Lock policy for this item. See {@link MetadataLockSchema} for\n * the full semantics table.\n *\n * | Value | Save | Delete |\n * |---------------|------|--------|\n * | `none` | ✅ | ✅ |\n * | `no-overlay` | ❌ | ✅ |\n * | `no-delete` | ✅ | ❌ |\n * | `full` | ❌ | ❌ |\n *\n * `no-overlay` is recommended for \"structural\" items that should\n * stay authoritative but allow side-by-side extension (e.g. core\n * objects whose fields can be extended via `objectExtensions`).\n * `full` is for items that have no safe extension point at all\n * (e.g. the platform Setup app whose nav tree is wired directly\n * into framework code).\n */\n lock: MetadataLockSchema.describe(\n 'Lock policy — none | no-overlay | no-delete | full.',\n ),\n\n /**\n * Short user-visible explanation surfaced in `403 item_locked`\n * errors and the Studio lock banner. Aim for one sentence; the\n * banner truncates long values.\n */\n reason: z.string().min(1).max(500).describe(\n 'User-visible reason shown when the lock blocks an action.',\n ),\n\n /**\n * Optional documentation link rendered next to the reason in\n * the Studio lock banner. Use it to point operators at the\n * package's protection policy or to a \"how to customise this\"\n * guide. Must be a fully-qualified URL.\n */\n docsUrl: z.string().url().optional().describe(\n 'Optional URL the Studio banner links to for more context.',\n ),\n}).strict();\n\nexport type Protection = z.infer<typeof ProtectionSchema>;\n\n// ─────────────────────────────────────────────────────────────────────\n// Loader-side translation\n// ─────────────────────────────────────────────────────────────────────\n\n/** Loader context handed in by the registration pipeline. */\nexport interface ApplyProtectionContext {\n /** Owning package id (e.g. `com.objectstack.platform-objects`). */\n packageId?: string;\n /** Owning package semver. */\n packageVersion?: string;\n /**\n * `'package'` for items introduced by a package loader (default).\n * Pass `'env-forced'` when the runtime is materialising an\n * emergency override.\n */\n provenance?: 'package' | 'env-forced';\n}\n\n/**\n * Translate the author-facing `protection` block on `item` into the\n * private `_lock` envelope and strip the public block so it never\n * leaks into the overlay row.\n *\n * Safe to call on any object: items without `protection` are returned\n * unchanged (other than the standard `_packageId` / `_packageVersion`\n * stamping that always runs when the context supplies those fields).\n *\n * Always **mutates** `item` and returns it for chaining.\n */\nexport function applyProtection<T extends Record<string, unknown>>(\n item: T,\n ctx: ApplyProtectionContext = {},\n): T {\n if (!item || typeof item !== 'object') return item;\n\n // Stamp provenance / package coords first so they apply even when\n // there is no `protection` block. The loader pipeline used to do\n // _packageId stamping itself; centralising it here keeps the two\n // load paths (artifact loader + registry.registerItem) consistent.\n if (ctx.packageId && (item as any)._packageId === undefined) {\n (item as any)._packageId = ctx.packageId;\n }\n if (ctx.packageVersion && (item as any)._packageVersion === undefined) {\n (item as any)._packageVersion = ctx.packageVersion;\n }\n // Only stamp provenance when we actually have package coords or an\n // author-facing protection block; otherwise leave the item alone so\n // that DB-only / test fixtures don't acquire an unexpected\n // `_provenance` field. The loader passes packageId for genuine\n // package items; bare `registerItem(type, item)` calls without a\n // package context still produce a clean item.\n const hasProtectionBlock =\n (item as any).protection\n && typeof (item as any).protection === 'object';\n if (\n (ctx.packageId || hasProtectionBlock)\n && (item as any)._provenance === undefined\n ) {\n (item as any)._provenance = ctx.provenance ?? 'package';\n }\n\n const block = (item as any).protection;\n if (!block || typeof block !== 'object') return item;\n\n // Author-facing block exists — translate to the private envelope.\n // We accept partial values (lock alone, reason alone) and let the\n // protocol layer fall back to defaults; full Zod validation runs\n // upstream when the schemas were composed with ProtectionSchema.\n const lock = block.lock as MetadataLock | undefined;\n const reason = typeof block.reason === 'string' ? block.reason : undefined;\n const docsUrl = typeof block.docsUrl === 'string' ? block.docsUrl : undefined;\n\n if (lock !== undefined) {\n (item as any)._lock = lock;\n }\n if (reason !== undefined) {\n (item as any)._lockReason = reason;\n }\n if (docsUrl !== undefined) {\n (item as any)._lockDocsUrl = docsUrl;\n }\n // Lock source is 'package' for anything that came through this\n // helper. Artifact-only items (no packageId) fall back to\n // 'artifact' to preserve the Phase-1 contract.\n if ((item as any)._lockSource === undefined) {\n (item as any)._lockSource = ctx.packageId ? 'package' : 'artifact';\n }\n\n // Strip the public block — it lives only on the author-side\n // module, never on the persisted overlay row.\n delete (item as any).protection;\n\n return item;\n}\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { ExpressionInputSchema } from '../shared/expression.zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\nimport { SharingConfigSchema, EmbedConfigSchema } from './sharing.zod';\n\n/**\n * Base Navigation Item Schema\n * Shared properties for all navigation types.\n * \n * **NAMING CONVENTION:**\n * Navigation item IDs are used in URLs and configuration and must be lowercase snake_case.\n * \n * @example Good IDs\n * - 'menu_accounts'\n * - 'page_dashboard'\n * - 'nav_settings'\n * \n * @example Bad IDs (will be rejected)\n * - 'MenuAccounts' (PascalCase)\n * - 'Page Dashboard' (spaces)\n */\nimport { lazySchema } from '../shared/lazy-schema';\nimport { MetadataProtectionFields } from '../kernel/metadata-protection.zod';\nimport { ProtectionSchema } from '../shared/protection.zod';\nconst BaseNavItemSchema = z.object({\n /** Unique identifier for the item */\n id: SnakeCaseIdentifierSchema.describe('Unique identifier for this navigation item (lowercase snake_case)'),\n \n /** Display label */\n label: I18nLabelSchema.describe('Display proper label'),\n \n /** Icon name (Lucide) */\n icon: z.string().optional().describe('Icon name'),\n\n /** Sort order within the same level (lower numbers appear first) */\n order: z.number().optional().describe('Sort order within the same level (lower = first)'),\n\n /** Badge text or count displayed on the navigation item (e.g. \"3\", \"New\") */\n badge: z.union([z.string(), z.number()]).optional().describe('Badge text or count displayed on the item'),\n\n /** Visual variant for the badge (consumed by objectui NavigationRenderer) */\n badgeVariant: z.enum(['default', 'secondary', 'destructive', 'outline']).optional().describe('Visual variant of the nav badge. Declared to match the objectui NavigationRenderer read (inverse-drift fix, liveness audit #1878/#1891/#1894).'),\n\n /** \n * Visibility condition. \n * Formula expression returning boolean. \n * e.g. \"user.is_admin || user.department == 'sales'\"\n */\n visible: ExpressionInputSchema.optional().describe('Visibility predicate (CEL). e.g. P`\\'org_admin\\' in current_user.positions`'),\n\n /** Permissions required to see/access this navigation item */\n requiredPermissions: z.array(z.string()).optional().describe('Permissions required to access this item'),\n\n /**\n * Capability gate — registered object name.\n *\n * When set, the frontend MUST hide (or render disabled) this navigation\n * entry if the named object is not registered in the runtime's\n * SchemaRegistry. Useful for cloud-only objects (e.g. `sys_app`,\n * `sys_package`, `sys_package_installation`) that don't exist in\n * single-environment runtimes — declaring the dependency here avoids\n * 404-when-clicked traps without hard-coding environment checks in the\n * UI.\n *\n * Independent of `visible` (CEL) and `requiredPermissions` (RBAC) —\n * this gates on runtime *capability*, not user authorization.\n */\n requiresObject: z.string().optional().describe('Hide/disable this entry unless the named object is registered in the runtime'),\n\n /**\n * Capability gate — registered service name.\n *\n * Same idea as `requiresObject` but keyed on a kernel service\n * (e.g. `'ai'`, `'tenant'`, `'realtime'`). Hide the entry when the\n * service isn't installed.\n */\n requiresService: z.string().optional().describe('Hide/disable this entry unless the named kernel service is registered'),\n});\n\n/**\n * 1. Object Navigation Item\n *\n * Navigates to an object's list view by default. When `recordId` is set,\n * navigates directly to that record's detail page instead — useful for\n * \"My Profile\", \"My Settings\", or any other always-one-row entry where\n * dropping the user on a list view first would be wrong UX.\n *\n * `recordId` supports a small set of template variables resolved at render\n * time by the shell (see Console's `AppSidebar` / `AppContent`):\n * - `{current_user_id}` — the signed-in user's id\n * - `{current_org_id}` — the active organization id\n * These mirror the variables already understood by the view-layer\n * filter resolver (see e.g. `sys_user.me` listView), so authors only\n * have to learn one vocabulary.\n *\n * @example List view (existing behaviour)\n * ```ts\n * { id: 'nav_users', type: 'object', label: 'Users',\n * objectName: 'sys_user', viewName: 'all_users' }\n * ```\n *\n * @example Direct-to-record (new)\n * ```ts\n * { id: 'nav_profile', type: 'object', label: 'My Profile',\n * objectName: 'sys_user', recordId: '{current_user_id}' }\n * ```\n *\n * @example Parameterized slice on the bare data surface (objectui ADR-0055)\n * ```ts\n * { id: 'nav_my_open', type: 'object', label: 'My Open Tickets',\n * objectName: 'ticket', filters: { owner_id: '{current_user_id}', status: 'open' } }\n * ```\n */\nexport const ObjectNavItemSchema = lazySchema(() => BaseNavItemSchema.extend({\n type: z.literal('object'),\n objectName: z.string().describe('Target object name'),\n viewName: z.string().optional().describe('Default list view to open. Defaults to \"all\". Ignored when `recordId` is set.'),\n /**\n * When set, navigate straight to the detail page of this specific\n * record instead of the object's list view. Supports template\n * variables `{current_user_id}` and `{current_org_id}` resolved by\n * the shell at render time. Mutually exclusive with `viewName`\n * (viewName is ignored if both are set).\n */\n recordId: z.string().optional().describe(\n 'Navigate directly to this record id instead of the list view. Supports template vars: {current_user_id}, {current_org_id}.',\n ),\n /**\n * Open the record in view (default) or edit mode. Only meaningful\n * when `recordId` is set.\n */\n recordMode: z.enum(['view', 'edit']).optional().describe(\n 'Open the record in view (default) or edit mode. Only meaningful when `recordId` is set.',\n ),\n /**\n * URL filter conditions — the entry targets the parameterized bare data\n * surface (`/:objectName/data`, objectui ADR-0055) with each entry\n * serialized as a `filter[<field>]=<value>` search param (equality\n * semantics), instead of anchoring to a saved view. Use for one-off /\n * parameterized slices (dashboard drill-throughs, \"assigned to me\"\n * links); a slice worth curating and reusing belongs in a named view\n * via `viewName`. Values support the same template variables as\n * `recordId`. Precedence: `recordId` → `filters` → `viewName`.\n *\n * Mutually exclusive with `recordId` / `viewName` — enforced by\n * {@link NavigationItemSchema} (see `objectNavTargetExclusivity`) so the\n * ambiguous combination is unrepresentable rather than silently resolved\n * by precedence.\n */\n filters: z.record(z.string(), z.string()).optional().describe(\n 'URL filter conditions — targets the /:objectName/data bare surface via filter[<field>]=<value> params instead of a saved view. Values support template vars {current_user_id}, {current_org_id}. Mutually exclusive with recordId/viewName.',\n ),\n}));\n\n/**\n * Correct-by-construction guard (ADR-0053 philosophy): `filters` combined\n * with `recordId` or `viewName` is an authoring ambiguity — runtime\n * precedence would silently ignore one of them (a stale `recordId` hijacks\n * a configured `filters` slice). Reject it at validation with the fix in\n * the message. The legacy `recordId` + `viewName` combination stays\n * tolerated: it predates this guard and is documented as \"viewName is\n * ignored when recordId is set\".\n */\nconst objectNavTargetExclusivity = (\n item: { filters?: unknown; recordId?: unknown; viewName?: unknown },\n ctx: z.RefinementCtx,\n): void => {\n if (item.filters && (item.recordId || item.viewName)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['filters'],\n message:\n '`filters` cannot be combined with `recordId` or `viewName` — pick ONE landing: '\n + 'recordId (record deep-link), filters (/data slice), or viewName (named view). '\n + 'Remove the extra field(s); runtime precedence would silently ignore them.',\n });\n }\n};\n\n/**\n * 2. Dashboard Navigation Item\n * Navigates to a specific dashboard.\n */\nexport const DashboardNavItemSchema = lazySchema(() => BaseNavItemSchema.extend({\n type: z.literal('dashboard'),\n dashboardName: z.string().describe('Target dashboard name'),\n}));\n\n/**\n * 3. Page Navigation Item\n * Navigates to a custom UI page/component.\n */\nexport const PageNavItemSchema = lazySchema(() => BaseNavItemSchema.extend({\n type: z.literal('page'),\n pageName: z.string().describe('Target custom page component name'),\n params: z.record(z.string(), z.unknown()).optional().describe('Parameters passed to the page context'),\n}));\n\n/**\n * 4. URL Navigation Item\n * Navigates to an external or absolute URL.\n */\nexport const UrlNavItemSchema = lazySchema(() => BaseNavItemSchema.extend({\n type: z.literal('url'),\n url: z.string().describe('Target external URL'),\n target: z.enum(['_self', '_blank']).default('_self').describe('Link target window'),\n}));\n\n/**\n * 5. Report Navigation Item\n * Navigates to a specific report.\n */\nexport const ReportNavItemSchema = lazySchema(() => BaseNavItemSchema.extend({\n type: z.literal('report'),\n reportName: z.string().describe('Target report name'),\n}));\n\n/**\n * 6. Action Navigation Item\n * Triggers an action (e.g. opening a flow, running a script, or launching a screen action).\n */\nexport const ActionNavItemSchema = lazySchema(() => BaseNavItemSchema.extend({\n type: z.literal('action'),\n actionDef: z.object({\n actionName: z.string().describe('Action machine name to execute'),\n params: z.record(z.string(), z.unknown()).optional().describe('Parameters passed to the action'),\n }).describe('Action definition to execute when clicked'),\n}));\n\n/**\n * 7. Component Navigation Item\n * Navigates to a built-in front-end component registered in the runtime's\n * `ComponentRegistry` (e.g. `metadata:directory`, `metadata:resource`,\n * `setup:permission_matrix`). Unlike `page` (which resolves a user-defined\n * Page metadata record) and `url` (external link), `component` targets\n * a first-party UI shipped with the platform — typically admin/setup\n * surfaces that have no row in any data store.\n *\n * `params` are passed verbatim to the component as React props, so the\n * same component (e.g. `metadata:resource`) can be reused across many\n * nav entries with different `type` parameters.\n *\n * @example\n * ```ts\n * { id: 'nav_objects', type: 'component', label: 'Objects',\n * componentRef: 'metadata:resource', params: { type: 'object' } }\n * ```\n */\nexport const ComponentNavItemSchema = lazySchema(() => BaseNavItemSchema.extend({\n type: z.literal('component'),\n componentRef: z.string().describe('Component registry key (e.g. \"metadata:directory\")'),\n params: z.record(z.string(), z.unknown()).optional().describe('Props passed to the component'),\n}));\n\n/**\n * 8. Group Navigation Item\n * A container for child navigation items (Sub-menu).\n * Does not perform navigation itself.\n */\nexport const GroupNavItemSchema = lazySchema(() => BaseNavItemSchema.extend({\n type: z.literal('group'),\n expanded: z.boolean().default(false).describe('Default expansion state in sidebar'),\n // children property is added in the recursive definition below\n}));\n\n/**\n * 9. Separator Navigation Item\n * A visual divider in the navigation list. Renders no target; declared to\n * match the objectui renderer's `item.type === 'separator'` branch\n * (inverse-drift fix, liveness audit #1878/#1891/#1894).\n */\nconst SeparatorNavItemSchema = lazySchema(() => z.object({\n type: z.literal('separator'),\n id: SnakeCaseIdentifierSchema.optional().describe('Optional id for the separator'),\n order: z.number().optional().describe('Sort order within the same level (lower = first)'),\n}));\n\n/**\n * Recursive Union of all navigation item types.\n * Allows constructing an unlimited-depth navigation tree.\n */\nexport const NavigationItemSchema: z.ZodType<any> = z.lazy(() =>\n z.union([\n ObjectNavItemSchema.extend({\n children: z.array(NavigationItemSchema).optional().describe('Child navigation items (e.g. specific views)'),\n }).superRefine(objectNavTargetExclusivity),\n DashboardNavItemSchema,\n PageNavItemSchema,\n UrlNavItemSchema,\n ReportNavItemSchema,\n ActionNavItemSchema,\n ComponentNavItemSchema,\n SeparatorNavItemSchema,\n GroupNavItemSchema.extend({\n children: z.array(NavigationItemSchema).describe('Child navigation items'),\n })\n ])\n);\n\n/**\n * Navigation Contribution (ADR-0029 D7)\n *\n * Lets a package inject navigation items into an app it does **not** own —\n * the UI-layer analog of object `objectExtensions`. A capability plugin\n * contributes its menu entries into a shared admin app (e.g. `setup`) so the\n * app can be a thin \"shell + group anchors\" while each plugin ships the menu\n * for the objects it owns.\n *\n * The runtime merges all contributions into the owning app's `navigation`\n * tree by **target group id + priority** (lower priority applied first,\n * mirroring object extender ordering). When `group` is omitted the items are\n * appended at the app's top level. Contributed items keep the normal nav\n * gating fields (`requiresObject` / `requiredPermissions` / `visible`), so an\n * uninstalled capability simply contributes nothing and its slot stays empty.\n *\n * @example\n * {\n * app: 'setup',\n * group: 'group_integrations',\n * priority: 100,\n * items: [\n * { id: 'nav_webhooks', type: 'object', label: 'Webhooks', objectName: 'sys_webhook', requiresObject: 'sys_webhook' },\n * ],\n * }\n */\nexport const NavigationContributionSchema = lazySchema(() => z.object({\n app: SnakeCaseIdentifierSchema.describe('Target app name to contribute navigation into (e.g. \"setup\")'),\n group: SnakeCaseIdentifierSchema.optional().describe('Target group nav-item id to append into (e.g. \"group_integrations\"); omit to append at the app top level'),\n priority: z.number().int().min(0).default(200).describe('Merge priority within the target group — lower applied first (matches object extender priority)'),\n items: z.array(NavigationItemSchema).describe('Navigation items contributed into the target app/group'),\n}).describe('A navigation contribution: a package injecting nav items into an app it does not own (ADR-0029 D7)'));\nexport type NavigationContribution = z.infer<typeof NavigationContributionSchema>;\n\n/**\n * App Branding Configuration\n * Allows configuring the look and feel of the specific app.\n */\nexport const AppBrandingSchema = lazySchema(() => z.object({\n primaryColor: z.string().optional().describe('Primary theme color hex code'),\n accentColor: z.string().optional().describe('Accent color hex code (highlights, active states). Declared to match the objectui ConsoleLayout read of branding.accentColor (inverse-drift fix, liveness audit #1878/#1891/#1894).'),\n logo: z.string().optional().describe('Custom logo URL for this app'),\n favicon: z.string().optional().describe('Custom favicon URL for this app'),\n}));\n\n/**\n * Navigation Area Schema\n * \n * A logical grouping (zone/section) of navigation items, similar to Salesforce \"App Areas\"\n * or Dynamics 365 \"Site Map Areas\". Each area represents a business domain (e.g. Sales, Service, Settings)\n * and contains its own independent navigation tree.\n * \n * Areas allow large applications to partition navigation by business function while\n * keeping a single AppSchema definition. The runtime may render areas as top-level tabs,\n * sidebar sections, or a switchable navigation context.\n * \n * @example\n * ```ts\n * const salesArea: NavigationArea = {\n * id: 'area_sales',\n * label: 'Sales',\n * icon: 'briefcase',\n * order: 1,\n * navigation: [\n * { id: 'nav_leads', type: 'object', label: 'Leads', objectName: 'lead' },\n * { id: 'nav_opportunities', type: 'object', label: 'Opportunities', objectName: 'opportunity' },\n * ],\n * };\n * ```\n */\nexport const NavigationAreaSchema = lazySchema(() => z.object({\n /** Unique area identifier */\n id: SnakeCaseIdentifierSchema.describe('Unique area identifier (lowercase snake_case)'),\n\n /** Display label */\n label: I18nLabelSchema.describe('Area display label'),\n\n /** Icon name (Lucide) */\n icon: z.string().optional().describe('Area icon name'),\n\n /** Sort order among areas (lower = first) */\n order: z.number().optional().describe('Sort order among areas (lower = first)'),\n\n /** Area description */\n description: I18nLabelSchema.optional().describe('Area description'),\n\n /** \n * Visibility condition.\n * Formula expression returning boolean.\n */\n visible: ExpressionInputSchema.optional().describe('Visibility predicate (CEL) for this area.'),\n\n /** Permissions required to access this area */\n requiredPermissions: z.array(z.string()).optional().describe('Permissions required to access this area'),\n\n /** Navigation items within this area */\n navigation: z.array(NavigationItemSchema).describe('Navigation items within this area'),\n}));\n\n/**\n * App Context Selector Schema\n *\n * Declares a sidebar-level \"scope\" dropdown (e.g. a Package filter, an\n * Environment switcher, a Locale picker) whose **current value is exposed\n * as a navigation template variable** named after `id`.\n *\n * This is the metadata-driven way to add a control at the top of the\n * navigation that transparently scopes every child navigation item —\n * without wiring the value into each item by hand. The shell:\n * 1. Renders the dropdown (options pulled from `optionsSource.endpoint`).\n * 2. Holds the selected value (persisted per `persist`).\n * 3. Substitutes `{<id>}` into any nav item's `params` / `recordId`\n * exactly like the built-in `{current_user_id}` / `{current_org_id}`\n * variables (see `ObjectNavItem.recordId`).\n *\n * @example Package filter for the Studio workbench\n * ```ts\n * contextSelectors: [{\n * id: 'active_package',\n * label: 'Package',\n * icon: 'package',\n * optionsSource: {\n * endpoint: '/api/v1/packages',\n * valueKey: 'manifest.id',\n * labelKey: 'manifest.name',\n * // Only offer third-party / custom (project-scoped) packages;\n * // hide the platform's own system/cloud kernel packages.\n * filter: [{ key: 'manifest.scope', op: 'nin', value: ['system', 'cloud'] }],\n * },\n * }]\n * // …then in nav items:\n * { id: 'nav_objects', type: 'component', componentRef: 'metadata:resource',\n * params: { type: 'object', package: '{active_package}' } }\n * ```\n */\nexport const AppContextSelectorSchema = lazySchema(() => z.object({\n /**\n * Identifier — also the template-variable name the selected value is\n * exposed under. Reference it in nav items as `{<id>}`\n * (e.g. `id: 'active_package'` → `{active_package}`).\n */\n id: SnakeCaseIdentifierSchema.describe('Selector id; selected value is exposed as the nav template var {<id>}'),\n\n /** Display label for the dropdown. */\n label: I18nLabelSchema.describe('Dropdown label'),\n\n /** Icon name (Lucide). */\n icon: z.string().optional().describe('Icon name'),\n\n /**\n * Where the dropdown options come from. The shell fetches `endpoint`\n * and maps each row to `{ value: row[valueKey], label: row[labelKey] }`.\n * Re-uses existing REST surfaces (e.g. `/api/v1/packages`) so no\n * bespoke option API is required.\n */\n optionsSource: z.object({\n endpoint: z.string().describe('REST endpoint returning the option rows (e.g. /api/v1/packages)'),\n valueKey: z.string().default('id').describe('Row property used as the option value (dotted path allowed, e.g. \"manifest.id\")'),\n labelKey: z.string().default('name').describe('Row property used as the option label (dotted path allowed, e.g. \"manifest.name\")'),\n /**\n * Optional predicates applied to each fetched row before it becomes\n * an option. All predicates must pass (logical AND). Keys are dotted\n * paths so nested fields (e.g. `manifest.scope`) can be reached.\n *\n * This keeps shared REST surfaces (e.g. `/api/v1/packages`) generic\n * while letting an individual selector narrow the list. For example,\n * the Studio package scope hides platform/kernel packages so only\n * `project`-scoped (third-party / custom) packages are selectable —\n * the scope dropdown is a developer affordance, not a place to\n * surface the platform's own internal `system`/`cloud` packages:\n *\n * ```ts\n * filter: [{ key: 'manifest.scope', op: 'nin', value: ['system', 'cloud'] }]\n * ```\n */\n filter: z.array(z.object({\n key: z.string().describe('Dotted path on each row to compare (e.g. \"manifest.scope\")'),\n op: z.enum(['eq', 'ne', 'in', 'nin']).default('eq')\n .describe('Comparison operator: eq | ne | in | nin'),\n value: z.union([z.string(), z.array(z.string())])\n .describe('Comparison value (string for eq/ne, string[] for in/nin)'),\n })).optional().describe('Predicates (AND) each option row must satisfy'),\n }).describe('Option data source'),\n\n /** Whether to prepend an \"All\" option that clears the scope. */\n includeAll: z.boolean().default(true).describe('Prepend an \"All\" option that clears the scope'),\n\n /** Value emitted when \"All\" is selected (empty string = no filter). */\n allValue: z.string().default('').describe('Template value when \"All\" is selected (empty = no filter)'),\n\n /** How the selection is persisted across navigation. */\n persist: z.enum(['query', 'session', 'none']).default('query')\n .describe('Persist selection via URL query, sessionStorage, or not at all'),\n\n /** Where the dropdown is rendered. */\n placement: z.enum(['sidebar_header', 'topbar']).default('sidebar_header')\n .describe('Render location in the app chrome'),\n}));\n\nexport type AppContextSelector = z.infer<typeof AppContextSelectorSchema>;\n\n/**\n * Schema for Applications (Apps).\n * A logical container for business functionality (e.g., \"Sales CRM\", \"HR Portal\").\n * \n * **NAMING CONVENTION:**\n * App names are used in URLs and routing and must be lowercase snake_case.\n * Prefix with 'app_' is recommended for clarity.\n * \n * @example Good app names\n * - 'app_crm'\n * - 'app_finance'\n * - 'app_portal'\n * - 'sales_app'\n * \n * @example Bad app names (will be rejected)\n * - 'CRM' (uppercase)\n * - 'FinanceApp' (mixed case)\n * - 'Sales App' (spaces)\n */\n/**\n * App Configuration Schema\n * Defines a business application container, including its navigation, branding, and permissions.\n * \n * The App is the top-level navigation shell. The `navigation[]` field holds the complete\n * sidebar tree with unlimited nesting depth via `type: 'group'` items. Pages are referenced\n * by name via `type: 'page'` items and defined independently.\n * \n * @example CRM App with nested navigation tree\n * {\n * name: \"crm\",\n * label: \"Sales CRM\",\n * icon: \"briefcase\",\n * navigation: [\n * { type: \"group\", id: \"grp_sales\", label: \"Sales Cloud\", expanded: true, children: [\n * { type: \"page\", id: \"nav_pipeline\", label: \"Pipeline\", pageName: \"page_pipeline\" },\n * { type: \"page\", id: \"nav_accounts\", label: \"Accounts\", pageName: \"page_accounts\" },\n * ]},\n * { type: \"page\", id: \"nav_settings\", label: \"Settings\", pageName: \"admin_settings\" },\n * ]\n * }\n */\nexport const AppSchema = lazySchema(() => z.object({\n /** Machine name (id) */\n name: SnakeCaseIdentifierSchema.describe('App unique machine name (lowercase snake_case)'),\n \n /** Display label */\n label: I18nLabelSchema.describe('App display label'),\n\n /** App version */\n version: z.string().optional().describe('App version'),\n \n /** Description */\n description: I18nLabelSchema.optional().describe('App description'),\n \n /** Icon name (Lucide) */\n icon: z.string().optional().describe('App icon used in the App Launcher'),\n \n /** Branding/Theming Configuration */\n branding: AppBrandingSchema.optional().describe('App-specific branding'),\n \n /** Application status */\n active: z.boolean().optional().default(true).describe('Whether the app is enabled'),\n\n /** Is this the default app for new users? */\n isDefault: z.boolean().optional().default(false).describe('Is default app'),\n\n /**\n * Hide this app from the top-level App Switcher.\n *\n * Hidden apps stay fully routable and permission-checked — they just\n * don't appear in the apps dropdown. The shell is expected to surface\n * them through the avatar / user dropdown instead, so this is the\n * right knob for personal-settings-style apps (\"Account\") that would\n * feel out of place next to business apps (CRM, HR, Setup).\n *\n * Mirrors GitHub Settings / Google account chip / Salesforce\n * \"Personal Settings\" — visible to every user, but reached from the\n * avatar rather than the app launcher.\n */\n hidden: z.boolean().optional()\n .describe('Hide from the App Switcher; the shell surfaces hidden apps via the avatar menu instead'),\n \n /** \n * Full Navigation Tree — supports unlimited nesting depth.\n * Pages are referenced by name via `type: 'page'` items.\n * Groups can contain other groups for arbitrary sidebar depth.\n * \n * For simple apps, use `navigation` directly.\n * For enterprise apps with multiple business domains, use `areas` instead.\n */\n navigation: z.array(NavigationItemSchema).optional()\n .describe('Full navigation tree for the app sidebar'),\n\n /**\n * Navigation Areas — partitions navigation by business domain.\n * Each area defines an independent navigation tree (e.g. Sales, Service, Settings).\n * When areas are defined, they take precedence over the top-level `navigation` array.\n * \n * @example\n * ```ts\n * areas: [\n * { id: 'area_sales', label: 'Sales', icon: 'briefcase', order: 1, navigation: [...] },\n * { id: 'area_service', label: 'Service', icon: 'headset', order: 2, navigation: [...] },\n * ]\n * ```\n */\n areas: z.array(NavigationAreaSchema).optional()\n .describe('Navigation areas for partitioning navigation by business domain'),\n\n /**\n * App-level context selectors — sidebar/topbar \"scope\" dropdowns whose\n * selected value is injected into navigation items as a template\n * variable (`{<id>}`). Use to add a Package / Environment / Locale\n * filter that transparently scopes every child nav item. See\n * {@link AppContextSelectorSchema}.\n */\n contextSelectors: z.array(AppContextSelectorSchema).optional()\n .describe('App-level scope dropdowns whose value is injected into nav items as {<id>} template vars'),\n \n /** \n * App-level Home Page Override\n * ID of the navigation item to act as the landing page.\n * If not set, usually defaults to the first navigation item.\n */\n homePageId: z.string().optional().describe('ID of the navigation item to serve as landing page'),\n\n /** \n * Access Control\n * List of permissions required to access this app.\n * Modern replacement for role/profile based assignment.\n * Example: [\"app.access.crm\"]\n */\n requiredPermissions: z.array(z.string()).optional().describe('Permissions required to access this app'),\n \n /** \n * Package Components (For config file convenience)\n * In a real monorepo these might be auto-discovered, but here we allow explicit registration.\n */\n objects: z.array(z.unknown()).optional().describe('Objects belonging to this app'),\n apis: z.array(z.unknown()).optional().describe('Custom APIs belonging to this app'),\n\n /** Sharing configuration for public access */\n sharing: SharingConfigSchema.optional().describe('Public sharing configuration'),\n\n /** Embed configuration for iframe embedding */\n embed: EmbedConfigSchema.optional().describe('Iframe embedding configuration'),\n\n /** Mobile navigation mode */\n mobileNavigation: z.object({\n mode: z.enum(['drawer', 'bottom_nav', 'hamburger']).default('drawer')\n .describe('Mobile navigation mode: drawer sidebar, bottom navigation bar, or hamburger menu'),\n bottomNavItems: z.array(z.string()).optional()\n .describe('Navigation item IDs to show in bottom nav (max 5)'),\n }).optional().describe('Mobile-specific navigation configuration'),\n\n /**\n * Default AI Copilot for this app.\n *\n * When set, the ambient chat endpoint (`POST /api/v1/ai/chat` with\n * `context.appName`) auto-resolves to this agent without the user\n * having to pick from a list. The agent's `skills[]` are loaded\n * from the SkillRegistry and exposed to the LLM.\n *\n * Mirrors the Salesforce Agentforce / ServiceNow Now Assist pattern\n * where each application surface has one ambient copilot.\n *\n * @example\n * ```ts\n * defineApp({ name: 'crm', defaultAgent: 'sales_copilot', ... })\n * ```\n */\n defaultAgent: SnakeCaseIdentifierSchema.optional()\n .describe('Name of the default AI agent for this app (used by the ambient chat endpoint)'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes for the application'),\n\n /**\n * ADR-0010 §3.7 — Package-level protection envelope. Package\n * authors declare lock policy here; the loader translates it\n * into the private `_lock` envelope at registration time and\n * strips this block before persistence. See\n * `shared/protection.zod.ts`.\n */\n protection: ProtectionSchema.optional().describe(\n 'Package author protection block — lock policy for this app.',\n ),\n\n // ADR-0010 — runtime protection envelope (internal — set by loader).\n ...MetadataProtectionFields,\n}));\n\n/**\n * App Factory Helper\n */\nexport const App = {\n create: (config: z.input<typeof AppSchema>): App => AppSchema.parse(config),\n} as const;\n\n/**\n * Type-safe factory for creating application definitions.\n *\n * Validates the config at creation time using Zod `.parse()`.\n *\n * @example CRM App with nested navigation tree\n * ```ts\n * const crmApp = defineApp({\n * name: 'crm',\n * label: 'Sales CRM',\n * navigation: [\n * { id: 'grp_sales', type: 'group', label: 'Sales Cloud', expanded: true, children: [\n * { id: 'nav_pipeline', type: 'page', label: 'Pipeline', pageName: 'page_pipeline' },\n * { id: 'nav_accounts', type: 'page', label: 'Accounts', pageName: 'page_accounts' },\n * ]},\n * { id: 'nav_settings', type: 'page', label: 'Settings', pageName: 'admin_settings' },\n * ],\n * });\n * ```\n */\nexport function defineApp(config: z.input<typeof AppSchema>): App {\n return AppSchema.parse(config);\n}\n\n// Main Types\nexport type App = z.infer<typeof AppSchema>;\nexport type AppInput = z.input<typeof AppSchema>;\nexport type AppBranding = z.infer<typeof AppBrandingSchema>;\nexport type NavigationItem = z.infer<typeof NavigationItemSchema>;\nexport type NavigationArea = z.infer<typeof NavigationAreaSchema>;\n\n// Discriminated Item Types (Helper exports)\nexport type ObjectNavItem = z.infer<typeof ObjectNavItemSchema>;\nexport type DashboardNavItem = z.infer<typeof DashboardNavItemSchema>;\nexport type PageNavItem = z.infer<typeof PageNavItemSchema>;\nexport type UrlNavItem = z.infer<typeof UrlNavItemSchema>;\nexport type ReportNavItem = z.infer<typeof ReportNavItemSchema>;\nexport type ActionNavItem = z.infer<typeof ActionNavItemSchema>;\nexport type ComponentNavItem = z.infer<typeof ComponentNavItemSchema>;\nexport type GroupNavItem = z.infer<typeof GroupNavItemSchema> & { children: NavigationItem[] };\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { z } from 'zod';\n\n/**\n * # Conditional-visibility predicate normalization (ADR-0089)\n *\n * One concept — *\"show this only when the CEL predicate is TRUE\"* — used to be\n * spelled three different ways depending on the layer:\n *\n * | Layer | Legacy key | Canonical |\n * |:------------------------------|:-------------|:-------------|\n * | Data field / field option | `visibleWhen`| `visibleWhen`|\n * | View form section / field | `visibleOn` | `visibleWhen`|\n * | Page component | `visibility` | `visibleWhen`|\n *\n * ADR-0089 makes **`visibleWhen`** the single canonical key across all layers\n * (aligning with the `readonlyWhen` / `requiredWhen` family and the resolved\n * `conditionalRequired → requiredWhen` precedent). `visibleOn` and `visibility`\n * stay accepted as `@deprecated` aliases and are folded into `visibleWhen`\n * **once, at the schema boundary** (a zod `.transform()`), so no renderer or\n * validator has to re-implement the fallback.\n *\n * The *binding root* is still determined by the layer — runtime record surfaces\n * bind `record` + `current_user`; metadata-editing forms bind `data` — this\n * unifies the *name*, not the environment.\n */\n\n/** Deprecated alias keys folded into the canonical `visibleWhen`. */\nexport const VISIBILITY_ALIAS_KEYS = ['visibleOn', 'visibility'] as const;\n\n/** Object carrying the canonical key and/or its deprecated aliases. */\ntype WithVisibilityAliases = {\n visibleWhen?: unknown;\n visibleOn?: unknown;\n visibility?: unknown;\n};\n\n/**\n * Fold the deprecated `visibleOn` / `visibility` aliases into the canonical\n * `visibleWhen` and drop the aliases from the output (ADR-0089 D2). The\n * canonical key wins when present; otherwise the first defined alias is used.\n *\n * Designed to be used as a zod `.transform()` on any object schema that carries\n * a conditional-visibility predicate:\n *\n * ```ts\n * z.object({ ..., visibleWhen: Expr.optional(), visibleOn: Expr.optional() })\n * .transform(normalizeVisibleWhen)\n * ```\n */\nexport function normalizeVisibleWhen<T extends WithVisibilityAliases>(\n input: T,\n): Omit<T, 'visibleOn' | 'visibility'> {\n const { visibleOn, visibility, ...rest } = input;\n const canonical =\n rest.visibleWhen !== undefined\n ? rest.visibleWhen\n : visibleOn !== undefined\n ? visibleOn\n : visibility;\n\n if (canonical === undefined) {\n // Nothing to fold — strip the (absent) aliases and return as-is.\n return rest as Omit<T, 'visibleOn' | 'visibility'>;\n }\n return { ...rest, visibleWhen: canonical } as Omit<T, 'visibleOn' | 'visibility'>;\n}\n\n/** A key that is (or is a likely mis-spelling of) the visibility predicate. */\nfunction looksLikeVisibilityKey(key: string): boolean {\n return /vis|conceal|hidden|show.?when/i.test(key);\n}\n\n/**\n * Custom zod `error` for the `.strict()` view/page schemas (ADR-0089 D3a).\n *\n * With `.strict()`, a key these schemas do not declare — a stale `visibleOn` past\n * removal, a `visibleWhen` typo, or a wrong-layer paste — is now a **loud parse\n * error** instead of a silent strip (ADR-0049 enforce-or-remove, ADR-0078\n * no-silently-inert). This error map turns that rejection into a *fixable* one: it\n * always names the offending key(s), and when a key looks like the\n * conditional-visibility predicate it points the author at the canonical\n * `visibleWhen`. Every other issue code defers to zod's default (`undefined`).\n *\n * Wire it as the object's `error` alongside `.strict()`:\n *\n * ```ts\n * z.object({ ..., visibleWhen: Expr.optional() }, { error: strictVisibilityError })\n * .strict()\n * .transform(normalizeVisibleWhen)\n * ```\n */\nexport const strictVisibilityError: z.core.$ZodErrorMap = (issue) => {\n if (issue.code !== 'unrecognized_keys') return undefined;\n const keys = (issue as { keys?: readonly string[] }).keys ?? [];\n const list = keys.map((k) => `\\`${k}\\``).join(', ');\n const base =\n `Unrecognized key(s) on this view/page schema: ${list}. ` +\n `Before ADR-0089 D3a these were dropped silently, shipping inert metadata; ` +\n `a mis-layered or stale key is now a loud parse error.`;\n if (keys.some(looksLikeVisibilityKey)) {\n return (\n base +\n ' If this is the conditional-visibility predicate, the canonical key is ' +\n '`visibleWhen` (ADR-0089) — `visibleOn` (view form) and `visibility` (page ' +\n 'component) are still accepted as deprecated aliases.'\n );\n }\n return base;\n};\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * Unified Query DSL Specification\n * \n * Based on industry best practices from:\n * - Prisma ORM\n * - Strapi CMS\n * - TypeORM\n * - LoopBack Framework\n * \n * Version: 1.0.0\n * Status: Draft\n * \n * Objective: Define a JSON-based, database-agnostic query syntax standard\n * for data filtering interactions between frontend and backend APIs.\n * \n * Design Principles:\n * 1. Declarative: Frontend describes \"what data to get\", not \"how to query\"\n * 2. Database Agnostic: Syntax contains no database-specific directives\n * 3. Type Safe: Structure can be statically inferred by TypeScript\n * 4. Convention over Configuration: Implicit syntax for common queries\n */\n\n/**\n * Field Reference\n * Represents a reference to another field/column instead of a literal value.\n * Used for joins (ON clause) and cross-field comparisons.\n * \n * @example\n * // user.id = order.owner_id\n * { \"$eq\": { \"$field\": \"order.owner_id\" } }\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const FieldReferenceSchema = lazySchema(() => z.object({\n $field: z.string().describe('Field Reference/Column Name')\n}));\n\nexport type FieldReference = z.infer<typeof FieldReferenceSchema>;\n\n// ============================================================================\n// 3.1 Comparison Operators\n// ============================================================================\n\n/**\n * Comparison operators for equality and inequality checks.\n * Supported data types: Any\n */\nexport const EqualityOperatorSchema = lazySchema(() => z.object({\n /** Equal to (default) - SQL: = | MongoDB: $eq */\n $eq: z.any().optional(),\n \n /** Not equal to - SQL: <> or != | MongoDB: $ne */\n $ne: z.any().optional(),\n}));\n\n/**\n * Comparison operators for numeric and date comparisons.\n * Supported data types: Number, Date\n */\nexport const ComparisonOperatorSchema = lazySchema(() => z.object({\n /** Greater than - SQL: > | MongoDB: $gt */\n $gt: z.union([z.number(), z.date(), FieldReferenceSchema]).optional(),\n \n /** Greater than or equal to - SQL: >= | MongoDB: $gte */\n $gte: z.union([z.number(), z.date(), FieldReferenceSchema]).optional(),\n \n /** Less than - SQL: < | MongoDB: $lt */\n $lt: z.union([z.number(), z.date(), FieldReferenceSchema]).optional(),\n \n /** Less than or equal to - SQL: <= | MongoDB: $lte */\n $lte: z.union([z.number(), z.date(), FieldReferenceSchema]).optional(),\n}));\n\n// ============================================================================\n// 3.2 Set & Range Operators\n// ============================================================================\n\n/**\n * Set operators for membership checks.\n */\nexport const SetOperatorSchema = lazySchema(() => z.object({\n /** In list - SQL: IN (?, ?, ?) | MongoDB: $in */\n $in: z.array(z.any()).optional(),\n \n /** Not in list - SQL: NOT IN (...) | MongoDB: $nin */\n $nin: z.array(z.any()).optional(),\n}));\n\n/**\n * Range operator for interval checks (closed interval).\n * SQL: BETWEEN ? AND ? | MongoDB: $gte AND $lte\n */\nexport const RangeOperatorSchema = lazySchema(() => z.object({\n /** Between (inclusive) - takes [min, max] array */\n $between: z.tuple([\n z.union([z.number(), z.date(), FieldReferenceSchema]),\n z.union([z.number(), z.date(), FieldReferenceSchema])\n ]).optional(),\n}));\n\n// ============================================================================\n// 3.3 String-Specific Operators\n// ============================================================================\n\n/**\n * String pattern matching operators.\n * Note: Case sensitivity should be handled at backend level.\n */\nexport const StringOperatorSchema = lazySchema(() => z.object({\n /** Contains substring - SQL: LIKE %?% | MongoDB: $regex */\n $contains: z.string().optional(),\n \n /** Does not contain substring - SQL: NOT LIKE %?% | MongoDB: $not: $regex */\n $notContains: z.string().optional(),\n \n /** Starts with prefix - SQL: LIKE ?% | MongoDB: $regex */\n $startsWith: z.string().optional(),\n \n /** Ends with suffix - SQL: LIKE %? | MongoDB: $regex */\n $endsWith: z.string().optional(),\n}));\n\n// ============================================================================\n// 3.5 Special Operators\n// ============================================================================\n\n/**\n * Special check operators for null and existence.\n */\nexport const SpecialOperatorSchema = lazySchema(() => z.object({\n /** Is null check - SQL: IS NULL (true) / IS NOT NULL (false) | MongoDB: field: null */\n $null: z.boolean().optional(),\n \n /** Field exists check (primarily for NoSQL) - MongoDB: $exists */\n $exists: z.boolean().optional(),\n}));\n\n// ============================================================================\n// Combined Field Operators\n// ============================================================================\n\n/**\n * All field-level operators combined.\n * These can be applied to individual fields in a filter.\n */\nexport const FieldOperatorsSchema = lazySchema(() => z.object({\n // Equality\n $eq: z.any().optional(),\n $ne: z.any().optional(),\n \n // Comparison (numeric/date)\n $gt: z.union([z.number(), z.date(), FieldReferenceSchema]).optional(),\n $gte: z.union([z.number(), z.date(), FieldReferenceSchema]).optional(),\n $lt: z.union([z.number(), z.date(), FieldReferenceSchema]).optional(),\n $lte: z.union([z.number(), z.date(), FieldReferenceSchema]).optional(),\n \n // Set & Range\n $in: z.array(z.any()).optional(),\n $nin: z.array(z.any()).optional(),\n $between: z.tuple([\n z.union([z.number(), z.date(), FieldReferenceSchema]),\n z.union([z.number(), z.date(), FieldReferenceSchema])\n ]).optional(),\n \n // String-specific\n $contains: z.string().optional(),\n $notContains: z.string().optional(),\n $startsWith: z.string().optional(),\n $endsWith: z.string().optional(),\n \n // Special\n $null: z.boolean().optional(),\n $exists: z.boolean().optional(),\n}));\n\n// ============================================================================\n// 3.4 Logical Operators & Recursive Filter Structure\n// ============================================================================\n\n/**\n * Recursive filter type that supports:\n * 1. Implicit equality: { field: value }\n * 2. Explicit operators: { field: { $op: value } }\n * 3. Logical combinations: { $and: [...], $or: [...], $not: {...} }\n * 4. Nested relations: { relation: { field: value } }\n */\nexport type FilterCondition = {\n [key: string]: \n | any // Implicit equality: key: value\n | z.infer<typeof FieldOperatorsSchema> // Explicit operators: key: { $op: value }\n | FilterCondition; // Nested relation: key: { nested: ... }\n} & {\n /** Logical AND - combines all conditions that must be true */\n $and?: FilterCondition[];\n \n /** Logical OR - at least one condition must be true */\n $or?: FilterCondition[];\n \n /** Logical NOT - negates the condition */\n $not?: FilterCondition;\n};\n\n/**\n * Zod schema for recursive filter validation.\n * Uses z.lazy() to handle recursive structure.\n */\nexport const FilterConditionSchema: z.ZodType<FilterCondition> = z.lazy(() =>\n z.record(z.string(), z.unknown()).and(\n z.object({\n $and: z.array(FilterConditionSchema).optional(),\n $or: z.array(FilterConditionSchema).optional(),\n $not: FilterConditionSchema.optional(),\n })\n )\n);\n\n// ============================================================================\n// Query Filter Wrapper\n// ============================================================================\n\n/**\n * Top-level query filter wrapper.\n * This is typically used as the \"where\" clause in a query.\n * \n * @example\n * ```typescript\n * const filter: QueryFilter = {\n * where: {\n * status: \"active\", // Implicit equality\n * age: { $gte: 18 }, // Explicit operator\n * $or: [ // Logical combination\n * { role: \"admin\" },\n * { email: { $contains: \"@company.com\" } }\n * ],\n * profile: { // Nested relation\n * verified: true\n * }\n * }\n * }\n * ```\n */\nexport const QueryFilterSchema = lazySchema(() => z.object({\n where: FilterConditionSchema.optional(),\n}));\n\n// ============================================================================\n// TypeScript Type Exports\n// ============================================================================\n\n/**\n * Type-safe filter operators for use in TypeScript.\n * \n * @example\n * ```typescript\n * type UserFilter = Filter<User>;\n * \n * const filter: UserFilter = {\n * age: { $gte: 18 },\n * email: { $contains: \"@example.com\" }\n * };\n * ```\n */\nexport type Filter<T = any> = {\n [K in keyof T]?: \n | T[K] // Implicit equality\n | {\n $eq?: T[K];\n $ne?: T[K];\n $gt?: T[K] extends number | Date ? T[K] : never;\n $gte?: T[K] extends number | Date ? T[K] : never;\n $lt?: T[K] extends number | Date ? T[K] : never;\n $lte?: T[K] extends number | Date ? T[K] : never;\n $in?: T[K][];\n $nin?: T[K][];\n $between?: T[K] extends number | Date ? [T[K], T[K]] : never;\n $contains?: T[K] extends string ? string : never;\n $notContains?: T[K] extends string ? string : never;\n $startsWith?: T[K] extends string ? string : never;\n $endsWith?: T[K] extends string ? string : never;\n $null?: boolean;\n $exists?: boolean;\n }\n | (T[K] extends object ? Filter<T[K]> : never); // Nested relation\n} & {\n $and?: Filter<T>[];\n $or?: Filter<T>[];\n $not?: Filter<T>;\n};\n\n/**\n * Scalar types supported by the filter system.\n */\nexport type Scalar = string | number | boolean | Date | null;\n\n// Export inferred types\nexport type FieldOperators = z.infer<typeof FieldOperatorsSchema>;\nexport type QueryFilter = z.infer<typeof QueryFilterSchema>;\n\n// ============================================================================\n// Normalization Utilities (Internal Representation)\n// ============================================================================\n\n/**\n * Normalized filter AST structure.\n * This is the internal representation after converting all syntactic sugar\n * to explicit operators.\n * \n * Stage 1: Normalization Pass\n * Input: { age: 18, role: \"admin\" }\n * Output: { $and: [{ age: { $eq: 18 } }, { role: { $eq: \"admin\" } }] }\n * \n * This simplifies adapter implementation by providing a consistent structure.\n */\nexport const NormalizedFilterSchema: z.ZodType<any> = z.lazy(() => \n z.object({\n $and: z.array(\n z.union([\n // Field condition: { field: { $op: value } }\n z.record(z.string(), FieldOperatorsSchema),\n // Nested logical group\n NormalizedFilterSchema,\n ])\n ).optional(),\n \n $or: z.array(\n z.union([\n z.record(z.string(), FieldOperatorsSchema),\n NormalizedFilterSchema,\n ])\n ).optional(),\n \n $not: z.union([\n z.record(z.string(), FieldOperatorsSchema),\n NormalizedFilterSchema,\n ]).optional(),\n })\n);\n\nexport type NormalizedFilter = z.infer<typeof NormalizedFilterSchema>;\n\n// ============================================================================\n// AST Array Format Detection & Validation\n// ============================================================================\n\n/**\n * Set of valid AST comparison operators (case-insensitive).\n * Used by `isFilterAST()` to validate AST structure beyond `Array.isArray`.\n */\nexport const VALID_AST_OPERATORS = new Set([\n '=', '==', '!=', '<>', '>', '>=', '<', '<=',\n 'in', 'nin', 'not_in',\n 'contains', 'notcontains', 'not_contains', 'like',\n 'startswith', 'starts_with',\n 'endswith', 'ends_with',\n 'between',\n // Null / empty predicates. `is_null` / `is_not_null` are canonical; `isnull`,\n // `isnotnull`, `is_empty`, `is_not_empty` are the alias spellings the ObjectUI\n // `data-objectstack` adapter emits and the driver-sql/#2704 fix accepts — kept\n // in sync here so `parseFilterAST()` never treats them as an unknown operator.\n 'is_null', 'is_not_null',\n 'isnull', 'isnotnull', 'is_empty', 'is_not_empty',\n]);\n\n/**\n * Detect whether a value is a valid Filter AST array structure.\n *\n * A valid AST is one of:\n * - Comparison node: `[field: string, operator: string, value: unknown]` where operator is a known operator\n * - Logical node: `[\"and\" | \"or\", ...children]` where children are valid AST nodes\n * - Legacy flat array: `[[cond], [cond], ...]` where all elements are sub-arrays (each a valid AST node)\n *\n * This replaces the naïve `Array.isArray(filter)` check, preventing accidental\n * misidentification of arbitrary arrays as filter ASTs.\n *\n * @example\n * isFilterAST([\"status\", \"=\", \"active\"]) // true\n * isFilterAST([\"and\", [\"a\", \"=\", 1], [\"b\", \">\", 2]]) // true\n * isFilterAST([[\"a\", \"=\", 1], [\"b\", \"=\", 2]]) // true (legacy)\n * isFilterAST([1, 2, 3]) // false\n * isFilterAST(\"not an array\") // false\n * isFilterAST({ status: \"active\" }) // false\n */\nexport function isFilterAST(filter: unknown): boolean {\n if (!Array.isArray(filter) || filter.length === 0) return false;\n\n const first = filter[0];\n\n // Logical node: [\"and\", ...] or [\"or\", ...]\n if (typeof first === 'string') {\n const lower = first.toLowerCase();\n if (lower === 'and' || lower === 'or') {\n return filter.length >= 2 && filter.slice(1).every((child: unknown) => isFilterAST(child));\n }\n\n // Comparison node: [field, operator, value]\n if (filter.length >= 2 && typeof filter[1] === 'string') {\n return VALID_AST_OPERATORS.has(filter[1].toLowerCase());\n }\n }\n\n // Legacy flat array: [[cond], [cond], ...]\n if (filter.every((item: unknown) => isFilterAST(item))) {\n return filter.length > 0;\n }\n\n return false;\n}\n\n// ============================================================================\n// AST Array → FilterCondition Conversion\n// ============================================================================\n\n/**\n * Operator mapping from AST infix operators to FilterCondition `$`-prefixed operators.\n */\nconst AST_OPERATOR_MAP: Record<string, string> = {\n '=': '$eq',\n '==': '$eq',\n '!=': '$ne',\n '<>': '$ne',\n '>': '$gt',\n '>=': '$gte',\n '<': '$lt',\n '<=': '$lte',\n 'in': '$in',\n 'nin': '$nin',\n 'not_in': '$nin',\n 'contains': '$contains',\n 'notcontains': '$notContains',\n 'not_contains': '$notContains',\n 'like': '$contains',\n 'startswith': '$startsWith',\n 'starts_with': '$startsWith',\n 'endswith': '$endsWith',\n 'ends_with': '$endsWith',\n 'between': '$between',\n 'is_null': '$null',\n 'is_not_null': '$null',\n 'isnull': '$null',\n 'isnotnull': '$null',\n 'is_empty': '$null',\n 'is_not_empty': '$null',\n};\n\n/**\n * Convert a single AST comparison node `[field, operator, value]` to a FilterCondition object.\n */\nfunction convertComparison(node: [string, string, unknown]): FilterCondition {\n const [field, operator, value] = node;\n const op = operator.toLowerCase();\n\n // Special case: equality shorthand\n if (op === '=' || op === '==') {\n return { [field]: value } as FilterCondition;\n }\n\n // Null / empty predicates — direction comes from the operator NAME, not the\n // (filler) value: the ObjectUI client sends a truthy placeholder value for\n // both `isnull` and `isnotnull`, so keying off `value` would collapse them.\n if (op === 'is_null' || op === 'isnull' || op === 'is_empty') {\n return { [field]: { $null: true } } as FilterCondition;\n }\n if (op === 'is_not_null' || op === 'isnotnull' || op === 'is_not_empty') {\n return { [field]: { $null: false } } as FilterCondition;\n }\n\n const mapped = AST_OPERATOR_MAP[op];\n if (mapped) {\n return { [field]: { [mapped]: value } } as FilterCondition;\n }\n\n // Fallback: use the operator as-is with $ prefix\n return { [field]: { [`$${op}`]: value } } as FilterCondition;\n}\n\n/**\n * Parse a filter from AST array format to FilterCondition object format.\n *\n * The AST array format is used by the ObjectUI client and the `FilterBuilder`:\n * - Comparison: `[field, operator, value]` → `{ field: value }` or `{ field: { $op: value } }`\n * - Logical AND: `[\"and\", cond1, cond2, ...]` → `{ $and: [...] }`\n * - Logical OR: `[\"or\", cond1, cond2, ...]` → `{ $or: [...] }`\n *\n * If the input is already a FilterCondition object (not an array), it is returned as-is.\n * If the input is `null` or `undefined`, it is returned as-is.\n *\n * @example\n * // Simple condition\n * parseFilterAST([\"status\", \"=\", \"active\"])\n * // → { status: \"active\" }\n *\n * @example\n * // Compound AND\n * parseFilterAST([\"and\", [\"priority\", \"=\", \"high\"], [\"status\", \"=\", \"active\"]])\n * // → { $and: [{ priority: \"high\" }, { status: \"active\" }] }\n *\n * @example\n * // Object passthrough\n * parseFilterAST({ status: \"active\" })\n * // → { status: \"active\" }\n */\nexport function parseFilterAST(filter: unknown): FilterCondition | undefined {\n if (filter == null) return undefined;\n if (!Array.isArray(filter)) return filter as FilterCondition;\n if (filter.length === 0) return undefined;\n\n const first = filter[0];\n\n // Logical node: [\"and\", cond1, cond2, ...] or [\"or\", cond1, cond2, ...]\n if (typeof first === 'string' && (first.toLowerCase() === 'and' || first.toLowerCase() === 'or')) {\n const logicOp = `$${first.toLowerCase()}` as '$and' | '$or';\n const children = filter.slice(1).map((child: unknown) => parseFilterAST(child)).filter(Boolean) as FilterCondition[];\n if (children.length === 0) return undefined;\n if (children.length === 1) return children[0];\n return { [logicOp]: children } as FilterCondition;\n }\n\n // Comparison node: [field, operator, value]\n if (filter.length >= 2 && typeof first === 'string') {\n return convertComparison(filter as [string, string, unknown]);\n }\n\n // Legacy flat array: [[field, op, val], [field, op, val], ...]\n // All elements are sub-arrays → treat as implicit AND\n if (filter.every((item: unknown) => Array.isArray(item))) {\n const children = filter.map((child: unknown) => parseFilterAST(child)).filter(Boolean) as FilterCondition[];\n if (children.length === 0) return undefined;\n if (children.length === 1) return children[0];\n return { $and: children } as FilterCondition;\n }\n\n return undefined;\n}\n\n// ============================================================================\n// Constants & Metadata\n// ============================================================================\n\n/**\n * All supported operator keys.\n * Useful for validation and parsing.\n */\nexport const FILTER_OPERATORS = [\n // Equality\n '$eq', '$ne',\n // Comparison\n '$gt', '$gte', '$lt', '$lte',\n // Set & Range\n '$in', '$nin', '$between',\n // String\n '$contains', '$notContains', '$startsWith', '$endsWith',\n // Special\n '$null', '$exists',\n] as const;\n\n/**\n * Logical operator keys.\n */\nexport const LOGICAL_OPERATORS = ['$and', '$or', '$not'] as const;\n\n/**\n * All operator keys (field + logical).\n */\nexport const ALL_OPERATORS = [...FILTER_OPERATORS, ...LOGICAL_OPERATORS] as const;\n\nexport type FilterOperatorKey = typeof FILTER_OPERATORS[number];\nexport type LogicalOperatorKey = typeof LOGICAL_OPERATORS[number];\nexport type OperatorKey = typeof ALL_OPERATORS[number];\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { SystemIdentifierSchema } from '../shared/identifiers.zod';\nimport { ExpressionInputSchema } from '../shared/expression.zod';\nimport { FilterConditionSchema } from './filter.zod';\n\n/**\n * Field Type Enum\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const FieldType = z.enum([\n // Core Text. 'password' on a generic (non-better-auth) object is plaintext at\n // rest but masked to SECRET_MASK on read — the auth subsystem's one-way\n // hashing applies only to its own identity tables, never to an authored\n // 'password' field. Prefer 'secret' for reversible machine credentials. See\n // ADR-0100.\n 'text', 'textarea', 'email', 'url', 'phone', 'password',\n // Secret — reversible, encrypted-at-rest value (DB password, API key, token).\n // UNLIKE 'password' (masked-on-read but plaintext at rest, or one-way hashed\n // inside the auth subsystem), a 'secret' is round-tripped: the engine encrypts\n // it on write via the registered ICryptoProvider, stores the ciphertext handle\n // in `sys_secret`, persists only an opaque ref on the row, and masks it on\n // read. Fail-closed: no provider ⇒ writes throw rather than persist cleartext.\n // See ADR-0100.\n 'secret',\n // Rich Content\n 'markdown', 'html', 'richtext',\n // Numbers\n 'number', 'currency', 'percent', \n // Date & Time\n 'date', 'datetime', 'time',\n // Logic\n 'boolean', 'toggle', // Toggle is a distinct UI from checkbox\n // Selection\n 'select', // Single select dropdown\n 'multiselect', // Multi select (often tags)\n 'radio', // Radio group\n 'checkboxes', // Checkbox group\n // Relational\n 'lookup', 'master_detail', // Dynamic reference\n 'tree', // Hierarchical reference\n // User reference — a lookup specialized to the `sys_user` system object (person\n // picker; single, or multiple for collaborators/watchers). Stored IDENTICALLY to\n // 'lookup' (FK string column → sys_user.id; `multiple` ⇒ JSON) and resolved via the\n // same $expand machinery. The distinct type exists for modelling discoverability\n // (Studio/AI field palette), the user-search picker, and `current_user` defaults —\n // NOT a separate storage primitive. Ownership stays the existing `owner_id`\n // convention (plugin-security); a declarative `owner` is a possible future flag.\n 'user',\n // Media\n 'image', 'file', 'avatar', 'video', 'audio',\n // Calculated / System\n 'formula', 'summary', 'autonumber',\n // Embedded structured values (stored as JSON on the parent row — no separate table / FK)\n 'composite', // Single embedded sub-object with declared sub-fields (≈ Strapi component / ACF group)\n 'repeater', // Repeating embedded sub-object array with declared sub-fields (≈ Strapi repeatable component / ACF repeater)\n 'record', // Name-keyed map of embedded sub-objects (Record<string, SubObject>). Insertion order = display order. Used for collections where each item has a stable machine name (e.g. object.fields). See ADR-0007.\n // Enhanced Types\n 'location', // GPS coordinates\n 'address', // Structured address\n 'code', // Code editor (JSON/SQL/JS)\n 'json', // Structured JSON data (untyped escape hatch)\n 'color', // Color picker\n 'rating', // Star rating\n 'slider', // Numeric slider\n 'signature', // Digital signature\n 'qrcode', // QR code / Barcode\n 'progress', // Progress bar\n 'tags', // Simple tag list\n // AI/ML Types\n 'vector', // Vector embeddings for AI/ML (semantic search, RAG)\n]);\n\nexport type FieldType = z.infer<typeof FieldType>;\n\n/**\n * Select Option Schema\n * \n * Defines option values for select/picklist fields.\n * \n * **CRITICAL RULE**: The `value` field is a machine identifier that gets stored in the database.\n * It MUST be lowercase to avoid case-sensitivity issues in queries and comparisons.\n * \n * @example Good\n * { label: 'New', value: 'new' }\n * { label: 'In Progress', value: 'in_progress' }\n * { label: 'Closed Won', value: 'closed_won' }\n * \n * @example Bad (will be rejected)\n * { label: 'New', value: 'New' } // uppercase\n * { label: 'In Progress', value: 'In Progress' } // spaces and uppercase\n * { label: 'Closed Won', value: 'Closed_Won' } // mixed case\n */\nexport const SelectOptionSchema = lazySchema(() => z.object({\n label: z.string().describe('Display label (human-readable, any case allowed)'),\n value: SystemIdentifierSchema.describe('Stored value (lowercase machine identifier)'),\n color: z.string().optional().describe('Color code for badges/charts'),\n default: z.boolean().optional().describe('Is default option'),\n /**\n * Per-option visibility predicate (CEL) — the option is offered only when this\n * evaluates TRUE. Omit = always available. Evaluated against the SAME binding\n * environment as field-level `visibleWhen` (live `record` + `current_user`), so\n * it expresses BOTH cascading/dependent options (`record.country == 'cn'`) AND\n * role/context gating (`'admin' in current_user.positions`). When it references\n * sibling fields, declare those on the field's `dependsOn` so the form can gate\n * and re-evaluate the option list as the parent changes.\n *\n * ⚠️ Client-side hiding is UX, not authorization. When an option is gated for\n * access-control reasons the server MUST also reject writes of its value (the\n * rule-validator evaluates the picked value's `visibleWhen`) — hiding it in the\n * dropdown alone is bypassable.\n */\n visibleWhen: ExpressionInputSchema.optional().describe(\"Per-option visibility predicate (CEL) — option is offered only when TRUE (else omitted). Same env as field visibleWhen (record + current_user). e.g. P`record.country == 'cn'` or P`'admin' in current_user.positions`\"),\n}));\n\n/**\n * Location Coordinates Schema\n * GPS coordinates for location field type\n */\nexport const LocationCoordinatesSchema = lazySchema(() => z.object({\n latitude: z.number().min(-90).max(90).describe('Latitude coordinate'),\n longitude: z.number().min(-180).max(180).describe('Longitude coordinate'),\n altitude: z.number().optional().describe('Altitude in meters'),\n accuracy: z.number().optional().describe('Accuracy in meters'),\n}));\n\n/**\n * Currency Configuration Schema\n * Configuration for currency field type supporting multi-currency\n * \n * Note: Currency codes are validated by length only (3 characters) to support:\n * - Standard ISO 4217 codes (USD, EUR, CNY, etc.)\n * - Cryptocurrency codes (BTC, ETH, etc.)\n * - Custom business-specific codes\n * Stricter validation can be implemented at the application layer based on business requirements.\n */\nexport const CurrencyConfigSchema = lazySchema(() => z.object({\n precision: z.number().int().min(0).max(10).default(2).describe('Decimal precision (default: 2)'),\n currencyMode: z.enum(['dynamic', 'fixed']).default('dynamic').describe('Currency mode: dynamic (user selectable) or fixed (single currency)'),\n defaultCurrency: z.string().length(3).default('CNY').describe('Default or fixed currency code (ISO 4217, e.g., USD, CNY, EUR)'),\n}));\n\n/**\n * Currency Value Schema\n * Runtime value structure for currency fields\n * \n * Note: Currency codes are validated by length only (3 characters) to support flexibility.\n * See CurrencyConfigSchema for details on currency code validation strategy.\n */\nexport const CurrencyValueSchema = lazySchema(() => z.object({\n value: z.number().describe('Monetary amount'),\n currency: z.string().length(3).describe('Currency code (ISO 4217)'),\n}));\n\n/**\n * Address Schema\n * Structured address for address field type\n */\nexport const AddressSchema = lazySchema(() => z.object({\n street: z.string().optional().describe('Street address'),\n city: z.string().optional().describe('City name'),\n state: z.string().optional().describe('State/Province'),\n postalCode: z.string().optional().describe('Postal/ZIP code'),\n country: z.string().optional().describe('Country name or code'),\n countryCode: z.string().optional().describe('ISO country code (e.g., US, GB)'),\n formatted: z.string().optional().describe('Formatted address string'),\n}));\n\n/**\n * Data Quality Rules Schema\n * Defines data quality validation and monitoring for fields\n * \n * @example Unique SSN field with completeness requirement\n * {\n * uniqueness: true,\n * completeness: 0.95, // 95% of records must have this field\n * accuracy: {\n * source: 'government_db',\n * threshold: 0.98\n * }\n * }\n */\nexport const DataQualityRulesSchema = lazySchema(() => z.object({\n /** Enforce uniqueness constraint */\n uniqueness: z.boolean().default(false).describe('Enforce unique values across all records'),\n \n /** Completeness ratio (0-1) indicating minimum percentage of non-null values */\n completeness: z.number().min(0).max(1).default(0).describe('Minimum ratio of non-null values (0-1, default: 0 = no requirement)'),\n \n /** Accuracy validation against authoritative source */\n accuracy: z.object({\n source: z.string().describe('Reference data source for validation (e.g., \"api.verify.com\", \"master_data\")'),\n threshold: z.number().min(0).max(1).describe('Minimum accuracy threshold (0-1, e.g., 0.95 = 95% match required)'),\n }).optional().describe('Accuracy validation configuration'),\n}));\n\n/**\n * Computed Field Caching Schema\n * Configuration for caching computed/formula field results\n * \n * @example Cache product price with 1-hour TTL, invalidate on inventory changes\n * {\n * enabled: true,\n * ttl: 3600,\n * invalidateOn: ['inventory.quantity', 'pricing.discount']\n * }\n */\nexport const ComputedFieldCacheSchema = lazySchema(() => z.object({\n /** Enable caching for this computed field */\n enabled: z.boolean().describe('Enable caching for computed field results'),\n \n /** Time-to-live in seconds */\n ttl: z.number().min(0).describe('Cache TTL in seconds (0 = no expiration)'),\n \n /** Array of field paths that trigger cache invalidation when changed */\n invalidateOn: z.array(z.string()).describe('Field paths that invalidate cache (e.g., [\"inventory.quantity\", \"pricing.base_price\"])'),\n}));\n\n/**\n * Field Schema - Best Practice Enterprise Pattern\n */\n/**\n * Field Definition Schema\n * Defines the properties, type, and behavior of a single field (column) on an object.\n * \n * @example Lookup Field\n * {\n * name: \"account_id\",\n * label: \"Account\",\n * type: \"lookup\",\n * reference: \"accounts\",\n * required: true\n * }\n * \n * @example Select Field\n * {\n * name: \"status\",\n * label: \"Status\",\n * type: \"select\",\n * options: [\n * { label: \"Open\", value: \"open\" },\n * { label: \"Closed\", value: \"closed\" }\n * ],\n * defaultValue: \"open\"\n * }\n */\nexport const FieldSchema = lazySchema(() => z.object({\n /** Identity */\n name: z.string().regex(/^[a-z_][a-z0-9_]*$/).describe('Machine name (snake_case)').optional(),\n label: z.string().optional().describe('Human readable label'),\n type: FieldType.describe('Field Data Type'),\n description: z.string().optional().describe('Tooltip/Help text'),\n format: z.string().optional().describe('Format string (e.g. email, phone)'),\n\n // `columnName` removed in the 16.x line (#2377, ADR-0049): the SQL driver\n // hardcodes the physical column = field key (createColumn never reads it), so\n // a custom column name was silently ignored. External/federated objects map\n // physical columns via `external.columnMap` (ADR-0062 D7 / ADR-0015).\n\n /** Database Constraints */\n required: z.boolean().default(false).describe('Is required'),\n searchable: z.boolean().default(false).describe('Is searchable'),\n multiple: z.boolean().default(false).describe('Allow multiple values (Stores as Array/JSON). Applicable for select, lookup, file, image.'),\n unique: z.boolean().default(false).describe('Is unique constraint'),\n defaultValue: z.unknown().optional().describe('Default value'),\n \n /** Text/String Constraints */\n maxLength: z.number().optional().describe('Max character length'),\n minLength: z.number().optional().describe('Min character length'),\n \n /** Number Constraints */\n precision: z.number().optional().describe('Total digits'),\n scale: z.number().optional().describe('Decimal places'),\n min: z.number().optional().describe('Minimum value'),\n max: z.number().optional().describe('Maximum value'),\n\n /** Selection Options */\n options: z.array(SelectOptionSchema).optional().describe('Static options for select/multiselect'),\n\n /**\n * Relationship Config\n * \n * Used by `lookup` and `master_detail` field types to define cross-object references.\n * The `reference` property is **required** for these types — it identifies the target\n * object whose records this field links to. The engine uses `reference` during $expand\n * post-processing to resolve foreign key IDs into full related objects via batch queries.\n * \n * For `master_detail` fields, the parent record controls the lifecycle of child records\n * (e.g., cascade delete). For `lookup` fields, the reference is a soft link.\n */\n reference: z.string().optional().describe(\n 'Target object name (snake_case) for lookup/master_detail fields. '\n + 'Required for relationship types. Used by $expand to resolve foreign key IDs into full objects.'\n ),\n // `referenceFilters` (string[]) removed in the 16.x line (#2377, ADR-0049):\n // the lookup picker reads the structured `lookupFilters` ({field,operator,value}),\n // never this string[] form — as authored it filtered nothing. Use `lookupFilters`.\n deleteBehavior: z.enum(['set_null', 'cascade', 'restrict']).optional().default('set_null').describe('What happens if referenced record is deleted'),\n /**\n * Master-detail INLINE EDITING. On a child's `master_detail`/`lookup` field\n * (whose `reference` is the parent object), declare that \"this child is\n * entered/edited inline within the parent's form\". The parent's standard\n * create/edit form then renders the children and saves parent + children in\n * ONE atomic transaction — no form view config and no bespoke page. The intent\n * lives here in the data model; forms derive the UI.\n *\n * The value also selects the EDITING FORM FACTOR:\n * - `true` → auto: the UI picks `grid` or `form` from the child's shape\n * (rich types / many fields → `form`, else `grid`).\n * - `'grid'` → an editable line-item grid (fast bulk entry; thin children\n * like invoice lines / order items).\n * - `'form'` → a compact read-only list; \"Add\" / per-row edit opens the\n * child's FULL form (fat children with rich types, e.g. long\n * text, attachments, many fields).\n * Use for true line-item/composition children; leave off for associations\n * (comments, attachments) — surface those as detail-page related lists.\n */\n inlineEdit: z.union([z.boolean(), z.enum(['grid', 'form'])]).optional().describe('Edit these child records inline within the parent\\'s form (atomic master-detail). true = auto-pick grid/form by child shape; \\'grid\\' = editable line-item grid; \\'form\\' = list + per-row full form.'),\n /** Optional section title for the inline grid (defaults to the child object label). */\n inlineTitle: z.string().optional().describe('Title for the inline master-detail grid'),\n /** Optional explicit grid columns for the inline editor (derived from the child object when omitted). */\n inlineColumns: z.array(z.any()).optional().describe('Explicit columns for the inline grid (derived from the child object when omitted)'),\n /** Optional numeric child field summed for the inline grid running total. */\n inlineAmountField: z.string().optional().describe('Numeric child field summed for the inline grid total'),\n\n /**\n * Detail-page RELATED LIST — the read-side mirror of `inlineEdit`. On a\n * child's `master_detail`/`lookup` field (whose `reference` is the parent),\n * this governs whether/how the child collection appears as a related list on\n * the parent's record DETAIL page. Owned children (`master_detail`) and\n * `lookup` children are shown by default (derived from the relationship);\n * set `relatedList: false` to suppress a child from the detail page (e.g.\n * noisy audit/association links you don't want surfaced). Where `inlineEdit`\n * pulls a child INTO the parent's entry form (write side), `relatedList`\n * controls its appearance on the parent's detail page (read side). The intent\n * lives here in the data model; the detail page derives the UI.\n *\n * Tri-state (ADR-0085 semantic-role style — this is a PROMINENCE hint, NOT a\n * layout switch):\n * - `false` → suppress this child from the parent's detail page.\n * - `true` / absent → shown; stacks with the other non-primary children\n * under a single shared \"Related\" tab. Only `'primary'`\n * earns its own tab — there is no count-based auto-split.\n * - `'primary'` → CORE relationship: always surfaced prominently. The\n * detail renderer promotes it to its own tab regardless\n * of child count. This states business intent (true\n * across every surface — detail tab, mobile card, AI\n * summary, search facet); \"primary → own tab\" is only\n * the DETAIL renderer's interpretation. Being prominence\n * (not a `relatedLayout` switch) is what admits it to the\n * object model under ADR-0085's admission test.\n */\n relatedList: z.union([z.boolean(), z.literal('primary')]).optional().describe('Show this child collection as a related list on the parent\\'s detail page (read-side mirror of inlineEdit). false = suppress; true/absent = shown (stacked under the shared \"Related\" tab); \\'primary\\' = core relationship, promoted to its own tab. Prominence intent, not a layout switch (ADR-0085).'),\n /** Optional section title for the detail-page related list (defaults to the child object label). */\n relatedListTitle: z.string().optional().describe('Title for the detail-page related list'),\n /** Optional explicit columns for the detail-page related list (derived from the child object when omitted). */\n relatedListColumns: z.array(z.any()).optional().describe('Explicit columns for the detail-page related list (derived from the child object when omitted)'),\n\n /**\n * LOOKUP PICKER (forward) config — how THIS lookup/master_detail field's\n * record picker presents and scopes candidate records when the user selects a\n * related record. Read-side mirror is relatedList* (the PARENT's detail-page\n * list of children); these configure the CHILD-side picker that chooses the\n * parent. All optional: the renderer auto-derives a sensible multi-column\n * result from the referenced object's schema when omitted (objectui\n * packages/fields: LookupField / RecordPickerDialog / deriveLookupColumns,\n * which read both these camelCase keys and their snake_case aliases).\n */\n displayField: z.string().optional().describe(\"Field shown as each candidate's label in the picker/popover (defaults to the referenced object's name/title).\"),\n descriptionField: z.string().optional().describe('Secondary field shown under the label in the quick-select popover.'),\n lookupColumns: z.array(z.union([z.string(), z.object({\n field: z.string(),\n label: z.string().optional(),\n width: z.string().optional(),\n type: z.string().optional(),\n })])).optional().describe('Explicit columns for the record-picker table; auto-derived from the referenced object when omitted.'),\n lookupPageSize: z.number().int().positive().optional().describe('Rows per page in the record-picker dialog (default 10).'),\n lookupFilters: z.array(z.object({\n field: z.string(),\n operator: z.enum(['eq', 'ne', 'gt', 'lt', 'gte', 'lte', 'contains', 'in', 'notIn']),\n value: z.any(),\n })).optional().describe('Base filters restricting which records are selectable (e.g. only active). The structured, picker-honoured lookup filter.'),\n dependsOn: z.array(z.union([z.string(), z.object({\n field: z.string(),\n param: z.string().optional(),\n })])).optional().describe(\"Declares that this field's available values depend on the value of other field(s) on the same record — the form gates the field until they are set and re-evaluates as they change. For `lookup`/`master_detail` it scopes the candidate query (string = same local/remote key; {field,param} when the remote filter key differs — the {field,param} form is lookup-only). For `select`/`multiselect`/`radio` the actual per-option rule lives in each option's `visibleWhen`; list the referenced fields here (string form) so the option list gates and refreshes with the parent.\"),\n allowCreate: z.boolean().optional().describe('Allow inline quick-create from the record picker: when no match exists the user can create a record from the typed text (optimistic dataSource.create with the display field). Best for simple objects whose only required field is the display field.'),\n\n /** Calculation — CEL formula. Plain string accepted for back-compat; build emits canonical envelope. */\n expression: ExpressionInputSchema.optional().describe('Formula expression (CEL). e.g. F`record.amount * 0.1`'),\n /**\n * The value type a `formula` field computes, declared at authoring (the way\n * Salesforce/Airtable carry a formula's result type). Lets consumers — dataset\n * measures, display formatting, validation — read a declared type instead of\n * re-parsing the expression. Authoring stamps it from the inferred CEL type;\n * absent when the type can't be proven (an ambiguous/`dyn` expression).\n */\n returnType: z.enum(['number', 'text', 'boolean', 'date']).optional()\n .describe('Inferred value type of a formula field (number/text/boolean/date)'),\n summaryOperations: z.object({\n object: z.string().describe('Source child object name for roll-up'),\n field: z.string().describe('Field on child object to aggregate (ignored for count)'),\n function: z.enum(['count', 'sum', 'min', 'max', 'avg']).describe('Aggregation function to apply'),\n relationshipField: z.string().optional().describe('FK field on the child pointing back to this parent. Auto-detected from the child\\'s lookup/master_detail field referencing this object when omitted; set explicitly only when the child has more than one such reference.'),\n /**\n * Optional predicate that restricts WHICH child rows are aggregated — a\n * FilterCondition (the same object DSL as a query `where`), evaluated against\n * each child row. Omit to aggregate every child. This is what lets several\n * summaries roll up the SAME child object into different totals — e.g.\n * `content_publication.total_signups` = count of engagement rows where\n * `{ type: 'signup' }` vs `total_clicks` where `{ type: 'click' }`, or\n * `procurement_order.received_amount` = sum of receipt lines where\n * `{ status: 'received' }`. The engine ANDs it with the parent-FK match, so\n * a child moving in or out of the predicate (a status change) recomputes the\n * parent on its next write like any other child update.\n */\n filter: FilterConditionSchema.optional().describe(\"Predicate restricting which child rows are aggregated (a query `where` FilterCondition, e.g. { status: 'received' } or { type: { $in: ['signup','trial'] } }). Omit to aggregate all children. Lets one child object feed multiple filtered roll-ups.\"),\n }).optional().describe('Roll-up summary definition. The engine recomputes the value when child records are inserted/updated/deleted.'),\n\n /** Enhanced Field Type Configurations */\n // Pruned 2026-06 — per-type *display* knobs that were dead in both layers (no\n // runtime reader; renderers ignore them). See\n // docs/audits/2026-06-dead-surface-disposition-plan.md (P2 field prune): code\n // theme/lineNumbers, rating allowHalf, location displayMap/allowGeocoding, address\n // addressFormat, color colorFormat/allowAlpha/presetColors, slider showValue/marks,\n // barcode/qr barcodeFormat/qrErrorCorrection/displayValue/allowScanning.\n language: z.string().optional().describe('Programming language for syntax highlighting (e.g., javascript, python, sql)'),\n step: z.number().optional().describe('Step increment for slider (default: 1)'),\n\n // Currency field config\n currencyConfig: CurrencyConfigSchema.optional().describe('Configuration for currency field type'),\n\n // Vector field — flat dimensionality (the live authoring path).\n // The renderer reads this flat sibling (objectui VectorField.tsx:11).\n dimensions: z.number().int().min(1).max(10000).optional().describe('Vector dimensionality (e.g., 1536 for OpenAI embeddings)'),\n\n /**\n * Track this field's value changes on the record **activity timeline**. When\n * TRUE, the platform's activity writer renders each change as a human-readable\n * entry (\"<label>: <old> → <new>\") instead of a generic \"Updated <object>\"\n * row — no app code required. Opt-in per field (cf. Salesforce Feed Tracking,\n * ServiceNow field auditing, Dataverse column auditing). The writer already\n * captures the field diff; this flag controls whether it is surfaced legibly.\n *\n * Unlike the pruned `auditTrail` below, this flag HAS a runtime consumer\n * (`@objectstack/plugin-audit` audit-writers), satisfying enforce-or-remove\n * (ADR-0049). See ADR-0052 §5b.\n */\n trackHistory: z.boolean().optional().describe(\"Render this field's value changes as human-readable entries on the record activity timeline (ADR-0052 §5b). Opt-in per field.\"),\n\n // Pruned 2026-06 (dead in both layers — aspirational governance with no runtime\n // consumer; encryption/masking implied at-rest protection that never happened —\n // the real channel is type:'secret'). See\n // docs/audits/2026-06-dead-surface-disposition-plan.md (P0/P2 field prune):\n // encryptionConfig, maskingRule, auditTrail, cached, dataQuality.\n\n /** Layout & Grouping */\n group: z.string().optional().describe('Field group name for organizing fields in forms and layouts (e.g., \"contact_info\", \"billing\", \"system\")'),\n\n /**\n * Conditional field rules (CEL predicates over `record`). Evaluated on BOTH\n * sides: the client form toggles the field's visibility / read-only / required\n * state live as the record changes (UX), and the server enforces\n * `requiredWhen` and ignores writes to a field whose `readonlyWhen` is TRUE\n * (so the rule can't be bypassed). e.g. `P\\`record.status == 'paid'\\``.\n */\n visibleWhen: ExpressionInputSchema.optional().describe(\"Predicate (CEL) — field is shown only when TRUE (else hidden). e.g. P`record.type == 'invoice'`\"),\n readonlyWhen: ExpressionInputSchema.optional().describe(\"Predicate (CEL) — field is read-only when TRUE. e.g. P`record.status == 'paid'`\"),\n requiredWhen: ExpressionInputSchema.optional().describe(\"Predicate (CEL) — field is required when TRUE. Canonical name for `conditionalRequired`.\"),\n\n /** Conditional Requirements\n * @deprecated Alias of `requiredWhen` — kept for back-compat. */\n conditionalRequired: ExpressionInputSchema.optional().describe('Predicate (CEL) — field is required when TRUE. Alias of `requiredWhen`.'),\n\n /**\n * Form widget override. Names a registered field/UI component to render this\n * field with, overriding the default widget derived from `type`. Honored by\n * the generic object form (objectui `ObjectForm`/`form.tsx` resolve\n * `widget || type`, looking the value up as `field:<widget>` in the component\n * registry). Use it when the raw `type` renderer would force a user to type\n * machine data that should be *picked* instead — e.g. an object-name field\n * (`widget: 'object-ref'`), a stored FilterCondition (`widget:\n * 'filter-condition'`), or a recipient reference whose target depends on a\n * sibling field (`widget: 'recipient-picker'`). Unknown/unregistered values\n * fall back to the `type` renderer, so it degrades safely.\n */\n widget: z.string().optional().describe('Form widget override — names a registered field component (resolved as `field:<widget>`) to render this field instead of the `type` default. Degrades to the `type` renderer when unregistered. e.g. \"object-ref\", \"filter-condition\", \"recipient-picker\".'),\n\n /** Security & Visibility */\n hidden: z.boolean().default(false).describe('Hidden from default UI'),\n readonly: z.boolean().default(false).describe('Read-only — never editable in forms, AND server-enforced on BOTH write paths: a non-system write to this field is silently dropped from the payload on UPDATE (#2948/#3003) and on INSERT (#3043; a create can no longer directly seed e.g. `approval_status: \"approved\"`), symmetric with `readonlyWhen`. A stripped INSERT field still falls back to its `defaultValue`; system-context writes (import, seed replay, migration) are exempt.'),\n\n /**\n * [ADR-0066 D3] Capabilities required to READ/EDIT this field. A field\n * declaring `requiredPermissions` is masked on read and denied on write unless\n * the caller holds ALL listed capabilities — an AND-gate that is strictest-wins\n * over permission-set field grants. Enforced by plugin-security's FieldMasker.\n */\n requiredPermissions: z.array(z.string()).optional().describe('[ADR-0066 D3] Capabilities required to read/edit this field (mask on read, deny on write; AND-gate).'),\n system: z.boolean().optional().describe('Auto-injected system/audit field (e.g. created_at, updated_by, organization_id). Tools that surface system fields separately from author-declared business fields should branch on this flag.'),\n sortable: z.boolean().optional().default(true).describe('Whether field is sortable in list views'),\n inlineHelpText: z.string().optional().describe('Help text displayed below the field in forms'),\n /**\n * Auto-number display format. Literal text interleaved with `{...}` tokens:\n *\n * - `{0000}` — the sequence counter, zero-padded to that many digits as a\n * MINIMUM width (at most one slot; omit it and the bare number is\n * appended). Past that width the number simply grows — it never wraps.\n * - `{YYYY} {YY} {MM} {DD} {YYYYMMDD}` — generation date in the request's\n * business timezone (`ExecutionContext.timezone`, ADR-0053; UTC fallback).\n * - `{field_name}` — the value of another field on the SAME record\n * (e.g. `{island_zone}`, `{plan_no}`), interpolated as text.\n *\n * The counter is scoped to whatever renders BEFORE the `{0000}` slot, so the\n * period/group resets fall out automatically — no separate reset config:\n * - `AD{YYYYMMDD}{0000}` → `AD202606170032` (resets each day)\n * - `{section}{island_zone}{000}` → `JYG1A001` (per island)\n * - `{plan_no}{000}` → `…PROD20260617001001` (per parent record)\n * A fixed-prefix format with no date/field token (e.g. `CASE-{0000}`) keeps a\n * single global counter — fully backward compatible.\n *\n * A `{field}` token must name an EXISTING field that is SET before the record\n * is created (mark it `required: true`). An empty interpolated field would\n * collapse the number into the wrong counter scope, so generation throws\n * instead; `objectstack compile` lints this (unknown field → build error,\n * optional field → warning).\n */\n autonumberFormat: z.string().optional().describe('Auto-number format: literal text + {0000} counter, {YYYY}/{MM}/{DD}/{YYYYMMDD} date tokens (business tz), and {field_name} interpolation. Counter resets per rendered prefix (e.g. AD{YYYYMMDD}{0000} resets daily).'),\n // `index` (field-level bool) removed in the 16.x line (#2377, ADR-0049): the\n // driver builds indexes from the object's `indexes[]` array; a field-level\n // `index: true` created no index. Declare the index in object `indexes[]`.\n externalId: z.boolean().default(false).describe('Is external ID for upsert operations'),\n}));\n\nexport type Field = z.infer<typeof FieldSchema>;\nexport type SelectOption = z.infer<typeof SelectOptionSchema>;\nexport type LocationCoordinates = z.infer<typeof LocationCoordinatesSchema>;\nexport type Address = z.infer<typeof AddressSchema>;\nexport type CurrencyConfig = z.infer<typeof CurrencyConfigSchema>;\nexport type CurrencyConfigInput = z.input<typeof CurrencyConfigSchema>;\nexport type CurrencyValue = z.infer<typeof CurrencyValueSchema>;\nexport type DataQualityRules = z.infer<typeof DataQualityRulesSchema>;\nexport type DataQualityRulesInput = z.input<typeof DataQualityRulesSchema>;\nexport type ComputedFieldCache = z.infer<typeof ComputedFieldCacheSchema>;\n\n/**\n * Field Factory Helper\n */\nexport type FieldInput = Omit<Partial<Field>, 'type'>;\n\nexport const Field = {\n text: (config: FieldInput = {}) => ({ type: 'text', ...config } as const),\n textarea: (config: FieldInput = {}) => ({ type: 'textarea', ...config } as const),\n number: (config: FieldInput = {}) => ({ type: 'number', ...config } as const),\n boolean: (config: FieldInput = {}) => ({ type: 'boolean', ...config } as const),\n date: (config: FieldInput = {}) => ({ type: 'date', ...config } as const),\n datetime: (config: FieldInput = {}) => ({ type: 'datetime', ...config } as const),\n currency: (config: FieldInput = {}) => ({ type: 'currency', ...config } as const),\n percent: (config: FieldInput = {}) => ({ type: 'percent', ...config } as const),\n url: (config: FieldInput = {}) => ({ type: 'url', ...config } as const),\n email: (config: FieldInput = {}) => ({ type: 'email', ...config } as const),\n phone: (config: FieldInput = {}) => ({ type: 'phone', ...config } as const),\n image: (config: FieldInput = {}) => ({ type: 'image', ...config } as const),\n file: (config: FieldInput = {}) => ({ type: 'file', ...config } as const),\n avatar: (config: FieldInput = {}) => ({ type: 'avatar', ...config } as const),\n formula: (config: FieldInput = {}) => ({ type: 'formula', ...config } as const),\n summary: (config: FieldInput = {}) => ({ type: 'summary', ...config } as const),\n autonumber: (config: FieldInput = {}) => ({ type: 'autonumber', ...config } as const),\n markdown: (config: FieldInput = {}) => ({ type: 'markdown', ...config } as const),\n html: (config: FieldInput = {}) => ({ type: 'html', ...config } as const),\n password: (config: FieldInput = {}) => ({ type: 'password', ...config } as const),\n /**\n * Secret field — reversible encrypted-at-rest value (DB password, API key,\n * token). Encrypted on write to `sys_secret` via the registered\n * ICryptoProvider; only an opaque ref is persisted on the row; masked on\n * read. Distinct from `password` (one-way hash, owned by the auth subsystem).\n */\n secret: (config: FieldInput = {}) => ({ type: 'secret', ...config } as const),\n \n /**\n * Select field helper with backward-compatible API\n * \n * Automatically converts option values to lowercase to enforce naming conventions.\n * \n * @example Old API (array first) - auto-converts to lowercase\n * Field.select(['High', 'Low'], { label: 'Priority' })\n * // Results in: [{ label: 'High', value: 'high' }, { label: 'Low', value: 'low' }]\n * \n * @example New API (config object) - enforces lowercase\n * Field.select({ options: [{label: 'High', value: 'high'}], label: 'Priority' })\n * \n * @example Multi-word values - converts to snake_case\n * Field.select(['In Progress', 'Closed Won'], { label: 'Status' })\n * // Results in: [{ label: 'In Progress', value: 'in_progress' }, { label: 'Closed Won', value: 'closed_won' }]\n */\n select: (optionsOrConfig: SelectOption[] | string[] | FieldInput & { options: SelectOption[] | string[] }, config?: FieldInput) => {\n // Helper function to convert string to lowercase snake_case\n const toSnakeCase = (str: string): string => {\n return str\n .toLowerCase()\n .replace(/\\s+/g, '_') // Replace spaces with underscores\n .replace(/[^a-z0-9_]/g, ''); // Remove invalid characters (keeping underscores only)\n };\n\n // Support both old and new signatures:\n // Old: Field.select(['a', 'b'], { label: 'X' })\n // New: Field.select({ options: [{label: 'A', value: 'a'}], label: 'X' })\n let options: SelectOption[];\n let finalConfig: FieldInput;\n \n if (Array.isArray(optionsOrConfig)) {\n // Old signature: array as first param\n options = optionsOrConfig.map(o => \n typeof o === 'string' \n ? { label: o, value: toSnakeCase(o) } // Auto-convert string to snake_case\n : { ...o, value: o.value.toLowerCase() } // Ensure value is lowercase\n );\n finalConfig = config || {};\n } else {\n // New signature: config object with options\n options = (optionsOrConfig.options || []).map(o => \n typeof o === 'string' \n ? { label: o, value: toSnakeCase(o) } // Auto-convert string to snake_case\n : { ...o, value: o.value.toLowerCase() } // Ensure value is lowercase\n );\n // Remove options from config to avoid confusion\n const { options: _, ...restConfig } = optionsOrConfig;\n finalConfig = restConfig;\n }\n \n return { type: 'select', options, ...finalConfig } as const;\n },\n\n \n lookup: (reference: string, config: FieldInput = {}) => ({ \n type: 'lookup', \n reference, \n ...config \n } as const),\n \n masterDetail: (reference: string, config: FieldInput = {}) => ({\n type: 'master_detail',\n reference,\n ...config\n } as const),\n\n /**\n * User field — a person picker. Semantic specialization of `lookup` with the\n * target fixed to the `sys_user` system object: stored identically (FK string\n * column → sys_user.id; `multiple: true` ⇒ JSON array) and resolved via the same\n * $expand machinery. The distinct `user` type drives the Studio/AI field palette,\n * the user-search picker, and `current_user` defaults — without re-implementing\n * lookup storage.\n *\n * @example Single assignee\n * Field.user({ label: 'Assignee' })\n * @example Collaborators / watchers (multi)\n * Field.user({ label: 'Watchers', multiple: true })\n * @example Auto-fill the acting user on create\n * Field.user({ label: 'Reporter', defaultValue: 'current_user' })\n */\n user: (config: FieldInput = {}) => ({\n type: 'user',\n reference: 'sys_user',\n ...config,\n } as const),\n\n // Enhanced Field Type Helpers\n location: (config: FieldInput = {}) => ({ \n type: 'location', \n ...config \n } as const),\n \n address: (config: FieldInput = {}) => ({ \n type: 'address', \n ...config \n } as const),\n \n richtext: (config: FieldInput = {}) => ({ \n type: 'richtext', \n ...config \n } as const),\n \n code: (language?: string, config: FieldInput = {}) => ({ \n type: 'code', \n language,\n ...config \n } as const),\n \n color: (config: FieldInput = {}) => ({ \n type: 'color', \n ...config \n } as const),\n \n rating: (max: number = 5, config: FieldInput = {}) => ({\n type: 'rating',\n max,\n ...config\n } as const),\n \n signature: (config: FieldInput = {}) => ({ \n type: 'signature', \n ...config \n } as const),\n \n slider: (config: FieldInput = {}) => ({ \n type: 'slider', \n ...config \n } as const),\n \n qrcode: (config: FieldInput = {}) => ({ \n type: 'qrcode', \n ...config \n } as const),\n \n json: (config: FieldInput = {}) => ({ \n type: 'json', \n ...config \n } as const),\n \n vector: (dimensions: number, config: FieldInput = {}) => ({\n type: 'vector',\n dimensions,\n ...config\n } as const),\n};\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * Shared HTTP Schemas\n * \n * Common HTTP-related schemas used across API and System protocols.\n * These schemas ensure consistency across different parts of the stack.\n */\n\n// ==========================================\n// Basic HTTP Types\n// ==========================================\n\n/**\n * HTTP Method Enum\n */\nimport { lazySchema } from './lazy-schema';\nexport const HttpMethod = z.enum([\n 'GET', \n 'POST', \n 'PUT', \n 'DELETE', \n 'PATCH', \n 'HEAD', \n 'OPTIONS'\n]);\n\nexport type HttpMethod = z.infer<typeof HttpMethod>;\n\n/**\n * HTTP Method Schema (subset for UI/View data sources)\n * Common HTTP methods used in view data source configurations.\n * Migrated from ui/view.zod.ts to shared for reuse across modules.\n */\nexport const HttpMethodSchema = lazySchema(() => z.enum(['GET', 'POST', 'PUT', 'PATCH', 'DELETE']));\n\nexport type HttpMethodType = z.infer<typeof HttpMethodSchema>;\n\n/**\n * HTTP Request Configuration Schema\n * Defines a complete HTTP request configuration used by API data providers.\n * Migrated from ui/view.zod.ts to shared for reuse across modules.\n */\nexport const HttpRequestSchema = lazySchema(() => z.object({\n url: z.string().describe('API endpoint URL'),\n method: HttpMethodSchema.optional().default('GET').describe('HTTP method'),\n headers: z.record(z.string(), z.string()).optional().describe('Custom HTTP headers'),\n params: z.record(z.string(), z.unknown()).optional().describe('Query parameters'),\n body: z.unknown().optional().describe('Request body for POST/PUT/PATCH'),\n}));\n\nexport type HttpRequest = z.infer<typeof HttpRequestSchema>;\n\n// ==========================================\n// CORS Configuration\n// ==========================================\n\n/**\n * CORS Configuration Schema\n * Cross-Origin Resource Sharing configuration\n * \n * Used by:\n * - api/router.zod.ts (RouterConfigSchema)\n * - system/http-server.zod.ts (HttpServerConfigSchema)\n * \n * @example\n * {\n * \"enabled\": true,\n * \"origins\": [\"http://localhost:3000\", \"https://app.example.com\"],\n * \"methods\": [\"GET\", \"POST\", \"PUT\", \"DELETE\"],\n * \"credentials\": true,\n * \"maxAge\": 86400\n * }\n */\nexport const CorsConfigSchema = lazySchema(() => z.object({\n /**\n * Enable CORS\n */\n enabled: z.boolean().default(true).describe('Enable CORS'),\n \n /**\n * Allowed origins (* for all)\n */\n origins: z.union([\n z.string(),\n z.array(z.string())\n ]).default('*').describe('Allowed origins (* for all)'),\n \n /**\n * Allowed HTTP methods\n */\n methods: z.array(HttpMethod).optional().describe('Allowed HTTP methods'),\n \n /**\n * Allow credentials (cookies, authorization headers)\n */\n credentials: z.boolean().default(false).describe('Allow credentials (cookies, authorization headers)'),\n \n /**\n * Preflight cache duration in seconds\n */\n maxAge: z.number().int().optional().describe('Preflight cache duration in seconds'),\n}));\n\nexport type CorsConfig = z.infer<typeof CorsConfigSchema>;\n\n// ==========================================\n// Rate Limiting\n// ==========================================\n\n/**\n * Rate Limit Configuration Schema\n * \n * Used by:\n * - api/endpoint.zod.ts (ApiEndpointSchema)\n * - system/http-server.zod.ts (HttpServerConfigSchema)\n * \n * @example\n * {\n * \"enabled\": true,\n * \"windowMs\": 60000,\n * \"maxRequests\": 100\n * }\n */\nexport const RateLimitConfigSchema = lazySchema(() => z.object({\n /**\n * Enable rate limiting\n */\n enabled: z.boolean().default(false).describe('Enable rate limiting'),\n \n /**\n * Time window in milliseconds\n */\n windowMs: z.number().int().default(60000).describe('Time window in milliseconds'),\n \n /**\n * Max requests per window\n */\n maxRequests: z.number().int().default(100).describe('Max requests per window'),\n}));\n\nexport type RateLimitConfig = z.infer<typeof RateLimitConfigSchema>;\n\n// ==========================================\n// Static File Serving\n// ==========================================\n\n/**\n * Static Mount Configuration Schema\n * Configuration for serving static files\n * \n * Used by:\n * - api/router.zod.ts (RouterConfigSchema)\n * - system/http-server.zod.ts (HttpServerConfigSchema)\n * \n * @example\n * {\n * \"path\": \"/static\",\n * \"directory\": \"./public\",\n * \"cacheControl\": \"public, max-age=31536000\"\n * }\n */\nexport const StaticMountSchema = lazySchema(() => z.object({\n /**\n * URL path to serve from\n */\n path: z.string().describe('URL path to serve from'),\n \n /**\n * Physical directory to serve\n */\n directory: z.string().describe('Physical directory to serve'),\n \n /**\n * Cache-Control header value\n */\n cacheControl: z.string().optional().describe('Cache-Control header value'),\n}));\n\nexport type StaticMount = z.infer<typeof StaticMountSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { ProtectionSchema } from '../shared/protection.zod';\nimport { MetadataProtectionFields } from '../kernel/metadata-protection.zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { ExpressionInputSchema } from '../shared/expression.zod';\nimport { normalizeVisibleWhen, strictVisibilityError } from '../shared/visibility';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\nimport { SharingConfigSchema } from './sharing.zod';\nimport { ResponsiveConfigSchema, PerformanceConfigSchema } from './responsive.zod';\nimport { FieldType, SelectOptionSchema } from '../data/field.zod';\n\n/**\n * HTTP Method Enum & HTTP Request Schema\n * Migrated to shared/http.zod.ts. Re-exported here for backward compatibility.\n */\nimport { HttpMethodSchema, HttpRequestSchema } from '../shared/http.zod';\nimport { lazySchema } from '../shared/lazy-schema';\nexport { HttpMethodSchema, HttpRequestSchema };\n\n/**\n * View Data Source Configuration\n * Supports three modes:\n * 1. 'object': Standard Protocol - Auto-connects to ObjectStack Metadata and Data APIs\n * 2. 'api': Custom API - Explicitly provided API URLs\n * 3. 'value': Static Data - Hardcoded data array\n */\nexport const ViewDataSchema = lazySchema(() => z.discriminatedUnion('provider', [\n z.object({\n provider: z.literal('object'),\n object: z.string().describe('Target object name'),\n }),\n z.object({\n provider: z.literal('api'),\n read: HttpRequestSchema.optional().describe('Configuration for fetching data'),\n write: HttpRequestSchema.optional().describe('Configuration for submitting data (for forms/editable tables)'),\n }),\n z.object({\n provider: z.literal('value'),\n items: z.array(z.unknown()).describe('Static data array'),\n }),\n /**\n * Schema-bound data source — used by standalone forms whose data is\n * shaped by a JSON Schema (or Zod-derived schema) rather than by an\n * ObjectQL object. Powers the metadata editor, action input dialogs,\n * and any Form that is not bound to a CRUD object.\n */\n z.object({\n provider: z.literal('schema'),\n /** Schema identifier (e.g. metadata type name \"report\"). Resolved at runtime against /meta entries. */\n schemaId: z.string().describe('Schema identifier — typically the metadata type name'),\n /** Optional inline JSON Schema; when omitted the runtime resolves schemaId from the server. */\n schema: z.record(z.string(), z.unknown()).optional().describe('Inline JSON Schema (Draft 2020-12). Optional when schemaId is resolvable.'),\n }),\n]));\n\n/**\n * Canonical filter operators for view filter rules.\n *\n * This is the SINGLE authoring vocabulary for `ViewFilterRule.operator`.\n * Exposing it as an enum (rather than a free `z.string()`) lets JSON-Schema\n * consumers — notably ObjectUI's SchemaForm — auto-render an operator\n * dropdown, and rejects genuinely unknown operators at parse time.\n *\n * Unary operators (`is_empty`, `is_not_empty`, `is_null`, `is_not_null`) take\n * no `value`. `before` / `after` are the date-friendly spellings of\n * `less_than` / `greater_than`; `between` expects a two-element `value` array.\n *\n * Note: relative-date operators (`this_quarter`, `last_7_days`, …) are NOT\n * filter-rule operators — they are date-range presets and live on dashboard\n * date-range config (`DashboardFilterSchema.defaultRange`), not here.\n */\nexport const VIEW_FILTER_OPERATORS = [\n 'equals', 'not_equals',\n 'contains', 'not_contains',\n 'starts_with', 'ends_with',\n 'greater_than', 'less_than',\n 'greater_than_or_equal', 'less_than_or_equal',\n 'in', 'not_in',\n 'is_empty', 'is_not_empty',\n 'is_null', 'is_not_null',\n 'before', 'after', 'between',\n] as const;\n\nexport type ViewFilterOperator = (typeof VIEW_FILTER_OPERATORS)[number];\n\n/**\n * Legacy operator spellings normalized to the canonical vocabulary above.\n *\n * These are historical shorthand (`eq`, `gt`) and camelCase (`notEquals`,\n * `greaterThan`) forms that older authoring tools and already-stored view\n * metadata may still carry. They are folded to canonical on parse so every\n * downstream consumer sees exactly one vocabulary — one strict contract, not\n * N dialects. Deprecated: new producers MUST emit the canonical forms; these\n * aliases are a migration bridge and may be dropped in a future major.\n */\nexport const VIEW_FILTER_OPERATOR_ALIASES: Record<string, ViewFilterOperator> = {\n eq: 'equals',\n ne: 'not_equals', neq: 'not_equals', notequals: 'not_equals', notEquals: 'not_equals',\n notcontains: 'not_contains', notContains: 'not_contains',\n startswith: 'starts_with', startsWith: 'starts_with',\n endswith: 'ends_with', endsWith: 'ends_with',\n gt: 'greater_than', greaterthan: 'greater_than', greaterThan: 'greater_than',\n lt: 'less_than', lessthan: 'less_than', lessThan: 'less_than',\n gte: 'greater_than_or_equal', greaterorequal: 'greater_than_or_equal',\n greaterOrEqual: 'greater_than_or_equal', greaterThanOrEqual: 'greater_than_or_equal',\n lte: 'less_than_or_equal', lessorequal: 'less_than_or_equal',\n lessOrEqual: 'less_than_or_equal', lessThanOrEqual: 'less_than_or_equal',\n nin: 'not_in', notin: 'not_in', notIn: 'not_in',\n isempty: 'is_empty', isEmpty: 'is_empty',\n isnotempty: 'is_not_empty', isNotEmpty: 'is_not_empty',\n isnull: 'is_null', isNull: 'is_null',\n isnotnull: 'is_not_null', isNotNull: 'is_not_null',\n};\n\n/**\n * Fold a legacy operator spelling to its canonical form. Returns canonical\n * operators unchanged, maps known aliases, and returns unknown input verbatim\n * (so the enum's own validation reports it as invalid). Exported so producers\n * and renderers can normalize stored metadata against the SAME canonical map\n * the schema uses, instead of inventing a second dialect.\n */\nexport function normalizeFilterOperator(op: unknown): string {\n if (typeof op !== 'string') return op as string;\n if ((VIEW_FILTER_OPERATORS as readonly string[]).includes(op)) return op;\n return VIEW_FILTER_OPERATOR_ALIASES[op] ?? VIEW_FILTER_OPERATOR_ALIASES[op.toLowerCase()] ?? op;\n}\n\n/**\n * View Filter Rule Schema\n * Standardized filter condition used in list views, tabs, and page-level filters.\n * Uses a declarative array-of-objects format: [{ field, operator, value }].\n *\n * @example\n * ```ts\n * filter: [\n * { field: 'status', operator: 'equals', value: 'active' },\n * { field: 'close_date', operator: 'after', value: '2024-01-01' },\n * { field: 'archived_at', operator: 'is_empty' },\n * ]\n * ```\n */\nexport const ViewFilterRuleSchema = lazySchema(() => z.object({\n /** Field name to filter on */\n field: z.string().describe('Field name to filter on'),\n /**\n * Filter operator (canonical vocabulary). Legacy shorthand/camelCase\n * spellings (`eq`, `gt`, `isNull`, …) are accepted and normalized to\n * canonical on parse.\n */\n operator: z.preprocess(normalizeFilterOperator, z.enum(VIEW_FILTER_OPERATORS))\n .describe('Filter operator'),\n /** Filter value (optional for unary operators like is_empty, is_null) */\n value: z.union([z.string(), z.number(), z.boolean(), z.null(), z.array(z.union([z.string(), z.number()]))])\n .optional().describe('Filter value'),\n}).describe('View filter rule'));\n\nexport type ViewFilterRule = z.infer<typeof ViewFilterRuleSchema>;\n\n/**\n * Column Summary Function Schema\n * Aggregation function for column footer (Airtable-style column summaries)\n */\nexport const ColumnSummarySchema = lazySchema(() => z.enum([\n 'none',\n 'count',\n 'count_empty',\n 'count_filled',\n 'count_unique',\n 'percent_empty',\n 'percent_filled',\n 'sum',\n 'avg',\n 'min',\n 'max',\n]).describe('Aggregation function for column footer summary'));\n\n/**\n * List Column Configuration Schema\n * Detailed configuration for individual list view columns\n */\nexport const ListColumnSchema = lazySchema(() => z.object({\n field: z.string().describe('Field name (snake_case)'),\n label: I18nLabelSchema.optional().describe('Display label override'),\n width: z.number().positive().optional().describe('Column width in pixels'),\n align: z.enum(['left', 'center', 'right']).optional().describe('Text alignment'),\n hidden: z.boolean().optional().describe('Hide column by default'),\n sortable: z.boolean().optional().describe('Allow sorting by this column'),\n resizable: z.boolean().optional().describe('Allow resizing this column'),\n wrap: z.boolean().optional().describe('Allow text wrapping'),\n type: z.string().optional().describe('Renderer type override (e.g., \"currency\", \"date\")'),\n\n /** Pinning (Airtable-style frozen columns) */\n pinned: z.enum(['left', 'right']).optional().describe('Pin/freeze column to left or right side'),\n\n /** Column Footer Summary (Airtable-style aggregation) */\n summary: ColumnSummarySchema.optional().describe('Footer aggregation function for this column'),\n\n /** Interaction */\n link: z.boolean().optional().describe('Functions as the primary navigation link (triggers View navigation)'),\n action: z.string().optional().describe('Registered Action ID to execute when clicked'),\n}));\n\n/**\n * List View Selection Configuration\n */\nexport const SelectionConfigSchema = lazySchema(() => z.object({\n type: z.enum(['none', 'single', 'multiple']).default('none').describe('Selection mode'),\n}));\n\n/**\n * List View Pagination Configuration\n */\nexport const PaginationConfigSchema = lazySchema(() => z.object({\n pageSize: z.number().int().positive().default(25).describe('Number of records per page'),\n pageSizeOptions: z.array(z.number().int().positive()).optional().describe('Available page size options'),\n}));\n\n/**\n * Row Height / Density Schema (Airtable-style)\n * Controls the visual density of rows in a list view.\n */\nexport const RowHeightSchema = lazySchema(() => z.enum([\n 'compact', // Minimal padding, single line\n 'short', // Reduced padding\n 'medium', // Default padding\n 'tall', // Extra padding, multi-line preview\n 'extra_tall', // Maximum padding, rich content preview\n]).describe('Row height / density setting for list view'));\n\n/**\n * Grouping Field Configuration\n * Defines a single grouping level for record grouping.\n */\nexport const GroupingFieldSchema = lazySchema(() => z.object({\n field: z.string().describe('Field name to group by'),\n order: z.enum(['asc', 'desc']).default('asc').describe('Group sort order'),\n collapsed: z.boolean().default(false).describe('Collapse groups by default'),\n}));\n\n/**\n * Grouping Configuration Schema (Airtable-style)\n * Supports multi-level grouping for grid/gallery views.\n */\nexport const GroupingConfigSchema = lazySchema(() => z.object({\n fields: z.array(GroupingFieldSchema).min(1).describe('Fields to group by (supports up to 3 levels)'),\n}).describe('Record grouping configuration'));\n\n/**\n * Gallery View Configuration (Airtable-style)\n * Configures card layout for gallery/card views.\n */\nexport const GalleryConfigSchema = lazySchema(() => z.object({\n coverField: z.string().optional().describe('Attachment/image field to display as card cover'),\n coverFit: z.enum(['cover', 'contain']).default('cover').describe('Image fit mode for card cover'),\n cardSize: z.enum(['small', 'medium', 'large']).default('medium').describe('Card size in gallery view'),\n titleField: z.string().optional().describe('Field to display as card title'),\n visibleFields: z.array(z.string()).optional().describe('Fields to display on card body'),\n}).describe('Gallery/card view configuration'));\n\n/**\n * Timeline View Configuration (Airtable-style)\n * Configures timeline/chronological views.\n */\nexport const TimelineConfigSchema = lazySchema(() => z.object({\n startDateField: z.string().describe('Field for timeline item start date'),\n endDateField: z.string().optional().describe('Field for timeline item end date'),\n titleField: z.string().describe('Field to display as timeline item title'),\n groupByField: z.string().optional().describe('Field to group timeline rows'),\n colorField: z.string().optional().describe('Field to determine item color'),\n scale: z.enum(['hour', 'day', 'week', 'month', 'quarter', 'year']).default('week').describe('Default timeline scale'),\n}).describe('Timeline view configuration'));\n\n/**\n * View Sharing Configuration (Airtable-style)\n * Defines who can see and modify a view.\n */\nexport const ViewSharingSchema = lazySchema(() => z.object({\n type: z.enum(['personal', 'collaborative']).default('collaborative').describe('View ownership type'),\n lockedBy: z.string().optional().describe('User who locked the view configuration'),\n}).describe('View sharing and access configuration'));\n\n/**\n * Row Color Configuration (Airtable-style)\n * Defines how rows are colored based on field values.\n */\nexport const RowColorConfigSchema = lazySchema(() => z.object({\n field: z.string().describe('Field to derive color from (typically a select/status field)'),\n colors: z.record(z.string(), z.string()).optional().describe('Map of field value to color (hex/token)'),\n}).describe('Row color configuration based on field values'));\n\n/**\n * Visualization Type Schema\n * Whitelist of visualization types the user can switch between.\n * Maps to Airtable's \"Visualizations\" setting in Appearance panel.\n */\nexport const VisualizationTypeSchema = lazySchema(() => z.enum([\n 'grid',\n 'kanban',\n 'gallery',\n 'calendar',\n 'timeline',\n 'gantt',\n 'map',\n 'chart',\n 'tree',\n]).describe('Visualization type that users can switch to'));\n\n/**\n * User Actions Configuration Schema (Airtable Interface parity)\n * Controls which interactive actions are available to users in the view toolbar.\n * Each boolean toggles the corresponding toolbar element on/off.\n *\n * @see Airtable Interface → \"User actions\" panel\n */\nexport const UserActionsConfigSchema = lazySchema(() => z.object({\n sort: z.boolean().default(true).describe('Allow users to sort records'),\n search: z.boolean().default(true).describe('Allow users to search records'),\n filter: z.boolean().default(true).describe('Allow users to filter records'),\n refresh: z.boolean().default(true).describe('Allow users to reload the view data from the backend without a full page reload'),\n rowHeight: z.boolean().default(true).describe('Allow users to toggle row height/density'),\n addRecordForm: z.boolean().default(false).describe('Add records through a form instead of inline'),\n editInline: z.boolean().default(false).describe('Allow users to edit records inline — click a cell to edit it with the field\\'s type-aware widget (the same control the form uses). Off by default: the list is read-only unless the author opts in.'),\n buttons: z.array(z.string()).optional().describe('Custom action button IDs to show in the toolbar'),\n}).describe('User action toggles for the view toolbar'));\n\n/**\n * Appearance Configuration Schema (Airtable Interface parity)\n * Controls visual presentation options for the view.\n *\n * @see Airtable Interface → \"Appearance\" panel\n */\nexport const AppearanceConfigSchema = lazySchema(() => z.object({\n showDescription: z.boolean().default(true).describe('Show the view description text'),\n allowedVisualizations: z.array(VisualizationTypeSchema).optional()\n .describe('Whitelist of visualization types users can switch between (e.g. [\"grid\", \"gallery\", \"kanban\"])'),\n}).describe('Appearance and visualization configuration'));\n\n/**\n * View Tab Schema (Airtable Interface parity)\n * Defines a tab in a multi-tab view interface.\n * Each tab references a named list view and can be ordered, pinned, or set as default.\n *\n * @see Airtable Interface → \"Tabs\" panel\n */\nexport const ViewTabSchema = lazySchema(() => z.object({\n name: SnakeCaseIdentifierSchema.describe('Tab identifier (snake_case)'),\n label: I18nLabelSchema.optional().describe('Display label'),\n icon: z.string().optional().describe('Tab icon name'),\n view: z.string().optional().describe('Referenced list view name from listViews'),\n filter: z.array(ViewFilterRuleSchema).optional().describe('Tab-specific filter criteria'),\n order: z.number().int().min(0).optional().describe('Tab display order'),\n pinned: z.boolean().default(false).describe('Pin tab (cannot be removed by users)'),\n isDefault: z.boolean().default(false).describe('Set as the default active tab'),\n visible: z.boolean().default(true).describe('Tab visibility'),\n}).describe('Tab configuration for multi-tab view interface'));\n\n/**\n * User Filter Field Schema (ADR-0047)\n * One field exposed as a quick-filter control in the end-user filter bar.\n * Rendering details (widget, options) default to inference from the field\n * definition on the source object — authors only override when needed.\n *\n * @see Airtable Interface → \"User filters\" panel (Dropdowns element)\n */\nexport const UserFilterFieldSchema = lazySchema(() => z.object({\n field: z.string().describe('Field name on the source object (must exist — checked by reference diagnostics)'),\n label: I18nLabelSchema.optional().describe('Display label override (defaults to the field label)'),\n type: z.enum(['select', 'multi-select', 'boolean', 'date-range', 'text']).optional()\n .describe('Filter control type. Omit to infer from the field definition'),\n options: z.array(z.object({\n value: z.union([z.string(), z.number(), z.boolean()]).describe('Option value'),\n label: I18nLabelSchema.describe('Option label'),\n color: z.string().optional().describe('Option color token/hex'),\n })).optional().describe('Static options. Omit to derive from the field definition (select options / lookup records)'),\n showCount: z.boolean().optional().describe('Show per-option record counts'),\n defaultValues: z.array(z.union([z.string(), z.number(), z.boolean()])).optional()\n .describe('Pre-selected values when the view loads'),\n}).describe('Quick-filter field configuration'));\n\n/**\n * User Filters Schema (ADR-0047, Airtable Interface parity)\n * The end-user-facing quick-filter surface above a list. The author picks the\n * element style and which fields/presets are exposed; end users combine them\n * at runtime (session-scoped — selections never persist as metadata).\n *\n * Distinct from `ListView.filter` (the always-on base criteria) and from the\n * advanced filter builder (`userActions.filter` toggle).\n *\n * @see Airtable Interface → \"User filters\" panel (Elements: tabs / dropdowns)\n */\nexport const UserFiltersSchema = lazySchema(() => z.object({\n // `toggle` is DEPRECATED (ADR-0047 §3.4a): it overlaps `tabs` (presets) and\n // `dropdown` (per-field values) without adding expressive power, needs\n // per-field defaultValues to be useful, and authoring tooling no longer\n // offers it (None / Tabs / Dropdown only). Kept in the enum so existing\n // configs keep rendering; do not author new `toggle` filters.\n element: z.enum(['dropdown', 'tabs', 'toggle']).default('dropdown')\n .describe('Filter control style: \"dropdown\" (per-field value selectors) or \"tabs\" (named presets). \"toggle\" is deprecated.'),\n fields: z.array(UserFilterFieldSchema).optional()\n .describe('Fields exposed as quick filters (dropdown/toggle elements)'),\n tabs: z.array(ViewTabSchema).optional()\n .describe('Named filter presets rendered as tabs (tabs element). Reuses ViewTabSchema'),\n showAllRecords: z.boolean().optional()\n .describe('Show an \"All records\" tab before the presets (tabs element)'),\n}).describe('End-user quick-filter configuration (Airtable \"User filters\" parity)'));\n\n/**\n * Add Record Configuration Schema (Airtable Interface parity)\n * Configures the \"Add Record\" entry point for a list view.\n *\n * @see Airtable Interface → \"+ Add record\" button\n */\nexport const AddRecordConfigSchema = lazySchema(() => z.object({\n enabled: z.boolean().default(true).describe('Show the add record entry point'),\n position: z.enum(['top', 'bottom', 'both']).default('bottom').describe('Position of the add record button'),\n mode: z.enum(['inline', 'form', 'modal']).default('inline').describe('How to add a new record'),\n formView: z.string().optional().describe('Named form view to use when mode is \"form\" or \"modal\"'),\n}).describe('Add record entry point configuration'));\n\n/**\n * Kanban Settings\n */\nexport const KanbanConfigSchema = lazySchema(() => z.object({\n groupByField: z.string().describe('Field to group columns by (usually status/select)'),\n summarizeField: z.string().optional().describe('Field to sum at top of column (e.g. amount)'),\n columns: z.array(z.string()).describe('Fields to show on cards'),\n}));\n\n/**\n * List Chart View Configuration (Airtable-style)\n * Configures aggregate chart visualizations (bar/line/pie/area/scatter)\n * when used as a `type: 'chart'` ListView. Distinct from the full-featured\n * `ChartConfigSchema` in `chart.zod.ts` (which is for embedded reports).\n */\nexport const ListChartConfigSchema = lazySchema(() => z.object({\n chartType: z.enum(['bar', 'line', 'pie', 'area', 'scatter']).default('bar').describe('Chart visualisation type'),\n /**\n * ADR-0021 — the semantic-layer `dataset` this chart binds to. Selects\n * dimensions/measures BY NAME so the chart's numbers stay consistent with\n * every other surface using the same dataset. This is the single author-facing\n * shape (the legacy inline `xAxisField` + `yAxisFields` + `aggregation` query\n * was removed in the cutover).\n */\n dataset: SnakeCaseIdentifierSchema.describe('Dataset name to bind (ADR-0021)'),\n /** Dimension names (from the dataset) for X / group / split. */\n dimensions: z.array(z.string()).optional().describe('Dimension names — X/group/split'),\n /** Measure names (from the dataset) for the value axis. */\n values: z.array(z.string()).min(1).describe('Measure names — Y (at least one)'),\n}).describe('List chart view configuration'));\n\n/**\n * Calendar Settings\n */\nexport const CalendarConfigSchema = lazySchema(() => z.object({\n startDateField: z.string().describe('Field providing the event start date/time'),\n endDateField: z.string().optional().describe('Field providing the event end date/time (defaults to a single-day event)'),\n titleField: z.string().describe('Field displayed as the event title'),\n colorField: z.string().optional().describe('Field whose value determines the event color'),\n}));\n\n/**\n * Quick filter dimension for the Gantt toolbar.\n */\nexport const GanttQuickFilterSchema = lazySchema(() => z.object({\n field: z.string().describe('Record field / dot-path the dimension filters on'),\n label: z.string().optional().describe('Trigger label (falls back to the field label)'),\n options: z.array(z.union([\n z.string(),\n z.object({\n value: z.union([z.string(), z.number()]),\n label: z.string().optional(),\n }),\n ])).optional().describe('Explicit option override for fixed enums'),\n}));\n\n/**\n * Gantt Settings\n *\n * Beyond the core timeline fields, the renderer supports a two-level\n * parent/child hierarchy (parentField/typeField), planned-vs-actual baselines,\n * dynamic grouping, a resource/workload view, hover tooltips and quick filters.\n */\nexport const GanttConfigSchema = lazySchema(() => z.object({\n startDateField: z.string().describe('Field providing the task start date'),\n endDateField: z.string().describe('Field providing the task end date'),\n titleField: z.string().describe('Field displayed as the task title'),\n progressField: z.string().optional().describe('Field providing the task completion percentage'),\n dependenciesField: z.string().optional().describe(\"Field listing the task's predecessor (dependency) record ids\"),\n colorField: z.string().optional().describe('Field that drives the bar color'),\n // Two-level hierarchy: a parent task id (summary bar) and a row type.\n parentField: z.string().optional().describe('Field holding the parent task id (builds the summary → step tree)'),\n typeField: z.string().optional().describe('Field whose value maps to task/summary/milestone'),\n // Planned-vs-actual reference bars.\n baselineStartField: z.string().optional().describe('Baseline (planned) start field'),\n baselineEndField: z.string().optional().describe('Baseline (planned) end field'),\n // Dynamic grouping: bucket leaf tasks under one synthesized summary per value.\n groupByField: z.string().optional().describe('Field to group leaf tasks by (synthesized summary rows)'),\n // Resource / workload view.\n resourceView: z.boolean().optional().describe('Render a per-resource workload histogram instead of the timeline'),\n assigneeField: z.string().optional().describe('Resource field to bucket load by (resource view)'),\n effortField: z.string().optional().describe('Per-task load units (resource view; default 1)'),\n capacity: z.number().optional().describe('Per-resource capacity ceiling; loads above this flag overload'),\n // Hover tooltip + quick filters.\n tooltipFields: z.array(z.union([\n z.string(),\n z.object({ field: z.string(), label: z.string().optional() }),\n ])).optional().describe('Fields to surface in the hover tooltip, in display order'),\n quickFilters: z.array(GanttQuickFilterSchema).optional().describe('Multi-select filter dropdowns rendered above the chart'),\n autoZoomToFilter: z.boolean().optional().describe('When true (default), filtering zooms the range to the filtered tasks'),\n// Forward-compatible: the gantt renderer (objectui plugin-gantt) keeps adding\n// config knobs (e.g. lockField / defaultCollapsedDepth) ahead of this schema.\n// Passthrough lets those extra fields reach the renderer instead of being\n// stripped here, so a renderer release no longer has to wait on a spec release.\n}).passthrough());\n\n/**\n * Tree (tree-grid) Settings\n *\n * Renders a self-referencing object as an indented, expand/collapse tree-grid.\n * Flat records are nested via a single-parent pointer field (`parentField`).\n * Unlike a fixed-depth `grouping`, a tree handles arbitrary depth (org charts,\n * category trees, BOMs, nested comments). When `parentField` is omitted the\n * renderer auto-detects the object's `tree`/self-reference field.\n */\nexport const TreeConfigSchema = lazySchema(() => z.object({\n parentField: z.string().optional().describe('Single-parent pointer field (auto-detected from the object schema when omitted)'),\n labelField: z.string().optional().describe('Field rendered indented in the first column (defaults to \"name\")'),\n fields: z.array(z.string()).optional().describe('Additional fields rendered as flat columns alongside the label'),\n defaultExpandedDepth: z.number().int().min(0).optional().describe('Initial expansion depth (0 = roots only; omit = expand all)'),\n// Forward-compatible: let renderer-ahead config knobs reach plugin-tree.\n}).passthrough());\n\n/**\n * Navigation Mode Enum\n * Defines how to navigate to the detail view from a list item.\n */\nexport const NavigationModeSchema = lazySchema(() => z.enum([\n 'page', // Navigate to a new route (default)\n 'drawer', // Open details in a side drawer/panel\n 'modal', // Open details in a modal dialog\n 'split', // Show details side-by-side with the list (master-detail)\n 'popover', // Show details in a popover (lightweight)\n 'new_window', // Open in new browser tab/window\n 'none' // No navigation (read-only list)\n]));\n\n/**\n * Navigation Configuration Schema\n */\nexport const NavigationConfigSchema = lazySchema(() => z.object({\n mode: NavigationModeSchema.default('page'),\n \n /** Target View Config */\n view: z.string().optional().describe('Name of the form view to use for details (e.g. \"summary_view\", \"edit_form\")'),\n \n /** Interaction Triggers */\n preventNavigation: z.boolean().default(false).describe('Disable standard navigation entirely'),\n openNewTab: z.boolean().default(false).describe('Force open in new tab (applies to page mode)'),\n \n /**\n * [#2578] Overlay size for a drawer/modal detail — coarse T-shirt buckets,\n * aligned with `FormView.modalSize` (`page` mode ignores it). `'auto'`\n * (default): the renderer derives the size from the object's field count and\n * clamps it to the client viewport, so AI writes nothing — it cannot know the\n * client width. Explicit buckets are a coarse, viewport-independent override.\n */\n size: z.enum(['auto', 'sm', 'md', 'lg', 'xl', 'full']).default('auto')\n .describe(\"[#2578] Overlay size bucket for drawer/modal detail: 'auto' (default — renderer derives from field count + viewport; AI writes nothing) or a coarse override sm/md/lg/xl/full. Prefer this over the pixel `width`; page mode ignores it.\"),\n\n /**\n * @deprecated [#2578 → `size`] A pixel/percent width cannot be authored blind:\n * the author (often an AI) does not know the client viewport. Kept only as a\n * renderer fallback for pre-#2578 metadata; new metadata sets `size` (or omits\n * it for `auto`).\n */\n width: z.union([z.string(), z.number()]).optional().describe('[DEPRECATED → size] Pixel/percent width of the drawer/modal (e.g. \"600px\"). A pixel width cannot be chosen at authoring time without knowing the client viewport — use the `size` bucket.'),\n}));\n\n/**\n * List View Schema (Expanded)\n * Defines how a collection of records is displayed to the user.\n * \n * **NAMING CONVENTION:**\n * View names (when provided) are machine identifiers and must be lowercase snake_case.\n * \n * @example Standard Grid\n * {\n * name: \"all_active\",\n * label: \"All Active\",\n * type: \"grid\",\n * columns: [\"name\", \"status\", \"created_at\"],\n * filter: [[\"status\", \"=\", \"active\"]]\n * }\n * \n * @example Kanban Board\n * {\n * type: \"kanban\",\n * columns: [\"name\", \"amount\"],\n * kanban: {\n * groupByField: \"stage\",\n * summarizeField: \"amount\",\n * columns: [\"name\", \"close_date\"]\n * }\n * }\n */\nexport const ListViewSchema = lazySchema(() => z.object({\n name: SnakeCaseIdentifierSchema.optional().describe('Internal view name (lowercase snake_case)'),\n label: I18nLabelSchema.optional(), // Display label override (supports i18n)\n type: z.enum([\n 'grid', // Standard Data Table\n 'kanban', // Board / Columns\n 'gallery', // Card Deck / Masonry\n 'calendar', // Monthly/Weekly/Daily\n 'timeline', // Chronological Stream (Feed)\n 'gantt', // Project Timeline\n 'map', // Geospatial\n 'chart', // Aggregate visualisation\n 'tree' // Self-referencing hierarchy (tree-grid)\n ]).default('grid'),\n \n /** Data Source Configuration */\n data: ViewDataSchema.optional().describe('Data source configuration (defaults to \"object\" provider)'),\n \n /** Shared Query Config */\n columns: z.union([\n z.array(z.string()), // Legacy: simple field names\n z.array(ListColumnSchema), // Enhanced: detailed column config\n ]).describe('Fields to display as columns'),\n filter: z.array(ViewFilterRuleSchema).optional().describe('Filter criteria (JSON Rules)'),\n /**\n * Sort order. Prefer the structured `{ field, order }[]` form.\n *\n * @deprecated The bare string form (`\"field desc\"`) is legacy and retained\n * only for backward compatibility (it was the exact shape that crashed the\n * renderer in objectui#2601 — kept covered by a live fixture). Removal will\n * go through its own deprecation cycle; do not drop it here.\n */\n sort: z.union([\n z.string(), //Legacy \"field desc\"\n z.array(z.object({\n field: z.string(),\n order: z.enum(['asc', 'desc'])\n }))\n ]).optional(),\n \n /** Search & Filter */\n searchableFields: z.array(z.string()).optional().describe('Fields enabled for search'),\n filterableFields: z.array(z.string()).optional().describe('Legacy shorthand for userFilters.fields — bare field names enabled for end-user filtering. Prefer userFilters'),\n\n /** User Filters (ADR-0047, Airtable Interface parity) */\n userFilters: UserFiltersSchema.optional()\n .describe('End-user quick-filter bar: dropdown/toggle fields or tab presets. Omit to let the renderer derive filters from select/boolean fields'),\n\n /** Grid Features */\n resizable: z.boolean().optional().describe('Enable column resizing'),\n striped: z.boolean().optional().describe('Striped row styling'),\n bordered: z.boolean().optional().describe('Show borders'),\n compactToolbar: z.boolean().optional().describe('Collapse Group/Color/Density/Hide-fields into a single View settings popover'),\n\n /** Selection */\n selection: SelectionConfigSchema.optional().describe('Row selection configuration'),\n\n /** Navigation / Interaction */\n navigation: NavigationConfigSchema.optional().describe('Configuration for item click navigation (page, drawer, modal, etc.)'),\n\n /** Pagination */\n pagination: PaginationConfigSchema.optional().describe('Pagination configuration'),\n\n /** Type Specific Config */\n kanban: KanbanConfigSchema.optional().describe('Kanban-board configuration — applies when the view renders as a kanban layout'),\n calendar: CalendarConfigSchema.optional().describe('Calendar configuration — applies when the view renders as a calendar layout'),\n gantt: GanttConfigSchema.optional().describe('Gantt-timeline configuration — applies when the view renders as a gantt layout'),\n gallery: GalleryConfigSchema.optional(),\n timeline: TimelineConfigSchema.optional(),\n chart: ListChartConfigSchema.optional(),\n tree: TreeConfigSchema.optional().describe('Tree/hierarchy configuration — applies when the view renders as a tree layout'),\n\n /** View Metadata (Airtable-style view management) */\n description: I18nLabelSchema.optional().describe('View description for documentation/tooltips'),\n sharing: ViewSharingSchema.optional().describe('View sharing and access configuration'),\n\n /** Row Height / Density (Airtable-style) */\n rowHeight: RowHeightSchema.optional().describe('Row height / density setting'),\n\n /** Record Grouping (Airtable-style) */\n grouping: GroupingConfigSchema.optional().describe('Group records by one or more fields'),\n\n /** Row Color (Airtable-style) */\n rowColor: RowColorConfigSchema.optional().describe('Color rows based on field value'),\n\n /** Field Visibility & Ordering per View (Airtable-style) */\n hiddenFields: z.array(z.string()).optional().describe('Fields to hide in this specific view'),\n fieldOrder: z.array(z.string()).optional().describe('Explicit field display order for this view'),\n\n /** Row & Bulk Actions */\n rowActions: z.array(z.string()).optional().describe('Actions available for individual row items'),\n bulkActions: z.array(z.string()).optional().describe('Actions available when multiple rows are selected'),\n bulkActionDefs: z.array(z.record(z.string(), z.any())).optional().describe('Rich bulk action definitions (schema-driven, executed via BulkActionDialog)'),\n\n /** Performance */\n virtualScroll: z.boolean().optional().describe('Enable virtual scrolling for large datasets'),\n\n /** Conditional Formatting */\n conditionalFormatting: z.array(z.object({\n condition: ExpressionInputSchema.describe('Predicate (CEL) to evaluate.'),\n style: z.record(z.string(), z.string()).describe('CSS styles to apply when condition is true'),\n })).optional().describe('Conditional formatting rules for list rows'),\n\n /** Inline Edit */\n inlineEdit: z.boolean().optional().describe('Allow inline editing of records directly in the list view'),\n\n /** Export */\n exportOptions: z.array(z.enum(['csv', 'xlsx', 'pdf', 'json'])).optional().describe('Available export format options'),\n\n /** User Actions (Airtable Interface parity) */\n userActions: UserActionsConfigSchema.optional().describe('User action toggles for the view toolbar'),\n\n /** Appearance (Airtable Interface parity) */\n appearance: AppearanceConfigSchema.optional().describe('Appearance and visualization configuration'),\n\n /** Tabs (Airtable Interface parity) */\n tabs: z.array(ViewTabSchema).optional().describe('Tab definitions for multi-tab view interface'),\n\n /** Add Record (Airtable Interface parity) */\n addRecord: AddRecordConfigSchema.optional().describe('Add record entry point configuration'),\n\n /** Record Count Display (Airtable Interface parity) */\n showRecordCount: z.boolean().optional().describe('Show record count at the bottom of the list'),\n\n /** Advanced: Allow Printing (Airtable Interface parity) */\n allowPrinting: z.boolean().optional().describe('Allow users to print the view'),\n\n /** Empty State */\n emptyState: z.object({\n title: I18nLabelSchema.optional(),\n message: I18nLabelSchema.optional(),\n icon: z.string().optional(),\n }).optional().describe('Empty state configuration when no records found'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes for the list view'),\n\n /** Responsive layout overrides per breakpoint */\n responsive: ResponsiveConfigSchema.optional().describe('Responsive layout configuration'),\n\n /** Performance optimization settings */\n performance: PerformanceConfigSchema.optional().describe('Performance optimization settings'),\n}));\n\n/**\n * Form Field Configuration Schema\n * Detailed configuration for individual form fields.\n * \n * Reuses Data.FieldType and related constraints from the Data protocol to avoid duplication.\n * The `type` field auto-infers widget rendering; explicit `widget` overrides are only needed\n * for custom components.\n * \n * @example Auto-inferred select widget\n * { field: 'status', type: 'select', options: [{ label: 'Open', value: 'open' }] }\n * \n * @example Lookup field with reference\n * { field: 'account_id', type: 'lookup', reference: 'account', label: 'Account' }\n * \n * @example Custom widget override\n * { field: 'filter', widget: 'filter-builder' }\n */\nexport const FormFieldSchema: z.ZodType<any> = lazySchema(() => z.object({\n /** Field name (snake_case) */\n field: z.string().describe('Field name (snake_case)'),\n \n /** Field type — reuses Data.FieldType. When set, widget is auto-inferred (can be overridden). */\n type: FieldType.optional().describe('Field type (auto-infers widget if omitted)'),\n \n /** Select/multiselect options — only needed when type=select/multiselect/radio/checkboxes */\n options: z.array(SelectOptionSchema).optional().describe('Options for select/multiselect/radio/checkboxes fields'),\n \n /** Reference object for lookup/master_detail fields */\n reference: z.string().optional().describe('Target object name for lookup/master_detail fields'),\n \n /** Text constraints */\n maxLength: z.number().optional().describe('Maximum character length (for text/textarea/email/url/phone)'),\n minLength: z.number().optional().describe('Minimum character length'),\n \n /** Number constraints */\n min: z.number().optional().describe('Minimum value (for number/currency/percent/slider)'),\n max: z.number().optional().describe('Maximum value'),\n precision: z.number().optional().describe('Total digits (for number/currency)'),\n scale: z.number().optional().describe('Decimal places'),\n \n /** Multi-value flag */\n multiple: z.boolean().optional().describe('Allow multiple values (for select/lookup/file/image)'),\n \n /** UI overrides */\n label: I18nLabelSchema.optional().describe('Display label override'),\n placeholder: I18nLabelSchema.optional().describe('Placeholder text'),\n helpText: I18nLabelSchema.optional().describe('Help/hint text'),\n readonly: z.boolean().optional().describe('Read-only override'),\n immutable: z.boolean().optional().describe('Editable on create, locked once the record exists (e.g. machine names).'),\n required: z.boolean().optional().describe('Required override'),\n hidden: z.boolean().optional().describe('Hidden override'),\n colSpan: z.number().int().min(1).max(4).optional().describe('[legacy — prefer `span`] Absolute column span (1-4). Fragile when the column count is derived per surface (mobile 1 / modal 2 / page 3-4): a fixed span only lines up at the width the author imagined. The renderer clamps it to the current column count. Prefer `span`.'),\n /**\n * [#2578] Relative field width — decoupled from the (often auto-derived)\n * column count, so it stays correct at 1/2/3/4 columns.\n */\n span: z.enum(['auto', 'full']).default('auto').describe(\"Relative field width. 'auto' (default — omit it): the renderer sizes the field from its widget type × the current column count (wide widgets like textarea/richtext/json/file/subform take the whole row). 'full': whole row at any column count. Prefer this over the absolute `colSpan`.\"),\n\n /** Custom widget override — only needed when auto-inference is insufficient */\n widget: z.string().optional().describe('Custom widget/component name (overrides type-based inference)'),\n\n /** For `code` fields: source language (e.g. 'javascript', 'sql', 'json', 'typescript', 'expression', 'cel'). Drives syntax highlighting. */\n language: z.string().optional().describe('Code editor language (for type=code)'),\n\n /**\n * Sub-fields for `composite` / `repeater` / `record` types — declares\n * the inner shape of an embedded sub-object (composite), each row of\n * an embedded sub-object array (repeater), or each entry of a name-keyed\n * map (record). Recursive: any of the three can nest.\n *\n * Use `lookup` / `master_detail` instead when the children are independent\n * records with their own IDs in a separate object/table.\n */\n fields: z.array(z.lazy(() => FormFieldSchema)).optional()\n .describe('Sub-fields for composite/repeater/record types'),\n\n /**\n * For `record`-typed fields only. Declares how the map key is sourced,\n * displayed, and validated when an admin creates a new entry.\n *\n * The same identifier is also stored as `name` on the inner value (so\n * `record.fields[k].name === k`). Most callers can omit this and accept\n * the defaults: `{ field: 'name', label: 'Name', regex: /^[a-z_][a-z0-9_]*$/, immutable: true }`.\n *\n * See ADR-0007 (record form field type).\n */\n keyField: z.object({\n field: z.string().default('name').describe('Property name that holds the key inside each item (defaults to \"name\")'),\n label: I18nLabelSchema.optional().describe('Display label for the key column'),\n placeholder: I18nLabelSchema.optional().describe('Placeholder when entering a new key'),\n helpText: I18nLabelSchema.optional().describe('Help text under the key input'),\n /** Validation pattern serialised as a regex source string (no flags). */\n regex: z.string().optional().describe('JS regex source string the key must match (no flags)'),\n /** Renamable after creation? Defaults to false — keys are usually identifiers. */\n immutable: z.boolean().default(true).describe('If true, the key is read-only after creation'),\n }).optional().describe('Key column config for record-typed fields'),\n\n dependsOn: z.string().optional().describe('Parent field name for cascading'),\n /**\n * Conditional-visibility predicate (CEL) — the field is shown only when TRUE\n * (ADR-0089, canonical `*When` name). Binding root depends on the surface:\n * runtime record forms bind `record` + `current_user`; metadata-editing forms\n * (`*.form.ts`) bind the row under edit as `data`.\n */\n visibleWhen: ExpressionInputSchema.optional().describe(\"Visibility predicate (CEL) — field shown only when TRUE. Root: `record`+`current_user` (runtime forms) or `data` (metadata forms). e.g. P`record.priority == 'urgent'`\"),\n /** @deprecated ADR-0089 — use `visibleWhen`. Accepted and normalized to `visibleWhen` at parse. */\n visibleOn: ExpressionInputSchema.optional().describe('[DEPRECATED → `visibleWhen`] Visibility predicate (CEL). Normalized to `visibleWhen` at parse.'),\n disclosure: z.enum(['inline', 'popover']).optional().describe('Composite rendering: inline bordered box (default) or a summary line + gear popover (progressive disclosure).'),\n}, { error: strictVisibilityError }).strict().transform(normalizeVisibleWhen));\n\n/**\n * Form Layout Section\n */\nexport const FormSectionSchema = lazySchema(() => z.object({\n /**\n * Stable identifier for translation lookup. snake_case convention.\n * When provided, translation bundles can target this section's `label`\n * and `description` via `metadataForms.<type>.sections.<name>`.\n * Optional for backward-compat with sections that only have a `label`.\n */\n name: z.string().optional().describe('Stable section identifier for i18n lookup (snake_case)'),\n label: I18nLabelSchema.optional(),\n description: z.string().optional().describe('Optional description rendered under the section header.'),\n collapsible: z.boolean().default(false),\n collapsed: z.boolean().default(false),\n /**\n * Conditional-visibility predicate (CEL) — the whole section is shown only\n * when TRUE (ADR-0089, canonical `*When` name). Same per-layer binding root as\n * {@link FormFieldSchema.visibleWhen}: `record`+`current_user` in runtime\n * forms, `data` in metadata-editing forms.\n */\n visibleWhen: ExpressionInputSchema.optional().describe('Visibility predicate (CEL) — section shown only when TRUE. Root: `record`+`current_user` (runtime forms) or `data` (metadata forms).'),\n /** @deprecated ADR-0089 — use `visibleWhen`. Accepted and normalized to `visibleWhen` at parse. */\n visibleOn: ExpressionInputSchema.optional().describe('[DEPRECATED → `visibleWhen`] Visibility predicate (CEL). Hides the whole section when false. Normalized to `visibleWhen` at parse.'),\n columns: z.union([\n z.enum(['1', '2', '3', '4']),\n z.literal(1),\n z.literal(2),\n z.literal(3),\n z.literal(4),\n ]).default(1).transform(val => (typeof val === 'string' ? parseInt(val) : val) as 1 | 2 | 3 | 4),\n fields: z.array(z.union([\n z.string(), // Legacy: simple field name\n FormFieldSchema, // Enhanced: detailed field config\n ])),\n}, { error: strictVisibilityError }).strict().transform(normalizeVisibleWhen));\n\n/**\n * A single form action button (submit / cancel / reset): visibility + label.\n * Leaf of the [EXPERIMENTAL] {@link FormViewSchema} `buttons` block (#2998).\n * `.strict()` per ADR-0089 D3a so a typo'd key errors instead of vanishing.\n */\nexport const FormButtonConfigSchema = lazySchema(() => z.object({\n show: z.boolean().optional().describe('Whether the button is rendered (renderer default applies when omitted)'),\n label: I18nLabelSchema.optional().describe('Button label (i18n-capable; renderer default when omitted)'),\n}).strict());\nexport type FormButtonConfig = z.infer<typeof FormButtonConfigSchema>;\n\n/**\n * Form View Schema\n * Defines the layout for creating or editing a single record.\n *\n * @example Simple Sectioned Form\n * {\n * type: \"simple\",\n * sections: [\n * {\n * label: \"General Info\",\n * columns: 2,\n * fields: [\"name\", \"status\"]\n * },\n * {\n * label: \"Details\",\n * fields: [\"description\", { field: \"priority\", widget: \"rating\" }]\n * }\n * ]\n * }\n */\nexport const FormViewSchema = lazySchema(() => z.object({\n type: z.enum([\n 'simple', // Single column or sections\n 'tabbed', // Tabs\n 'wizard', // Step by step\n 'split', // Master-Detail split\n 'drawer', // Side panel\n 'modal' // Dialog\n ]).default('simple'),\n\n // --- Presentation options (per `type` variant). These mirror what the\n // ObjectForm component accepts so the protocol declares them; all optional. ---\n /** Field layout within the form body. */\n layout: z.enum(['vertical', 'horizontal', 'inline', 'grid']).optional().describe('Field layout direction'),\n /** Number of columns for the form body (grid/multi-column layouts). */\n columns: z.number().int().min(1).optional().describe('Number of columns for the form body'),\n /** Optional form title / description (for embedded or standalone forms). */\n title: z.string().optional().describe('Form title'),\n description: z.string().optional().describe('Form description'),\n /** Tabbed (`type: 'tabbed'`). */\n defaultTab: z.string().optional().describe('Initially active tab (tabbed forms)'),\n tabPosition: z.enum(['top', 'bottom', 'left', 'right']).optional().describe('Tab strip position (tabbed forms)'),\n /** Wizard (`type: 'wizard'`). */\n allowSkip: z.boolean().optional().describe('Allow skipping steps (wizard forms)'),\n showStepIndicator: z.boolean().optional().describe('Show the step indicator (wizard forms)'),\n /** Split (`type: 'split'`). */\n splitDirection: z.enum(['horizontal', 'vertical']).optional().describe('Split orientation (split forms)'),\n splitSize: z.number().optional().describe('Primary split panel size, % (split forms)'),\n splitResizable: z.boolean().optional().describe('Whether the split is resizable (split forms)'),\n /** Drawer (`type: 'drawer'`). */\n drawerSide: z.enum(['top', 'bottom', 'left', 'right']).optional().describe('Drawer side (drawer forms)'),\n /** @deprecated [#2578 → `modalSize` / size buckets] A pixel width can't be authored blind (unknown client viewport); the renderer derives width from content + viewport. */\n drawerWidth: z.string().optional().describe('[DEPRECATED → size buckets] Drawer width, e.g. \"480px\". A pixel width cannot be chosen without knowing the client viewport — the renderer derives it.'),\n /** Modal (`type: 'modal'`). */\n modalSize: z.enum(['sm', 'default', 'lg', 'xl', 'full']).optional().describe('Modal size (modal forms)'),\n\n /** Data Source Configuration */\n data: ViewDataSchema.optional().describe('Data source configuration (defaults to \"object\" provider)'),\n \n sections: z.array(FormSectionSchema).optional(), // For simple layout\n groups: z.array(FormSectionSchema).optional(), // Legacy support -> alias to sections\n\n /**\n * Inline child collections (master-detail). When present, the standard\n * create/edit form for this object renders as a master-detail form — the\n * object's own fields on top, an editable grid per child collection below,\n * persisted together in ONE atomic transaction — with no bespoke page. Each\n * entry needs only `childObject`; the relationship FK and grid columns are\n * derived from the child object's metadata (override via\n * `relationshipField` / `columns`).\n */\n subforms: z.array(z.object({\n childObject: z.string().describe('Child object whose records are entered inline'),\n relationshipField: z.string().optional().describe('FK on the child pointing back to the parent (auto-detected when omitted)'),\n columns: z.array(z.any()).optional().describe('Editable grid columns (derived from the child object when omitted)'),\n amountField: z.string().optional().describe('Numeric child column summed for the running total'),\n totalField: z.string().optional().describe('Parent field to receive the rolled-up sum'),\n title: z.string().optional().describe('Section title'),\n addLabel: z.string().optional().describe('Add-row button label'),\n minRows: z.number().optional(),\n maxRows: z.number().optional(),\n })).optional().describe('Inline master-detail child collections'),\n\n /** Default Sort for Related Lists (e.g., sort child records by date) */\n defaultSort: z.array(z.object({\n field: z.string().describe('Field name to sort by'),\n order: z.enum(['asc', 'desc']).default('desc').describe('Sort direction'),\n })).optional().describe('Default sort order for related list views within this form'),\n\n /** Public form sharing configuration */\n sharing: SharingConfigSchema.optional().describe('Public sharing configuration for this form'),\n\n /**\n * What happens after a successful submit.\n *\n * - `thank-you` (default) — show a confirmation panel\n * - `redirect` — send the browser to a URL\n * - `continue` — reset the form so another response can be entered\n * - `next-record` — advance to the next record (internal queues only)\n */\n submitBehavior: z.union([\n z.object({\n kind: z.literal('thank-you'),\n title: z.string().optional(),\n message: z.string().optional(),\n }),\n z.object({\n kind: z.literal('redirect'),\n url: z.string(),\n delayMs: z.number().int().min(0).optional(),\n }),\n z.object({ kind: z.literal('continue') }),\n z.object({ kind: z.literal('next-record') }),\n ]).optional().describe('Post-submit behavior'),\n\n /**\n * ⚠️ EXPERIMENTAL — NOT ENFORCED (#2998, ADR-0078). Structured action-button\n * config: per-button visibility + label for `submit` / `cancel` / `reset`.\n * This is the spec home for the flat renderer-invented keys ObjectUI's\n * `ObjectForm` reads today (`showSubmit`/`submitText`/`showCancel`/`cancelText`/\n * `showReset`, objectui#2545) — those never existed here and are silently\n * stripped by this strip-mode container. Experimental until the ObjectUI\n * renderer reads `buttons.*` (the ADR-0078 escape hatch: the contract ships\n * ahead of its consumer, marked so authoring it is not a false promise).\n */\n buttons: z.object({\n submit: FormButtonConfigSchema.optional().describe('Submit button'),\n cancel: FormButtonConfigSchema.optional().describe('Cancel button'),\n reset: FormButtonConfigSchema.optional().describe('Reset button'),\n }).strict().optional()\n .describe('[EXPERIMENTAL — NOT ENFORCED, #2998] Form action-button visibility & labels. Renderer wiring pending in ObjectUI (objectui#2545).'),\n\n /**\n * ⚠️ EXPERIMENTAL — NOT ENFORCED (#2998, ADR-0078). Initial field values for\n * create-mode forms, keyed by field machine name. Spec home for ObjectUI's\n * renderer-invented `initialValues` (objectui#2545). Experimental until the\n * ObjectUI renderer reads it.\n */\n defaults: z.record(z.string(), z.unknown()).optional()\n .describe('[EXPERIMENTAL — NOT ENFORCED, #2998] Initial field values for create-mode forms (spec home for ObjectUI `initialValues`). Renderer wiring pending (objectui#2545).'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes for the form view'),\n}));\n\n/**\n * Object-scoped user filters (ADR-0047 amendment, framework #2679 / objectui #2338).\n *\n * A {@link UserFiltersSchema} restricted to the styles that make sense on an object\n * list view: `dropdown` (per-field value chips — the Airtable \"quick filter\" pills)\n * and the deprecated `toggle`. The `tabs` element and its `showAllRecords` companion\n * are OMITTED because an object view's saved-view switcher (`ViewTabBar`) already owns\n * the tab-bar role — a `tabs` user-filter would render a second, conflicting tab bar.\n * Need named presets on an object? Use `listViews` (each becomes a segmented tab).\n */\nexport const ObjectUserFiltersSchema = lazySchema(() =>\n UserFiltersSchema.omit({ tabs: true, showAllRecords: true }).extend({\n element: z.enum(['dropdown', 'toggle']).default('dropdown')\n .describe('Filter control style on object views: \"dropdown\" (per-field value chips). \"toggle\" is deprecated. \"tabs\" is page-only — use `listViews` for named presets.'),\n }));\n\n/**\n * ADR-0047 \"views\" mode — an object's default list + named list views.\n *\n * Structurally a {@link ListViewSchema} whose `userFilters` is narrowed to\n * {@link ObjectUserFiltersSchema}: `dropdown` value chips are allowed (ADR-0047\n * amendment, framework #2679), but the page-only `tabs` preset bar is not — that\n * belongs to a page list (`InterfaceListPage`, \"filters\" mode), because an object\n * view's only tab-bar nav is the `ViewTabBar`. The narrowed schema makes a `tabs`\n * user-filter untypable at author time (tsc); the CLI `validate` list-view-mode rule\n * reports it pre-parse. See objectui #2338.\n */\nexport const ObjectListViewSchema = lazySchema(() =>\n ListViewSchema.omit({ userFilters: true }).extend({ userFilters: ObjectUserFiltersSchema.optional() }));\n\n/**\n * Master View Schema\n * Can define multiple named views.\n */\n/**\n * View Container Schema\n * Aggregates all view definitions for a specific object or context.\n * \n * @example\n * {\n * list: { type: \"grid\", columns: [\"name\"] },\n * form: { type: \"simple\", fields: [\"name\"] },\n * listViews: {\n * \"all\": { label: \"All\", filter: [] },\n * \"my\": { label: \"Mine\", filter: [[\"owner\", \"=\", \"{user_id}\"]] }\n * }\n * }\n */\nexport const ViewSchema = lazySchema(() => z.object({\n list: ObjectListViewSchema.optional(), // Default list view (views mode — dropdown userFilters allowed, no tabs; ADR-0047)\n form: FormViewSchema.optional(), // Default form view\n listViews: z.record(z.string(), ObjectListViewSchema).optional().describe('Additional named list views (views mode — dropdown userFilters allowed, no tabs; ADR-0047)'),\n formViews: z.record(z.string(), FormViewSchema).optional().describe('Additional named form views'),\n /**\n * ADR-0010 §3.7 — Package-level protection envelope. Package\n * authors declare lock policy here; the loader translates it\n * into the private `_lock` envelope at registration time and\n * strips this block before persistence. See\n * `shared/protection.zod.ts`.\n */\n protection: ProtectionSchema.optional().describe(\n 'Package author protection block — lock policy for this view.',\n ),\n\n // ADR-0010 — runtime protection envelope (internal — set by loader).\n ...MetadataProtectionFields,\n\n}));\n\n/**\n * Type-safe factory for creating view definitions.\n *\n * Validates the config at creation time using Zod `.parse()`, and rejects a\n * container that defines no views: `ViewSchema` strips unknown top-level keys,\n * so a *flat* list view (`{ name, label, type, columns, ... }`) would parse to\n * an empty container — zero views register and the Console silently renders\n * nothing. Failing here surfaces that authoring mistake at build time.\n *\n * @example\n * ```ts\n * const taskViews = defineView({\n * list: {\n * type: 'grid',\n * data: { provider: 'object', object: 'task' },\n * columns: ['subject', 'status', 'priority', 'due_date'],\n * },\n * form: {\n * type: 'simple',\n * sections: [{ label: 'Details', fields: [{ field: 'subject' }] }],\n * },\n * });\n * ```\n */\nexport function defineView(config: z.input<typeof ViewSchema>): View {\n const parsed = ViewSchema.parse(config);\n const viewCount =\n (parsed.list ? 1 : 0) +\n (parsed.form ? 1 : 0) +\n Object.keys(parsed.listViews ?? {}).length +\n Object.keys(parsed.formViews ?? {}).length;\n if (viewCount === 0) {\n throw new Error(\n 'defineView: the container defines no views — nothing registers and no view appears in the Console. '\n + 'Declare at least one of `list`, `form`, `listViews`, `formViews`. '\n + 'If you passed a flat list view ({ name, label, type, columns, ... }), wrap it: '\n + 'defineView({ list: { type, data, columns, ... } }).'\n );\n }\n return parsed;\n}\n\n// ───────────────────────────────────────────────────────────────────────────\n// Independent View Item model (Object has-many View)\n// ───────────────────────────────────────────────────────────────────────────\n//\n// The {@link ViewSchema} *container* above aggregates every view of an object\n// into one document. That model cannot express runtime-authored views (a user\n// adding \"My high-value leads\" at runtime cannot append to a developer's source\n// file), and it forces multiple distinct views into a single designer.\n//\n// {@link ViewItemSchema} promotes each named view to a first-class, independently\n// addressable entity bound to its object by a foreign key. The object↔view\n// switcher is then a *query* (`getViewsByObject`) rather than embedded storage —\n// mirroring Airtable / Salesforce / Notion, where a table/object has-many views.\n//\n// `defineView` is retained as authoring sugar: the backend loader expands an\n// aggregated document into N ViewItems at registration time, so existing\n// `*.view.ts` files and the published spec keep working unchanged.\n\n/**\n * Qualified view-item identity: `<object>.<viewKey>` — dotted snake_case\n * segments, e.g. `crm_lead.pipeline`. Globally unique, and the object can be\n * recovered from the prefix, so the registry key never collides across objects.\n */\nexport const ViewItemNameSchema = z\n .string()\n .regex(\n /^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$/,\n 'View item name must be a dotted snake_case qualified name, e.g. \"crm_lead.pipeline\".',\n )\n .describe('Globally-unique view id, `<object>.<viewKey>`.');\n\n/**\n * Identity layer for a view item — its visibility scope and ownership.\n *\n * - `package` — shipped from `*.view.ts` source / an installed package.\n * Not deletable (reinstall restores it); customisable via an\n * override layer; hideable from the switcher.\n * - `shared` — authored at runtime, visible org-wide. Creating one is gated\n * by the `view.manageShared` capability.\n * - `personal` — authored at runtime, scoped to `owner`. Any user with read\n * access to the object may create one.\n *\n * Named `scope` (not `provenance`) to avoid colliding with the loader-set\n * `_provenance` envelope field, which tracks a different axis\n * (package | org | env-forced).\n */\nexport const ViewScopeSchema = z\n .enum(['package', 'shared', 'personal'])\n .describe('View identity layer: package | shared | personal.');\n\n/** Discriminator for the kind of view a {@link ViewItemSchema} carries. */\nexport const ViewKindSchema = z\n .enum(['list', 'form'])\n .describe('Whether `config` is a ListView (list family) or a FormView.');\n\n/**\n * Fields shared by every independent view item, regardless of kind. Returned\n * as a raw Zod shape so it composes into each discriminated-union member\n * without forcing eager schema construction.\n */\nfunction viewItemBaseShape() {\n return {\n name: ViewItemNameSchema,\n object: z\n .string()\n .describe('Bound object name — the foreign key used to aggregate views.'),\n label: I18nLabelSchema.optional().describe('Display label (supports i18n).'),\n isDefault: z\n .boolean()\n .optional()\n .describe(\"Whether this is the object's default view in the switcher.\"),\n order: z\n .number()\n .int()\n .optional()\n .describe(\"Sort order within the object's view switcher / left rail.\"),\n scope: ViewScopeSchema.optional().describe(\n 'Identity layer (defaults to `package` for source-loaded views).',\n ),\n owner: z\n .string()\n .optional()\n .describe('Owner user id — set when `scope` is `personal`.'),\n hidden: z\n .boolean()\n .optional()\n .describe('Hidden from the switcher (per-user / per-org declutter).'),\n /**\n * Package author protection block — same envelope as {@link ViewSchema};\n * the loader translates it into the private `_lock` envelope.\n */\n protection: ProtectionSchema.optional().describe(\n 'Package author protection block — lock policy for this view.',\n ),\n // ADR-0010 — runtime protection envelope (internal — set by loader).\n ...MetadataProtectionFields,\n };\n}\n\n/**\n * Independent View Item — a single named view bound to one object.\n *\n * Discriminated on `viewKind`: a `list` item carries a {@link ListViewSchema}\n * config (grid / kanban / calendar / …), a `form` item carries a\n * {@link FormViewSchema} config.\n *\n * @example\n * ```ts\n * const pipeline = defineViewItem({\n * name: 'crm_lead.pipeline',\n * object: 'crm_lead',\n * viewKind: 'list',\n * label: 'Pipeline',\n * config: {\n * type: 'kanban',\n * data: { provider: 'object', object: 'crm_lead' },\n * columns: ['name', 'stage', 'amount'],\n * },\n * });\n * ```\n */\nexport const ViewItemSchema = lazySchema(() =>\n z.discriminatedUnion('viewKind', [\n z.object({\n viewKind: z.literal('list'),\n config: ListViewSchema.describe('List-family view configuration.'),\n ...viewItemBaseShape(),\n }),\n z.object({\n viewKind: z.literal('form'),\n config: FormViewSchema.describe('Form view configuration.'),\n ...viewItemBaseShape(),\n }),\n ]),\n);\n\n/**\n * Type-safe factory for an independent {@link ViewItem}.\n *\n * Validates the config at creation time using Zod `.parse()`.\n *\n * @example\n * ```ts\n * const allLeads = defineViewItem({\n * name: 'crm_lead.all',\n * object: 'crm_lead',\n * viewKind: 'list',\n * isDefault: true,\n * config: { type: 'grid', data: { provider: 'object', object: 'crm_lead' }, columns: ['name'] },\n * });\n * ```\n */\nexport function defineViewItem(config: z.input<typeof ViewItemSchema>): ViewItem {\n return ViewItemSchema.parse(config);\n}\n\n// ───────────────────────────────────────────────────────────────────────────\n// Canonical persisted-`view`-body schema (the runtime metadata-type schema)\n// ───────────────────────────────────────────────────────────────────────────\n//\n// #3095 — the `view` metadata type maps to THIS schema in\n// `metadata-type-schemas.ts` (both the save-time 422 validator and the\n// read-time `computeMetadataDiagnostics` badge consult it). A single\n// container schema ({@link ViewSchema}) is a NO-OP for two of the three shapes\n// a `view` body actually carries at runtime: Zod strips unknown keys, so a\n// standalone {@link ViewItemSchema} record ({ name, object, viewKind, config })\n// and a console personalization overlay (raw view config + inherited identity)\n// both parse to `{}` — silently \"valid\" while their `config` is never checked.\n//\n// The three legitimate runtime shapes, each validated GENUINELY here:\n//\n// 1. `defineView` aggregate **container** — at least one of\n// `list`/`form`/`listViews`/`formViews`. An empty container is rejected\n// (it registers zero views; mirrors the {@link defineView} guard).\n// 2. Standalone **ViewItem record** — `{ viewKind, config, … }`; the nested\n// `config` is validated against ListView/FormView.\n// 3. **Flattened runtime overlay** — a raw ListView/FormView config at the\n// top level plus optional identity fields (`viewKind`/`object`/`label`,\n// inherited from the shadowed registry entry by `normalizeViewMetadata`;\n// see #2555). This is what a personalization PUT (column sort, inline\n// edit, …) sends. Discriminated from a record by the ABSENCE of a nested\n// `config`, and from a container by the ABSENCE of container slots — the\n// structural guards below make those exclusions explicit so a malformed\n// record/container can never be rescued by this lenient branch.\n//\n// Auxiliary Studio round-trip keys (`isPinned`, `sortOrder`, …) ride along on\n// every shape: all four members strip-parse (no `.strict()`), so an unknown\n// top-level key never 422s — matching the \"persist the payload verbatim\"\n// contract in `saveMetaItem` (it validates but stores the original item).\n\n/**\n * Optional identity + structural-guard fields layered onto the two \"flattened\n * runtime overlay\" members. The `config`/`list`/`form`/`listViews`/`formViews`\n * guards pin those keys to `undefined`: a body carrying any of them is a record\n * or a container, not a flattened overlay, so it must be validated by the\n * dedicated member instead of slipping through here with its real payload\n * stripped away.\n */\nfunction flattenedViewOverlayFields() {\n return {\n name: z.string().optional().describe('Save name / qualified view id (stamped by the write path).'),\n object: z.string().optional().describe('Bound object name (inherited from the shadowed entry — #2555).'),\n viewKind: ViewKindSchema.optional().describe('View family (inherited from the shadowed entry — #2555).'),\n label: I18nLabelSchema.optional().describe('Display label (inherited from the shadowed entry — #2555).'),\n isDefault: z.boolean().optional(),\n order: z.number().int().optional(),\n scope: ViewScopeSchema.optional(),\n owner: z.string().optional(),\n hidden: z.boolean().optional(),\n protection: ProtectionSchema.optional(),\n ...MetadataProtectionFields,\n // Structural guards — a flattened overlay is neither a record nor a container.\n config: z.undefined().optional(),\n list: z.undefined().optional(),\n form: z.undefined().optional(),\n listViews: z.undefined().optional(),\n formViews: z.undefined().optional(),\n };\n}\n\n/**\n * True when a `view` container defines at least one view. The bare\n * {@link ViewSchema} accepts `{}` (every slot optional), which would let an\n * empty overlay pass validation and register nothing — the same footgun\n * {@link defineView} rejects at authoring time.\n */\nfunction containerHasAView(v: unknown): boolean {\n if (!v || typeof v !== 'object') return false;\n const c = v as Record<string, unknown>;\n return Boolean(\n c.list ||\n c.form ||\n (c.listViews && typeof c.listViews === 'object' && Object.keys(c.listViews).length > 0) ||\n (c.formViews && typeof c.formViews === 'object' && Object.keys(c.formViews).length > 0),\n );\n}\n\n/**\n * Canonical schema for ANY persisted `view` metadata body — the schema the\n * `view` type registers in `metadata-type-schemas.ts`. A union over the three\n * runtime shapes (see the block comment above), so save-time validation and\n * read-time diagnostics finally see through `ViewItem`/personalization bodies\n * instead of stripping them to `{}` (#3095).\n *\n * `z.toJSONSchema()` emits this as an `anyOf` of the four members, which the\n * `/api/v1/meta/types/view` endpoint serves to Studio's SchemaForm.\n */\nexport const ViewMetadataSchema = lazySchema(() =>\n z.union([\n // 2. Standalone ViewItem record — nested config validated genuinely.\n ViewItemSchema,\n // 1. Non-empty defineView container.\n ViewSchema.refine(containerHasAView, {\n message:\n 'A view container must define at least one of `list`, `form`, `listViews`, or `formViews`.',\n }),\n // 3. Flattened runtime overlay — inline ListView / FormView config + identity.\n // The list member is tried first; a flattened form (no required\n // `columns`, disjoint `type` enum) then matches the form member.\n ListViewSchema.extend(flattenedViewOverlayFields()),\n FormViewSchema.extend(flattenedViewOverlayFields()),\n ]),\n);\n\n// ───────────────────────────────────────────────────────────────────────────\n// defineView container → ViewItem expansion (shared by every loader)\n//\n// `defineView({ list, form, listViews, formViews })` aggregates an object's\n// views into one document. Each registration path that ingests such a\n// container (the ObjectQL engine boot loop AND the metadata HMR plugin) must\n// expand it into N independent ViewItems registered under `<object>.<viewKey>`,\n// so each view is individually addressable and `getViewsByObject()` can rebuild\n// the switcher. The original container is ALSO kept under the bare `<object>`\n// key for backward-compatible reads. This logic lives in `@objectstack/spec`\n// (depended on by both objectql and metadata) so the two loaders cannot drift.\n\n/** A ViewItem materialised from an aggregated container (always `package`). */\nexport interface ExpandedViewItem {\n name: string;\n object: string;\n viewKind: 'list' | 'form';\n label?: unknown;\n config: any;\n isDefault?: boolean;\n order: number;\n scope: 'package';\n /** Non-blocking expansion diagnostics (MetadataValidationResult wire shape).\n * Present only when the item's name had to be rewritten to avoid a\n * collision — loaders surface `warnings` in their boot/HMR logs and\n * Studio can badge the view. */\n _diagnostics?: { valid: boolean; warnings: Array<{ path: string; message: string }> };\n}\n\n/** True when a raw view artifact still uses the aggregated container shape\n * (and is not already an independent ViewItem, which carries `viewKind`). */\nexport function isAggregatedViewContainer(item: any): boolean {\n if (!item || typeof item !== 'object') return false;\n if (item.viewKind) return false; // already an independent ViewItem\n return Boolean(item.list || item.form || item.listViews || item.formViews);\n}\n\n/** Structural signature used to collapse a container's default `list`/`form`\n * with a redundant `listViews`/`formViews` restatement of the same view (the\n * common \"default == listViews.all\" authoring pattern). */\nfunction viewSignature(v: any): string {\n if (!v || typeof v !== 'object') return '';\n try {\n return JSON.stringify({ type: v.type ?? null, label: v.label ?? null, columns: v.columns ?? null });\n } catch {\n return '';\n }\n}\n\n/** Allocate a collision-free `<object>.<key>` name within one expansion. */\nfunction uniqueViewName(base: string, used: Set<string>): string {\n let name = base;\n let i = 2;\n while (used.has(name)) name = `${base}_${i++}`;\n used.add(name);\n return name;\n}\n\n/** Stamp a rename warning on an expanded item whose `<object>.<key>` name was\n * already taken (e.g. `formViews.default` vs the implicit default `list`).\n * The rename itself is kept for backward compatibility — this makes it LOUD:\n * loaders log the warning and Studio can render it, so authors discover that\n * references to the requested name (form action `target`s, navigation\n * `viewName`s) resolve to a DIFFERENT view. */\nfunction stampRenameWarning(item: ExpandedViewItem, requestedName: string): void {\n if (item.name === requestedName) return;\n item._diagnostics = {\n valid: true,\n warnings: [{\n path: 'name',\n message:\n `View key collision: '${requestedName}' is already registered by another view in this `\n + `defineView container (list and form views share one '<object>.<key>' namespace, and the `\n + `default 'list' implicitly claims '<object>.default'). This ${item.viewKind} view was `\n + `renamed to '${item.name}'. References targeting '${requestedName}' — form action `\n + `targets, navigation viewNames — will resolve to the OTHER view. Rename the view key `\n + `to something unique to remove this warning.`,\n }],\n };\n}\n\nfunction cloneViewConfig(v: any): any {\n try {\n return structuredClone(v);\n } catch {\n return JSON.parse(JSON.stringify(v));\n }\n}\n\n/**\n * A view-key collision detected while expanding one `defineView` container.\n *\n * List and form views share a single `<object>.<key>` namespace during\n * expansion (see {@link expandViewContainer}), and the default `list`\n * implicitly claims `<object>.default`. When a later view competes for a name\n * already taken, it is renamed (`<object>.<key>` → `<object>.<key>_2`) to keep\n * the runtime registry key unique. That rename is a silent footgun: references\n * to the requested name (form action `target`s, navigation `viewName`s) resolve\n * to the OTHER view. The build-time view-ref lint turns each collision into a\n * hard error so the author fixes the key instead of shipping a broken reference.\n */\nexport interface ViewKeyCollision {\n /** The `<object>.<key>` name that was already registered by an earlier view. */\n requested: string;\n /** The disambiguated name the colliding view was renamed to (e.g. `…_2`). */\n renamedTo: string;\n /** Which family the renamed (losing) view belongs to. */\n viewKind: 'list' | 'form';\n /** The raw author-supplied key that collided. */\n key: string;\n}\n\n/** Result of {@link expandViewContainerWithDiagnostics}. */\nexport interface ExpandViewResult {\n items: ExpandedViewItem[];\n collisions: ViewKeyCollision[];\n}\n\n/**\n * Expand an aggregated view container into independent ViewItems, ALSO reporting\n * every name collision that forced a rename.\n *\n * List family: `listViews` entries first (keys taken from the author), then the\n * default `list` — deduped by structural signature so a `listViews.all` that\n * merely restates `list` collapses into one item. The view matching the\n * declared default is flagged `isDefault`. Form family: `formViews` entries,\n * then the default `form`.\n *\n * Collisions are captured at the exact points the shared `used` set forces a\n * rename, so the diagnostic can never drift from the expansion it describes.\n */\nexport function expandViewContainerWithDiagnostics(object: string, container: any): ExpandViewResult {\n const out: ExpandedViewItem[] = [];\n const collisions: ViewKeyCollision[] = [];\n const used = new Set<string>();\n let order = 0;\n\n // ---- list family ----\n const listSigToName = new Map<string, string>();\n const listViews =\n container.listViews && typeof container.listViews === 'object' ? container.listViews : {};\n for (const [k, v] of Object.entries<any>(listViews)) {\n if (!v || typeof v !== 'object') continue;\n const requested = `${object}.${k}`;\n const name = uniqueViewName(requested, used);\n if (name !== requested) collisions.push({ requested, renamedTo: name, viewKind: 'list', key: k });\n listSigToName.set(viewSignature(v), name);\n const item: ExpandedViewItem = { name, object, viewKind: 'list', label: v.label, config: cloneViewConfig(v), order: order++, scope: 'package' };\n stampRenameWarning(item, requested);\n out.push(item);\n }\n const defaultList = container.list;\n let defaultListName: string | undefined;\n if (defaultList && typeof defaultList === 'object') {\n const dup = listSigToName.get(viewSignature(defaultList));\n if (dup) {\n defaultListName = dup; // already represented by a named listViews entry\n } else {\n const key = typeof defaultList.name === 'string' && defaultList.name ? defaultList.name : 'default';\n const requested = `${object}.${key}`;\n const name = uniqueViewName(requested, used);\n if (name !== requested) collisions.push({ requested, renamedTo: name, viewKind: 'list', key });\n const item: ExpandedViewItem = { name, object, viewKind: 'list', label: defaultList.label, config: cloneViewConfig(defaultList), order: order++, scope: 'package' };\n stampRenameWarning(item, requested);\n out.push(item);\n defaultListName = name;\n }\n }\n if (!defaultListName && out.length) defaultListName = out[0].name;\n for (const item of out) {\n if (item.viewKind === 'list' && item.name === defaultListName) item.isDefault = true;\n }\n\n // ---- form family ----\n const formStart = out.length;\n const formSigSeen = new Set<string>();\n const formViews =\n container.formViews && typeof container.formViews === 'object' ? container.formViews : {};\n for (const [k, v] of Object.entries<any>(formViews)) {\n if (!v || typeof v !== 'object') continue;\n const requested = `${object}.${k}`;\n const name = uniqueViewName(requested, used);\n if (name !== requested) collisions.push({ requested, renamedTo: name, viewKind: 'form', key: k });\n formSigSeen.add(viewSignature(v));\n const item: ExpandedViewItem = { name, object, viewKind: 'form', label: v.label, config: cloneViewConfig(v), order: order++, scope: 'package' };\n stampRenameWarning(item, requested);\n out.push(item);\n }\n const defaultForm = container.form;\n let defaultFormName: string | undefined;\n if (defaultForm && typeof defaultForm === 'object' && !formSigSeen.has(viewSignature(defaultForm))) {\n const key = typeof defaultForm.name === 'string' && defaultForm.name ? defaultForm.name : 'form';\n const requested = `${object}.${key}`;\n const name = uniqueViewName(requested, used);\n if (name !== requested) collisions.push({ requested, renamedTo: name, viewKind: 'form', key });\n const item: ExpandedViewItem = { name, object, viewKind: 'form', label: defaultForm.label, config: cloneViewConfig(defaultForm), order: order++, scope: 'package' };\n stampRenameWarning(item, requested);\n out.push(item);\n defaultFormName = name;\n }\n if (!defaultFormName && out.length > formStart) defaultFormName = out[formStart].name;\n for (let i = formStart; i < out.length; i++) {\n if (out[i].name === defaultFormName) out[i].isDefault = true;\n }\n\n return { items: out, collisions };\n}\n\n/**\n * Expand an aggregated view container into independent ViewItems.\n *\n * Thin wrapper over {@link expandViewContainerWithDiagnostics} that discards the\n * collision diagnostics — the shape every runtime loader consumes. Behaviour is\n * unchanged: colliding names are still renamed so the registry key stays unique.\n */\nexport function expandViewContainer(object: string, container: any): ExpandedViewItem[] {\n return expandViewContainerWithDiagnostics(object, container).items;\n}\n\n/**\n * Type-safe factory for a standalone {@link FormView} bound to a JSON Schema\n * rather than to an ObjectQL object.\n *\n * Use this for forms that edit **metadata** (e.g. `report.form.ts`,\n * `dashboard.form.ts`), **action inputs**, or **flow screens** — anywhere the\n * data shape is described by a Zod-derived JSON Schema instead of an Object\n * field set.\n *\n * The returned FormView is validated at definition time; the runtime form\n * renderer (`@object-ui/plugin-form`) inspects `data.provider === 'schema'`\n * and pulls field metadata from the resolved JSON Schema instead of from\n * ObjectQL.\n *\n * @example\n * ```ts\n * export const reportForm = defineForm({\n * schemaId: 'report',\n * type: 'tabbed',\n * sections: [\n * { label: 'Basics', columns: 2, fields: [\n * { field: 'name' },\n * { field: 'label' },\n * { field: 'objectName', widget: 'ref:object' },\n * { field: 'type' },\n * ]},\n * { label: 'Columns', fields: [{ field: 'columns', widget: 'master-detail' }] },\n * { label: 'Advanced', collapsible: true, collapsed: true, fields: [\n * { field: 'filter', widget: 'filter-builder' },\n * { field: 'chart', widget: 'chart-config' },\n * ]},\n * ],\n * });\n * ```\n */\nexport function defineForm(\n config: Omit<z.input<typeof FormViewSchema>, 'data'> & { schemaId: string },\n): FormView {\n const { schemaId, ...rest } = config;\n return FormViewSchema.parse({\n ...rest,\n data: { provider: 'schema', schemaId },\n });\n}\n\nexport type View = z.infer<typeof ViewSchema>;\nexport type ViewItem = z.infer<typeof ViewItemSchema>;\n/** Any persisted `view` metadata body: container | ViewItem record | flattened overlay (#3095). */\nexport type ViewMetadata = z.infer<typeof ViewMetadataSchema>;\nexport type ViewScope = z.infer<typeof ViewScopeSchema>;\nexport type ViewKind = z.infer<typeof ViewKindSchema>;\nexport type ListView = z.infer<typeof ListViewSchema>;\nexport type FormView = z.infer<typeof FormViewSchema>;\nexport type FormSection = z.infer<typeof FormSectionSchema>;\nexport type ListColumn = z.infer<typeof ListColumnSchema>;\nexport type FormField = z.infer<typeof FormFieldSchema>;\nexport type SelectionConfig = z.infer<typeof SelectionConfigSchema>;\nexport type NavigationConfig = z.infer<typeof NavigationConfigSchema>;\nexport type PaginationConfig = z.infer<typeof PaginationConfigSchema>;\nexport type ViewData = z.infer<typeof ViewDataSchema>;\nexport type HttpRequest = z.infer<typeof HttpRequestSchema>;\nexport type HttpMethod = z.infer<typeof HttpMethodSchema>;\nexport type ColumnSummary = z.infer<typeof ColumnSummarySchema>;\nexport type RowHeight = z.infer<typeof RowHeightSchema>;\nexport type GroupingConfig = z.infer<typeof GroupingConfigSchema>;\nexport type GalleryConfig = z.infer<typeof GalleryConfigSchema>;\nexport type TimelineConfig = z.infer<typeof TimelineConfigSchema>;\nexport type ListChartConfig = z.infer<typeof ListChartConfigSchema>;\nexport type ViewSharing = z.infer<typeof ViewSharingSchema>;\nexport type RowColorConfig = z.infer<typeof RowColorConfigSchema>;\nexport type VisualizationType = z.infer<typeof VisualizationTypeSchema>;\nexport type UserActionsConfig = z.infer<typeof UserActionsConfigSchema>;\nexport type AppearanceConfig = z.infer<typeof AppearanceConfigSchema>;\nexport type ViewTab = z.infer<typeof ViewTabSchema>;\nexport type UserFilterField = z.infer<typeof UserFilterFieldSchema>;\nexport type UserFilters = z.infer<typeof UserFiltersSchema>;\nexport type AddRecordConfig = z.infer<typeof AddRecordConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { ProtectionSchema } from '../shared/protection.zod';\nimport { MetadataProtectionFields } from '../kernel/metadata-protection.zod';\nimport { FilterConditionSchema } from '../data/filter.zod';\nimport { ChartTypeSchema, ChartConfigSchema } from './chart.zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\nimport { ResponsiveConfigSchema, PerformanceConfigSchema } from './responsive.zod';\n\n/**\n * Color variant for dashboard widgets (e.g., KPI cards).\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const WidgetColorVariantSchema = lazySchema(() => z.enum([\n 'default',\n 'blue',\n 'teal',\n 'orange',\n 'purple',\n 'success',\n 'warning',\n 'danger',\n]).describe('Widget color variant'));\n\n/**\n * Action type for widget action buttons.\n */\nexport const WidgetActionTypeSchema = lazySchema(() => z.enum([\n 'script',\n 'url',\n 'modal',\n 'flow',\n 'api',\n]).describe('Widget action type'));\n\n/**\n * Dashboard Header Action Schema\n * An action button displayed in the dashboard header area.\n */\nexport const DashboardHeaderActionSchema = lazySchema(() => z.object({\n /** Action label */\n label: I18nLabelSchema.describe('Action button label'),\n\n /** Action URL or target */\n actionUrl: z.string().describe('URL or target for the action'),\n\n /** Action type */\n actionType: WidgetActionTypeSchema.optional().describe('Type of action'),\n\n /** Icon identifier */\n icon: z.string().optional().describe('Icon identifier for the action button'),\n}).describe('Dashboard header action'));\n\n/**\n * Dashboard Header Schema\n * Structured header configuration for the dashboard.\n */\nexport const DashboardHeaderSchema = lazySchema(() => z.object({\n /** Whether to show the dashboard title in the header */\n showTitle: z.boolean().default(true).describe('Show dashboard title in header'),\n\n /** Whether to show the dashboard description in the header */\n showDescription: z.boolean().default(true).describe('Show dashboard description in header'),\n\n /** Action buttons displayed in the header */\n actions: z.array(DashboardHeaderActionSchema).optional().describe('Header action buttons'),\n}).describe('Dashboard header configuration'));\n\n/**\n * Legacy / quarantined widget keys that `.strict()` now rejects. Naming them\n * lets the error map hand the author a fixable message instead of a bare\n * \"unrecognized key\". Two families:\n *\n * - **Pre-ADR-0021 inline analytics** (`object`/`categoryField`/`valueField`/\n * `aggregate`/`rowField`/`columnField`/…): removed from the authorable spec at\n * `@objectstack/spec` 9.0.0 (the single-form cutover). Bind a `dataset` and\n * select `dimensions`/`values` instead.\n * - **objectui-internal props** (`component`, inline `data`): renderer-only\n * capabilities that are intentionally not modeled server-side (framework#3251\n * decision tree) — they must not appear on AI-authored dashboard metadata.\n */\nconst LEGACY_WIDGET_ANALYTICS_KEYS = new Set([\n 'object', 'categoryField', 'categoryGranularity', 'valueField', 'aggregate',\n 'aggregation', 'rowField', 'columnField', 'xAxisField', 'yAxisFields', 'measures',\n]);\nconst QUARANTINED_WIDGET_KEYS = new Set(['component', 'data']);\n\n/**\n * Error map for the strict `DashboardWidgetSchema`. Turns an\n * `unrecognized_keys` rejection into a *fixable* message: it always names the\n * offending key(s), and when a key is a removed inline-analytics key or an\n * objectui-internal prop it points the author at the ADR-0021 dataset shape\n * (and `options` for renderer-specific extras). Mirrors `strictVisibilityError`\n * (ADR-0089 D3a); every other issue code defers to zod's default.\n */\nconst strictWidgetAnalyticsError: z.core.$ZodErrorMap = (issue) => {\n if (issue.code !== 'unrecognized_keys') return undefined;\n const keys = (issue as { keys?: readonly string[] }).keys ?? [];\n const list = keys.map((k) => `\\`${k}\\``).join(', ');\n const base =\n `Unrecognized key(s) on this dashboard widget: ${list}. ` +\n `Undeclared top-level keys were dropped silently before strict validation, ` +\n `shipping inert metadata; a stale or mis-layered key is now a loud parse error.`;\n if (keys.some((k) => LEGACY_WIDGET_ANALYTICS_KEYS.has(k))) {\n return (\n base +\n ' The pre-ADR-0021 inline analytics shape (`object` + `categoryField` + ' +\n '`valueField` + `aggregate`, pivot `rowField`/`columnField`) was removed — ' +\n 'bind a `dataset` and select `dimensions` + `values` by name. Renderer-only ' +\n 'settings belong under `options`.'\n );\n }\n if (keys.some((k) => QUARANTINED_WIDGET_KEYS.has(k))) {\n return (\n base +\n ' `component` and inline `data` are objectui-internal renderer capabilities, ' +\n 'not part of the author-facing dashboard spec (framework#3251).'\n );\n }\n return base;\n};\n\n/**\n * Dashboard Widget Schema\n * A single component on the dashboard grid.\n */\nexport const DashboardWidgetSchema = lazySchema(() => z.object({\n /** Unique widget identifier (snake_case, used for targetWidgets references) */\n id: SnakeCaseIdentifierSchema.describe('Unique widget identifier (snake_case)'),\n\n /** Widget Title */\n title: I18nLabelSchema.optional().describe('Widget title'),\n\n /** Widget Description (displayed below the title) */\n description: I18nLabelSchema.optional().describe('Widget description text below the header'),\n \n /** Visualization Type */\n type: ChartTypeSchema.default('metric').describe('Visualization type'),\n \n /** Chart Configuration */\n chartConfig: ChartConfigSchema.optional().describe('Chart visualization configuration'),\n\n /** Color variant for the widget (e.g., KPI card accent color) */\n colorVariant: WidgetColorVariantSchema.optional().describe('Widget color variant for theming'),\n\n /**\n * Runtime capability gate — widget is hidden when the named object is\n * not registered in the runtime's SchemaRegistry. Mirrors\n * `NavigationItem.requiresObject` so cloud-only widgets (e.g. those\n * keyed on `sys_app` / `sys_package_installation`) silently disappear\n * in single-environment runtimes instead of rendering a 404 error.\n * Set explicitly to the dataset's base object when the widget should be\n * gated on that object's availability.\n */\n requiresObject: z.string().optional().describe('Hide the widget unless the named object is registered'),\n\n /**\n * Runtime capability gate — widget is hidden when the named kernel\n * service is not registered. Mirrors `NavigationItem.requiresService`.\n */\n requiresService: z.string().optional().describe('Hide the widget unless the named kernel service is registered'),\n\n /** Action URL for the widget header action button */\n actionUrl: z.string().optional().describe('URL or target for the widget action button'),\n\n /** Action type for the widget header action button */\n actionType: WidgetActionTypeSchema.optional().describe('Type of action for the widget action button'),\n\n /** Icon for the widget header action button */\n actionIcon: z.string().optional().describe('Icon identifier for the widget action button'),\n \n /** Presentation-scope filter (MongoDB-style), ANDed into the dataset query as `runtimeFilter`. */\n filter: FilterConditionSchema.optional().describe('Presentation-scope filter (runtimeFilter)'),\n\n /**\n * Period-over-period comparison primitive.\n *\n * When set, the renderer runs a second query against a shifted time\n * window and surfaces the delta (metric widgets show a secondary\n * value + arrow; chart widgets render a muted/dashed overlay series).\n *\n * - `'previousPeriod'` — auto-detect the comparison window from the\n * widget's `filter` date macros (e.g. `{current_month_start}` →\n * `{last_month_start}`). Falls back to no comparison when the\n * filter contains no resolvable date range.\n * - `'previousYear'` — shift the resolved filter window back by one\n * calendar year.\n * - `{ offset: '7d' | '1M' | '1y' }` — shift by an explicit\n * ISO-8601-like duration. Units: `d` (days), `w` (weeks),\n * `M` (months), `y` (years).\n */\n compareTo: z.union([\n z.literal('previousPeriod'),\n z.literal('previousYear'),\n z.object({\n offset: z.string().regex(/^\\d+[dwMy]$/, 'Offset must match <N>(d|w|M|y), e.g. \"7d\", \"1M\", \"1y\"'),\n }),\n ]).optional().describe('Period-over-period comparison window'),\n\n /**\n * ADR-0021 — the semantic-layer `dataset` this widget binds to. The widget\n * selects the dataset's dimensions/measures BY NAME; the dataset owns the base\n * object, allowed joins, intrinsic filter, dimensions, and measures,\n * so numbers stay consistent across every surface. This is the single\n * author-facing analytics shape (the legacy inline `object` + `categoryField`\n * + `valueField` + `aggregate` query was removed in the single-form cutover).\n */\n dataset: SnakeCaseIdentifierSchema.describe('Dataset name to bind (ADR-0021)'),\n /** Dimension names (from the dataset) for X / group / split. */\n dimensions: z.array(z.string()).optional().describe('Dimension names — X/group/split'),\n /** Measure names (from the dataset) for the value axis. */\n values: z.array(z.string()).min(1).describe('Measure names — Y (at least one)'),\n\n /**\n * Layout Position (React-Grid-Layout style)\n * x: column (0-11)\n * y: row\n * w: width (1-12)\n * h: height\n *\n * OPTIONAL — when omitted, the renderer auto-flows the widget into the grid\n * (DashboardGridLayout falls back to `x: (i % 4) * 3, y: Math.floor(i/4) * 4,\n * w: 3, h: 4`). The Studio dashboard designer adds widgets WITHOUT a layout\n * and relies on this auto-flow; requiring `layout` here made every\n * designer-authored dashboard fail validation (422 on draft save, Publish\n * disabled) even though it rendered correctly. Authors may still pin an\n * explicit grid position; absence means \"auto-place\".\n */\n layout: z.object({\n x: z.number(),\n y: z.number(),\n w: z.number(),\n h: z.number(),\n }).optional().describe('Grid layout position (auto-flowed when omitted)'),\n \n /** Widget specific options (colors, legend, etc.) */\n options: z.unknown().optional().describe('Widget specific configuration'),\n\n /**\n * Per-widget bindings from a dashboard-level filter (referenced by its\n * `name`, or the reserved name `\"dateRange\"` for the built-in date range)\n * to one of THIS widget's fields (framework#2501):\n * - string → apply the filter to that field (e.g. `{ dateRange: 'signed_at' }`)\n * - false → opt this widget out of that filter\n * - absent → default binding: the filter's own `field`\n * (dateRange: `dateRange.field ?? 'created_at'`)\n */\n filterBindings: z.record(z.string(), z.union([z.string(), z.literal(false)])).optional()\n .describe(\"Per-widget dashboard-filter bindings: filter name → this widget's field, or false to opt out\"),\n\n /**\n * Rule ids of build diagnostics intentionally suppressed on this widget\n * (e.g. `'table-count-only'` when a single-row summary table is deliberate).\n * Consumed by `objectstack build` / `objectstack lint`; no runtime effect.\n */\n suppressWarnings: z.array(z.string()).optional().describe('Build diagnostic rule ids suppressed on this widget'),\n\n /** Responsive layout overrides per breakpoint */\n responsive: ResponsiveConfigSchema.optional().describe('Responsive layout configuration'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n // ADR-0021 single-form: every widget binds a `dataset` and selects `values`\n // (both required above) — there is no inline-query shape to disambiguate.\n}, { error: strictWidgetAnalyticsError })\n // ADR-0021 endpoint (framework#3251, protocol 16 `step16`): reject undeclared\n // top-level keys instead of silently stripping them. A hallucinated or legacy\n // key is now a deterministic author-time error (CI) rather than a silent\n // no-op a human reviewer would miss. `options` stays the free-form escape\n // hatch for renderer-specific extras.\n .strict());\n\n/**\n * Dynamic options binding for global filters.\n * Allows dropdown options to be fetched from an object at runtime.\n */\nexport const GlobalFilterOptionsFromSchema = lazySchema(() => z.object({\n /** Source object name to fetch options from */\n object: z.string().describe('Source object name'),\n\n /** Field to use as option value */\n valueField: z.string().describe('Field to use as option value'),\n\n /** Field to use as option label */\n labelField: z.string().describe('Field to use as option label'),\n\n /** Optional filter to apply when fetching options */\n filter: FilterConditionSchema.optional().describe('Filter to apply to source object'),\n}).describe('Dynamic filter options from object'));\n\n/**\n * Global Filter Schema\n * Defines a single global filter control for the dashboard filter bar.\n */\nexport const GlobalFilterSchema = lazySchema(() => z.object({\n /**\n * Stable filter name (framework#2501) — the dashboard-variable key under\n * which the filter's value is published (readable in widget expressions as\n * `page.<name>`) and the key widgets reference in `filterBindings`.\n * Defaults to `field`. The name `\"dateRange\"` is reserved for the built-in\n * dashboard date range.\n */\n name: z.string().optional().describe('Stable filter name (variable key); defaults to field'),\n\n /** Field name to filter on */\n field: z.string().describe('Field name to filter on'),\n\n /** Display label for the filter */\n label: I18nLabelSchema.optional().describe('Display label for the filter'),\n\n /** Filter input type */\n type: z.enum(['text', 'select', 'date', 'number', 'lookup']).optional().describe('Filter input type'),\n\n /** Static options for select/lookup filters */\n options: z.array(z.object({\n value: z.union([z.string(), z.number(), z.boolean()]).describe('Option value'),\n label: I18nLabelSchema,\n })).optional().describe('Static filter options'),\n\n /** Dynamic data binding for filter options */\n optionsFrom: GlobalFilterOptionsFromSchema.optional().describe('Dynamic filter options from object'),\n\n /** Default filter value */\n defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional().describe('Default filter value'),\n\n /** Filter application scope */\n scope: z.enum(['dashboard', 'widget']).default('dashboard').describe('Filter application scope'),\n\n /** Widget IDs to apply this filter to (when scope is widget) */\n targetWidgets: z.array(z.string()).optional().describe('Widget IDs to apply this filter to'),\n}));\n\n/**\n * Dashboard Schema\n * Represents a page containing multiple visualizations.\n * \n * @example Sales Executive Dashboard (ADR-0021: widgets bind a `dataset` and\n * select `dimensions`/`values` BY NAME — each metric/measure is defined once in\n * `defineDataset`, never inline on the widget)\n * {\n * name: \"sales_overview\",\n * label: \"Sales Executive Overview\",\n * widgets: [\n * {\n * title: \"Total Pipe\",\n * type: \"metric\",\n * dataset: \"opportunity_metrics\",\n * values: [\"amount_sum\"],\n * layout: { x: 0, y: 0, w: 3, h: 2 }\n * },\n * {\n * title: \"Revenue by Region\",\n * type: \"bar\",\n * dataset: \"order_metrics\",\n * dimensions: [\"region\"],\n * values: [\"total_sum\"],\n * layout: { x: 3, y: 0, w: 6, h: 4 }\n * }\n * ]\n * }\n */\nexport const DashboardSchema = lazySchema(() => z.object({\n /** Machine name */\n name: SnakeCaseIdentifierSchema.describe('Dashboard unique name'),\n \n /** Display label */\n label: I18nLabelSchema.describe('Dashboard label'),\n \n /** Description */\n description: I18nLabelSchema.optional().describe('Dashboard description'),\n\n /** Structured header configuration */\n header: DashboardHeaderSchema.optional().describe('Dashboard header configuration'),\n \n /** Collection of widgets */\n widgets: z.array(DashboardWidgetSchema).describe('Widgets to display'),\n\n /** Grid column count — defaults to 12 for a standard 12-column grid */\n columns: z.number().int().min(1).max(24).optional().describe('Number of grid columns (default 12)'),\n\n /** Grid gap in Tailwind spacing units (e.g. 4 = 1rem) */\n gap: z.number().int().min(0).optional().describe('Grid gap in Tailwind spacing units'),\n\n /** Auto-refresh */\n refreshInterval: z.number().optional().describe('Auto-refresh interval in seconds'),\n\n /** Dashboard Date Range (Global time filter) */\n dateRange: z.object({\n field: z.string().optional().describe('Default date field name for time-based filtering'),\n defaultRange: z.enum(['today', 'yesterday', 'this_week', 'last_week', 'this_month', 'last_month', 'this_quarter', 'last_quarter', 'this_year', 'last_year', 'last_7_days', 'last_30_days', 'last_90_days', 'custom']).default('this_month').describe('Default date range preset'),\n allowCustomRange: z.boolean().default(true).describe('Allow users to pick a custom date range'),\n }).optional().describe('Global dashboard date range filter configuration'),\n\n /** Global Filters */\n globalFilters: z.array(GlobalFilterSchema).optional().describe('Global filters that apply to all widgets in the dashboard'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n\n /** Performance optimization settings */\n performance: PerformanceConfigSchema.optional().describe('Performance optimization settings'),\n /**\n * ADR-0010 §3.7 — Package-level protection envelope. Package\n * authors declare lock policy here; the loader translates it\n * into the private `_lock` envelope at registration time and\n * strips this block before persistence. See\n * `shared/protection.zod.ts`.\n */\n protection: ProtectionSchema.optional().describe(\n 'Package author protection block — lock policy for this dashboard.',\n ),\n\n // ADR-0010 — runtime protection envelope (internal — set by loader).\n ...MetadataProtectionFields,\n\n}));\n\nexport type Dashboard = z.infer<typeof DashboardSchema>;\nexport type DashboardInput = z.input<typeof DashboardSchema>;\nexport type DashboardWidget = z.infer<typeof DashboardWidgetSchema>;\nexport type DashboardHeader = z.infer<typeof DashboardHeaderSchema>;\nexport type DashboardHeaderAction = z.infer<typeof DashboardHeaderActionSchema>;\nexport type WidgetColorVariant = z.infer<typeof WidgetColorVariantSchema>;\nexport type WidgetActionType = z.infer<typeof WidgetActionTypeSchema>;\nexport type GlobalFilter = z.infer<typeof GlobalFilterSchema>;\nexport type GlobalFilterOptionsFrom = z.infer<typeof GlobalFilterOptionsFromSchema>;\n\n/**\n * Dashboard Factory Helper\n */\nexport const Dashboard = {\n create: (config: z.input<typeof DashboardSchema>): Dashboard => DashboardSchema.parse(config),\n} as const;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { ProtectionSchema } from '../shared/protection.zod';\nimport { MetadataProtectionFields } from '../kernel/metadata-protection.zod';\nimport { FilterConditionSchema } from '../data/filter.zod';\nimport { ChartConfigSchema } from './chart.zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\nimport { ResponsiveConfigSchema, PerformanceConfigSchema } from './responsive.zod';\n\n/**\n * Report Type Enum\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const ReportType = z.enum([\n 'tabular', // Simple list\n 'summary', // Grouped by row\n 'matrix', // Grouped by row and column\n 'joined' // Joined multiple blocks\n]);\n\n/**\n * Report Column Schema\n */\nexport const ReportColumnSchema = lazySchema(() => z.object({\n field: z.string().describe('Field name'),\n label: I18nLabelSchema.optional().describe('Override label'),\n aggregate: z.enum(['sum', 'avg', 'max', 'min', 'count', 'unique']).optional().describe('Aggregation function'),\n /** Responsive visibility/priority per breakpoint */\n responsive: ResponsiveConfigSchema.optional().describe('Responsive visibility for this column'),\n}));\n\n/**\n * Report Grouping Schema\n */\nexport const ReportGroupingSchema = lazySchema(() => z.object({\n field: z.string().describe('Field to group by'),\n sortOrder: z.enum(['asc', 'desc']).default('asc'),\n dateGranularity: z.enum(['day', 'week', 'month', 'quarter', 'year']).optional().describe('For date fields'),\n}));\n\n/**\n * Report Chart Schema\n * Embedded visualization configuration using unified chart taxonomy.\n */\nexport const ReportChartSchema = lazySchema(() => ChartConfigSchema.extend({\n /** Report-specific chart configuration */\n xAxis: z.string().describe('Grouping field for X-Axis'),\n yAxis: z.string().describe('Summary field for Y-Axis'),\n groupBy: z.string().optional().describe('Additional grouping field'),\n}));\n\n/**\n * Joined Report Block Schema\n *\n * Represents a single sub-report inside a `type: 'joined'` report. Each block\n * is a self-contained, independently-queried report stacked vertically (or\n * arranged in a grid) inside the joined container. Blocks are used for\n * comparative dashboards where each panel is a different slice of the same\n * domain — e.g. \"new customers / churned / silent\" in a customer-churn\n * report, or \"new / qualified / closed\" in a lead-funnel report.\n *\n * Blocks may declare their own filter (combined with the container filter\n * via `$and` at render time) and their own grouping / aggregation.\n *\n * Notes for implementers:\n * - `type` defaults to `tabular` — leave a block's type implicit if the\n * sub-report is just a list. Set explicitly to `summary` or `matrix` for\n * aggregated blocks.\n * - The schema is intentionally permissive about the column shape: blocks\n * are not allowed to be themselves `joined` (no recursion).\n */\nexport const JoinedReportBlockSchema: z.ZodTypeAny = lazySchema(() => z.object({\n /** Stable id for the block (used as react key, telemetry, deeplinks). */\n name: SnakeCaseIdentifierSchema,\n /** Human label shown above the block. Falls back to `name`. */\n label: I18nLabelSchema.optional(),\n /** Optional description rendered below the label. */\n description: I18nLabelSchema.optional(),\n /** Block report type — `joined` is intentionally excluded (no recursion). */\n type: z.enum(['tabular', 'summary', 'matrix']).default('tabular'),\n /** Optional inline chart configuration. */\n chart: ReportChartSchema.optional(),\n\n /**\n * ADR-0021 — the dataset this block binds to (single-form). The block selects\n * the dataset's measures by name; the legacy inline `objectName` + `columns` +\n * `groupings` query was removed in the cutover.\n */\n dataset: SnakeCaseIdentifierSchema.optional().describe('Dataset name to bind (ADR-0021)'),\n /** Dimension names (from the dataset) to group rows by. Dataset-bound only. */\n rows: z.array(z.string()).optional().describe('Dimension names down (dataset-bound)'),\n /** Dimension names across — matrix blocks pivot rows × columns (ADR-0021 D2). */\n columns: z.array(z.string()).optional().describe('Dimension names across (matrix, dataset-bound)'),\n /** Measure names (from the dataset) to display. Dataset-bound only. */\n values: z.array(z.string()).optional().describe('Measure names to show (dataset-bound)'),\n /** Render-time scope filter, ANDed at query time. Dataset-bound only. */\n runtimeFilter: FilterConditionSchema.optional().describe('Render-time scope filter (dataset-bound)'),\n}));\n\n/**\n * Report Schema\n * Deep data analysis definition.\n */\nexport const ReportSchema = lazySchema(() => z.object({\n /** Identity */\n name: SnakeCaseIdentifierSchema.describe('Report unique name'),\n label: I18nLabelSchema.describe('Report label'),\n description: I18nLabelSchema.optional(),\n\n /** Report Configuration */\n type: ReportType.default('tabular').describe('Report format type'),\n\n /**\n * ADR-0021 — the semantic-layer `dataset` this report binds to. The report\n * renders the dataset's named measures grouped by the chosen `rows`\n * dimensions — numbers stay consistent with every other surface using the\n * same dataset. This is the single author-facing analytics shape (the legacy\n * inline `objectName` + `columns` + `groupings` query was removed in the\n * single-form cutover). For a `joined` report, the data lives on `blocks`.\n */\n dataset: SnakeCaseIdentifierSchema.optional().describe('Dataset name to bind (ADR-0021)'),\n /** Dimension names (from the dataset) to group rows by (down axis). */\n rows: z.array(z.string()).optional().describe('Dimension names down'),\n /**\n * Dimension names across (ADR-0021 D2) — a `matrix` report pivots\n * `rows` × `columns` with `values` in the cells. Ignored for other types.\n */\n columns: z.array(z.string()).optional().describe('Dimension names across (matrix)'),\n /** Measure names (from the dataset) to display. */\n values: z.array(z.string()).optional().describe('Measure names to show'),\n /** Render-time scope filter, ANDed at query time. */\n runtimeFilter: FilterConditionSchema.optional().describe('Render-time scope filter'),\n /**\n * ADR-0021 D2 — click an aggregated row/cell to open the underlying\n * records (dataset-backed; the host resolves the dataset's object and\n * dimension→field mapping). Default on; set `false` to disable.\n */\n drilldown: z.boolean().default(true).describe('Click-through to underlying records'),\n\n /** Visualization */\n chart: ReportChartSchema.optional().describe('Embedded chart configuration'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n\n /** Performance optimization settings */\n performance: PerformanceConfigSchema.optional().describe('Performance optimization settings'),\n\n /**\n * Joined report blocks — only meaningful when `type: 'joined'`.\n *\n * A joined report renders multiple independent sub-reports stacked\n * vertically in the same view. Each block declares its own object,\n * columns, groupings and filter. The container-level `filter` is ANDed\n * into every block at query time so a top-level scope (e.g. \"this\n * quarter\") flows down without per-block duplication.\n *\n * Renderers must ignore `blocks` when `type !== 'joined'`.\n */\n blocks: z.array(JoinedReportBlockSchema).optional().describe('Sub-reports for type=joined'),\n /**\n * ADR-0010 §3.7 — Package-level protection envelope. Package\n * authors declare lock policy here; the loader translates it\n * into the private `_lock` envelope at registration time and\n * strips this block before persistence. See\n * `shared/protection.zod.ts`.\n */\n protection: ProtectionSchema.optional().describe(\n 'Package author protection block — lock policy for this report.',\n ),\n\n // ADR-0010 — runtime protection envelope (internal — set by loader).\n ...MetadataProtectionFields,\n\n}).superRefine((r, ctx) => {\n // ADR-0021 single-form: a report is dataset-bound. A `joined` report carries\n // its data on `blocks` (each block dataset-bound); every other type needs a\n // top-level `dataset` + `values`.\n if (r.type === 'joined') {\n if (!r.blocks || r.blocks.length === 0) {\n ctx.addIssue({ code: 'custom', message: 'a `joined` report needs `blocks`.', path: ['blocks'] });\n }\n } else if (!r.dataset || !r.values || r.values.length === 0) {\n ctx.addIssue({\n code: 'custom',\n message: 'a report needs `dataset` + `values` (measure names).',\n path: ['dataset'],\n });\n }\n}));\n\nexport type JoinedReportBlock = z.infer<typeof JoinedReportBlockSchema>;\nexport type JoinedReportBlockInput = z.input<typeof JoinedReportBlockSchema>;\n\n/**\n * Report Types\n * \n * Note: For configuration/definition contexts, use the Input types (e.g., ReportInput)\n * which allow optional fields with defaults to be omitted.\n */\nexport type Report = z.infer<typeof ReportSchema>;\nexport type ReportColumn = z.infer<typeof ReportColumnSchema>;\nexport type ReportGrouping = z.infer<typeof ReportGroupingSchema>;\nexport type ReportChart = z.infer<typeof ReportChartSchema>;\n\n/**\n * Input Types for Report Configuration\n * Use these when defining reports in configuration files.\n */\nexport type ReportInput = z.input<typeof ReportSchema>;\nexport type ReportColumnInput = z.input<typeof ReportColumnSchema>;\nexport type ReportGroupingInput = z.input<typeof ReportGroupingSchema>;\nexport type ReportChartInput = z.input<typeof ReportChartSchema>;\n\n/**\n * Report Factory Helper\n */\nexport const Report = {\n create: (config: ReportInput): Report => ReportSchema.parse(config),\n} as const;\n\n/**\n * Type-safe factory for an analytics report. Validates at authoring time via\n * `.parse()` and accepts input-shape config (optional defaults, CEL\n * shorthand) — preferred over a bare `: Report` literal.\n */\nexport function defineReport(config: z.input<typeof ReportSchema>): Report {\n return ReportSchema.parse(config);\n}\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { FilterConditionSchema } from './filter.zod';\n\n/**\n * Sort Node\n * Represents \"Order By\".\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const SortNodeSchema = lazySchema(() => z.object({\n field: z.string(),\n order: z.enum(['asc', 'desc']).default('asc')\n}));\n\n/**\n * Aggregation Function Enum\n * Standard aggregation functions for data analysis.\n * \n * Supported Functions:\n * - **count**: Count rows (SQL: COUNT(*) or COUNT(field))\n * - **sum**: Sum numeric values (SQL: SUM(field))\n * - **avg**: Average numeric values (SQL: AVG(field))\n * - **min**: Minimum value (SQL: MIN(field))\n * - **max**: Maximum value (SQL: MAX(field))\n * - **count_distinct**: Count unique values (SQL: COUNT(DISTINCT field))\n * - **array_agg**: Aggregate values into array (SQL: ARRAY_AGG(field))\n * - **string_agg**: Concatenate values (SQL: STRING_AGG(field, delimiter))\n * \n * Performance Considerations:\n * - COUNT(*) is typically faster than COUNT(field) as it doesn't check for nulls\n * - COUNT DISTINCT may require additional memory for tracking unique values\n * - Window aggregates (with OVER clause) can be more efficient than subqueries\n * - Large GROUP BY operations benefit from proper indexing on grouped fields\n * \n * @example\n * // SQL: SELECT region, SUM(amount) FROM sales GROUP BY region\n * {\n * object: 'sales',\n * fields: ['region'],\n * aggregations: [\n * { function: 'sum', field: 'amount', alias: 'total_sales' }\n * ],\n * groupBy: ['region']\n * }\n * \n * @example\n * // Salesforce SOQL: SELECT COUNT(Id) FROM Account\n * {\n * object: 'account',\n * aggregations: [\n * { function: 'count', alias: 'total_accounts' }\n * ]\n * }\n */\nexport const AggregationFunction = z.enum([\n 'count', 'sum', 'avg', 'min', 'max',\n 'count_distinct', 'array_agg', 'string_agg'\n]);\n\n/**\n * Date Granularity Enum\n * Used to bucket date/timestamp fields into uniform periods during GROUP BY.\n *\n * Backends MAY emit `DATE_TRUNC` (PostgreSQL), `DATE_FORMAT` (MySQL),\n * `$dateTrunc` (MongoDB), or any other equivalent. When a driver does not\n * support server-side truncation the engine falls back to an in-memory bucket\n * using ISO-8601 conventions (weeks start Monday).\n */\nexport const DateGranularity = z.enum(['day', 'week', 'month', 'quarter', 'year']);\n\n/**\n * GroupBy Node\n *\n * A grouping target — either a bare field name (string) for plain grouping,\n * or a structured object that adds `dateGranularity` for time-bucketed\n * grouping. The string form remains the canonical short-hand:\n *\n * ```ts\n * groupBy: ['region', { field: 'closed_at', dateGranularity: 'quarter' }]\n * ```\n *\n * This is backward-compatible: every existing `groupBy: ['region']` payload\n * continues to validate.\n */\nexport const GroupByNodeSchema = lazySchema(() => z.union([\n z.string(),\n z.object({\n field: z.string().describe('Field to group by'),\n dateGranularity: DateGranularity.optional().describe('Bucket date values into uniform periods (day/week/month/quarter/year)'),\n /** Optional alias for the projected group value (defaults to `field`). */\n alias: z.string().optional().describe('Alias for the projected group value'),\n }),\n]));\n\n/**\n * Aggregation Node\n * Represents an aggregated field with function.\n * \n * Aggregations summarize data across groups of rows (GROUP BY).\n * Used with `groupBy` to create analytical queries.\n * \n * @example\n * // SQL: SELECT customer_id, COUNT(*), SUM(amount) FROM orders GROUP BY customer_id\n * {\n * object: 'order',\n * fields: ['customer_id'],\n * aggregations: [\n * { function: 'count', alias: 'order_count' },\n * { function: 'sum', field: 'amount', alias: 'total_amount' }\n * ],\n * groupBy: ['customer_id']\n * }\n * \n * @example\n * // Salesforce SOQL: SELECT LeadSource, COUNT(Id) FROM Lead GROUP BY LeadSource\n * {\n * object: 'lead',\n * fields: ['lead_source'],\n * aggregations: [\n * { function: 'count', alias: 'lead_count' }\n * ],\n * groupBy: ['lead_source']\n * }\n */\nexport const AggregationNodeSchema = lazySchema(() => z.object({\n function: AggregationFunction.describe('Aggregation function'),\n field: z.string().optional().describe('Field to aggregate (optional for COUNT(*))'),\n alias: z.string().describe('Result column alias'),\n distinct: z.boolean().optional().describe('Apply DISTINCT before aggregation'),\n filter: FilterConditionSchema.optional().describe('Filter/Condition to apply to the aggregation (FILTER WHERE clause)'),\n}));\n\n/**\n * Join Type Enum\n * Standard SQL join types for combining tables.\n * \n * Join Types:\n * - **inner**: Returns only matching rows from both tables (SQL: INNER JOIN)\n * - **left**: Returns all rows from left table, matching rows from right (SQL: LEFT JOIN)\n * - **right**: Returns all rows from right table, matching rows from left (SQL: RIGHT JOIN)\n * - **full**: Returns all rows from both tables (SQL: FULL OUTER JOIN)\n * \n * @example\n * // SQL: SELECT * FROM orders INNER JOIN customers ON orders.customer_id = customers.id\n * {\n * object: 'order',\n * joins: [\n * {\n * type: 'inner',\n * object: 'customer',\n * on: ['order.customer_id', '=', 'customer.id']\n * }\n * ]\n * }\n * \n * @example\n * // Salesforce SOQL-style: Find all customers and their orders (if any)\n * {\n * object: 'customer',\n * joins: [\n * {\n * type: 'left',\n * object: 'order',\n * on: ['customer.id', '=', 'order.customer_id']\n * }\n * ]\n * }\n */\nexport const JoinType = z.enum(['inner', 'left', 'right', 'full']);\n\n/**\n * Join Execution Strategy\n * Hints to the query engine on how to execute the join.\n * \n * Strategies:\n * - **auto**: Engine decides best strategy (Default).\n * - **database**: Push down join to the database (Requires same datasource).\n * - **hash**: Load both sets into memory and hash join (Cross-datasource, memory intensive).\n * - **loop**: Nested loop lookup (N+1 safe version). (Good for small right-side lookups).\n */\nexport const JoinStrategy = z.enum(['auto', 'database', 'hash', 'loop']);\n\n/**\n * Join Node\n * Represents table joins for combining data from multiple objects.\n * \n * Joins connect related data across multiple tables using ON conditions.\n * Supports both direct object joins and subquery joins.\n * \n * @example\n * // SQL: SELECT o.*, c.name FROM orders o INNER JOIN customers c ON o.customer_id = c.id\n * {\n * object: 'order',\n * fields: ['id', 'amount'],\n * joins: [\n * {\n * type: 'inner',\n * object: 'customer',\n * alias: 'c',\n * on: ['order.customer_id', '=', 'c.id']\n * }\n * ]\n * }\n * \n * @example\n * // SQL: Multi-table join\n * // SELECT * FROM orders o\n * // INNER JOIN customers c ON o.customer_id = c.id\n * // LEFT JOIN shipments s ON o.id = s.order_id\n * {\n * object: 'order',\n * joins: [\n * {\n * type: 'inner',\n * object: 'customer',\n * alias: 'c',\n * on: ['order.customer_id', '=', 'c.id']\n * },\n * {\n * type: 'left',\n * object: 'shipment',\n * alias: 's',\n * on: ['order.id', '=', 's.order_id']\n * }\n * ]\n * }\n * \n * @example\n * // Salesforce SOQL: SELECT Name, (SELECT LastName FROM Contacts) FROM Account\n * {\n * object: 'account',\n * fields: ['name'],\n * joins: [\n * {\n * type: 'left',\n * object: 'contact',\n * on: ['account.id', '=', 'contact.account_id']\n * }\n * ]\n * }\n * \n * @example\n * // Subquery Join: Join with a filtered/aggregated dataset\n * {\n * object: 'customer',\n * joins: [\n * {\n * type: 'left',\n * object: 'order',\n * alias: 'high_value_orders',\n * on: ['customer.id', '=', 'high_value_orders.customer_id'],\n * subquery: {\n * object: 'order',\n * fields: ['customer_id', 'total'],\n * filters: ['total', '>', 1000]\n * }\n * }\n * ]\n * }\n */\nexport const JoinNodeSchema: z.ZodType<any> = z.lazy(() => \n z.object({\n type: JoinType.describe('Join type'),\n strategy: JoinStrategy.optional().describe('Execution strategy hint'),\n object: z.string().describe('Object/table to join'),\n alias: z.string().optional().describe('Table alias'),\n on: FilterConditionSchema.describe('Join condition'),\n subquery: z.lazy(() => QuerySchema).optional().describe('Subquery instead of object'),\n })\n);\n\n/**\n * Window Function Enum\n * Advanced analytical functions for row-based calculations.\n * \n * Window Functions:\n * - **row_number**: Sequential number within partition (SQL: ROW_NUMBER() OVER (...))\n * - **rank**: Rank with gaps for ties (SQL: RANK() OVER (...))\n * - **dense_rank**: Rank without gaps (SQL: DENSE_RANK() OVER (...))\n * - **percent_rank**: Relative rank as percentage (SQL: PERCENT_RANK() OVER (...))\n * - **lag**: Access previous row value (SQL: LAG(field) OVER (...))\n * - **lead**: Access next row value (SQL: LEAD(field) OVER (...))\n * - **first_value**: First value in window (SQL: FIRST_VALUE(field) OVER (...))\n * - **last_value**: Last value in window (SQL: LAST_VALUE(field) OVER (...))\n * - **sum/avg/count/min/max**: Aggregates over window (SQL: SUM(field) OVER (...))\n * \n * @example\n * // SQL: SELECT *, ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY amount DESC) as rank\n * // FROM orders\n * {\n * object: 'order',\n * fields: ['id', 'customer_id', 'amount'],\n * windowFunctions: [\n * {\n * function: 'row_number',\n * alias: 'rank',\n * over: {\n * partitionBy: ['customer_id'],\n * orderBy: [{ field: 'amount', order: 'desc' }]\n * }\n * }\n * ]\n * }\n * \n * @example\n * // SQL: Running total with SUM() OVER (...)\n * {\n * object: 'transaction',\n * fields: ['date', 'amount'],\n * windowFunctions: [\n * {\n * function: 'sum',\n * field: 'amount',\n * alias: 'running_total',\n * over: {\n * orderBy: [{ field: 'date', order: 'asc' }],\n * frame: {\n * type: 'rows',\n * start: 'UNBOUNDED PRECEDING',\n * end: 'CURRENT ROW'\n * }\n * }\n * }\n * ]\n * }\n */\nexport const WindowFunction = z.enum([\n 'row_number', 'rank', 'dense_rank', 'percent_rank',\n 'lag', 'lead', 'first_value', 'last_value',\n 'sum', 'avg', 'count', 'min', 'max'\n]);\n\n/**\n * Window Specification\n * Defines PARTITION BY and ORDER BY for window functions.\n * \n * Window specifications control how window functions compute values:\n * - **partitionBy**: Divide rows into groups (like GROUP BY but without collapsing rows)\n * - **orderBy**: Define order for ranking and offset functions\n * - **frame**: Specify which rows to include in aggregate calculations\n * \n * @example\n * // Partition by department, order by salary\n * {\n * partitionBy: ['department'],\n * orderBy: [{ field: 'salary', order: 'desc' }]\n * }\n * \n * @example\n * // Moving average with frame specification\n * {\n * orderBy: [{ field: 'date', order: 'asc' }],\n * frame: {\n * type: 'rows',\n * start: '6 PRECEDING',\n * end: 'CURRENT ROW'\n * }\n * }\n */\nexport const WindowSpecSchema = lazySchema(() => z.object({\n partitionBy: z.array(z.string()).optional().describe('PARTITION BY fields'),\n orderBy: z.array(SortNodeSchema).optional().describe('ORDER BY specification'),\n frame: z.object({\n type: z.enum(['rows', 'range']).optional(),\n start: z.string().optional().describe('Frame start (e.g., \"UNBOUNDED PRECEDING\", \"1 PRECEDING\")'),\n end: z.string().optional().describe('Frame end (e.g., \"CURRENT ROW\", \"1 FOLLOWING\")'),\n }).optional().describe('Window frame specification'),\n}));\n\n/**\n * Window Function Node\n * Represents window function with OVER clause.\n * \n * Window functions perform calculations across a set of rows related to the current row,\n * without collapsing the result set (unlike GROUP BY aggregations).\n * \n * @example\n * // SQL: Top 3 products per category\n * // SELECT *, ROW_NUMBER() OVER (PARTITION BY category ORDER BY sales DESC) as rank\n * // FROM products\n * {\n * object: 'product',\n * fields: ['name', 'category', 'sales'],\n * windowFunctions: [\n * {\n * function: 'row_number',\n * alias: 'category_rank',\n * over: {\n * partitionBy: ['category'],\n * orderBy: [{ field: 'sales', order: 'desc' }]\n * }\n * }\n * ]\n * }\n * \n * @example\n * // SQL: Year-over-year comparison with LAG\n * {\n * object: 'monthly_sales',\n * fields: ['month', 'revenue'],\n * windowFunctions: [\n * {\n * function: 'lag',\n * field: 'revenue',\n * alias: 'prev_year_revenue',\n * over: {\n * orderBy: [{ field: 'month', order: 'asc' }]\n * }\n * }\n * ]\n * }\n */\nexport const WindowFunctionNodeSchema = lazySchema(() => z.object({\n function: WindowFunction.describe('Window function name'),\n field: z.string().optional().describe('Field to operate on (for aggregate window functions)'),\n alias: z.string().describe('Result column alias'),\n over: WindowSpecSchema.describe('Window specification (OVER clause)'),\n}));\n\n/**\n * Field Selection Node\n * Represents \"Select\" attributes, including joins.\n */\nexport const FieldNodeSchema: z.ZodType<any> = z.lazy(() => \n z.union([\n z.string(), // Primitive field: \"name\"\n z.object({\n field: z.string(), // Relationship field: \"owner\"\n fields: z.array(FieldNodeSchema).optional(), // Nested select: [\"name\", \"email\"]\n alias: z.string().optional()\n })\n ])\n);\n\n/**\n * Full-Text Search Configuration\n * Defines full-text search parameters for text queries.\n * \n * Supports:\n * - Multi-field search\n * - Relevance scoring\n * - Fuzzy matching\n * - Language-specific analyzers\n * \n * @example\n * {\n * query: \"John Smith\",\n * fields: [\"name\", \"email\", \"description\"],\n * fuzzy: true,\n * boost: { \"name\": 2.0, \"email\": 1.5 }\n * }\n */\nexport const FullTextSearchSchema = lazySchema(() => z.object({\n query: z.string().describe('Search query text'),\n fields: z.array(z.string()).optional().describe('Fields to search in (if not specified, searches all text fields)'),\n fuzzy: z.boolean().optional().default(false).describe('Enable fuzzy matching (tolerates typos)'),\n operator: z.enum(['and', 'or']).optional().default('or').describe('Logical operator between terms'),\n boost: z.record(z.string(), z.number()).optional().describe('Field-specific relevance boosting (field name -> boost factor)'),\n minScore: z.number().optional().describe('Minimum relevance score threshold'),\n language: z.string().optional().describe('Language for text analysis (e.g., \"en\", \"zh\", \"es\")'),\n highlight: z.boolean().optional().default(false).describe('Enable search result highlighting'),\n}));\n\nexport type FullTextSearch = z.infer<typeof FullTextSearchSchema>;\n\n/**\n * Query AST Schema\n * The universal data retrieval contract defined in `ast-structure.mdx`.\n * \n * This schema represents ObjectQL - a universal query language that abstracts\n * SQL, NoSQL, and SaaS APIs into a single unified interface.\n * \n * Updates (v2):\n * - Aligned with modern ORM standards (Prisma/TypeORM)\n * - Added `cursor` based pagination support\n * - Renamed `top`/`skip` to `limit`/`offset`\n * - Unified filtering syntax with `FilterConditionSchema`\n * \n * Updates (v3):\n * - Added `search` parameter for full-text search (P2 requirement)\n * \n * @example\n * // Simple query: SELECT name, email FROM account WHERE status = 'active'\n * {\n * object: 'account',\n * fields: ['name', 'email'],\n * where: { status: 'active' }\n * }\n * \n * @example\n * // Pagination with Limit/Offset\n * {\n * object: 'post',\n * where: { published: true },\n * orderBy: [{ field: 'created_at', order: 'desc' }],\n * limit: 20,\n * offset: 40\n * }\n * \n * @example\n * // Full-text search\n * {\n * object: 'article',\n * search: {\n * query: \"machine learning\",\n * fields: [\"title\", \"content\"],\n * fuzzy: true,\n * boost: { \"title\": 2.0 }\n * },\n * limit: 10\n * }\n */\nconst BaseQuerySchema = z.object({\n /** Target Entity */\n object: z.string().describe('Object name (e.g. account)'),\n \n /** Select Clause */\n fields: z.array(FieldNodeSchema).optional().describe('Fields to retrieve'),\n \n /** Where Clause (Filtering) */\n where: FilterConditionSchema.optional().describe('Filtering criteria (WHERE)'),\n \n /** Full-Text Search */\n search: FullTextSearchSchema.optional().describe('Full-text search configuration ($search parameter)'),\n \n /** Order By Clause (Sorting) */\n orderBy: z.array(SortNodeSchema).optional().describe('Sorting instructions (ORDER BY)'),\n \n /** Pagination */\n limit: z.number().optional().describe('Max records to return (LIMIT)'),\n offset: z.number().optional().describe('Records to skip (OFFSET)'),\n top: z.number().optional().describe('Alias for limit (OData compatibility)'),\n cursor: z.record(z.string(), z.unknown()).optional().describe('Cursor for keyset pagination'),\n \n /** Joins */\n joins: z.array(JoinNodeSchema).optional().describe('Explicit Table Joins'),\n \n /** Aggregations */\n aggregations: z.array(AggregationNodeSchema).optional().describe('Aggregation functions'),\n \n /** Group By Clause */\n groupBy: z.array(GroupByNodeSchema).optional().describe('GROUP BY targets (strings or `{field, dateGranularity?}` objects for date bucketing)'),\n \n /** Having Clause */\n having: FilterConditionSchema.optional().describe('HAVING clause for aggregation filtering'),\n \n /** Window Functions */\n windowFunctions: z.array(WindowFunctionNodeSchema).optional().describe('Window functions with OVER clause'),\n \n /** Subquery flag */\n distinct: z.boolean().optional().describe('SELECT DISTINCT flag'),\n});\n\n/**\n * QueryAST — Abstract Syntax Tree for data queries.\n *\n * The `expand` property enables recursive loading of related records through\n * lookup and master_detail fields. Each key is a relationship field name; the\n * value is a nested QueryAST that can further filter, select, sort, and expand\n * the related records (up to a default max depth of 3).\n *\n * @example\n * ```ts\n * const ast: QueryAST = {\n * object: 'task',\n * fields: ['title', 'assignee'],\n * expand: {\n * assignee: { object: 'user', fields: ['name', 'email'] },\n * project: {\n * object: 'project',\n * expand: { org: { object: 'org' } } // nested expand\n * }\n * }\n * };\n * ```\n */\nexport type QueryAST = z.infer<typeof BaseQuerySchema> & {\n expand?: Record<string, QueryAST>;\n};\n\nexport type QueryInput = z.input<typeof BaseQuerySchema> & {\n expand?: Record<string, QueryInput>;\n};\n\nexport const QuerySchema: z.ZodType<QueryAST> = lazySchema(() => BaseQuerySchema.extend({\n expand: z.lazy(() => z.record(z.string(), QuerySchema)).optional().describe(\n 'Recursive relation loading map. Keys are lookup/master_detail field names; '\n + 'values are nested QueryAST objects that control select (`fields`) and filter '\n + '(`where`, AND-merged with the batch $in), plus further expansion on the related '\n + 'object. The engine resolves expand via batch $in queries (driver-agnostic) with a '\n + 'default max depth of 3; per-parent `limit`/`offset`/`orderBy` are NOT applied on '\n + 'this path.'\n ),\n}));\n\nexport type SortNode = z.infer<typeof SortNodeSchema>;\nexport type AggregationNode = z.infer<typeof AggregationNodeSchema>;\nexport type GroupByNode = z.infer<typeof GroupByNodeSchema>;\nexport type DateGranularityValue = z.infer<typeof DateGranularity>;\nexport type JoinNode = z.infer<typeof JoinNodeSchema>;\nexport type WindowFunctionNode = z.infer<typeof WindowFunctionNodeSchema>;\nexport type WindowSpec = z.infer<typeof WindowSpecSchema>;\n","// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { lazySchema } from '../shared/lazy-schema';\nimport { ProtectionSchema } from '../shared/protection.zod';\nimport { MetadataProtectionFields } from '../kernel/metadata-protection.zod';\nimport { FilterConditionSchema } from '../data/filter.zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { I18nLabelSchema } from './i18n.zod';\nimport { AggregationFunction, DateGranularity } from '../data/query.zod';\n\n/**\n * Analytics Dataset — the one semantic layer (ADR-0021).\n *\n * A `dataset` is a named, reusable analytical definition: a base object, the\n * relationships to include (joins are *derived* from the object graph — the\n * author never writes an `ON` clause), and the declared **dimensions**\n * (groupable axes) and **measures** (aggregatable values). It is deliberately\n * SMALLER than `QuerySchema`: no raw SQL, no hand-authored join predicates,\n * no window/having grammar in the author surface.\n *\n * Presentations (`report` / `dashboard`) bind to a dataset by reference and\n * pick dimensions/measures *by name*. The dataset compiles to the existing\n * Cube analytics runtime (ADR-0021 D-A=(c)); RLS / tenant scoping is enforced\n * by the runtime per joined object (D-C), never declared here.\n *\n * Naming: this module owns the high-prior `dataset` / `dimension` / `measure`\n * vocabulary (LookML / dbt / Cube / PowerBI). The Zod export identifiers are\n * `Dataset`-prefixed (`DatasetDimensionSchema`, `DatasetMeasureSchema`) so they\n * do not clash with the Cube layer's `DimensionSchema` / `MetricSchema` in\n * `data/analytics.zod.ts` while the two layers coexist (Phase 1). The Cube\n * layer is absorbed/retired in a later phase (D-A).\n */\n\n/**\n * Dimension — a groupable axis (e.g. \"region\", \"close_date by quarter\").\n */\nexport const DatasetDimensionSchema = lazySchema(() => z.object({\n /** Referenced by presentations (report rows/columns, widget dimensions). */\n name: SnakeCaseIdentifierSchema.describe('Dimension name — referenced by presentations'),\n label: I18nLabelSchema.optional(),\n /**\n * A field on the base object, OR a relationship path (one or more to-one hops)\n * ending in a field — e.g. `account.region` or `account.owner.region`\n * (ADR-0071 multi-hop). The join chain is DERIVED from the relationship(s)\n * declared in `Dataset.include`; the author never writes a predicate.\n */\n field: z.string().describe('Base field, or `relationship[.relationship].field` path'),\n type: z.enum(['string', 'number', 'date', 'boolean', 'lookup']).optional(),\n /** Default bucketing for date dimensions (day/week/month/quarter/year). */\n dateGranularity: DateGranularity.optional(),\n}));\n\n/**\n * Derived-measure operator (ADR-0021 Q1).\n * A derived measure references OTHER measures BY NAME only — no raw fields,\n * no raw SQL — keeping it enumerable and reviewable.\n */\nexport const DerivedMeasureOp = z.enum(['ratio', 'sum', 'difference', 'product']);\n\n/**\n * Measure — an aggregatable value (e.g. \"revenue = sum(amount)\"). Defined ONCE\n * here; every presentation references it by name.\n */\nexport const DatasetMeasureSchema = lazySchema(() => z.object({\n name: SnakeCaseIdentifierSchema.describe('Measure name — e.g. \"revenue\"; defined once'),\n label: I18nLabelSchema.optional(),\n /** Aggregation function — reuses the canonical query.zod enum. */\n aggregate: AggregationFunction.optional().describe('Aggregation (sum/avg/count/...); omit when `derived` is set'),\n /** Base field, or `relationship[.relationship].field` path. Optional for `count` (count(*)). */\n field: z.string().optional().describe('Aggregated field; optional for count(*)'),\n /** Measure-scoped filter (e.g. only won deals for \"won_amount\"). */\n filter: FilterConditionSchema.optional(),\n /** Display format, e.g. \"$0,0.00\", \"0.0%\". */\n format: z.string().optional(),\n /**\n * Display currency (ISO 4217, e.g. \"USD\", \"CNY\"). Carried onto the result\n * field so presentations render a locale-correct symbol via `Intl` rather\n * than a \"$\" baked into `format`. Declare it on the measure (the semantic\n * layer) when the aggregated field is a fixed-currency amount.\n */\n currency: z.string().length(3).optional().describe('Display currency code (ISO 4217)'),\n /**\n * Derived measure — computed from OTHER measures in this dataset by name\n * only. e.g. `{ op: 'ratio', of: ['won_amount', 'total_amount'] }`.\n * Mutually exclusive with `field`/`aggregate` semantics: when `derived` is\n * set, `aggregate` is ignored at compile time.\n */\n derived: z.object({\n op: DerivedMeasureOp,\n /** Names of other measures in this dataset (2+ for ratio/difference). */\n of: z.array(SnakeCaseIdentifierSchema).min(1),\n }).optional(),\n}));\n\n/**\n * Dataset — the single analytical source of truth (ADR-0021 D1).\n */\nexport const DatasetSchema = lazySchema(() => z.object({\n /** Identity. */\n name: SnakeCaseIdentifierSchema.describe('Dataset unique name'),\n label: I18nLabelSchema.describe('Dataset label'),\n description: I18nLabelSchema.optional(),\n\n /** Base object — the FROM. */\n object: z.string().describe('Base object name'),\n\n /**\n * Relationships to include, by NAME or by PATH — lookup / master_detail field\n * names on the object graph, optionally chained through to-one relationships\n * up to 3 hops (`account`, `account.owner`; ADR-0071 multi-hop). Joins are\n * COMPILED from these — the author writes no ON clause. Declaring `a.b`\n * implicitly includes the intermediate `a`. D-C: only declared paths are\n * joinable; no arbitrary predicates, and to-many traversal is out of scope.\n */\n include: z\n .array(\n z\n .string()\n .refine((p) => p.split('.').length <= 3, {\n message: 'include path exceeds the 3-hop limit (ADR-0071)',\n }),\n )\n .optional()\n .describe('Relationship names/paths to join (derived from object graph; max 3 hops)'),\n\n /** Definition-level filter (the dataset's intrinsic scope, e.g. non-deleted). */\n filter: FilterConditionSchema.optional().describe('Intrinsic dataset scope filter'),\n\n /** The semantic contract presentations bind to. */\n dimensions: z.array(DatasetDimensionSchema).describe('Groupable axes'),\n measures: z.array(DatasetMeasureSchema).describe('Aggregatable values'),\n\n /**\n * ADR-0010 — package-author protection envelope; the loader translates this\n * into the private `_lock` envelope at registration and strips it before\n * persistence.\n */\n protection: ProtectionSchema.optional().describe(\n 'Package author protection block — lock policy for this dataset.',\n ),\n\n // ADR-0010 — runtime protection envelope (internal — set by loader).\n ...MetadataProtectionFields,\n}).superRefine((ds, ctx) => {\n // Measure names must be unique (presentations reference them by name).\n const measureNames = new Set<string>();\n for (const m of ds.measures) {\n if (measureNames.has(m.name)) {\n ctx.addIssue({ code: 'custom', message: `duplicate measure name \"${m.name}\"`, path: ['measures'] });\n }\n measureNames.add(m.name);\n }\n // Dimension names must be unique.\n const dimNames = new Set<string>();\n for (const d of ds.dimensions) {\n if (dimNames.has(d.name)) {\n ctx.addIssue({ code: 'custom', message: `duplicate dimension name \"${d.name}\"`, path: ['dimensions'] });\n }\n dimNames.add(d.name);\n }\n // Derived measures may only reference OTHER measures declared in this dataset.\n for (const m of ds.measures) {\n if (!m.derived) {\n // A non-derived measure must declare an aggregate (a derived measure\n // omits it — it combines other measures by name instead).\n if (!m.aggregate) {\n ctx.addIssue({\n code: 'custom',\n message: `measure \"${m.name}\" requires \\`aggregate\\` (or a \\`derived\\` spec)`,\n path: ['measures'],\n });\n } else if (!m.field && m.aggregate !== 'count') {\n // A non-derived measure needs a field unless it is a plain count.\n ctx.addIssue({\n code: 'custom',\n message: `measure \"${m.name}\" requires \\`field\\` (only \\`count\\` may omit it)`,\n path: ['measures'],\n });\n }\n continue;\n }\n for (const ref of m.derived.of) {\n if (ref === m.name) {\n ctx.addIssue({ code: 'custom', message: `derived measure \"${m.name}\" cannot reference itself`, path: ['measures'] });\n } else if (!measureNames.has(ref)) {\n ctx.addIssue({\n code: 'custom',\n message: `derived measure \"${m.name}\" references unknown measure \"${ref}\"`,\n path: ['measures'],\n });\n }\n }\n }\n}));\n\n/**\n * Authoring helper — identity function that gives editors full type-checking\n * and inference when defining a dataset in a `*.dataset.ts` file.\n *\n * @example\n * ```ts\n * export default defineDataset({\n * name: 'sales',\n * label: 'Sales',\n * object: 'opportunity',\n * include: ['account'],\n * dimensions: [{ name: 'region', field: 'account.region' }],\n * measures: [{ name: 'revenue', aggregate: 'sum', field: 'amount' }],\n * });\n * ```\n */\nexport function defineDataset(dataset: DatasetInput): DatasetInput {\n return dataset;\n}\n\nexport type DatasetDimension = z.infer<typeof DatasetDimensionSchema>;\nexport type DatasetMeasure = z.infer<typeof DatasetMeasureSchema>;\nexport type DerivedMeasureOpValue = z.infer<typeof DerivedMeasureOp>;\nexport type Dataset = z.infer<typeof DatasetSchema>;\n\n/** Input types for authoring (optional fields with defaults may be omitted). */\nexport type DatasetDimensionInput = z.input<typeof DatasetDimensionSchema>;\nexport type DatasetMeasureInput = z.input<typeof DatasetMeasureSchema>;\nexport type DatasetInput = z.input<typeof DatasetSchema>;\n","/**\n * Form layout for the Report metadata editor.\n *\n * Bound to {@link ReportSchema} via `data.provider = 'schema'`. The\n * `@object-ui/plugin-form` renderer resolves field metadata from the\n * Zod-derived JSON Schema served by `/api/v1/meta` and applies the\n * widget/visibility hints declared here.\n *\n * ADR-0021 single-form: a report is dataset-bound — it binds a semantic-layer\n * `dataset` and selects its `values` (measure names) grouped by `rows`\n * (dimension names). The legacy inline `objectName` + `columns` + `groupings`\n * query form was removed from {@link ReportSchema} in the 9.0 cutover, so this\n * form no longer declares those fields.\n */\n\nimport { defineForm } from './view.zod';\n\nexport const reportForm = defineForm({\n schemaId: 'report',\n type: 'simple',\n sections: [\n {\n label: 'Basics',\n description: 'Identity and report type.',\n columns: 2,\n fields: [\n { field: 'name', type: 'text', colSpan: 1, required: true, helpText: 'snake_case unique identifier' },\n { field: 'label', type: 'text', colSpan: 1, required: true },\n { field: 'description', type: 'textarea', colSpan: 2 },\n { field: 'type', colSpan: 2, helpText: 'Report type: tabular/summary/matrix/joined' },\n ],\n },\n {\n label: 'Dataset binding',\n description: 'The semantic-layer dataset this report renders. Values are the dataset’s measures; rows are its dimensions.',\n // A `joined` report carries its data on `blocks` instead.\n visibleWhen: \"data.type != 'joined'\",\n fields: [\n { field: 'dataset', widget: 'ref:dataset', helpText: 'Dataset to bind (measures/dimensions come from its semantic layer)' },\n { field: 'values', widget: 'string-tags', helpText: 'Measure names (from the dataset) to display' },\n { field: 'rows', widget: 'string-tags', helpText: 'Dimension names (from the dataset) to group rows by' },\n // CEL visibility — only Matrix reports pivot across a second dimension.\n { field: 'columns', widget: 'string-tags', visibleWhen: \"data.type == 'matrix'\", helpText: 'Dimension names across (matrix only)' },\n { field: 'drilldown', helpText: 'Click an aggregated row/cell to open the underlying records' },\n ],\n },\n {\n label: 'Joined blocks',\n description: 'Additional dataset-bound blocks stacked into a single report (joined reports only).',\n visibleWhen: \"data.type == 'joined'\",\n fields: [\n { field: 'blocks', type: 'repeater', helpText: 'Dataset-bound sub-reports (joined report only)' },\n ],\n },\n {\n label: 'Filter & chart',\n description: 'Render-time scope filter and chart presentation.',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'runtimeFilter', widget: 'json', helpText: 'Render-time scope filter, ANDed at query time' },\n { field: 'chart', type: 'composite', helpText: 'Chart config (type, legend, colors)' },\n ],\n },\n {\n label: 'Advanced',\n description: 'Accessibility and performance tuning.',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'aria', type: 'composite', helpText: 'Accessibility labels' },\n { field: 'performance', type: 'composite', helpText: 'Caching and optimization' },\n ],\n },\n ],\n});\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\n/**\n * View — canonical FormView layout.\n *\n * Views power most data surfaces (grid / kanban / calendar / gantt /\n * gallery / timeline / chart) and each surface has its own block of\n * options. We group fields by surface so the editor doesn't dump 30+\n * irrelevant knobs on the user.\n *\n * Visibility predicates use the `type` discriminator to reveal only\n * the surface-specific block.\n */\n\nimport { defineForm } from './view.zod';\n\nexport const viewForm = defineForm({\n schemaId: 'view',\n type: 'simple',\n sections: [\n {\n name: 'basics',\n label: 'Basics',\n description: 'Identity and primary surface.',\n columns: 2,\n fields: [\n { field: 'name', type: 'text', required: true, colSpan: 1, helpText: 'snake_case, unique per environment' },\n { field: 'label', type: 'text', required: true, colSpan: 1 },\n { field: 'description', type: 'textarea', colSpan: 2 },\n { field: 'type', required: true, colSpan: 1, helpText: 'Primary view surface' },\n { field: 'data', widget: 'json', colSpan: 2, helpText: 'Data source — e.g. {\"provider\":\"object\",\"object\":\"task\"}' },\n ],\n },\n {\n name: 'columns_filters',\n label: 'Columns & filters',\n description: 'What rows show and how users filter them.',\n fields: [\n { field: 'columns', type: 'repeater', required: true, helpText: 'Columns to display (field names from selected object)' },\n { field: 'filter', widget: 'filter-builder', dependsOn: 'data.object', helpText: 'Filter conditions — same visual builder as the list toolbar, with field-type-aware operators and value inputs' },\n { field: 'sort', type: 'repeater', helpText: 'Default sort order' },\n { field: 'searchableFields', widget: 'string-tags', helpText: 'Field names available for quick search' },\n { field: 'filterableFields', widget: 'string-tags', helpText: 'Field names available for filtering' },\n ],\n },\n {\n name: 'table_options',\n label: 'Table options',\n description: 'Grid-only display options.',\n visibleWhen: \"data.type == 'grid' || data.type == null\",\n collapsible: true,\n collapsed: true,\n columns: 2,\n fields: [\n { field: 'resizable', colSpan: 1 },\n { field: 'striped', colSpan: 1 },\n { field: 'bordered', colSpan: 1 },\n { field: 'compactToolbar', colSpan: 1 },\n { field: 'rowHeight', colSpan: 1 },\n { field: 'selection', type: 'composite', colSpan: 2 },\n { field: 'pagination', type: 'composite', colSpan: 2 },\n ],\n },\n {\n name: 'kanban',\n label: 'Kanban',\n description: 'Kanban-specific board configuration.',\n visibleWhen: \"data.type == 'kanban'\",\n fields: [{ field: 'kanban', type: 'composite' }],\n },\n {\n name: 'calendar',\n label: 'Calendar',\n description: 'Calendar-specific configuration.',\n visibleWhen: \"data.type == 'calendar'\",\n fields: [{ field: 'calendar', type: 'composite' }],\n },\n {\n name: 'gantt',\n label: 'Gantt',\n description: 'Gantt-specific configuration.',\n visibleWhen: \"data.type == 'gantt'\",\n fields: [{ field: 'gantt', type: 'composite' }],\n },\n {\n name: 'gallery',\n label: 'Gallery',\n description: 'Gallery-specific configuration.',\n visibleWhen: \"data.type == 'gallery'\",\n fields: [{ field: 'gallery', type: 'composite' }],\n },\n {\n name: 'timeline',\n label: 'Timeline',\n description: 'Timeline-specific configuration.',\n visibleWhen: \"data.type == 'timeline'\",\n fields: [{ field: 'timeline', type: 'composite' }],\n },\n {\n name: 'chart',\n label: 'Chart',\n description: 'Chart-specific configuration.',\n visibleWhen: \"data.type == 'chart'\",\n fields: [{ field: 'chart', type: 'composite' }],\n },\n {\n name: 'end_user_controls',\n label: 'End-user controls',\n description: 'What end users can do on this view — quick filters, filter tabs, visualization switching (ADR-0047, Airtable Interface parity).',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'userFilters', type: 'composite', helpText: 'Quick-filter bar: element style (dropdown / tabs / toggle) + exposed fields or tab presets' },\n { field: 'tabs', type: 'repeater', helpText: 'In-view filter tabs — each tab applies its own filter rules' },\n { field: 'appearance', type: 'composite', helpText: 'allowedVisualizations: which renderers users may switch between' },\n { field: 'userActions', type: 'composite', helpText: 'Toolbar toggles: sort / search / filter / row height' },\n { field: 'addRecord', type: 'composite' },\n { field: 'showRecordCount' },\n ],\n },\n {\n name: 'navigation_sharing',\n label: 'Navigation & sharing',\n description: 'Where this view appears and who can see it.',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'navigation', type: 'composite' },\n { field: 'sharing', type: 'composite' },\n ],\n },\n ],\n});\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { defineForm } from './view.zod';\n\nexport const appForm = defineForm({\n schemaId: 'app',\n type: 'simple',\n sections: [\n {\n label: 'Basics',\n description: 'App identity and activation.',\n columns: 2,\n fields: [\n { field: 'name', type: 'text', required: true, colSpan: 1, helpText: 'snake_case, unique' },\n { field: 'label', type: 'text', required: true, colSpan: 1 },\n { field: 'description', type: 'textarea', colSpan: 2 },\n { field: 'version', type: 'text', colSpan: 1 },\n { field: 'icon', type: 'text', colSpan: 1, helpText: 'Lucide icon name (e.g. \"users\", \"briefcase\")' },\n { field: 'active', type: 'boolean', colSpan: 1 },\n { field: 'isDefault', type: 'boolean', colSpan: 1, helpText: 'Make this the default app for new users' },\n ],\n },\n {\n label: 'Navigation',\n description: 'Sidebar items and area grouping.',\n fields: [\n { field: 'navigation', type: 'composite', helpText: 'Nav tree — recursive structure' },\n { field: 'areas', type: 'repeater', helpText: 'Group items into collapsible areas' },\n { field: 'homePageId', type: 'text', helpText: 'Landing page when app opens' },\n { field: 'mobileNavigation', type: 'composite', helpText: 'Bottom tab bar config for mobile' },\n ],\n },\n {\n label: 'Content',\n description: 'Objects and APIs this app uses.',\n fields: [\n { field: 'objects', widget: 'object-selector', multiple: true, helpText: 'Object names this app exposes' },\n { field: 'apis', type: 'composite', helpText: 'API endpoint definitions' },\n { field: 'defaultAgent', type: 'text', helpText: 'AI agent for the ambient assistant button' },\n ],\n },\n {\n label: 'Branding',\n description: 'Theme colors and logo.',\n collapsible: true,\n collapsed: true,\n fields: [{ field: 'branding', type: 'composite', helpText: 'Primary/secondary colors, logo, theme' }],\n },\n {\n label: 'Access & sharing',\n description: 'Who can access this app and how it can be embedded.',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'requiredPermissions', widget: 'string-tags', helpText: 'Permissions needed to access this app' },\n { field: 'sharing', type: 'composite', helpText: 'Public/internal/restricted access control' },\n { field: 'embed', type: 'composite', helpText: 'iFrame embed configuration' },\n { field: 'aria', type: 'composite', helpText: 'Accessibility labels' },\n ],\n },\n ],\n});\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { defineForm } from './view.zod';\n\nexport const dashboardForm = defineForm({\n schemaId: 'dashboard',\n type: 'simple',\n sections: [\n {\n label: 'Basics',\n description: 'Dashboard identity and description.',\n columns: 2,\n fields: [\n { field: 'name', type: 'text', required: true, colSpan: 1, helpText: 'snake_case unique identifier' },\n { field: 'label', type: 'text', required: true, colSpan: 1, helpText: 'Display name' },\n { field: 'description', type: 'textarea', colSpan: 2 },\n ],\n },\n {\n label: 'Layout',\n description: 'Grid sizing and refresh cadence.',\n columns: 3,\n fields: [\n { field: 'columns', type: 'number', colSpan: 1, helpText: 'Grid columns (default 12)' },\n { field: 'gap', type: 'number', colSpan: 1, helpText: 'Grid gap (Tailwind units)' },\n { field: 'refreshInterval', type: 'number', colSpan: 1, helpText: 'Auto-refresh (seconds)' },\n { field: 'header', type: 'composite', colSpan: 3, helpText: 'Dashboard header config (title, subtitle, actions)' },\n ],\n },\n {\n label: 'Widgets',\n description: 'Cards and charts placed on the grid.',\n fields: [\n { field: 'widgets', type: 'repeater', required: true, helpText: 'Dashboard widgets with position and sizing' },\n ],\n },\n {\n label: 'Filters',\n description: 'Default and global filters applied across widgets.',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'dateRange', type: 'composite', helpText: 'Default date range selector' },\n { field: 'globalFilters', type: 'repeater', helpText: 'Filters applied to all widgets' },\n ],\n },\n {\n label: 'Advanced',\n description: 'Accessibility and performance tuning.',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'aria', type: 'composite', helpText: 'Accessibility labels' },\n { field: 'performance', type: 'composite', helpText: 'Caching and optimization config' },\n ],\n },\n ],\n});\n","// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { defineForm } from './view.zod';\n\n/**\n * Form layout for the Dataset metadata editor (ADR-0021 analytics semantic layer).\n *\n * Bound to {@link DatasetSchema}. Until this entry existed, `dataset` was the\n * only UI-authorable metadata type WITHOUT a registered {@link FormView}, so the\n * metadata-admin create surface fell back to the auto-generated single-section\n * layout. That fallback (a) silently DROPPED the optional `include` (joins) and\n * `filter` (intrinsic scope) fields — making joined / scoped datasets\n * un-authorable online — and (b) rendered the base `object` and dimension/\n * measure `field`s as bare free-text inputs with no object context.\n *\n * This layout restores `include` + `filter`, groups the surface into sections\n * with guidance, and uses pickers (`ref:object`, `filter-builder` scoped to the\n * base object) so a business user can author a dataset without memorising\n * machine names. Mirrors {@link reportForm} — the sibling analytics editor.\n */\nexport const datasetForm = defineForm({\n schemaId: 'dataset',\n type: 'simple',\n sections: [\n {\n name: 'basics',\n label: 'Basics',\n description: 'Dataset identity.',\n columns: 2,\n fields: [\n { field: 'name', type: 'text', colSpan: 1, required: true, immutable: true, helpText: 'snake_case unique identifier' },\n { field: 'label', type: 'text', colSpan: 1, required: true, helpText: 'Display name' },\n { field: 'description', type: 'textarea', colSpan: 2, helpText: 'What this dataset measures' },\n ],\n },\n {\n name: 'source',\n label: 'Source',\n description: 'The base object, the relationships to join, and the dataset’s intrinsic scope. Joins are derived from the object graph — pick relationship (lookup / master_detail) names, never write an ON clause.',\n fields: [\n { field: 'object', widget: 'ref:object', required: true, helpText: 'Base object — the FROM' },\n { field: 'include', widget: 'string-tags', helpText: 'Relationship (lookup / master_detail) field names to join — enables `relationship.field` dimensions/measures (e.g. include \"account\" → group by account.region)' },\n { field: 'filter', widget: 'filter-builder', dependsOn: 'object', helpText: 'Intrinsic scope filter (e.g. exclude soft-deleted records), ANDed into every query' },\n ],\n },\n {\n name: 'dimensions',\n label: 'Dimensions',\n description: 'Groupable axes. Use a base field, or `relationship.field` (e.g. account.region) for a relationship included above.',\n fields: [\n { field: 'dimensions', type: 'repeater', required: true, helpText: 'Each: name (referenced by presentations), field, type, and — for dates — a default bucketing granularity' },\n ],\n },\n {\n name: 'measures',\n label: 'Measures',\n description: 'Aggregatable values defined once and referenced by name. A measure is sum/avg/count/… of a field; a derived measure combines other measures (ratio/sum/difference/product). Measure-scoped filters and derived ops are edited per-row in the dataset designer.',\n fields: [\n { field: 'measures', type: 'repeater', required: true, helpText: 'Each: name, aggregate, field (optional for count), and display format/currency' },\n ],\n },\n ],\n});\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { defineForm } from './view.zod';\n\n/**\n * Action Metadata Form\n * \n * Form layout for creating/editing action metadata definitions.\n */\nexport const actionForm = defineForm({\n schemaId: 'action',\n type: 'simple',\n sections: [\n {\n label: 'Basics',\n description: 'Action identity and presentation.',\n columns: 2,\n fields: [\n { field: 'name', required: true, colSpan: 1, helpText: 'Unique identifier (snake_case)' },\n { field: 'label', required: true, colSpan: 1, helpText: 'Button text shown to users' },\n { field: 'objectName', widget: 'ref:object', colSpan: 1, helpText: 'Object this action belongs to (optional)' },\n { field: 'icon', colSpan: 1, helpText: 'Lucide icon name (e.g., \"check\", \"x-circle\")' },\n { field: 'type', required: true, colSpan: 1, helpText: 'What happens when clicked' },\n { field: 'variant', colSpan: 1, helpText: 'Button style (primary=blue, danger=red, ghost=transparent)' },\n ],\n },\n {\n label: 'Behavior',\n description: 'Configure what happens when the action is triggered.',\n fields: [\n { field: 'target', visibleWhen: \"data.type != 'script'\", helpText: 'URL, flow name, or API endpoint to call' },\n { field: 'method', visibleWhen: \"data.type == 'api'\", helpText: 'HTTP method (GET, POST, PUT, DELETE)' },\n {\n field: 'body',\n type: 'composite',\n visibleWhen: \"data.type == 'script'\",\n helpText: 'Either an L1 expression or an L2 sandboxed JS body',\n // Mirrors hook.form.ts: `body` is a discriminated union\n // (HookBodySchema) on `language`, not a bare string. A flat\n // `widget: 'code'` fed the whole object to the editor and rendered\n // \"[object Object]\". Render the union as language + source (+ the\n // L2-only capability/timeout knobs).\n fields: [\n { field: 'language', type: 'select', required: true, helpText: 'expression = pure formula; js = sandboxed JavaScript', options: [\n { label: 'Expression (L1)', value: 'expression' },\n { label: 'JavaScript (L2 sandboxed)', value: 'js' },\n ] },\n { field: 'source', type: 'code', language: 'javascript', required: true, helpText: 'Function body source — no top-level imports' },\n { field: 'capabilities', type: 'tags', helpText: 'Allowed ctx APIs (api.read, api.write, crypto.uuid, log, …)' },\n { field: 'timeoutMs', type: 'number', helpText: 'Per-invocation timeout (ms)' },\n ],\n },\n { field: 'params', type: 'repeater', helpText: 'User input parameters (show form before executing)' },\n { field: 'confirmText', helpText: 'Confirmation message (e.g., \"Are you sure?\")' },\n { field: 'successMessage', helpText: 'Success message after completion' },\n { field: 'refreshAfter', helpText: 'Refresh the list/page after action completes' },\n ],\n },\n {\n label: 'Placement',\n description: 'Where and when the action button appears.',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'locations', type: 'repeater', helpText: 'Where to show this action (toolbar, row menu, etc.)' },\n { field: 'component', helpText: 'How to render (button, icon, menu item)' },\n { field: 'visible', widget: 'textarea', helpText: 'CEL expression: show only when condition is true' },\n { field: 'disabled', widget: 'textarea', helpText: 'CEL expression: disable when condition is true' },\n { field: 'shortcut', helpText: 'Keyboard shortcut (e.g., \"Ctrl+S\", \"Cmd+Enter\")' },\n ],\n },\n {\n label: 'Advanced',\n description: 'Bulk operations, AI exposure, and API request shape.',\n collapsible: true,\n collapsed: true,\n columns: 2,\n fields: [\n { field: 'bulkEnabled', colSpan: 1, helpText: 'Allow applying to multiple selected records' },\n { field: 'ai', colSpan: 2, helpText: 'AI exposure (opt-in): set ai.exposed=true and write ai.description (≥40 chars) to make this callable by agents.' },\n { field: 'recordIdParam', visibleWhen: \"data.type == 'api'\", colSpan: 1, helpText: 'Body parameter name for record ID' },\n { field: 'recordIdField', visibleWhen: \"data.type == 'api' && data.recordIdParam\", colSpan: 1, helpText: 'Field to use as record ID (default: \"id\")' },\n { field: 'bodyShape', visibleWhen: \"data.type == 'api'\", colSpan: 2, helpText: 'Request body structure (flat or nested)' },\n ],\n },\n ],\n});\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { defineForm } from './view.zod';\n\n/**\n * Page Metadata Form\n * \n * Form layout for creating/editing page metadata definitions.\n */\nexport const pageForm = defineForm({\n schemaId: 'page',\n type: 'simple',\n sections: [\n {\n label: 'Basics',\n description: 'Page identity and template.',\n columns: 2,\n fields: [\n { field: 'name', required: true, colSpan: 1, helpText: 'Unique identifier (snake_case)' },\n { field: 'label', required: true, colSpan: 1, helpText: 'Page title shown to users' },\n { field: 'icon', widget: 'icon', colSpan: 1, helpText: 'Icon for navigation menu' },\n {\n field: 'type',\n colSpan: 1,\n // The page KIND, not a visualization. Kanban/Calendar/Gallery/Timeline\n // are visualizations OF a List page (set under Interface →\n // Appearance → Allowed visualizations), not page types — so they are\n // deliberately absent here. Only kinds with a dedicated renderer are\n // offered; roadmap kinds (dashboard/form/record_detail/…) are valid in\n // the schema but hidden until they render distinctly.\n options: [\n { label: 'List / Interface page', value: 'list' },\n { label: 'Record page', value: 'record' },\n { label: 'Home page', value: 'home' },\n { label: 'App page', value: 'app' },\n { label: 'Utility panel', value: 'utility' },\n ],\n helpText: 'Page kind. \"List / Interface\" binds a source view into a curated surface — how it looks (grid / kanban / calendar / …) is a visualization set under Interface, not a page type.',\n },\n // A list/interface page renders via InterfaceListPage and ignores the\n // region template, so hide it there (same rationale as Data Context / Layout).\n { field: 'template', colSpan: 2, visibleWhen: \"data.type != 'list'\", helpText: 'Layout template (e.g., \"header-sidebar-main\")' },\n { field: 'description', widget: 'textarea', colSpan: 2, helpText: 'Page description for navigation' },\n ],\n },\n {\n label: 'Data Context',\n description: 'Record binding and page-local state.',\n // Interface/list pages bind their data via the Interface section\n // (source/sourceView), not a page-level object — hide this to keep\n // the panel lean (the region/record machinery doesn't apply).\n visibleWhen: \"data.type != 'list'\",\n fields: [\n { field: 'object', widget: 'ref:object', helpText: 'Bound object (for Record pages)' },\n {\n field: 'variables',\n type: 'repeater',\n helpText: 'Local page state variables',\n // Explicit sub-fields so `source` can use the `ref:component` picker —\n // a variable's `source` names the component (by `id`) that writes it,\n // so it's chosen from the page's real canvas components, not typed by\n // hand. Keep in sync with PageVariableSchema.\n fields: [\n { field: 'name', required: true, helpText: 'Variable name — exposed to expressions as `page.<name>`' },\n { field: 'type', helpText: 'Value type' },\n { field: 'defaultValue', helpText: 'Initial value (defaults to a type-appropriate empty value)' },\n { field: 'source', widget: 'ref:component', helpText: 'Component (by id) that writes this variable — e.g. an element:record_picker' },\n ],\n },\n ],\n },\n {\n label: 'Layout',\n description: 'Page regions and components placed within them.',\n // List pages render a curated list surface, not free-form regions —\n // the region designer is irrelevant here, so hide it for list pages.\n visibleWhen: \"data.type != 'list'\",\n fields: [\n // Not required: an empty full page falls back to the synthesized default\n // layout, slotted pages compose via `slots`, and list pages ignore regions\n // entirely. Marking it required made the form unsatisfiable when no region\n // editor was rendered (the metadata form can't yet edit a region tree).\n { field: 'regions', type: 'repeater', helpText: 'Layout regions (header, main, sidebar, footer) with components' },\n ],\n },\n {\n name: 'interface',\n label: 'Interface (list pages)',\n description: 'Interface mode (Airtable parity): the page defines its own data surface directly — columns, filters, visualizations and toolbar — no inheriting from a separate view.',\n collapsible: true,\n // Primary content for a list page — open by default (still collapsible).\n collapsed: false,\n visibleWhen: \"data.type == 'list'\",\n fields: [\n {\n field: 'interfaceConfig',\n type: 'composite',\n helpText:\n 'The page IS the view: source picks the object, columns/filterBy are defined directly here; appearance.allowedVisualizations whitelists renderers (one entry = locked); userActions toggles the toolbar.',\n // Order: common authoring controls first, rarely-used ones last.\n // Explicit sub-fields so `userFilters` can use the dedicated\n // filter-mode selector (None / Tabs / Dropdown, ADR-0047 §3.4a).\n // None maps to ABSENCE of userFilters — the protocol stores\n // \"no filter bar\" as omission, not a literal element: 'none'.\n // (`element: 'toggle'` stays valid but deprecated — not offered.)\n // Keep this list in sync with InterfacePageConfigSchema.\n fields: [\n // ── Data ── the page defines its own data surface directly.\n { field: 'source', widget: 'ref:object', helpText: 'Object this page reads from' },\n // Columns are defined ON the page (no view inheritance). `dependsOn:\n // 'source'` tells the picker which object's fields to offer.\n { field: 'columns', widget: 'field-multi', dependsOn: 'source', helpText: 'Columns to show — defined directly on the page (blank = all object fields)' },\n { field: 'filterBy', widget: 'filter-builder', dependsOn: 'source', helpText: 'Always-on base filter for the page — same visual builder as the list toolbar.' },\n { field: 'levels', helpText: 'Hierarchy levels to display (tree-like sources)' },\n // ── Appearance ──\n { field: 'appearance', type: 'composite', disclosure: 'popover', helpText: 'Allowed visualizations (Grid / Kanban / Calendar / …) and description visibility' },\n // ── User filters ──\n {\n field: 'userFilters',\n widget: 'filter-mode',\n helpText: 'End-user filter bar: None (no bar) / Tabs (named presets) / Dropdown (per-field). None removes the config.',\n },\n // ── User actions ──\n { field: 'userActions', type: 'composite', disclosure: 'popover', helpText: 'Toolbar toggles (search, sort, filter, row height)' },\n { field: 'addRecord', type: 'composite', disclosure: 'popover', helpText: 'Add-record entry point' },\n // Buttons ARE object actions — pick from the source object's actions.\n { field: 'buttons', widget: 'action-multi', dependsOn: 'source', helpText: \"Toolbar buttons — pick from this object's actions\" },\n {\n field: 'recordAction',\n options: [\n { label: 'Drawer (right-side peek)', value: 'drawer' },\n { label: 'Full page', value: 'page' },\n { label: 'Modal', value: 'modal' },\n { label: 'Not clickable', value: 'none' },\n ],\n helpText: 'How clicking a record opens its detail',\n },\n { field: 'showRecordCount', helpText: 'Show the record count bar' },\n { field: 'allowPrinting', helpText: 'Allow users to print this page' },\n ],\n },\n ],\n },\n {\n label: 'Advanced',\n description: 'Activation, audience, and accessibility.',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'isDefault', helpText: 'Set as default page for this page type' },\n { field: 'kind', helpText: 'Page override mode: full or slotted (for record pages)' },\n { field: 'assignedProfiles', widget: 'string-tags', helpText: 'Profiles that can access this page' },\n { field: 'aria', type: 'composite', helpText: 'Accessibility attributes (ARIA labels, roles)' },\n ],\n },\n ],\n});\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * Capability tokens a script body may request.\n *\n * The runtime sandbox enforces these — if a body uses a `ctx` API that requires\n * a capability it did not declare, the call throws at invocation time.\n *\n * - `api.read` — `ctx.api.object(...).find / findOne / count / aggregate`\n * - `api.write` — `ctx.api.object(...).insert / update / delete`\n * - `api.transaction` — `ctx.api.transaction(async () => { … })` — runs the\n * callback's `ctx.api` writes/reads inside one driver transaction, committed\n * on return and rolled back if the callback throws. Requires `api.write`\n * alongside it to be useful (the transaction body still needs write access).\n * - `crypto.uuid` — `ctx.crypto.randomUUID()`\n * - `crypto.hash` — `ctx.crypto.hash(algo, data)`\n * - `log` — `ctx.log.info / warn / error`\n *\n * `http.fetch` is intentionally absent — outbound calls go through Connector\n * recipes (separate spec) so they remain auditable and replayable.\n */\nexport const HookBodyCapability = z.enum([\n 'api.read',\n 'api.write',\n 'api.transaction',\n 'crypto.uuid',\n 'crypto.hash',\n 'log',\n]);\nexport type HookBodyCapability = z.infer<typeof HookBodyCapability>;\n\n/**\n * L1 — Pure expression body.\n *\n * Evaluated by the formula engine. No IO, no mutation. Used for predicates\n * (`condition`-style) and simple computed values.\n *\n * @example\n * ```json\n * { \"language\": \"expression\", \"source\": \"input.amount > 1000 && input.status == 'open'\" }\n * ```\n */\nexport const ExpressionBodySchema = z.object({\n language: z.literal('expression'),\n /** Formula-engine expression. Pure, side-effect-free. */\n source: z.string().min(1).describe('Formula expression source'),\n}).describe('L1 expression body — pure formula, no IO');\nexport type ExpressionBody = z.infer<typeof ExpressionBodySchema>;\n\n/**\n * L2 — Sandboxed JavaScript source.\n *\n * The `source` is the **function body only** (not a full module). The runtime\n * wraps it in `new AsyncFunction('ctx', source)` for hooks, or\n * `new AsyncFunction('input', 'ctx', source)` for actions, then executes\n * inside an isolated VM.\n *\n * Forbidden inside `source` (CLI build will reject):\n * - `import` / `require` / dynamic `import()`\n * - `process`, `globalThis`, `eval`, `new Function`\n * - any identifier resolved from a value-only top-level import\n *\n * @example\n * ```json\n * {\n * \"language\": \"js\",\n * \"source\": \"if (ctx.input.email) ctx.input.email = ctx.input.email.toLowerCase();\",\n * \"capabilities\": [],\n * \"timeoutMs\": 250\n * }\n * ```\n */\nexport const ScriptBodySchema = z.object({\n language: z.literal('js'),\n /** Function body source (NOT a full module — no top-level imports). */\n source: z.string().min(1).describe('Function body source'),\n /**\n * Capability tokens the body is allowed to use. Default: `[]`.\n * The sandbox throws if the body calls a `ctx` API not covered by these.\n */\n capabilities: z.array(HookBodyCapability).default([]).describe('Granted capability tokens'),\n /**\n * Per-invocation hard timeout in milliseconds.\n * Sandbox kills the script if it exceeds this; smaller of this and the\n * enclosing hook/action `timeout` wins.\n */\n timeoutMs: z.number().int().positive().max(30_000).optional().describe('Per-invocation timeout (ms)'),\n /**\n * Per-invocation memory cap in MB.\n * Subject to engine support (isolated-vm enforces, quickjs approximates).\n */\n memoryMb: z.number().int().positive().max(256).optional().describe('Per-invocation memory cap (MB)'),\n}).describe('L2 sandboxed JS body — runs inside an isolated VM with declared capabilities');\nexport type ScriptBody = z.infer<typeof ScriptBodySchema>;\n\n/**\n * Hook / Action body — discriminated by `language`.\n *\n * Two and only two forms are accepted:\n * - `expression` — L1, pure formula evaluated by the formula engine.\n * - `js` — L2, sandboxed JavaScript source string.\n *\n * The compiled-module path (`.mjs` envelope) is intentionally **not** part of\n * this union. All bodies are pure metadata and travel inside the project\n * artifact JSON — no separate runtime module is required.\n *\n * @see content/docs/concepts/north-star.mdx — \"Metadata-only runtime\"\n */\nexport const HookBodySchema = z.discriminatedUnion('language', [\n ExpressionBodySchema,\n ScriptBodySchema,\n]).describe('Hook/Action body — expression (L1) or sandboxed JS (L2)');\nexport type HookBody = z.infer<typeof HookBodySchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { z } from 'zod';\n\n/**\n * # Public auth feature-flag registry (#2874)\n *\n * Classification registry for the **public `/api/v1/auth/config` `features`\n * contract** produced by plugin-auth's `getPublicConfig()`. Every boolean flag\n * served there MUST be classified here — a drift guard in plugin-auth\n * (`public-feature-registry.test.ts`) asserts the served key set ≡ this\n * registry's key set, so a new flag that ships unclassified turns CI red.\n *\n * Why: the create-user `phoneNumber` bug (#2871 / objectui#2406) was one\n * instance of a broader class — *the UI advertises a capability the runtime\n * doesn't have because the plugin behind it is off*. Manual per-site gating\n * discipline inevitably leaves silent gaps; this registry is the single place\n * where each flag's consumption surface, default semantics, and gated spec\n * inputs (or exemption rationale) are recorded and CI-enforced.\n *\n * NOT to be confused with `kernel/feature.zod.ts` (`FeatureFlagSchema`) —\n * that schema models tenant-scoped runtime rollout toggles (strategies,\n * expiry, conditions). This registry classifies the fixed, deployment-level\n * capability flags that plugin-auth advertises to anonymous clients.\n *\n * Consumers:\n * - `ui/action.zod.ts` — `requiresFeature` sugar on actions/params is lowered\n * at parse time (see {@link lowerRequiresFeature}) into the canonical\n * `visible` CEL predicate using {@link featureGatePredicate}.\n * - plugin-auth drift guard (key-set equivalence with `getPublicConfig()`).\n * - platform-objects completeness guard (`feature-gate-guard.test.ts`) —\n * every path in `gatedInputs` must carry the matching predicate, and every\n * `features.*` reference in a `visible` predicate must be booked here.\n *\n * This module is deliberately **import-free** (type-only zod import aside) so\n * schema modules can depend on it file-directly without cycle risk, and it\n * contains constants plus pure lowering helpers only (Prime Directive #2).\n */\n\n/**\n * Where a flag is consumed:\n * - `crud` — admin/CRUD surface: action/param `visible` predicates rendered\n * through objectui's `filterVisibleParams` chain. The surface this registry\n * actively guards.\n * - `login` — objectui login/auth UI reads the flag straight off\n * `/auth/config` (no spec metadata in between).\n * - `status` — operational status indicator, not a capability gate.\n */\nexport type PublicAuthFeatureSurface = 'crud' | 'login' | 'status';\n\n/**\n * Default semantics of the flag, which decide the lowered predicate:\n * - `opt-in` — default `false`; gate with `features.X == true`.\n * - `default-on` — default `true`; gate with `features.X != false` so a\n * missing/undefined flag (e.g. config not yet fetched) keeps the input\n * visible.\n */\nexport type PublicAuthFeatureSemantics = 'opt-in' | 'default-on';\n\nexport type PublicAuthFeatureEntry = {\n surface: PublicAuthFeatureSurface;\n semantics: PublicAuthFeatureSemantics;\n /**\n * Spec inputs gated on this flag. Path grammar:\n * `<object>.actions.<action>` or `<object>.actions.<action>.params.<name|field>`.\n * The platform-objects completeness guard resolves each path and asserts the\n * target's `visible` predicate matches {@link featureGatePredicate}.\n * Mutually exclusive with `exempt`.\n */\n gatedInputs?: readonly string[];\n /** Required when `gatedInputs` is absent — why no spec input needs gating. */\n exempt?: { reason: string };\n /** Audit notes: login-surface consumption sites, known gaps, follow-ups. */\n notes?: string;\n};\n\n/**\n * The registry. Keys mirror the boolean flags assembled in plugin-auth's\n * `getPublicConfig()` (auth-manager.ts, `features` literal) — see the drift\n * guard. Login-surface consumption sites below were audited against objectui\n * on 2026-07-15 (#2874 P2②).\n */\nexport const PUBLIC_AUTH_FEATURES = {\n twoFactor: {\n surface: 'crud',\n semantics: 'opt-in',\n gatedInputs: [\n 'sys_user.actions.enable_two_factor',\n 'sys_user.actions.disable_two_factor',\n 'sys_user.actions.generate_backup_codes',\n 'sys_two_factor.actions.enable_two_factor',\n 'sys_two_factor.actions.disable_two_factor',\n 'sys_two_factor.actions.regenerate_backup_codes',\n ],\n notes:\n 'Login-surface 2FA challenge is server-driven remediation (ADR-0069), ' +\n 'so the flag is intentionally unread by objectui LoginForm.',\n },\n passkeys: {\n surface: 'login',\n semantics: 'opt-in',\n exempt: {\n reason:\n 'No spec input to gate. Typed in objectui (auth/src/types.ts) but no ' +\n 'passkey UI exists yet — advertised-but-unconsumed gap tracked in ' +\n 'objectui#2514 (#2874 P2②).',\n },\n },\n magicLink: {\n surface: 'login',\n semantics: 'opt-in',\n exempt: {\n reason:\n 'No spec input to gate. Typed in objectui (auth/src/types.ts) but no ' +\n 'magic-link UI exists yet — advertised-but-unconsumed gap tracked in ' +\n 'objectui#2514 (#2874 P2②).',\n },\n },\n organization: {\n surface: 'crud',\n semantics: 'default-on',\n gatedInputs: [\n 'sys_user.actions.invite_user',\n 'sys_member.actions.add_member',\n 'sys_member.actions.update_member_role',\n 'sys_member.actions.remove_member',\n 'sys_member.actions.transfer_ownership',\n 'sys_invitation.actions.invite_user',\n 'sys_invitation.actions.cancel_invitation',\n 'sys_invitation.actions.resend_invitation',\n 'sys_team.actions.create_team',\n 'sys_team.actions.update_team',\n 'sys_team.actions.remove_team',\n 'sys_team_member.actions.add_team_member',\n 'sys_team_member.actions.remove_team_member',\n ],\n notes: 'Org CAPABILITY gate, not multi-org (ADR-0081 D1).',\n },\n multiOrgEnabled: {\n surface: 'crud',\n semantics: 'default-on',\n gatedInputs: [\n 'sys_organization.actions.create_organization',\n 'sys_organization.actions.update_organization',\n 'sys_organization.actions.delete_organization',\n 'sys_organization.actions.set_active_organization',\n 'sys_organization.actions.leave_organization',\n 'sys_organization.actions.change_slug',\n ],\n notes:\n 'Reflects ACTUAL multi-tenancy capability (tenancy.mode === \"multi\", ' +\n 'ADR-0093 D4), not just the requested mode.',\n },\n degradedTenancy: {\n surface: 'status',\n semantics: 'opt-in',\n exempt: {\n reason:\n 'Operator status banner (ADR-0093 D5) — signals degraded tenant ' +\n 'isolation, not an input capability gate.',\n },\n },\n oidcProvider: {\n surface: 'crud',\n semantics: 'default-on',\n gatedInputs: [\n 'sys_oauth_application.actions.create_oauth_application',\n 'sys_oauth_application.actions.delete_oauth_application',\n 'sys_oauth_application.actions.disable_oauth_application',\n 'sys_oauth_application.actions.enable_oauth_application',\n 'sys_oauth_application.actions.rotate_client_secret',\n ],\n notes:\n 'Default-ON: the embedded OIDC authorization server follows the ' +\n 'default-on MCP surface (resolveOidcProviderEnabled). Login surface ' +\n 'consumes the socialProviders[] array (per-provider enabled), not this ' +\n 'flag.',\n },\n sso: {\n surface: 'login',\n semantics: 'opt-in',\n exempt: {\n reason:\n 'Deliberately ungated on the CRUD surface: the served value is ' +\n 'refined to \"usable\" (≥1 provider configured) via isSsoUsable() at ' +\n '/auth/config, so gating sys_sso_provider registration actions on it ' +\n 'would deadlock first-provider setup. Login consumption verified: ' +\n 'objectui LoginForm gates the \"Sign in with SSO\" button.',\n },\n },\n ssoEnforced: {\n surface: 'login',\n semantics: 'opt-in',\n exempt: {\n reason:\n 'Login-surface only: objectui LoginForm hides the password form and ' +\n 'self-registration (break-glass link remains). No spec input to gate.',\n },\n },\n deviceAuthorization: {\n surface: 'login',\n semantics: 'opt-in',\n exempt: {\n reason:\n 'No spec input (sys_device_code declares no actions). Known gap: ' +\n 'objectui DeviceAuthPage hits the device-auth endpoints without ' +\n 'checking this flag (absent from its client type) — tracked in ' +\n 'objectui#2513 (#2874 P2②).',\n },\n },\n admin: {\n surface: 'crud',\n semantics: 'opt-in',\n gatedInputs: [\n 'sys_user.actions.create_user',\n 'sys_user.actions.ban_user',\n 'sys_user.actions.unban_user',\n 'sys_user.actions.unlock_user',\n 'sys_user.actions.set_user_password',\n 'sys_user.actions.set_user_role',\n 'sys_user.actions.impersonate_user',\n ],\n notes: 'SCIM forces the admin plugin (and this flag) on — ADR-0071.',\n },\n phoneNumber: {\n surface: 'crud',\n semantics: 'opt-in',\n gatedInputs: ['sys_user.actions.create_user.params.phoneNumber'],\n notes:\n 'The original #2871 fix. Also read by objectui LoginForm for the ' +\n 'phone+password sign-in mode.',\n },\n phoneNumberOtp: {\n surface: 'login',\n semantics: 'opt-in',\n exempt: {\n reason:\n 'Login-surface only: gates the \"sign in with verification code\" link ' +\n '(LoginForm) and the phone branch of forgot-password. Only advertised ' +\n 'when SMS is actually deliverable (#2780).',\n },\n },\n} as const satisfies Record<string, PublicAuthFeatureEntry>;\n\nexport type PublicAuthFeatureName = keyof typeof PUBLIC_AUTH_FEATURES;\n\n/** Tuple of registry keys — feeds `z.enum(...)` for the `requiresFeature` sugar. */\nexport const PUBLIC_AUTH_FEATURE_NAMES = Object.keys(PUBLIC_AUTH_FEATURES) as [\n PublicAuthFeatureName,\n ...PublicAuthFeatureName[],\n];\n\n/**\n * Non-boolean keys `getPublicConfig()` may conditionally spread into\n * `features` (legal-link URLs). Exempt from flag classification; the drift\n * guard asserts no OTHER non-boolean key sneaks in.\n */\nexport const PUBLIC_AUTH_CONFIG_NON_FLAG_KEYS = ['termsUrl', 'privacyUrl'] as const;\n\n/**\n * The canonical CEL gate for a flag, per its default semantics:\n * `opt-in` → `features.X == true`; `default-on` → `features.X != false`\n * (so an absent flag — e.g. config not yet fetched — fails open).\n */\nexport function featureGatePredicate(name: PublicAuthFeatureName): string {\n const op = PUBLIC_AUTH_FEATURES[name].semantics === 'opt-in' ? '== true' : '!= false';\n return `features.${name} ${op}`;\n}\n\n/** Object shape the lowering transform operates on (post field-level parse). */\ntype WithRequiresFeature = {\n requiresFeature?: PublicAuthFeatureName;\n /** Already normalized by ExpressionInputSchema to the `{dialect, source}` envelope. */\n visible?: { dialect?: unknown; source?: unknown } & Record<string, unknown>;\n};\n\n/**\n * Lower the declarative `requiresFeature: '<flag>'` sugar into the canonical\n * `visible` CEL predicate and strip the sugar key from the output — mirroring\n * `normalizeVisibleWhen` (ADR-0089): persisted artifacts, lint, runtime, and\n * objectui only ever see the canonical envelope.\n *\n * - No existing `visible` → `{ dialect: 'cel', source: <gate> }`, string-equal\n * to the hand-written gates it replaces.\n * - Existing CEL `visible` with a `source` → composed as\n * `(<existing>) && <gate>` (existing predicate first, gate last — the\n * hand-written convention).\n * - Existing `visible` that is non-CEL or AST-only → loud parse error\n * (ADR-0078 no-silently-inert); write the combined predicate by hand.\n *\n * Designed as a zod `.transform((v, ctx) => lowerRequiresFeature(v, ctx))`\n * appended after the schema's refinements.\n */\nexport function lowerRequiresFeature<T extends WithRequiresFeature>(\n input: T,\n ctx: z.core.$RefinementCtx,\n): Omit<T, 'requiresFeature'> {\n const { requiresFeature, ...rest } = input;\n if (requiresFeature === undefined) return rest as Omit<T, 'requiresFeature'>;\n\n const gate = featureGatePredicate(requiresFeature);\n const existing = rest.visible;\n if (existing === undefined) {\n return { ...rest, visible: { dialect: 'cel', source: gate } } as Omit<T, 'requiresFeature'>;\n }\n if (existing.dialect !== 'cel' || typeof existing.source !== 'string') {\n ctx.addIssue({\n code: 'custom',\n path: ['requiresFeature'],\n message:\n '`requiresFeature` composes only with a CEL `visible` carrying a `source` string; ' +\n 'this expression is AST-only or non-CEL — write the combined predicate by hand.',\n });\n return rest as Omit<T, 'requiresFeature'>;\n }\n return {\n ...rest,\n visible: { ...existing, source: `(${existing.source}) && ${gate}` },\n } as Omit<T, 'requiresFeature'>;\n}\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { FieldType } from '../data/field.zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { ExpressionInputSchema } from '../shared/expression.zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\nimport { HookBodySchema } from '../data/hook-body.zod';\n// Imported file-directly (not via the kernel barrel): the module is\n// deliberately import-free, so this cannot introduce a cycle.\nimport { PUBLIC_AUTH_FEATURE_NAMES, lowerRequiresFeature } from '../kernel/public-auth-features';\n\n/**\n * Action Parameter Schema\n *\n * Defines inputs required before executing an action.\n *\n * Two declaration modes:\n *\n * 1. **Field-backed** (preferred) — reference an existing object field; the\n * runtime resolves the field's label (i18n), type, validation rules,\n * options, placeholder, help text, and widget mapping from object\n * metadata. Cross-object references use `objectOverride`.\n *\n * ```ts\n * params: [\n * { field: 'email' }, // same object\n * { field: 'role', objectOverride: 'sys_member' }, // different object\n * ]\n * ```\n *\n * 2. **Inline** (legacy / bespoke) — declare `name`, `label`, `type` etc.\n * inline when no matching object field exists. Inline values may also be\n * used alongside `field` to override individual properties.\n *\n * `name` is required unless `field` is provided (in which case it defaults\n * to the field name and is used as the request-body key).\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const ActionParamSchema = lazySchema(() => z.object({\n /** Request-body key. Defaults to `field` when `field` is set. */\n name: z.string().optional(),\n /** Reference an existing object field for label/type/validation/options. */\n field: SnakeCaseIdentifierSchema.optional(),\n /** Object that owns the referenced field (defaults to the action's parent object). */\n objectOverride: SnakeCaseIdentifierSchema.optional(),\n /** Overrides the resolved field label (or sets it for inline params). */\n label: I18nLabelSchema.optional(),\n /** Overrides the resolved field type (or sets it for inline params). */\n type: FieldType.optional(),\n /**\n * Required override; when omitted defaults to `false`. Consumers that wish\n * to inherit the underlying field's `required` flag should leave this\n * undefined in the source schema and resolve at runtime (the dialog\n * renderers check truthiness, so `false === undefined` for UI purposes).\n */\n required: z.boolean().optional().default(false),\n /** Select/picklist options override. */\n options: z.array(z.object({ label: I18nLabelSchema, value: z.string() })).optional(),\n /** Placeholder override. */\n placeholder: z.string().optional(),\n /** Help/description override. */\n helpText: z.string().optional(),\n /** Default value for the dialog input. */\n defaultValue: z.unknown().optional(),\n /**\n * Widget config for inline params (field-backed params inherit these from\n * the referenced field at runtime; inline values override). The param\n * dialog renders every param through the same field-widget renderer the\n * object form uses (objectui ADR-0059), so these mirror the corresponding\n * `FieldSchema` knobs.\n */\n /** Allow multiple values (file/image/lookup/user params → array value). */\n multiple: z.boolean().optional().describe('Allow multiple values (array value shape); mirrors FieldSchema.multiple.'),\n /** Accepted upload types (MIME types / extensions) for `file`/`image` params. */\n accept: z.array(z.string()).optional().describe('Accepted upload types (MIME types / extensions) for file/image params.'),\n /** Max upload size in bytes for `file`/`image` params. */\n maxSize: z.number().int().positive().optional().describe('Max upload size in bytes for file/image params.'),\n /**\n * When true, the param's default value is pulled from the current row record\n * (key = the resolved field name) when the action runs from a list_item\n * context. Useful for edit dialogs that pre-fill from the selected row.\n */\n defaultFromRow: z.boolean().optional(),\n /**\n * Visibility predicate (CEL) — same scope as the action-level `visible`\n * (`current_user` / `app` / `data` / `features`). When it evaluates false the\n * dialog omits this param entirely. Use it to hide a param that the backend\n * only accepts under an opt-in capability, e.g. the create-user `phoneNumber`\n * param gated on `features.phoneNumber` so the form never offers a field the\n * default backend rejects. Absent = always visible.\n */\n visible: ExpressionInputSchema.optional().describe('Param visibility predicate (CEL); omits the param when false.'),\n /**\n * Declarative capability gate (#2874): name a public auth feature flag\n * (see `PUBLIC_AUTH_FEATURES` in `@objectstack/spec/kernel`) and the schema\n * lowers it at parse time into the canonical `visible` predicate —\n * `features.X == true` (opt-in flag) or `features.X != false` (default-on),\n * AND-composed with any explicit `visible`. The sugar key is stripped from\n * the parsed output, so renderers/lint only ever see `visible`. Prefer this\n * over a hand-written `features.*` predicate: the flag name is\n * enum-checked and the gate/registry stay in lockstep.\n */\n requiresFeature: z.enum(PUBLIC_AUTH_FEATURE_NAMES).optional().describe('Public auth feature flag gating this param; lowered into `visible` at parse time.'),\n}).refine(\n (p) => Boolean(p.name) || Boolean(p.field),\n { message: 'ActionParam requires either \"name\" or \"field\"' },\n).transform((p, ctx) => lowerRequiresFeature(p, ctx)));\n\n/**\n * Action type enum values.\n */\nexport const ActionType = z.enum(['script', 'url', 'modal', 'flow', 'api', 'form']);\n\n/**\n * Action types that require a `target` field.\n * Derived from ActionType, excluding 'script' which allows inline handlers.\n * These types reference an external resource (URL, flow, modal, or API endpoint)\n * and cannot function without a target binding.\n */\nconst TARGET_REQUIRED_TYPES: ReadonlySet<string> = new Set(\n ActionType.options.filter((t) => t !== 'script'),\n);\n\n/**\n * Action Schema\n * \n * **NAMING CONVENTION:**\n * Action names are machine identifiers used in code and must be lowercase snake_case.\n * \n * **TARGET BINDING:**\n * The `target` field is the canonical way to bind an action to its handler.\n * - `type: 'script'` — `target` is recommended (references a script/function name).\n * - `type: 'url'` — `target` is **required** (the URL to navigate to).\n * - `type: 'flow'` — `target` is **required** (the flow name to invoke).\n * - `type: 'modal'` — `target` is **required** (the modal/page name to open).\n * - `type: 'api'` — `target` is **required** (the API endpoint to call).\n * - `type: 'form'` — `target` is **required** (the FormView name to open, routed to `/console/forms/:name`).\n * \n * The `execute` field is **deprecated** and will be removed in a future version.\n * If `execute` is provided without `target`, it is automatically migrated to `target`.\n * \n * @example Good action names\n * - 'on_close_deal'\n * - 'send_welcome_email'\n * - 'approve_contract'\n * - 'export_report'\n * \n * @example Bad action names (will be rejected)\n * - 'OnCloseDeal' (PascalCase)\n * - 'sendEmail' (camelCase)\n * - 'Send Email' (spaces)\n * \n * Note: The action name is the configuration ID. JavaScript function names can use camelCase,\n * but the metadata ID must be lowercase snake_case.\n */\n/**\n * Action Location — where an action is allowed to surface in the UI.\n *\n * Canonical list (single source of truth for the whole platform). Renderers,\n * the ActionEngine, the Studio designer dropdowns, and `objectui` consumers\n * MUST import from this constant rather than re-declaring their own enum —\n * adding a new location should require touching this one file only.\n *\n * Semantics:\n * - `list_toolbar` — header/toolbar of a list view (bulk actions, \"New\", export).\n * - `list_item` — per-row action on a list/grid row (Salesforce row-level menu).\n * - `record_header` — primary actions in the record-detail title bar.\n * - `record_more` — overflow menu under the \"More\" / ⋯ button on a record.\n * - `record_related` — actions on a related list section inside a record.\n * - `record_section` — actions surfaced inside a body section/tab of a record\n * (e.g. a Security tab grouping change-password, 2FA, etc.).\n * - `global_nav` — global navigation/command-palette level actions.\n */\nexport const ACTION_LOCATIONS = [\n 'list_toolbar',\n 'list_item',\n 'record_header',\n 'record_more',\n 'record_related',\n 'record_section',\n 'global_nav',\n] as const;\n\nexport const ActionLocationSchema = z.enum(ACTION_LOCATIONS);\nexport type ActionLocation = z.infer<typeof ActionLocationSchema>;\n\n/**\n * Tool category values for {@link ActionAiSchema.category}.\n *\n * Mirrors `ToolCategorySchema` in `../ai/tool.zod`. Kept **inline** rather\n * than imported to avoid a `ui → ai` import cycle (`ai/*.form.ts` already\n * imports `defineForm` from `ui/view.zod`). If you change the canonical\n * tool categories, update both sides.\n */\nconst ActionAiCategorySchema = z.enum([\n 'data',\n 'action',\n 'flow',\n 'integration',\n 'vector_search',\n 'analytics',\n 'utility',\n]);\n\n/**\n * AI exposure block (ADR-0011 \"Actions as AI Tools\").\n *\n * **Opt-in, default off.** An action becomes an AI-callable tool only when\n * `exposed: true`. This is a deliberate governance gate: in an AI-authoring\n * world the platform's value is that a human can govern exactly which\n * capabilities the agent fleet is allowed to invoke — a half-finished or\n * unreviewed action must never be silently armed.\n *\n * When exposed, `description` is **required** — it is the LLM-facing contract\n * (when/why to call), authored explicitly rather than derived from the\n * UI `label`. The bridge in `@objectstack/service-ai` translates this block\n * into an `AIToolDefinition`.\n */\nexport const ActionAiSchema = z.object({\n /**\n * Expose this action to AI agents as a callable tool. Default `false`.\n * Setting `true` REQUIRES `description`.\n */\n exposed: z.boolean().default(false).describe('Expose this action to AI agents. Requires `description` when true.'),\n\n /**\n * LLM-facing description: tells the model when and why to call this action.\n * Distinct from the UI `label`. Plain English, ≥ 40 chars for useful tool\n * selection. Required whenever `exposed` is true.\n */\n description: z.string().min(40).optional().describe('LLM-facing description (≥40 chars). Required when exposed.'),\n\n /**\n * Override the derived tool category. Defaults to `action` (side-effect).\n * Use `data` for read-only actions, `analytics` for aggregations, etc.\n */\n category: ActionAiCategorySchema.optional().describe('Tool category override (defaults to \"action\").'),\n\n /**\n * Per-parameter AI hints, keyed by param name (or the injected `recordId`).\n * Tightens the JSON Schema the LLM sees (e.g. add `enum`, override\n * `description`, supply `examples`) WITHOUT changing the UI-facing field\n * metadata. Keys must match a declared `params[].name` (or `recordId`).\n */\n paramHints: z.record(z.string(), z.object({\n description: z.string().optional(),\n enum: z.array(z.union([z.string(), z.number()])).optional(),\n examples: z.array(z.unknown()).optional(),\n })).optional().describe('Per-parameter AI hints keyed by param name.'),\n\n /**\n * Output JSON Schema for the action's return value. Enables structured\n * downstream tool chaining (one action's output feeds another's input) and\n * is summarised into the tool description so the model knows what it gets\n * back. Optional — when omitted the return value is treated as freeform.\n */\n outputSchema: z.record(z.string(), z.unknown()).optional().describe('JSON Schema for the action return value.'),\n\n /**\n * Override confirmation for AI calls. When unset, the bridge defaults to\n * `true` for actions that look destructive (`confirmText` set, `mode:'delete'`,\n * or `variant:'danger'`). Set explicitly to `false` to assert a destructive-\n * looking action is safe to run without human approval, or `true` to force a\n * human-in-the-loop gate on an otherwise-safe action.\n */\n requiresConfirmation: z.boolean().optional().describe('Override HITL confirmation for AI invocations.'),\n});\n\nexport type ActionAi = z.infer<typeof ActionAiSchema>;\n\nexport const ActionSchema = lazySchema(() => z.object({\n /** Machine name of the action */\n name: SnakeCaseIdentifierSchema.describe('Machine name (lowercase snake_case)'),\n \n /** Display label */\n label: I18nLabelSchema.describe('Display label'),\n\n /** Target object this action belongs to (optional, snake_case) */\n objectName: z.string().regex(/^[a-z_][a-z0-9_]*$/).optional().describe('Target object this action belongs to. When set, the action is auto-merged into the object\\'s actions array by defineStack().'),\n \n /** Icon name (Lucide) */\n icon: z.string().optional().describe('Icon name'),\n\n /** Where does this action appear? */\n locations: z.array(ActionLocationSchema).optional().describe('Locations where this action is visible'),\n\n /** \n * Visual Component Type\n * Defaults to 'button' or 'menu_item' based on location,\n * but can be overridden.\n */\n component: z.enum([\n 'action:button', // Standard Button\n 'action:icon', // Icon only\n 'action:menu', // Dropdown menu\n 'action:group' // Button Group\n ]).optional().describe('Visual component override'),\n \n /** What type of interaction? */\n type: ActionType.default('script').describe('Action functionality type'),\n \n /** \n * Payload / Target — the canonical binding for the action handler.\n * Required for url, flow, modal, and api types.\n * For `script` type: prefer `body` over `target`. `target` is kept only for\n * legacy bundle.functions[name] references.\n *\n * **Interpolation** (renderer responsibility, all action types):\n * `target` MAY contain `${param.X}` and `${ctx.X}` tokens. Renderers\n * resolve them just before invocation:\n * - `${param.X}` — value collected from the action's params dialog.\n * - `${ctx.X}` — values from the action context: `ctx.origin`\n * (window.origin), `ctx.recordId`, `ctx.user.id`, `ctx.org.id`, etc.\n * Used by redirect-style actions like `link_social`, where the target is\n * e.g. `/api/v1/auth/sign-in/social?provider=${param.provider}&callbackURL=${ctx.origin}/_console/apps/account/sys_account`.\n * Renderers MUST `encodeURIComponent` interpolated values before\n * substituting them into URL query positions.\n */\n target: z.string().optional().describe('URL, Script Name, Flow ID, or API Endpoint. Supports ${param.X} and ${ctx.X} interpolation.'),\n\n /**\n * For `type:'url'` — where to open `target`. A simple, declarative new-tab\n * control for STATIC urls (no handler, no synchronous pre-open). objectui's\n * ActionRunner.executeUrl reads `openIn` with priority over the legacy\n * `params.newTab`/external-URL heuristic.\n *\n * - `'new-tab'` — opens `target` in a new browser tab.\n * - `'self'` — navigates in place.\n * - omitted — external/absolute URLs open in a new tab; relative URLs\n * navigate in place.\n *\n * Distinct from `opensInNewTab`/`newTabUrl`, which pre-open an about:blank\n * tab synchronously for ASYNC SSO-redirect handlers — do NOT use `openIn`\n * for those. This is a STATIC execution option: keep it OUT of `params`\n * (which is user-input-collection only).\n */\n openIn: z.enum(['self', 'new-tab']).optional().describe(\"For type:'url' — where to open `target`. 'new-tab' opens a new browser tab; 'self' navigates in place. When omitted, external/absolute URLs open in a new tab and relative URLs navigate in place. Static execution option — keep it OUT of `params` (which is user-input-collection only).\"),\n\n /**\n * Action Body (L1 expression or L2 sandboxed JS).\n *\n * Only meaningful when `type === 'script'`. When set, the runtime invokes\n * the body inside the sandbox as `(input, ctx) => Promise<output>` and\n * ignores `target`.\n *\n * - `{ language: 'expression', source: '...' }` — pure formula (L1).\n * - `{ language: 'js', source: '...', capabilities: [...] }` — sandboxed JS (L2).\n *\n * Compiled-module bodies are not supported. Outbound IO (HTTP, etc.) goes\n * through Connector recipes (separate spec).\n */\n body: HookBodySchema.optional().describe('Action body — expression (L1) or sandboxed JS (L2). Only used when type is `script`.'),\n\n /** \n * @deprecated Use `target` instead. This field is auto-migrated to `target` during parsing.\n */\n execute: z.string().optional().describe('@deprecated — Use target instead. Auto-migrated to target during parsing.'),\n \n /** User Input Requirements */\n params: z.array(ActionParamSchema).optional().describe('Input parameters required from user'),\n \n /** Visual Style */\n variant: z.enum(['primary', 'secondary', 'danger', 'ghost', 'link']).optional().describe('Button visual variant for styling (primary = highlighted, danger = destructive, ghost = transparent)'),\n\n /**\n * Explicit sort order WITHIN a UI location group (lower = higher / more\n * prominent). Controls where the action lands in each `locations` group\n * instead of relying on cross-file `defineStack({ actions })` registration\n * order — which is fragile and couples unrelated features.\n *\n * In `record_header` the first visible action becomes the primary button, so\n * a low (or negative) `order` promotes an action into the primary slot and a\n * high `order` demotes it toward the `⋯` overflow menu. This is the\n * declarative lever a plugin (e.g. plugin-approvals) or app author uses to\n * make a decision like Approve/Reject stably outrank app actions, rather than\n * hiding the other actions to \"make room\".\n *\n * Honoured by a STABLE sort in `mergeActionsIntoObjects()` (see stack.zod):\n * actions that leave `order` unset are treated as `0` and keep their original\n * registration order, so setting `order` on nobody is a no-op — fully\n * backward compatible. Renderers MAY additionally prefer a `variant:'primary'`\n * action when two actions tie on `order` (see objectui record-header renderer).\n */\n order: z.number().optional().describe('Sort order within a location group (lower = higher). Promotes/demotes an action toward the record_header primary button; stable, so actions without `order` keep their registration order.'),\n\n /** UX Behavior */\n confirmText: I18nLabelSchema.optional().describe('Confirmation message before execution'),\n successMessage: I18nLabelSchema.optional().describe('Success message to show after execution'),\n // Runtime (ActionRunner) already honours this — declared here so authors can\n // set a friendly failure toast instead of surfacing the raw error string.\n errorMessage: I18nLabelSchema.optional().describe('Error message to show when the action fails (overrides the raw error).'),\n refreshAfter: z.boolean().default(false).describe('Refresh view after execution'),\n // Single-record update actions only. When true, the runtime captures the\n // record's prior field values and offers an \"Undo\" affordance on the success\n // toast (backed by the client UndoManager) to restore them.\n undoable: z.boolean().optional().describe('Offer an Undo affordance after this single-record update action succeeds.'),\n\n /**\n * Result Dialog — describe how to render the API response on success.\n *\n * When set and the action returns successfully, the renderer SHOULD open a\n * dialog showing the selected fields from `result.data` instead of the\n * `successMessage` toast. The dialog has an acknowledge button only — the\n * user must explicitly close it. Used for **one-shot reveals** of values\n * the user must copy now because they cannot be retrieved later:\n *\n * - TOTP enrollment URI + secret (`enable_two_factor`)\n * - Backup recovery codes (`regenerate_backup_codes`)\n * - Freshly minted OAuth `client_secret` (`rotate_client_secret`,\n * `create_oauth_application`)\n *\n * `fields` selects what to render and how. Each entry's `path` is a dot\n * path into `result.data` (e.g. `'totpURI'`, `'backupCodes'`,\n * `'client.client_secret'`). When `fields` is omitted, the renderer falls\n * back to JSON-printing the whole response under a single block.\n *\n * `format` (dialog-level) is a default for fields that don't carry their\n * own `format`; the per-field `format` always wins.\n *\n * Renderer contract (objectui):\n * - `qrcode` — render the value as a QR code; also render the raw string\n * underneath with a copy button (so the user can paste into apps that\n * don't scan).\n * - `code-list` — value must be an array of strings; render each in a\n * monospace row with per-row copy and a \"Copy all\" affordance.\n * - `secret` — render a single string masked by default with a reveal\n * toggle and copy button.\n * - `text` — plain text with copy.\n * - `json` — pretty-printed JSON in a monospace block.\n *\n * The dialog SHOULD set `refreshAfter` to true on close (separate from\n * the existing `refreshAfter` flag, which fires immediately on success).\n */\n resultDialog: z.object({\n title: I18nLabelSchema.optional(),\n description: I18nLabelSchema.optional(),\n acknowledge: I18nLabelSchema.optional().describe('Acknowledge button label, e.g. \"I have saved this\"'),\n format: z.enum(['qrcode', 'code-list', 'secret', 'text', 'json']).optional().describe('Default format for fields without their own format. Defaults to json when omitted.'),\n fields: z.array(z.object({\n path: z.string().describe('Dot path into result.data (e.g. \"totpURI\", \"client.client_secret\").'),\n label: I18nLabelSchema.optional(),\n format: z.enum(['qrcode', 'code-list', 'secret', 'text', 'json']).optional().describe('Per-field format override.'),\n })).optional().describe('Which fields from result.data to render. Omit to dump full JSON.'),\n }).optional().describe('Render API response in a one-shot reveal dialog (suppresses successMessage when set).'),\n \n /** Access */\n visible: ExpressionInputSchema.optional().describe('Visibility predicate (CEL).'),\n /**\n * Declarative capability gate (#2874) — action-level twin of the param\n * `requiresFeature`. Lowered at parse time into `visible` (`== true` for\n * opt-in flags, `!= false` for default-on; AND-composed with an explicit\n * `visible`) and stripped from the output. See `PUBLIC_AUTH_FEATURES` in\n * `@objectstack/spec/kernel`.\n */\n requiresFeature: z.enum(PUBLIC_AUTH_FEATURE_NAMES).optional().describe('Public auth feature flag gating this action; lowered into `visible` at parse time.'),\n disabled: z.union([z.boolean(), ExpressionInputSchema]).optional().describe('Boolean or predicate (CEL) — action is disabled when TRUE.'),\n\n /**\n * [ADR-0066 D4] System capabilities required to INVOKE this action — a\n * dual-surface gate from ONE declaration: the server (action route) rejects\n * the call with 403 when the caller's systemPermissions don't cover these (the\n * source of truth), and the objectui ActionRunner hides/disables the button\n * using the same requirement. Independent of `visible` (CEL): this is the RBAC\n * capability contract, mirroring `App.requiredPermissions`.\n */\n requiredPermissions: z.array(z.string()).optional().describe('[ADR-0066 D4] Capabilities required to invoke this action (server-enforced 403 + UI hide/disable).'),\n\n /** Keyboard Shortcut */\n shortcut: z.string().optional().describe('Keyboard shortcut to trigger this action (e.g., \"Ctrl+S\")'),\n\n /** Bulk Operations */\n bulkEnabled: z.boolean().optional().describe('Whether this action can be applied to multiple selected records'),\n\n /**\n * AI exposure block (ADR-0011). Opt-in, default off: an action is exposed\n * to AI agents only when `ai.exposed === true`, in which case `ai.description`\n * is required. See {@link ActionAiSchema}.\n */\n ai: ActionAiSchema.optional().describe('AI exposure (opt-in). Set ai.exposed=true + ai.description to make this callable by agents.'),\n\n /**\n * Row-context: when the action runs from a list_item location, this body key\n * receives the row's id (or the field named by `recordIdField`). Defaults to\n * `id` when omitted but `recordIdField` is set; otherwise no injection.\n */\n recordIdParam: z.string().optional().describe('Body key to inject the row id into when running from a list_item context.'),\n /**\n * Row field whose value seeds `recordIdParam`. Defaults to `'id'` when\n * `recordIdParam` is set. Use this when the body key expects a non-id value\n * (e.g. `token` for `revoke-session`).\n */\n recordIdField: z.string().optional().describe('Row field whose value seeds recordIdParam. Defaults to \"id\".'),\n /**\n * Request-body shape. `'flat'` (default) sends collected params at the top\n * level. `{ wrap: 'data' }` nests the user-collected params under that key\n * (used by better-auth `organization/update`), while `recordIdParam` and\n * other top-level keys stay flat.\n */\n bodyShape: z.union([\n z.literal('flat'),\n z.object({ wrap: z.string() }),\n ]).optional().describe('Body wrapping: flat (default) or { wrap: key } to nest user-collected params under a key.'),\n /**\n * HTTP method to use when `type: 'api'`. Defaults to `POST`. Use `PATCH` to\n * call data-API update endpoints (e.g. `/api/v1/sys_api_key/{id}` with\n * `bodyExtra: { revoked: true }`).\n */\n method: z.enum(['POST', 'PATCH', 'PUT', 'DELETE']).optional().describe('HTTP method for type:\"api\" actions. Defaults to POST.'),\n /**\n * Static body fragment merged into the outgoing request body for `type:'api'`\n * actions. Useful for constants the user shouldn't (or can't) edit, e.g.\n * `bodyExtra: { resend: true }` on a resend-invitation action that reuses\n * better-auth's `invite-member` endpoint. Applied after user-collected\n * params and `recordIdParam` so constants always win.\n */\n bodyExtra: z.record(z.string(), z.unknown()).optional().describe('Constant body fields merged into the API request (applied last; overrides user params).'),\n /**\n * Semantic mode hint — UI / runtime can use this to pick confirm copy,\n * default variants, success messaging. Pure metadata; no runtime branching.\n */\n mode: z.enum(['create', 'edit', 'delete', 'custom']).optional().describe('Semantic mode of the action.'),\n\n /**\n * Open the action's result in a NEW TAB. The renderer pre-opens the tab\n * synchronously on click (preserving the user gesture so popup blockers\n * don't fire), paints a progress page, then drives the tab to the\n * handler's returned `redirectUrl` — or, when `newTabUrl` is set, straight\n * to that URL with no server round trip.\n */\n opensInNewTab: z.boolean().optional().describe('Open the action result in a new tab. The renderer pre-opens the tab synchronously on click (popup-blocker-safe) and navigates it to the handler\\'s redirectUrl.'),\n\n /**\n * Zero-roundtrip new-tab target. A path template the renderer navigates\n * the pre-opened tab to IMMEDIATELY on click, skipping the action POST\n * entirely. Only valid together with `opensInNewTab`. The target endpoint\n * MUST perform all auth/authz itself (e.g. the cloud `/sso-open` endpoint,\n * which re-runs every check the POST half would have done). Supports the\n * `{recordId}` placeholder, URL-encoded on substitution.\n */\n newTabUrl: z.string().optional().describe('Direct new-tab URL template ({recordId} placeholder). When set with opensInNewTab, the renderer navigates the pre-opened tab here immediately — no action POST. The endpoint must enforce auth itself.'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}).transform((data) => {\n // Auto-migrate deprecated `execute` → `target` for backward compatibility\n if (data.execute && !data.target) {\n return { ...data, target: data.execute };\n }\n return data;\n}).refine((data) => {\n // Require `target` for types that reference an external resource\n if (TARGET_REQUIRED_TYPES.has(data.type) && !data.target) {\n return false;\n }\n return true;\n}, {\n message: \"Action 'target' is required when type is 'url', 'flow', 'modal', 'api', or 'form'.\",\n path: ['target'],\n}).refine((data) => {\n // A `script` action must be *executable*: it needs either an inline `body`\n // (the runtime invokes it in the sandbox) or a `target` naming a registered\n // bundle function. With neither, AppPlugin registers no engine handler and\n // the action fails at runtime with `Action '<name>' on object '*' not found`\n // (the #2169 Mark Done bug) — a soft failure invisible to build & shape\n // tests. Reject it at author/compile time instead.\n if (data.type === 'script' && !data.body && !data.target) {\n return false;\n }\n return true;\n}, {\n message:\n \"A 'script' action requires either an inline `body` (sandboxed L1/L2 handler) or a `target` (a registered bundle function name).\",\n path: ['body'],\n}).refine((data) => {\n // ADR-0011: an exposed action must carry an LLM-facing description.\n if (data.ai?.exposed === true && !data.ai.description) {\n return false;\n }\n return true;\n}, {\n message: 'ai.description is required (≥40 chars) when ai.exposed is true.',\n path: ['ai', 'description'],\n}).refine((data) => {\n // ADR-0011: paramHints keys must reference a declared param (or the\n // auto-injected `recordId`), so a typo can't silently no-op.\n const hints = data.ai?.paramHints;\n if (!hints) return true;\n const known = new Set<string>(['recordId']);\n for (const p of data.params ?? []) {\n const key = p.name ?? p.field;\n if (key) known.add(key);\n }\n return Object.keys(hints).every((k) => known.has(k));\n}, {\n message: 'ai.paramHints keys must match a declared param name (or \"recordId\").',\n path: ['ai', 'paramHints'],\n}).transform((data, ctx) => lowerRequiresFeature(data, ctx)));\n\nexport type Action = z.infer<typeof ActionSchema>;\nexport type ActionParam = z.infer<typeof ActionParamSchema>;\nexport type ActionInput = z.input<typeof ActionSchema>;\n\n/**\n * Action Factory Helper\n */\nexport const Action = {\n create: (config: z.input<typeof ActionSchema>): Action => ActionSchema.parse(config),\n} as const;\n\n/**\n * Type-safe factory for a global or object action. Validates at authoring time via\n * `.parse()` and accepts input-shape config (optional defaults, CEL\n * shorthand) — preferred over a bare `: Action` literal.\n */\nexport function defineAction(config: z.input<typeof ActionSchema>): Action {\n return ActionSchema.parse(config);\n}\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n// ============================================================================\n// Shared Enumerations\n// ============================================================================\n\n/** Aggregation functions used across query, data-engine, analytics, field */\nimport { lazySchema } from './lazy-schema';\nexport const AggregationFunctionEnum = z.enum([\n 'count', 'sum', 'avg', 'min', 'max',\n 'count_distinct', 'percentile', 'median', 'stddev', 'variance',\n]).describe('Standard aggregation functions');\nexport type AggregationFunction = z.infer<typeof AggregationFunctionEnum>;\n\n/** Sort direction used across query, data-engine, analytics */\nexport const SortDirectionEnum = z.enum(['asc', 'desc'])\n .describe('Sort order direction');\nexport type SortDirection = z.infer<typeof SortDirectionEnum>;\n\n/** Reusable sort item — field + direction pair used across views, data sources, filters */\nexport const SortItemSchema = lazySchema(() => z.object({\n field: z.string().describe('Field name to sort by'),\n order: SortDirectionEnum.describe('Sort direction'),\n}).describe('Sort field and direction pair'));\nexport type SortItem = z.infer<typeof SortItemSchema>;\n\n/** CRUD mutation events used across hook, validation, object CDC */\nexport const MutationEventEnum = z.enum([\n 'insert', 'update', 'delete', 'upsert',\n]).describe('Data mutation event types');\nexport type MutationEvent = z.infer<typeof MutationEventEnum>;\n\n/** Database isolation levels — unified format */\nexport const IsolationLevelEnum = z.enum([\n 'read_uncommitted', 'read_committed', 'repeatable_read', 'serializable', 'snapshot',\n]).describe('Transaction isolation levels (snake_case standard)');\nexport type IsolationLevel = z.infer<typeof IsolationLevelEnum>;\n\n/** Cache eviction strategies */\nexport const CacheStrategyEnum = z.enum(['lru', 'lfu', 'ttl', 'fifo'])\n .describe('Cache eviction strategy');\nexport type CacheStrategy = z.infer<typeof CacheStrategyEnum>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { ExpressionInputSchema } from '../shared/expression.zod';\nimport { normalizeVisibleWhen, strictVisibilityError } from '../shared/visibility';\nimport { SortItemSchema } from '../shared/enums.zod';\nimport { FilterConditionSchema } from '../data/filter.zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\nimport { ResponsiveConfigSchema, ResponsiveStylesSchema } from './responsive.zod';\nimport {\n UserActionsConfigSchema,\n AppearanceConfigSchema,\n UserFiltersSchema,\n ViewFilterRuleSchema,\n AddRecordConfigSchema,\n ListColumnSchema,\n} from './view.zod';\n\n/**\n * Page Region Schema\n * A named region in the template where components are dropped.\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const PageRegionSchema = lazySchema(() => z.object({\n name: z.string().describe('Region name (e.g. \"sidebar\", \"main\", \"header\")'),\n width: z.enum(['small', 'medium', 'large', 'full']).optional(),\n components: z.array(z.lazy(() => PageComponentSchema)).describe('Components in this region')\n}));\n\n/**\n * Standard Page Component Types\n */\nexport const PageComponentType = z.enum([\n // Structure\n 'page:header', 'page:footer', 'page:sidebar', 'page:tabs', 'page:accordion', 'page:card', 'page:section',\n // Record Context\n 'record:details', 'record:highlights', 'record:related_list', 'record:activity', 'record:chatter', 'record:path', 'record:alert', 'record:quick_actions', 'record:reference_rail', 'record:history',\n // Navigation\n 'app:launcher', 'nav:menu', 'nav:breadcrumb',\n // Utility\n 'global:search', 'global:notifications', 'user:profile',\n // AI\n 'ai:chat_window', 'ai:suggestion',\n // Content Elements (Airtable Interface parity)\n 'element:text', 'element:number', 'element:image', 'element:divider',\n // Interactive Elements (Phase B — Element Library)\n 'element:button', 'element:filter', 'element:form', 'element:record_picker', 'element:text_input'\n]);\n\n/**\n * Element Data Source Schema\n * Per-element data binding for multi-object pages.\n * Overrides page-level object context so each element can query a different object.\n */\nexport const ElementDataSourceSchema = lazySchema(() => z.object({\n object: z.string().describe('Object to query'),\n view: z.string().optional().describe('Named view to apply'),\n filter: FilterConditionSchema.optional().describe('Additional filter criteria'),\n sort: z.array(SortItemSchema).optional().describe('Sort order'),\n limit: z.number().int().positive().optional().describe('Max records to display'),\n}));\n\n/**\n * Page Component Schema\n * A configured instance of a UI component.\n */\nexport const PageComponentSchema = lazySchema(() => z.object({\n /** Definition */\n type: z.union([\n PageComponentType,\n z.string()\n ]).describe('Component Type (Standard enum or custom string)'),\n id: z.string().optional().describe('Unique instance ID'),\n \n /** Configuration */\n label: I18nLabelSchema.optional(),\n // Optional with an empty-object default. Many components carry no props\n // (record:activity, element:divider, …), and the platform's own default-page\n // synthesizer (buildDefaultPageSchema) emits nodes with props at the top\n // level rather than under `properties`. Requiring `properties` forced\n // `properties: {}` boilerplate and — worse — made every Studio attempt to\n // seed a record page from its object's synthesized default layout fail\n // validation (\"regions.N.components.M.properties: expected record\"), which\n // was the real reason record/home/app pages couldn't be created in Studio.\n properties: z.record(z.string(), z.unknown()).optional().default({}).describe('Component props passed to the widget. See component.zod.ts for schemas.'),\n \n /** \n * Event Handlers \n * Map event names to Action expressions.\n * \"onClick\": \"set_variable('userId', $event.id)\"\n * \"onRowSelect\": \"navigate_to('page_detail', { id: $event.id })\"\n */\n events: z.record(z.string(), z.string()).optional().describe('Event handlers map'),\n\n /** Appearance */\n style: z.record(z.string(), z.string()).optional().describe('Inline styles or utility classes'),\n className: z.string().optional().describe('CSS class names'),\n\n /**\n * SDUI scoped responsive styles (ADR-0065). Per-breakpoint CSS-property maps\n * compiled to id-scoped CSS at render. The preferred styling channel for\n * metadata-authored pages — build-independent and collision-free, unlike raw\n * `className`. Prefer design-token values (`var(--space-6)`, `var(--surface)`).\n */\n responsiveStyles: ResponsiveStylesSchema.optional()\n .describe('Per-breakpoint scoped style maps (ADR-0065)'),\n\n /**\n * Conditional-visibility predicate (CEL) — the component is rendered only when\n * TRUE (ADR-0089, canonical `*When` name). Page predicates bind the live page\n * surface: `record` + `current_user` plus page state as `page.<var>`.\n */\n visibleWhen: ExpressionInputSchema.optional().describe(\"Visibility predicate (CEL) — component rendered only when TRUE. Binds `record`, `current_user`, `page.<var>`. e.g. \\\"page.selectedProjectId != ''\\\"\"),\n /** @deprecated ADR-0089 — use `visibleWhen`. Accepted and normalized to `visibleWhen` at parse. */\n visibility: ExpressionInputSchema.optional().describe('[DEPRECATED → `visibleWhen`] Visibility predicate (CEL). Normalized to `visibleWhen` at parse.'),\n\n /** Per-element data binding, overrides page-level object context */\n dataSource: ElementDataSourceSchema.optional().describe('Per-element data binding for multi-object pages'),\n\n /** Responsive layout overrides per breakpoint */\n responsive: ResponsiveConfigSchema.optional().describe('Responsive layout configuration'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}, { error: strictVisibilityError }).strict().transform(normalizeVisibleWhen));\n\n/**\n * Page Variable Schema\n * Local, in-memory page state. Runtime-live (ADR-0049): the renderer mounts the\n * declared variables, exposes them to expressions as `page.<name>`, and lets an\n * interactive element write one via `source`. A write re-evaluates dependent\n * `visibility` / binding predicates immediately — the master/detail and\n * filtered-dashboard pattern with no custom code.\n *\n * Binding direction: a variable names the **writer** component, not the other\n * way round. `{ name: 'selectedProjectId', source: 'project_picker' }` means the\n * component whose `id` is `project_picker` (e.g. an `element:record_picker`)\n * writes the user's selection into `selectedProjectId`; predicates then read it\n * as `page.selectedProjectId`.\n */\nexport const PageVariableSchema = lazySchema(() => z.object({\n name: z.string().describe('Variable name. Exposed to expressions as `page.<name>`.'),\n type: z.enum(['string', 'number', 'boolean', 'object', 'array', 'record_id']).default('string'),\n defaultValue: z.unknown().optional()\n .describe('Initial value. Defaults to a type-appropriate empty value when omitted.'),\n /** Source element binding — the component id that writes this variable. */\n source: z.string().optional()\n .describe('Component id that writes this variable (e.g. an element:record_picker whose `id` matches).'),\n}));\n\n// BlankPageLayoutItemSchema / BlankPageLayoutSchema removed — the `blank` page\n// type has no renderer and was dropped from PageTypeSchema (framework#2265,\n// enforce-or-remove); objectui dropped all references in objectui#1949.\n\n/**\n * Page Type Schema\n * Unified page type enum covering both platform pages (Salesforce FlexiPage style)\n * and Airtable-inspired interface page types.\n *\n * **Page type is the page KIND, NOT a visualization.** How an interface (`list`)\n * page displays its records — grid / kanban / calendar / gallery / timeline — is a\n * *visualization*, configured via `interfaceConfig.appearance.allowedVisualizations`\n * and switched at runtime. Those are deliberately NOT page types: a kanban is a `list`\n * page shown as a board, not a distinct page kind. (Historically grid/kanban/calendar/\n * gallery/timeline appeared here; the runtime never branched on them — it always read\n * the visualization from `interfaceConfig` — so they were removed to stop misleading authors.)\n *\n * **Disambiguation of similar types:**\n * - `record` vs `record_detail`: `record` is a component-based layout page (FlexiPage style with regions),\n * `record_detail` is a field-display page showing all fields of a single record (Airtable style).\n * Use `record` for custom record pages with regions/components, `record_detail` for auto-generated detail views.\n * - `home` vs `overview`: `home` is the platform-level landing page (tab landing),\n * `overview` is an interface-level navigation hub with links/instructions.\n * Use `home` for app-level landing, `overview` for in-interface navigation hubs.\n * - `app` vs `utility` vs `blank`: `app` is an app-level page with navigation context,\n * `utility` is a floating utility panel (e.g. notes, phone), `blank` is a free-form canvas\n * for custom composition. They serve distinct layout purposes.\n *\n * **Liveness (ADR-0049 enforce-or-remove):** only types with a dedicated\n * renderer are authorizable. `record`, `home`, `app`, `utility`, and `list` are\n * live. Types once declared for \"roadmap parity\" but never given a renderer\n * (`dashboard`, `form`, `record_detail`, `record_review`, `overview`, `blank`)\n * have been REMOVED from this enum — a schema-valid-but-unrendered page type is\n * a false affordance: it passes validation, then breaks at runtime (\"Unknown\n * component type\"), which is especially dangerous when templates are AI-authored.\n * They are tracked in {@link PAGE_TYPE_ROADMAP} and re-enter the enum only when a\n * renderer ships. The `page-type-liveness` gate test asserts the enum never\n * re-grows a roadmap type.\n */\nexport const PageTypeSchema = lazySchema(() => z.enum([\n // Platform page types (Salesforce FlexiPage style) — region/component composition\n 'record', // Component-based record layout page with regions\n 'home', // Platform-level home/landing page\n 'app', // App-level page with navigation context\n 'utility', // Floating utility panel (e.g. notes, phone dialer)\n // Interface page type (Airtable parity). NOTE: grid/kanban/calendar/gallery/\n // timeline are NOT page types — they are visualizations of a `list` page\n // (interfaceConfig.appearance.allowedVisualizations).\n 'list', // Record list/grid surface with switchable visualizations + quick actions\n]).describe('Page type — the page KIND. Only types with a dedicated renderer are authorizable; visualizations of a list page live in interfaceConfig, not here.'));\n\n/**\n * Page types declared in the past for \"roadmap parity\" but removed from\n * {@link PageTypeSchema} because they never shipped a renderer (authoring one\n * produced a broken page at runtime). Kept here so the intent isn't lost: when a\n * renderer lands, move the type back into the enum (and, for high-risk surfaces,\n * add a liveness proof). ADR-0049 enforce-or-remove / spec liveness gate.\n */\nexport const PAGE_TYPE_ROADMAP = [\n 'dashboard', // KPI summary with charts/metrics\n 'form', // Data entry form\n 'record_detail', // Auto-generated single record field display\n 'record_review', // Sequential record review/approval (config: RecordReviewConfigSchema)\n 'overview', // Interface-level navigation/landing hub\n 'blank', // Free-form canvas (config: BlankPageLayoutSchema)\n] as const;\n\n// RecordReviewConfigSchema removed — the `record_review` page type has no\n// renderer and was dropped from PageTypeSchema (framework#2265, enforce-or-remove);\n// objectui dropped all references in objectui#1949.\n\n/**\n * Interface Page Configuration Schema (Airtable Interface parity)\n * Page-level declarative configuration for Airtable-style interface pages.\n * Covers title/data binding, levels, filter by, appearance, user actions,\n * tabs, record count, add record, and advanced options (printing).\n *\n * @see Airtable Interface → right panel (Page / Data / Appearance / User filters / User actions / Advanced)\n */\nexport const InterfacePageConfigSchema = lazySchema(() => z.object({\n /** Data binding (ADR-0047: pages REFERENCE views, never restate them) */\n source: z.string().optional().describe('Source object name for the page'),\n\n // ADR-0047 (revised): the page carries its OWN view metadata — columns, sort\n // and base filter are defined directly here (Airtable parity: there is no\n // \"inherit from a named view\" concept). The page IS the view definition.\n columns: z.union([z.array(z.string()), z.array(ListColumnSchema)]).optional()\n .describe('Columns shown by the page. Blank = all object fields. Defined directly on the page (no view inheritance).'),\n sort: z.array(SortItemSchema).optional()\n .describe('Default sort order for the page, defined directly on the page.'),\n filterBy: z.array(ViewFilterRuleSchema).optional().describe('Always-on page filter (base filter).'),\n levels: z.number().int().min(1).optional().describe('Number of hierarchy levels to display'),\n\n /** @deprecated Back-compat only. Pre-revision pages inherited columns/filter/sort\n * from a named object view; new pages define `columns`/`sort`/`filterBy` directly.\n * Still honored at runtime as a fallback when the page has no own `columns`. */\n sourceView: z.string().optional()\n .describe('@deprecated Legacy named-view inheritance. Define columns/sort/filterBy on the page instead.'),\n\n /** Appearance — `appearance.allowedVisualizations` is the runtime visualization whitelist */\n appearance: AppearanceConfigSchema.optional().describe('Appearance and visualization configuration'),\n\n /** User filters (ADR-0047) */\n userFilters: UserFiltersSchema.optional()\n .describe('End-user quick-filter bar for this page (overrides the source view\\'s userFilters)'),\n\n /** User actions */\n userActions: UserActionsConfigSchema.optional().describe('User action toggles'),\n\n /** Add record */\n addRecord: AddRecordConfigSchema.optional().describe('Add record entry point configuration'),\n\n /** Toolbar buttons — references to the source object's actions (ActionSchema).\n * Buttons ARE object actions (not free text): correct-by-construction. */\n buttons: z.array(z.string()).optional().describe(\"Toolbar buttons — names of the source object's actions to surface in the page toolbar\"),\n\n /** How clicking a record opens its detail: 'drawer' (right-side peek panel,\n * default), 'page' (full-page navigate to the record route), 'modal', or\n * 'none' (rows not clickable). */\n recordAction: z.enum(['drawer', 'page', 'modal', 'none']).optional()\n .describe(\"How clicking a record opens its detail (drawer | page | modal | none). Default: drawer\"),\n\n /** Record count */\n showRecordCount: z.boolean().optional().describe('Show record count at page bottom'),\n\n /** Advanced */\n allowPrinting: z.boolean().optional().describe('Allow users to print the page'),\n}).describe('Interface-level page configuration (Airtable parity)'));\n\n/**\n * Page Schema\n * Defines a composition of components for a specific context.\n * Supports both platform pages (Salesforce FlexiPage style: record, home, app, utility)\n * and interface pages (Airtable Interface style: dashboard, grid, kanban, record_review, etc.).\n * \n * **NAMING CONVENTION:**\n * Page names are used in routing and must be lowercase snake_case.\n * Prefix with 'page_' is recommended for clarity.\n * \n * @example Good page names\n * - 'page_dashboard'\n * - 'page_settings'\n * - 'home_page'\n * - 'record_detail'\n * \n * @example Bad page names (will be rejected)\n * - 'PageDashboard' (PascalCase)\n * - 'Settings Page' (spaces)\n */\nexport const PageSchema = lazySchema(() => z.object({\n name: SnakeCaseIdentifierSchema.describe('Page unique name (lowercase snake_case)'),\n label: I18nLabelSchema,\n description: I18nLabelSchema.optional(),\n\n /** Icon (used in interface navigation) */\n icon: z.string().optional().describe('Page icon name'),\n \n /** Page Type */\n type: PageTypeSchema.default('record').describe('Page type'),\n \n /**\n * Page-local state variables (ADR-0049). Runtime-live: the renderer mounts the\n * declared variables, exposes each to expressions as `page.<name>`, and lets an\n * interactive element write one via its `source` binding (e.g.\n * `element:record_picker` → `source`). A write re-evaluates dependent\n * `visibility` / binding predicates immediately — the master/detail and\n * filtered-dashboard pattern, with no custom code. See {@link PageVariableSchema}.\n */\n variables: z.array(PageVariableSchema).optional()\n .describe('Local page state, exposed to expressions as `page.<name>` and writable by interactive elements via `source` (master/detail, filtered dashboards).'),\n\n /** Context */\n object: z.string().optional().describe('Bound object (for Record pages)'),\n\n // recordReview / blankLayout fields removed — the record_review/blank page\n // types have no renderer and were dropped from PageTypeSchema (framework#2265);\n // objectui dropped all references in objectui#1949.\n\n /** Layout Template */\n template: z.string().default('default').describe('Layout template name (e.g. \"header-sidebar-main\")'),\n \n /** Regions & Content */\n // Optional with an empty-array default. Not every page authors regions:\n // • list/interface pages render via `interfaceConfig` (regions unused);\n // • `kind: 'slotted'` record pages render via `slots`;\n // • a `kind: 'full'` record/home/app page with no regions falls back to\n // the synthesized default layout (same surface a slotted page starts from).\n // Requiring it forced `regions: []` boilerplate on every list page and made\n // the Studio \"New Page\" form a dead-end for record/home/app pages (the form\n // has no region editor, so the required field could never be satisfied).\n regions: z.array(PageRegionSchema).optional().default([])\n .describe('Layout regions (header, main, sidebar, footer) with their components. Optional — list pages use interfaceConfig, slotted pages use slots, and an empty full page falls back to the synthesized default layout.'),\n \n /** Activation */\n isDefault: z.boolean().default(false),\n assignedProfiles: z.array(z.string()).optional(),\n\n /** Interface Page Configuration (Airtable Interface parity) */\n interfaceConfig: InterfacePageConfigSchema.optional()\n .describe('Interface-level page configuration (for Airtable-style interface pages)'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n\n /**\n * Override semantics for record pages.\n *\n * - `\"full\"` (default): the schema fully describes the page.\n * - `\"slotted\"`: the schema only provides overrides for one or more\n * named slots (see `slots`). The default-page synthesizer fills\n * in every slot the author did NOT override. Useful when you want\n * to customize just the header / actions / one tab without\n * re-authoring the rest of the page.\n *\n * Only meaningful when `type === 'record'`. Ignored otherwise.\n */\n kind: z.enum(['full', 'slotted', 'html', 'react', 'jsx']).default('full')\n .describe(\n \"Page override mode. full | slotted = structured authoring; \" +\n \"html = author-written constrained JSX/HTML+Tailwind compiled (parsed, never \" +\n \"executed) to the tree (ADR-0080; the legacy value 'jsx' is a deprecated alias); \" +\n \"react = real-React source executed at render by the runtime (ADR-0081); it \" +\n \"runs author JS, so it is gated by a host capability that defaults ON and is \" +\n \"disabled server-side via the OS_PAGE_REACT=off env toggle.\",\n ),\n\n /**\n * Slot override map for slotted record pages.\n *\n * Each slot accepts a single PageComponent or an array. Slots not\n * provided fall through to the synthesized default.\n *\n * Slot menu (v1): header | actions | alerts | highlights | details |\n * tabs | discussion. Each slot is a full replacement at the slot\n * boundary — no deep merge, no patch operations. To compose default +\n * custom, call the corresponding `buildDefault*` sub-builder from the\n * renderer runtime (e.g. @object-ui/plugin-detail).\n *\n * Only honored when `kind === 'slotted'`.\n */\n slots: z.object({\n header: z.union([PageComponentSchema, z.array(PageComponentSchema)]).optional(),\n actions: z.union([PageComponentSchema, z.array(PageComponentSchema)]).optional(),\n alerts: z.union([PageComponentSchema, z.array(PageComponentSchema)]).optional(),\n highlights: z.union([PageComponentSchema, z.array(PageComponentSchema)]).optional(),\n details: z.union([PageComponentSchema, z.array(PageComponentSchema)]).optional(),\n tabs: z.union([PageComponentSchema, z.array(PageComponentSchema)]).optional(),\n discussion: z.union([PageComponentSchema, z.array(PageComponentSchema)]).optional(),\n }).optional().describe('Slot override map for slotted pages'),\n\n /**\n * JSX-source authoring (ADR-0080). When `kind === 'jsx'`, `source` is the\n * source-of-truth: a constrained JSX/HTML+Tailwind text compiled by\n * `@objectstack/sdui-parser` into the SchemaNode tree at SAVE time — parse,\n * never execute. `regions` then hold the DERIVED tree (a cache; the source\n * wins on any mismatch). For `full`/`slotted` pages `source` is unused.\n */\n source: z.string().optional()\n .describe(\"Page source text. For kind==='html' (alias 'jsx') it is constrained JSX/HTML+Tailwind compiled to the tree by @objectstack/sdui-parser at save time (parse, never execute). For kind==='react' it is real React/JSX executed at render by @object-ui/react-runtime (trusted tier). Authoritative over `regions` in both.\"),\n /** Plugin namespaces the JSX source references — inferred at compile, checked at save AND load (ADR-0048 provenance). */\n requires: z.array(z.string()).optional()\n .describe('Plugin namespaces the JSX source references (validated at save and load)'),\n}).superRefine((page, ctx) => {\n // ADR-0080/0081 + ADR-0078 (completeness): an html/react/jsx page with no\n // `source` is silently inert — fail loudly at author time, never render empty.\n const sourceKinds = ['html', 'react', 'jsx'];\n if (sourceKinds.includes(page.kind) && !(typeof page.source === 'string' && page.source.trim().length > 0)) {\n ctx.addIssue({\n code: 'custom',\n path: ['source'],\n message: `A ${page.kind} page requires a non-empty \\`source\\` (the source is the source-of-truth).`,\n });\n }\n}));\n// PageSchema's only cross-field rule is the ADR-0080 jsx-source completeness\n// check above. It once also required `recordReview`/`blankLayout` and `slots`\n// (all removed — unrendered roadmap / \"required-but-unauthorable\" Studio traps).\n\nexport type Page = z.infer<typeof PageSchema>;\n/** Authoring input for {@link Page} — defaulted fields are optional. */\nexport type PageInput = z.input<typeof PageSchema>;\n\n/**\n * Type-safe factory for a custom page. Validates at authoring time via\n * `.parse()` and accepts input-shape config (optional defaults, CEL\n * shorthand) — preferred over a bare `: Page` literal.\n */\nexport function definePage(config: z.input<typeof PageSchema>): Page {\n return PageSchema.parse(config);\n}\nexport type PageType = z.infer<typeof PageTypeSchema>;\nexport type PageComponent = z.infer<typeof PageComponentSchema>;\nexport type PageRegion = z.infer<typeof PageRegionSchema>;\nexport type PageVariable = z.infer<typeof PageVariableSchema>;\nexport type ElementDataSource = z.infer<typeof ElementDataSourceSchema>;\nexport type InterfacePageConfig = z.infer<typeof InterfacePageConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { FieldSchema } from '../data/field.zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\nimport { PerformanceConfigSchema } from './responsive.zod';\n\n/**\n * Widget Lifecycle Hooks Schema\n * \n * Defines lifecycle callbacks for custom widgets inspired by Web Components and React.\n * These hooks allow widgets to perform initialization, cleanup, and respond to changes.\n * \n * @see https://developer.mozilla.org/en-US/docs/Web/API/Web_components\n * @see https://react.dev/reference/react/Component#component-lifecycle\n * \n * @example\n * ```typescript\n * const widget = {\n * lifecycle: {\n * onMount: \"console.log('Widget mounted')\",\n * onUpdate: \"if (prevProps.value !== props.value) { updateUI() }\",\n * onUnmount: \"cleanup()\",\n * onValidate: \"return value.length > 0 ? null : 'Required field'\"\n * }\n * }\n * ```\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const WidgetLifecycleSchema = lazySchema(() => z.object({\n /**\n * Called when widget is mounted/rendered for the first time\n * Use for initialization, setting up event listeners, loading data, etc.\n * \n * @example \"initializeDatePicker(); loadOptions();\"\n */\n onMount: z.string().optional().describe('Initialization code when widget mounts'),\n\n /**\n * Called when widget props change\n * Receives previous props for comparison\n * \n * @example \"if (prevProps.value !== props.value) { updateDisplay() }\"\n */\n onUpdate: z.string().optional().describe('Code to run when props change'),\n\n /**\n * Called when widget is about to be removed from DOM\n * Use for cleanup, removing event listeners, canceling timers, etc.\n * \n * @example \"destroyDatePicker(); cancelPendingRequests();\"\n */\n onUnmount: z.string().optional().describe('Cleanup code when widget unmounts'),\n\n /**\n * Custom validation logic for this widget\n * Should return error message string if invalid, null/undefined if valid\n * \n * @example \"return value && value.length >= 10 ? null : 'Minimum 10 characters'\"\n */\n onValidate: z.string().optional().describe('Custom validation logic'),\n\n /**\n * Called when widget receives focus\n * \n * @example \"highlightField(); logFocusEvent();\"\n */\n onFocus: z.string().optional().describe('Code to run on focus'),\n\n /**\n * Called when widget loses focus\n * \n * @example \"validateField(); saveFieldState();\"\n */\n onBlur: z.string().optional().describe('Code to run on blur'),\n\n /**\n * Called on any error in the widget\n * \n * @example \"logError(error); showErrorNotification();\"\n */\n onError: z.string().optional().describe('Error handling code'),\n}));\n\nexport type WidgetLifecycle = z.infer<typeof WidgetLifecycleSchema>;\n\n/**\n * Widget Event Schema\n * \n * Defines custom events that widgets can emit, inspired by DOM Events and Lightning Web Components.\n * \n * @see https://developer.mozilla.org/en-US/docs/Web/Events/Creating_and_triggering_events\n * @see https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.events\n * \n * @example\n * ```typescript\n * const searchEvent = {\n * name: 'search',\n * bubbles: true,\n * cancelable: false,\n * payload: {\n * query: 'string',\n * filters: 'object'\n * }\n * }\n * ```\n */\nexport const WidgetEventSchema = lazySchema(() => z.object({\n /**\n * Event name\n * Should be lowercase, dash-separated for consistency\n * \n * @example \"value-change\", \"item-selected\", \"search-complete\"\n */\n name: z.string().describe('Event name'),\n\n /**\n * Event label for documentation\n */\n label: I18nLabelSchema.optional().describe('Human-readable event label'),\n\n /**\n * Event description\n */\n description: I18nLabelSchema.optional().describe('Event description and usage'),\n\n /**\n * Whether event bubbles up through the DOM hierarchy\n * \n * @default false\n */\n bubbles: z.boolean().default(false).describe('Whether event bubbles'),\n\n /**\n * Whether event can be cancelled\n * \n * @default false\n */\n cancelable: z.boolean().default(false).describe('Whether event is cancelable'),\n\n /**\n * Event payload schema\n * Defines the data structure sent with the event\n * \n * @example { userId: 'string', timestamp: 'number' }\n */\n payload: z.record(z.string(), z.unknown()).optional().describe('Event payload schema'),\n}));\n\nexport type WidgetEvent = z.infer<typeof WidgetEventSchema>;\n\n/**\n * Widget Property Definition Schema\n * \n * Defines the contract for widget configuration properties.\n * Inspired by React PropTypes and Web Component attributes.\n * \n * @see https://react.dev/reference/react/Component#static-proptypes\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements\n * \n * @example\n * ```typescript\n * const widgetProps = {\n * maxLength: {\n * type: 'number',\n * required: false,\n * default: 100,\n * description: 'Maximum input length'\n * }\n * }\n * ```\n */\nexport const WidgetPropertySchema = lazySchema(() => z.object({\n /**\n * Property name\n * Should be camelCase following ObjectStack conventions\n */\n name: z.string().describe('Property name (camelCase)'),\n\n /**\n * Property label for UI\n */\n label: I18nLabelSchema.optional().describe('Human-readable label'),\n\n /**\n * Property data type\n * \n * @example \"string\", \"number\", \"boolean\", \"array\", \"object\", \"function\"\n */\n type: z.enum(['string', 'number', 'boolean', 'array', 'object', 'function', 'any'])\n .describe('TypeScript type'),\n\n /**\n * Whether property is required\n * \n * @default false\n */\n required: z.boolean().default(false).describe('Whether property is required'),\n\n /**\n * Default value for the property\n */\n default: z.unknown().optional().describe('Default value'),\n\n /**\n * Property description\n */\n description: I18nLabelSchema.optional().describe('Property description'),\n\n /**\n * Property validation schema\n * Can include min/max, regex, enum values, etc.\n */\n validation: z.record(z.string(), z.unknown()).optional().describe('Validation rules'),\n\n /**\n * Property category for grouping in UI\n */\n category: z.string().optional().describe('Property category'),\n}));\n\nexport type WidgetProperty = z.infer<typeof WidgetPropertySchema>;\n\n/**\n * Widget Manifest Schema\n * \n * Complete definition for a custom widget including metadata, lifecycle, events, and props.\n * This is used for widget registration and discovery.\n * \n * @example\n * ```typescript\n * const customWidget = {\n * name: 'custom_date_picker',\n * label: 'Custom Date Picker',\n * version: '1.0.0',\n * author: 'Company Name',\n * fieldTypes: ['date', 'datetime'],\n * lifecycle: { ... },\n * events: [ ... ],\n * properties: [ ... ]\n * }\n * ```\n */\n/**\n * Widget Source Schema\n * Defines how the widget code is loaded.\n */\nexport const WidgetSourceSchema = lazySchema(() => z.discriminatedUnion('type', [\n // NPM Registry (standard)\n z.object({\n type: z.literal('npm'),\n packageName: z.string().describe('NPM package name'),\n version: z.string().default('latest'),\n exportName: z.string().optional().describe('Named export (default: default)'),\n }),\n // Module Federation (Remote)\n z.object({\n type: z.literal('remote'),\n url: z.string().url().describe('Remote entry URL (.js)'),\n moduleName: z.string().describe('Exposed module name'),\n scope: z.string().describe('Remote scope name'),\n }),\n // Inline Code (Simple scripts)\n z.object({\n type: z.literal('inline'),\n code: z.string().describe('JavaScript code body'),\n }),\n]));\n\nexport type WidgetSource = z.infer<typeof WidgetSourceSchema>;\n\nexport const WidgetManifestSchema = lazySchema(() => z.object({\n /**\n * Widget identifier (snake_case)\n */\n name: SnakeCaseIdentifierSchema\n .describe('Widget identifier (snake_case)'),\n\n /**\n * Human-readable widget name\n */\n label: I18nLabelSchema.describe('Widget display name'),\n\n /**\n * Widget description\n */\n description: I18nLabelSchema.optional().describe('Widget description'),\n\n /**\n * Widget version (semver)\n */\n version: z.string().optional().describe('Widget version (semver)'),\n\n /**\n * Widget author/organization\n */\n author: z.string().optional().describe('Widget author'),\n\n /**\n * Icon name or URL\n */\n icon: z.string().optional().describe('Widget icon'),\n\n /**\n * Field types this widget supports\n * \n * @example [\"text\", \"email\", \"url\"]\n */\n fieldTypes: z.array(z.string()).optional().describe('Supported field types'),\n\n /**\n * Widget category for organization\n */\n category: z.enum(['input', 'display', 'picker', 'editor', 'custom'])\n .default('custom')\n .describe('Widget category'),\n\n /**\n * Widget lifecycle hooks\n */\n lifecycle: WidgetLifecycleSchema.optional().describe('Lifecycle hooks'),\n\n /**\n * Custom events this widget emits\n */\n events: z.array(WidgetEventSchema).optional().describe('Custom events'),\n\n /**\n * Widget configuration properties\n */\n properties: z.array(WidgetPropertySchema).optional().describe('Configuration properties'),\n\n /**\n * Widget implementation\n * Defines how to load the widget code\n */\n implementation: WidgetSourceSchema.optional().describe('Widget implementation source'),\n\n /**\n * Widget dependencies\n * External libraries or scripts needed\n */\n dependencies: z.array(z.object({\n name: z.string(),\n version: z.string().optional(),\n url: z.string().url().optional(),\n })).optional().describe('Widget dependencies'),\n\n /**\n * Widget screenshots for showcase\n */\n screenshots: z.array(z.string().url()).optional().describe('Screenshot URLs'),\n\n /**\n * Widget documentation URL\n */\n documentation: z.string().url().optional().describe('Documentation URL'),\n\n /**\n * License information\n */\n license: z.string().optional().describe('License (SPDX identifier)'),\n\n /**\n * Tags for discovery\n */\n tags: z.array(z.string()).optional().describe('Tags for categorization'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n\n /** Performance optimization settings */\n performance: PerformanceConfigSchema.optional().describe('Performance optimization settings'),\n}));\n\nexport type WidgetManifest = z.infer<typeof WidgetManifestSchema>;\n\n/**\n * Field Widget Props Schema\n * \n * This defines the contract for custom field components and plugin UI extensions.\n * Third-party developers use this interface to build custom field widgets that integrate\n * seamlessly with the ObjectStack UI system.\n * \n * @example\n * // Custom widget implementation\n * function CustomDatePicker(props: FieldWidgetProps) {\n * const { value, onChange, readonly, required, error, field, record, options } = props;\n * // Widget implementation...\n * }\n */\nexport const FieldWidgetPropsSchema = lazySchema(() => z.object({\n /**\n * Current field value.\n * Type depends on the field type (string, number, boolean, array, object, etc.)\n */\n value: z.unknown().describe('Current field value'),\n\n /**\n * Callback function to update the field value.\n * Should be called when user interaction changes the value.\n * \n * @param newValue - The new value to set\n */\n onChange: z.function()\n .input(z.tuple([z.unknown()]))\n .output(z.void())\n .describe('Callback to update field value'),\n\n /**\n * Whether the field is in read-only mode.\n * When true, the widget should display the value but not allow editing.\n */\n readonly: z.boolean().default(false).describe('Read-only mode flag'),\n\n /**\n * Whether the field is required.\n * Widget should indicate required state visually and validate accordingly.\n */\n required: z.boolean().default(false).describe('Required field flag'),\n\n /**\n * Validation error message to display.\n * When present, widget should display the error in its UI.\n */\n error: z.string().optional().describe('Validation error message'),\n\n /**\n * Complete field definition from the schema.\n * Contains metadata like type, constraints, options, etc.\n */\n field: FieldSchema.describe('Field schema definition'),\n\n /**\n * The complete record/document being edited.\n * Useful for conditional logic and cross-field dependencies.\n */\n record: z.record(z.string(), z.unknown()).optional().describe('Complete record data'),\n\n /**\n * Custom options passed to the widget.\n * Can contain widget-specific configuration like themes, behaviors, etc.\n */\n options: z.record(z.string(), z.unknown()).optional().describe('Custom widget options'),\n}));\n\n/**\n * TypeScript type for Field Widget Props\n */\nexport type FieldWidgetProps = z.infer<typeof FieldWidgetPropsSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * Activity-timeline UI config enums.\n *\n * The `service-feed` backend was retired (ADR-0052 §5 / #1955); `sys_comment` /\n * `sys_activity` are the canonical record-collaboration/timeline backend. Only these\n * two enums remain here — they are pure UI configuration for the record activity\n * component (`RecordActivityProps` in `../ui/component.zod.ts`), with no backend\n * dependency. (A later `feed` → `activity` rename is tracked separately.)\n */\n\n/**\n * Feed Item Type\n * Unified activity types for the record timeline.\n * Covers comments, field changes, tasks, events, and system activities.\n */\nexport const FeedItemType = z.enum([\n 'comment',\n 'field_change',\n 'task',\n 'event',\n 'email',\n 'call',\n 'note',\n 'file',\n 'record_create',\n 'record_delete',\n 'approval',\n 'sharing',\n 'system',\n]);\nexport type FeedItemType = z.infer<typeof FeedItemType>;\n\n/**\n * Feed Filter Mode\n * Controls which feed item types to display in the timeline.\n */\nexport const FeedFilterMode = z.enum([\n 'all',\n 'comments_only',\n 'changes_only',\n 'tasks_only',\n]);\nexport type FeedFilterMode = z.infer<typeof FeedFilterMode>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { FilterConditionSchema } from '../data/filter.zod';\nimport { ViewFilterRuleSchema } from './view.zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\nimport { FeedItemType, FeedFilterMode } from '../data/feed.zod';\n\n/**\n * Empty Properties Schema\n */\nimport { lazySchema } from '../shared/lazy-schema';\nimport { ExpressionInputSchema } from '../shared/expression.zod';\nconst EmptyProps = z.object({});\n\n/**\n * ----------------------------------------------------------------------\n * 1. Structure Components\n * ----------------------------------------------------------------------\n */\n\nexport const PageHeaderProps = z.object({\n title: I18nLabelSchema.describe('Page title'),\n subtitle: I18nLabelSchema.optional().describe('Page subtitle'),\n icon: z.string().optional().describe('Icon name'),\n breadcrumb: z.boolean().default(true).describe('Show breadcrumb'),\n actions: z.array(z.string()).optional().describe('Action IDs to show in header'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const PageTabsProps = z.object({\n type: z.enum(['line', 'card', 'pill']).default('line'),\n position: z.enum(['top', 'left']).default('top'),\n items: z.array(z.object({\n label: I18nLabelSchema,\n icon: z.string().optional(),\n /**\n * Conditional tab (CEL, #2606): when the predicate evaluates FALSE the\n * whole tab — header *and* panel — is omitted from the strip. This is the\n * item-level complement to a child component's own `visibleWhen`, which\n * hides only the panel content and would leave an empty tab header behind.\n * Binds the same environment as page-component `visibleWhen`: `record` +\n * `current_user`, plus page state as `page.<var>` (re-evaluated live).\n * Canonical `*When` name per ADR-0089 — this key is new, so the deprecated\n * `visibility` / `visibleOn` aliases are NOT accepted on tab items.\n */\n visibleWhen: ExpressionInputSchema.optional().describe(\n 'Visibility predicate (CEL) — the whole tab (header + panel) is omitted when FALSE; the renderer falls back to the first visible tab when the active one is hidden. Binds `record`, `current_user`, `page.<var>`. ADR-0089 canonical name (`visibility`/`visibleOn` aliases are not accepted here).',\n ),\n children: z.array(z.unknown()).describe('Child components')\n })),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const PageCardProps = z.object({\n title: I18nLabelSchema.optional(),\n bordered: z.boolean().default(true),\n actions: z.array(z.string()).optional(),\n /** Slot for nested content in the Card body */\n body: z.array(z.unknown()).optional().describe('Card content components (slot)'),\n /** Slot for footer content */\n footer: z.array(z.unknown()).optional().describe('Card footer components (slot)'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\n/**\n * ----------------------------------------------------------------------\n * 2. Record Context Components\n * ----------------------------------------------------------------------\n */\n\nexport const RecordDetailsProps = z.object({\n columns: z.enum(['1', '2', '3', '4']).default('2').describe('Number of columns for field layout (1-4)'),\n layout: z.enum(['auto', 'custom']).default('auto').describe('Layout mode: auto uses object highlightFields, custom uses explicit sections'),\n sections: z.array(z.string()).optional().describe('Section IDs to show (required when layout is \"custom\")'),\n fields: z.array(z.string()).optional().describe('Explicit field list to display (optional, overrides highlightFields)'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const RecordRelatedListProps = z.object({\n objectName: z.string().describe('Related object name (e.g., \"task\", \"opportunity\")'),\n relationshipField: z.string().describe('Field on related object that points to this record (e.g., \"account_id\")'),\n /**\n * Which field of THIS (parent) record `relationshipField` stores. Default\n * `id` (ordinary FK). Set to another unique field for junctions that key on\n * a machine name — e.g. `sys_user_position.position` stores\n * `sys_position.name`, so the Holders list on a position declares\n * `relationshipValueField: 'name'`. Used both to FILTER the list\n * (`{[relationshipField]: parent[relationshipValueField]}`) and as the\n * parent-side value written by the Add picker.\n */\n relationshipValueField: z.string().default('id').describe(\"Parent-record field whose value relationshipField stores (default 'id'; e.g. 'name' for name-keyed junctions).\"),\n columns: z.array(z.string()).optional().describe('Fields to display in the related list. Optional: when omitted, columns derive from the related object\\'s highlightFields / default list columns (a related list is just another surface that lists that object). Override chain: child highlightFields → field-level relatedListColumns → this inline list.'),\n sort: z.union([\n z.string(),\n z.array(z.object({\n field: z.string(),\n order: z.enum(['asc', 'desc'])\n }))\n ]).optional().describe('Sort order for related records'),\n limit: z.number().int().positive().default(5).describe('Number of records to display initially'),\n filter: z.array(ViewFilterRuleSchema).optional().describe('Additional filter criteria for related records'),\n title: I18nLabelSchema.optional().describe('Custom title for the related list'),\n showViewAll: z.boolean().default(true).describe('Show \"View All\" link to see all related records'),\n actions: z.array(z.string()).optional().describe('Action IDs available for related records'),\n /**\n * Enable an \"Add\" affordance that links EXISTING records via a picker, rather\n * than only \"+ New\" (create-and-navigate). Generic over m2m / junction\n * relationships: pick records from `add.picker.object` (the far side) and\n * create a link row in `objectName` with `{[relationshipField]: <parentId>,\n * [add.linkField]: <pickedId>}`. Omit `linkField` for a plain 1:m re-parent\n * (the picked child's `relationshipField` is set to the parent id instead).\n * Server-side rules still apply on insert (e.g. the AI-seat cap), and their\n * errors surface in the dialog. The canonical use is \"Assigned Users\" on a\n * permission set (objectName=`sys_user_permission_set`,\n * relationshipField=`permission_set_id`, picker.object=`sys_user`,\n * linkField=`user_id`).\n */\n add: z.object({\n picker: z.object({\n object: z.string().describe('Object to pick records from (the far side of an m2m, or the child object for a 1:m re-parent).'),\n valueField: z.string().default('id').describe('Field on the picked record used as the link value (default `id`).'),\n labelField: z.string().optional().describe('Field shown in the picker rows (defaults to the object title field).'),\n filter: z.array(ViewFilterRuleSchema).optional().describe('Restrict which records the picker offers.'),\n }).describe('Where the Add affordance sources records from.'),\n linkField: z.string().optional().describe('Field on `objectName` that stores the picked record id (junction case). Omit for a 1:m re-parent.'),\n label: I18nLabelSchema.optional().describe('Label for the Add button (default \"Add\").'),\n }).optional().describe('Add-existing-via-picker config (generic m2m/junction assignment).'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const RecordHighlightsField = z.union([\n z.string(),\n z.object({\n name: z.string().describe('Field name on the record'),\n label: z.string().optional().describe('Display label (overrides schema label)'),\n icon: z.string().optional().describe('Icon name (lucide icon key)'),\n type: z.string().optional().describe('Override cell renderer type (rare)'),\n }),\n]).describe('Highlight field: bare name, or {name,label?,icon?,type?}');\n\nexport const RecordHighlightsProps = z.object({\n fields: z.array(RecordHighlightsField).min(1).max(7).describe('Key fields to highlight (1-7 fields max, typically displayed as prominent cards). Each item may be a bare field name or {name, label?, icon?, type?} for inline overrides.'),\n layout: z.enum(['horizontal', 'vertical']).default('horizontal').describe('Layout orientation for highlight fields'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const RecordActivityProps = z.object({\n /** Activity types to display (unified enum including comment, field_change, etc.) */\n types: z.array(FeedItemType).optional().describe('Feed item types to show (default: all)'),\n /** Default filter mode (Airtable-style dropdown) */\n filterMode: FeedFilterMode.default('all').describe('Default activity filter'),\n /** Allow user to switch filter modes */\n showFilterToggle: z.boolean().default(true).describe('Show filter dropdown in panel header'),\n /** Pagination */\n limit: z.number().int().positive().default(20).describe('Number of items to load per page'),\n /** Show completed activities */\n showCompleted: z.boolean().default(false).describe('Include completed activities'),\n /** Merge field_change + comment in a unified timeline */\n unifiedTimeline: z.boolean().default(true).describe('Mix field changes and comments in one timeline (Airtable style)'),\n /** Show the comment input box at the bottom */\n showCommentInput: z.boolean().default(true).describe('Show \"Leave a comment\" input at the bottom'),\n /** Enable @mentions in comments */\n enableMentions: z.boolean().default(true).describe('Enable @mentions in comments'),\n /** Enable emoji reactions */\n enableReactions: z.boolean().default(false).describe('Enable emoji reactions on feed items'),\n /** Enable threaded replies */\n enableThreading: z.boolean().default(false).describe('Enable threaded replies on comments'),\n /** Show notification subscription toggle (bell icon) */\n showSubscriptionToggle: z.boolean().default(true).describe('Show bell icon for record-level notification subscription'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const RecordChatterProps = z.object({\n /** Panel position */\n position: z.enum(['sidebar', 'inline', 'drawer']).default('sidebar').describe('Where to render the chatter panel'),\n /** Panel width (for sidebar/drawer) */\n width: z.union([z.string(), z.number()]).optional().describe('Panel width (e.g., \"350px\", \"30%\")'),\n /** Collapsible */\n collapsible: z.boolean().default(true).describe('Whether the panel can be collapsed'),\n /** Default collapsed state */\n defaultCollapsed: z.boolean().default(false).describe('Whether the panel starts collapsed'),\n /** Feed configuration (delegates to RecordActivityProps) */\n feed: RecordActivityProps.optional().describe('Embedded activity feed configuration'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const RecordPathProps = z.object({\n statusField: z.string().describe('Field name representing the current status/stage'),\n stages: z.array(z.object({\n value: z.string(),\n label: I18nLabelSchema,\n })).optional().describe('Explicit stage definitions (if not using field metadata)'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const PageAccordionProps = z.object({\n items: z.array(z.object({\n label: I18nLabelSchema,\n icon: z.string().optional(),\n collapsed: z.boolean().default(false),\n children: z.array(z.unknown()).describe('Child components'),\n })),\n allowMultiple: z.boolean().default(false).describe('Allow multiple panels to be expanded simultaneously'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const AIChatWindowProps = z.object({\n mode: z.enum(['float', 'sidebar', 'inline']).default('float').describe('Display mode for the chat window'),\n agentId: z.string().optional().describe('Specific AI agent to use'),\n context: z.record(z.string(), z.unknown()).optional().describe('Contextual data to pass to the AI'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\n/**\n * ----------------------------------------------------------------------\n * 3. Content Element Components (Airtable Interface Parity)\n * ----------------------------------------------------------------------\n */\n\nexport const ElementTextPropsSchema = lazySchema(() => z.object({\n content: z.string().describe('Text or Markdown content'),\n variant: z.enum(['heading', 'subheading', 'body', 'caption'])\n .optional().default('body').describe('Text style variant'),\n align: z.enum(['left', 'center', 'right'])\n .optional().default('left').describe('Text alignment'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\nexport const ElementNumberPropsSchema = lazySchema(() => z.object({\n object: z.string().describe('Source object'),\n field: z.string().optional().describe('Field to aggregate'),\n aggregate: z.enum(['count', 'sum', 'avg', 'min', 'max'])\n .describe('Aggregation function'),\n filter: FilterConditionSchema.optional().describe('Filter criteria'),\n format: z.enum(['number', 'currency', 'percent']).optional().describe('Number display format'),\n prefix: z.string().optional().describe('Prefix text (e.g. \"$\")'),\n suffix: z.string().optional().describe('Suffix text (e.g. \"%\")'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\nexport const ElementImagePropsSchema = lazySchema(() => z.object({\n src: z.string().describe('Image URL or attachment field'),\n alt: z.string().optional().describe('Alt text for accessibility'),\n fit: z.enum(['cover', 'contain', 'fill'])\n .optional().default('cover').describe('Image object-fit mode'),\n height: z.number().optional().describe('Fixed height in pixels'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\n/**\n * Read-only, synthesized view of a metadata item, embedded inline in content\n * (ADR-0051). This is the *inline form* of ADR-0046 §3.5 (\"derived content is\n * rendered, never written\") and the component a ` ```metadata ` doc fence\n * compiles to. Because it renders the platform's *own* metadata via the\n * platform's *own* viewer, it carries no expressions or actions — it stays on\n * the data side of the §3.4 trust boundary and is safe to embed in inert docs\n * (`embeddableInDoc`). The view is resolved live at read time, then projected\n * to the reader's permissions automatically (see `detail` for the distinct,\n * author-controlled altitude projection). `object` embeds are deferred\n * (ADR-0051 §5).\n */\nexport const ElementMetadataViewerPropsSchema = lazySchema(() => z.object({\n type: z.enum(['state_machine', 'flow', 'permission'])\n .describe('Metadata view kind (ADR-0051): state_machine | flow | permission'),\n name: z.string()\n .describe('Target metadata item name; resolved package-scoped (ADR-0048), then dependencies (ADR-0046 §3.3)'),\n object: z.string().optional()\n .describe('Owning object — required for object-scoped kinds: state_machine is a rule ON an object (ADR-0020), permission renders a matrix FOR one; omit for top-level flow'),\n mode: z.enum(['diagram', 'matrix', 'summary']).optional()\n .describe('Render form; defaults per type (diagram for flow/state_machine, matrix for permission)'),\n detail: z.enum(['business', 'technical']).optional().default('business')\n .describe('Authoring altitude (ADR-0051 §3.4): business collapses technical flow nodes to business steps + approvals. NOT access (cf. book.audience); permission projection is automatic and render-time, never set here'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\n/**\n * ----------------------------------------------------------------------\n * 4. Interactive Element Components (Phase B — Element Library)\n * ----------------------------------------------------------------------\n */\n\nexport const ElementButtonPropsSchema = lazySchema(() => z.object({\n label: I18nLabelSchema.describe('Button display label'),\n variant: z.enum(['primary', 'secondary', 'danger', 'ghost', 'link'])\n .optional().default('primary').describe('Button visual variant'),\n size: z.enum(['small', 'medium', 'large'])\n .optional().default('medium').describe('Button size'),\n icon: z.string().optional().describe('Icon name (Lucide icon)'),\n iconPosition: z.enum(['left', 'right'])\n .optional().default('left').describe('Icon position relative to label'),\n disabled: z.boolean().optional().default(false).describe('Disable the button'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\nexport const ElementFilterPropsSchema = lazySchema(() => z.object({\n object: z.string().describe('Object to filter'),\n fields: z.array(z.string()).describe('Filterable field names'),\n targetVariable: z.string().optional().describe('Page variable to store filter state'),\n layout: z.enum(['inline', 'dropdown', 'sidebar'])\n .optional().default('inline').describe('Filter display layout'),\n showSearch: z.boolean().optional().default(true).describe('Show search input'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\nexport const ElementFormPropsSchema = lazySchema(() => z.object({\n object: z.string().describe('Object for the form'),\n fields: z.array(z.string()).optional().describe('Fields to display (defaults to all editable fields)'),\n mode: z.enum(['create', 'edit']).optional().default('create').describe('Form mode'),\n submitLabel: I18nLabelSchema.optional().describe('Submit button label'),\n onSubmit: ExpressionInputSchema.optional().describe('Action expression on form submit (CEL)'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\nexport const ElementRecordPickerPropsSchema = lazySchema(() => z.object({\n object: z.string().describe('Object to pick records from'),\n displayField: z.string().describe('Field to display as the record label'),\n searchFields: z.array(z.string()).optional().describe('Fields to search against'),\n filter: FilterConditionSchema.optional().describe('Filter criteria for available records'),\n multiple: z.boolean().optional().default(false).describe('Allow multiple record selection'),\n targetVariable: z.string().optional().describe('Page variable to bind selected record ID(s)'),\n placeholder: I18nLabelSchema.optional().describe('Placeholder text'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\n/**\n * A single-line free-text input — the data-entry half of an SDUI page (Airtable\n * \"text\"/\"number\" field parity). The console renderer binds the typed value into\n * a page variable via the {@link PageVariableSchema} `source` convention (the\n * variable whose `source` equals this component's `id`), exposing it to\n * expressions as `page.<var>` and to submit actions as a `{{page.<var>}}` token.\n * A whole free-text family lives under one element: `inputType` selects the\n * native modality (text/email/number/…), keeping genuinely-distinct inputs\n * (textarea, select, checkbox) free to arrive as their own elements later.\n */\nexport const ElementTextInputPropsSchema = lazySchema(() => z.object({\n inputType: z.enum(['text', 'email', 'number', 'tel', 'url', 'password'])\n .optional().default('text')\n .describe('Native input type — drives keyboard/validation affordance and how the bound value is coerced (number → numeric).'),\n label: I18nLabelSchema.optional().describe('Field label shown above the input'),\n placeholder: I18nLabelSchema.optional().describe('Placeholder text shown when empty'),\n defaultValue: z.union([z.string(), z.number()]).optional()\n .describe('Initial value; seeds the bound page variable on mount'),\n required: z.boolean().optional().default(false).describe('Mark the field as required'),\n disabled: z.boolean().optional().default(false).describe('Disable the input'),\n description: I18nLabelSchema.optional().describe('Helper text shown below the input'),\n targetVariable: z.string().optional()\n .describe('Page variable this input writes to. Declarative hint; the live binding resolves via the variable whose `source` equals this component id (see PageVariableSchema).'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\n/**\n * ----------------------------------------------------------------------\n * Component Props Map\n * Maps Component Type to its Property Schema\n * ----------------------------------------------------------------------\n */\nexport const ComponentPropsMap = {\n // Structure\n 'page:header': PageHeaderProps,\n 'page:tabs': PageTabsProps,\n 'page:card': PageCardProps,\n 'page:footer': EmptyProps,\n 'page:sidebar': EmptyProps,\n 'page:accordion': PageAccordionProps,\n 'page:section': EmptyProps,\n\n // Record\n 'record:details': RecordDetailsProps,\n 'record:related_list': RecordRelatedListProps,\n 'record:highlights': RecordHighlightsProps,\n 'record:activity': RecordActivityProps,\n 'record:chatter': RecordChatterProps,\n 'record:path': RecordPathProps,\n\n // Navigation\n 'app:launcher': EmptyProps,\n 'nav:menu': EmptyProps,\n 'nav:breadcrumb': EmptyProps,\n\n // Utility\n 'global:search': EmptyProps,\n 'global:notifications': EmptyProps,\n 'user:profile': EmptyProps,\n \n // AI\n 'ai:chat_window': AIChatWindowProps,\n 'ai:suggestion': z.object({ context: z.string().optional() }),\n\n // Content Elements\n 'element:text': ElementTextPropsSchema,\n 'element:number': ElementNumberPropsSchema,\n 'element:image': ElementImagePropsSchema,\n 'element:metadata_viewer': ElementMetadataViewerPropsSchema, // ADR-0051: inline read-only metadata view (embeddableInDoc)\n 'element:divider': EmptyProps,\n\n // Interactive Elements\n 'element:button': ElementButtonPropsSchema,\n 'element:filter': ElementFilterPropsSchema,\n 'element:form': ElementFormPropsSchema,\n 'element:record_picker': ElementRecordPickerPropsSchema,\n 'element:text_input': ElementTextInputPropsSchema,\n} as const;\n\n/**\n * Type Helper to extract props from map\n */\nexport type ComponentProps<T extends keyof typeof ComponentPropsMap> = z.infer<typeof ComponentPropsMap[T]>;\nexport type ComponentPropsInput<T extends keyof typeof ComponentPropsMap> = z.input<typeof ComponentPropsMap[T]>;\n","// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.\n//\n// React-tier component index (ADR-0081). Maps each curated public block that is\n// injected into `kind:'react'` page source to (a) the SPEC zod schema that\n// already defines its declarative/config props — the authoritative source, do\n// not re-author — and (b) a thin hand-authored React-interaction overlay: the\n// binding/controlled/callback props that are inherently React (objectName,\n// recordId, mode, onSuccess, onRowClick, …) and so are absent from the\n// declarative metadata schema.\n//\n// The contract the AI authors against (skills/objectstack-ui/references/\n// react-blocks.md + .contract.json) is GENERATED from this index by\n// `scripts/build-react-blocks-contract.ts` — never hand-edited.\n\nimport type { ZodTypeAny } from 'zod';\nimport { ListViewSchema, FormViewSchema } from './view.zod';\nimport {\n RecordDetailsProps,\n RecordRelatedListProps,\n RecordHighlightsProps,\n RecordPathProps,\n} from './component.zod';\nimport { ChartConfigSchema } from './chart.zod';\n\nexport type ReactPropKind = 'data' | 'binding' | 'controlled' | 'callback';\n\nexport interface ReactInteractionProp {\n name: string;\n type: string;\n kind: 'binding' | 'controlled' | 'callback';\n required?: boolean;\n description: string;\n}\n\nexport interface ReactBlockDef {\n /** PascalCase name the author writes in JSX, e.g. `<ObjectForm>`. */\n tag: string;\n /** The registry/render type, e.g. `object-form`. */\n schemaType: string;\n summary: string;\n /**\n * Spec zod schema that defines this block's declarative (config) props. The\n * generator extracts these as `data` props — authoritative, with descriptions.\n * Omit for blocks with no spec schema (then only the overlay is published).\n */\n schema?: ZodTypeAny;\n /**\n * Curate which spec-schema props to surface (high-signal subset; ADR-0080\n * \"capability ≠ contract\"). Definitions still come from the schema — this only\n * selects + orders. Omit to surface all of the schema's props.\n */\n dataProps?: string[];\n /** React-only props absent from the declarative schema (hand-authored). */\n interactions: ReactInteractionProp[];\n}\n\n// Shared overlays ----------------------------------------------------------\nconst OBJECT_NAME: ReactInteractionProp = {\n name: 'objectName',\n type: 'string',\n kind: 'binding',\n required: true,\n description: 'The object this block binds to (server-connected).',\n};\n\nexport const REACT_BLOCKS: ReactBlockDef[] = [\n {\n tag: 'ObjectForm',\n schemaType: 'object-form',\n summary: \"Server-connected create/edit/view form for one object. Config props come from the spec FormView schema; bind + wire it with the React props below.\",\n schema: FormViewSchema,\n dataProps: ['layout', 'columns', 'tabPosition', 'drawerSide', 'drawerWidth', 'modalSize', 'splitDirection', 'sections', 'subforms', 'submitBehavior'],\n interactions: [\n OBJECT_NAME,\n { name: 'mode', type: \"'create' | 'edit' | 'view'\", kind: 'controlled', description: 'Create a new record, or edit/view an existing one — drive from React state.' },\n { name: 'formType', type: \"'simple' | 'tabbed' | 'wizard' | 'split' | 'drawer' | 'modal'\", kind: 'binding', description: 'Form presentation; drawer/modal render the form in a built-in overlay (use drawerSide/drawerWidth/modalSize).' },\n { name: 'recordId', type: 'string | number', kind: 'controlled', description: 'Which record to load (edit/view). The hook for master/detail.' },\n { name: 'fields', type: 'string[]', kind: 'binding', description: 'Limit/order the fields shown (defaults to the object form fields).' },\n { name: 'initialValues', type: 'Record<string, any>', kind: 'binding', description: 'Prefill values in create mode.' },\n { name: 'onSuccess', type: '(record) => void', kind: 'callback', description: 'Called after a successful save with the saved record (e.g. close a panel + reload).' },\n { name: 'onError', type: '(error: Error) => void', kind: 'callback', description: 'Called when the save fails.' },\n { name: 'onCancel', type: '() => void', kind: 'callback', description: 'Called when the user cancels.' },\n { name: 'submitHandler', type: '(values) => any | Promise<any>', kind: 'callback', description: 'Custom persistence instead of the default create/update.' },\n ],\n },\n {\n tag: 'ListView',\n schemaType: 'list-view',\n summary: \"Server-connected object table with toolbar and switchable visualizations (grid/kanban/calendar/gantt/…). Config props come from the spec ListView schema.\",\n schema: ListViewSchema,\n dataProps: ['columns', 'sort', 'searchableFields', 'userFilters', 'pagination', 'grouping', 'rowHeight', 'selection', 'rowActions', 'inlineEdit'],\n interactions: [\n OBJECT_NAME,\n { name: 'viewType', type: \"'grid' | 'kanban' | 'gallery' | 'calendar' | 'timeline' | 'gantt' | 'map'\", kind: 'binding', description: 'Which visualization to render (default grid). How you get a kanban/calendar/gantt of the object.' },\n { name: 'filters', type: \"FilterArray e.g. ['status','=','active']\", kind: 'controlled', description: 'ObjectQL base filter; drive from React state for tabbed/searched lists. ([field, op, value]; ops =, !=, >, <, contains, in; compound: [\\\"and\\\", […], […]]).' },\n { name: 'navigation', type: \"{ mode: 'page' | 'drawer' | 'modal' | 'split' | 'none' }\", kind: 'binding', description: 'What a row click does. Use { mode: \\\"none\\\" } when you handle clicks via onRowClick.' },\n { name: 'onRowClick', type: '(record) => void', kind: 'callback', description: \"Called with the clicked row's record — the hook for master/detail.\" },\n { name: 'onNavigate', type: \"(recordId, action: 'view' | 'edit') => void\", kind: 'callback', description: 'Called for page-level navigation.' },\n { name: 'fields', type: 'string[]', kind: 'binding', description: 'Limit/order the columns shown (defaults to the object list fields).' },\n { name: 'options', type: 'Record<string, any>', kind: 'binding', description: 'View-type-specific options bag (kanban/calendar/gantt extras); prefer the typed spec props where they exist.' },\n ],\n },\n {\n tag: 'ObjectChart',\n schemaType: 'object-chart',\n summary: 'Chart over an object’s aggregated data. Config props come from the spec Chart config schema.',\n schema: ChartConfigSchema,\n dataProps: ['title', 'series', 'xAxis', 'yAxis', 'colors', 'showLegend'],\n interactions: [\n OBJECT_NAME,\n { name: 'filter', type: 'FilterArray', kind: 'controlled', description: 'ObjectQL filter scoping the data; drive from React state.' },\n { name: 'aggregate', type: '{ field, function, groupBy }', kind: 'binding', description: 'Aggregation: function (sum/avg/count) over field, grouped by groupBy.' },\n { name: 'data', type: 'any[]', kind: 'binding', description: 'Static/precomputed data to chart directly instead of binding via objectName + aggregate.' },\n ],\n },\n {\n tag: 'RecordDetails',\n schemaType: 'record:details',\n summary: 'Field-detail panel for the bound record. Config props from the spec RecordDetails schema.',\n schema: RecordDetailsProps,\n interactions: [\n { name: 'recordId', type: 'string | number', kind: 'controlled', description: 'The record to show.' },\n { name: 'objectName', type: 'string', kind: 'binding', description: 'The record’s object.' },\n ],\n },\n {\n tag: 'RecordHighlights',\n schemaType: 'record:highlights',\n summary: 'Highlights panel — a strip of key fields. Config props from the spec RecordHighlights schema.',\n schema: RecordHighlightsProps,\n interactions: [\n { name: 'recordId', type: 'string | number', kind: 'controlled', description: 'The record to summarize.' },\n { name: 'objectName', type: 'string', kind: 'binding', description: 'The record’s object.' },\n ],\n },\n {\n tag: 'RecordRelatedList',\n schemaType: 'record:related_list',\n summary: 'Related child records via a lookup. Config props from the spec RecordRelatedList schema.',\n schema: RecordRelatedListProps,\n interactions: [\n { name: 'recordId', type: 'string | number', kind: 'controlled', description: 'The parent record.' },\n { name: 'objectName', type: 'string', kind: 'binding', description: 'The parent object.' },\n ],\n },\n {\n tag: 'RecordPath',\n schemaType: 'record:path',\n summary: 'Stage/progress bar driven by a status field. Config props from the spec RecordPath schema.',\n schema: RecordPathProps,\n interactions: [\n { name: 'recordId', type: 'string | number', kind: 'controlled', description: 'The record whose stage to show.' },\n { name: 'objectName', type: 'string', kind: 'binding', description: 'The record’s object.' },\n ],\n },\n {\n tag: 'Block',\n schemaType: '(any)',\n summary: 'Escape hatch — render any registered component by type. <Block type=\"object-kanban\" objectName=\"task\" /> etc.',\n interactions: [\n { name: 'type', type: 'string', kind: 'binding', required: true, description: 'The registered component type to render.' },\n ],\n },\n];\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\n\n/**\n * Touch Target Configuration Schema\n * Ensures touch targets meet WCAG 2.5.5 minimum size requirements (44x44px).\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const TouchTargetConfigSchema = lazySchema(() => z.object({\n minWidth: z.number().default(44).describe('Minimum touch target width in pixels (WCAG 2.5.5: 44px)'),\n minHeight: z.number().default(44).describe('Minimum touch target height in pixels (WCAG 2.5.5: 44px)'),\n padding: z.number().optional().describe('Additional padding around touch target in pixels'),\n hitSlop: z.object({\n top: z.number().optional().describe('Extra hit area above the element'),\n right: z.number().optional().describe('Extra hit area to the right of the element'),\n bottom: z.number().optional().describe('Extra hit area below the element'),\n left: z.number().optional().describe('Extra hit area to the left of the element'),\n }).optional().describe('Invisible hit area extension beyond the visible bounds'),\n}).describe('Touch target sizing configuration (WCAG accessible)'));\n\nexport type TouchTargetConfig = z.infer<typeof TouchTargetConfigSchema>;\n\n/**\n * Gesture Type Enum\n * Supported touch gesture types.\n */\nexport const GestureTypeSchema = lazySchema(() => z.enum([\n 'swipe',\n 'pinch',\n 'long_press',\n 'double_tap',\n 'drag',\n 'rotate',\n 'pan',\n]).describe('Touch gesture type'));\n\nexport type GestureType = z.infer<typeof GestureTypeSchema>;\n\n/**\n * Swipe Direction Enum\n */\nexport const SwipeDirectionSchema = lazySchema(() => z.enum(['up', 'down', 'left', 'right']));\n\nexport type SwipeDirection = z.infer<typeof SwipeDirectionSchema>;\n\n/**\n * Swipe Gesture Configuration Schema\n */\nexport const SwipeGestureConfigSchema = lazySchema(() => z.object({\n direction: z.array(SwipeDirectionSchema).describe('Allowed swipe directions'),\n threshold: z.number().optional().describe('Minimum distance in pixels to recognize swipe'),\n velocity: z.number().optional().describe('Minimum velocity (px/ms) to trigger swipe'),\n}).describe('Swipe gesture recognition settings'));\n\nexport type SwipeGestureConfig = z.infer<typeof SwipeGestureConfigSchema>;\n\n/**\n * Pinch Gesture Configuration Schema\n */\nexport const PinchGestureConfigSchema = lazySchema(() => z.object({\n minScale: z.number().optional().describe('Minimum scale factor (e.g., 0.5 for 50%)'),\n maxScale: z.number().optional().describe('Maximum scale factor (e.g., 3.0 for 300%)'),\n}).describe('Pinch/zoom gesture recognition settings'));\n\nexport type PinchGestureConfig = z.infer<typeof PinchGestureConfigSchema>;\n\n/**\n * Long Press Gesture Configuration Schema\n */\nexport const LongPressGestureConfigSchema = lazySchema(() => z.object({\n duration: z.number().default(500).describe('Hold duration in milliseconds to trigger long press'),\n moveTolerance: z.number().optional().describe('Max movement in pixels allowed during press'),\n}).describe('Long press gesture recognition settings'));\n\nexport type LongPressGestureConfig = z.infer<typeof LongPressGestureConfigSchema>;\n\n/**\n * Gesture Configuration Schema\n * Unified configuration for all supported gesture types.\n */\nexport const GestureConfigSchema = lazySchema(() => z.object({\n type: GestureTypeSchema.describe('Gesture type to configure'),\n label: I18nLabelSchema.optional().describe('Descriptive label for the gesture action'),\n enabled: z.boolean().default(true).describe('Whether this gesture is active'),\n swipe: SwipeGestureConfigSchema.optional().describe('Swipe gesture settings (when type is swipe)'),\n pinch: PinchGestureConfigSchema.optional().describe('Pinch gesture settings (when type is pinch)'),\n longPress: LongPressGestureConfigSchema.optional().describe('Long press settings (when type is long_press)'),\n}).describe('Per-gesture configuration'));\n\nexport type GestureConfig = z.infer<typeof GestureConfigSchema>;\n\n/**\n * Touch Interaction Schema\n * Top-level touch and gesture interaction configuration for a component.\n */\nexport const TouchInteractionSchema = lazySchema(() => z.object({\n gestures: z.array(GestureConfigSchema).optional().describe('Configured gesture recognizers'),\n touchTarget: TouchTargetConfigSchema.optional().describe('Touch target sizing and hit area'),\n hapticFeedback: z.boolean().optional().describe('Enable haptic feedback on touch interactions'),\n}).merge(AriaPropsSchema.partial()).describe('Touch and gesture interaction configuration'));\n\nexport type TouchInteraction = z.infer<typeof TouchInteractionSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\n\n/**\n * Focus Trap Configuration Schema\n * Constrains keyboard focus within a specific container (e.g., modals, dialogs).\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const FocusTrapConfigSchema = lazySchema(() => z.object({\n enabled: z.boolean().default(false).describe('Enable focus trapping within this container'),\n initialFocus: z.string().optional().describe('CSS selector for the element to focus on activation'),\n returnFocus: z.boolean().default(true).describe('Return focus to trigger element on deactivation'),\n escapeDeactivates: z.boolean().default(true).describe('Allow Escape key to deactivate the focus trap'),\n}).describe('Focus trap configuration for modal-like containers'));\n\nexport type FocusTrapConfig = z.infer<typeof FocusTrapConfigSchema>;\n\n/**\n * Keyboard Shortcut Schema\n * Defines a single keyboard shortcut binding.\n */\nexport const KeyboardShortcutSchema = lazySchema(() => z.object({\n key: z.string().describe('Key combination (e.g., \"Ctrl+S\", \"Alt+N\", \"Escape\")'),\n action: z.string().describe('Action identifier to invoke when shortcut is triggered'),\n description: I18nLabelSchema.optional().describe('Human-readable description of what the shortcut does'),\n scope: z.enum(['global', 'view', 'form', 'modal', 'list']).default('global')\n .describe('Scope in which this shortcut is active'),\n}).describe('Keyboard shortcut binding'));\n\nexport type KeyboardShortcut = z.infer<typeof KeyboardShortcutSchema>;\n\n/**\n * Focus Management Schema\n * Controls tab order, focus visibility, and navigation behavior.\n */\nexport const FocusManagementSchema = lazySchema(() => z.object({\n tabOrder: z.enum(['auto', 'manual']).default('auto')\n .describe('Tab order strategy: auto (DOM order) or manual (explicit tabIndex)'),\n skipLinks: z.boolean().default(false).describe('Provide skip-to-content navigation links'),\n focusVisible: z.boolean().default(true).describe('Show visible focus indicators for keyboard users'),\n focusTrap: FocusTrapConfigSchema.optional().describe('Focus trap settings'),\n arrowNavigation: z.boolean().default(false)\n .describe('Enable arrow key navigation between focusable items'),\n}).describe('Focus and tab navigation management'));\n\nexport type FocusManagement = z.infer<typeof FocusManagementSchema>;\n\n/**\n * Keyboard Navigation Configuration Schema\n * Top-level keyboard navigation and shortcut configuration.\n */\nexport const KeyboardNavigationConfigSchema = lazySchema(() => z.object({\n shortcuts: z.array(KeyboardShortcutSchema).optional().describe('Registered keyboard shortcuts'),\n focusManagement: FocusManagementSchema.optional().describe('Focus and tab order management'),\n rovingTabindex: z.boolean().default(false)\n .describe('Enable roving tabindex pattern for composite widgets'),\n}).merge(AriaPropsSchema.partial()).describe('Keyboard navigation and shortcut configuration'));\n\nexport type KeyboardNavigationConfig = z.infer<typeof KeyboardNavigationConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { TouchTargetConfigSchema } from './touch.zod';\nimport { FocusManagementSchema } from './keyboard.zod';\n\n/**\n * Color Palette Schema\n * Defines brand colors and their variants.\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const ColorPaletteSchema = lazySchema(() => z.object({\n primary: z.string().describe('Primary brand color (hex, rgb, or hsl)'),\n secondary: z.string().optional().describe('Secondary brand color'),\n accent: z.string().optional().describe('Accent color for highlights'),\n success: z.string().optional().describe('Success state color (default: green)'),\n warning: z.string().optional().describe('Warning state color (default: yellow)'),\n error: z.string().optional().describe('Error state color (default: red)'),\n info: z.string().optional().describe('Info state color (default: blue)'),\n \n // Neutral colors\n background: z.string().optional().describe('Background color'),\n surface: z.string().optional().describe('Surface/card background color'),\n text: z.string().optional().describe('Primary text color'),\n textSecondary: z.string().optional().describe('Secondary text color'),\n border: z.string().optional().describe('Border color'),\n disabled: z.string().optional().describe('Disabled state color'),\n \n // Color variants (shades)\n primaryLight: z.string().optional().describe('Lighter shade of primary'),\n primaryDark: z.string().optional().describe('Darker shade of primary'),\n secondaryLight: z.string().optional().describe('Lighter shade of secondary'),\n secondaryDark: z.string().optional().describe('Darker shade of secondary'),\n}));\n\n/**\n * Typography Settings Schema\n * Font families, sizes, weights, and line heights.\n */\nexport const TypographySchema = lazySchema(() => z.object({\n fontFamily: z.object({\n base: z.string().optional().describe('Base font family (default: system fonts)'),\n heading: z.string().optional().describe('Heading font family'),\n mono: z.string().optional().describe('Monospace font family for code'),\n }).optional(),\n \n fontSize: z.object({\n xs: z.string().optional().describe('Extra small font size (e.g., 0.75rem)'),\n sm: z.string().optional().describe('Small font size (e.g., 0.875rem)'),\n base: z.string().optional().describe('Base font size (e.g., 1rem)'),\n lg: z.string().optional().describe('Large font size (e.g., 1.125rem)'),\n xl: z.string().optional().describe('Extra large font size (e.g., 1.25rem)'),\n '2xl': z.string().optional().describe('2X large font size (e.g., 1.5rem)'),\n '3xl': z.string().optional().describe('3X large font size (e.g., 1.875rem)'),\n '4xl': z.string().optional().describe('4X large font size (e.g., 2.25rem)'),\n }).optional(),\n \n fontWeight: z.object({\n light: z.number().optional().describe('Light weight (default: 300)'),\n normal: z.number().optional().describe('Normal weight (default: 400)'),\n medium: z.number().optional().describe('Medium weight (default: 500)'),\n semibold: z.number().optional().describe('Semibold weight (default: 600)'),\n bold: z.number().optional().describe('Bold weight (default: 700)'),\n }).optional(),\n \n lineHeight: z.object({\n tight: z.string().optional().describe('Tight line height (e.g., 1.25)'),\n normal: z.string().optional().describe('Normal line height (e.g., 1.5)'),\n relaxed: z.string().optional().describe('Relaxed line height (e.g., 1.75)'),\n loose: z.string().optional().describe('Loose line height (e.g., 2)'),\n }).optional(),\n \n letterSpacing: z.object({\n tighter: z.string().optional().describe('Tighter letter spacing (e.g., -0.05em)'),\n tight: z.string().optional().describe('Tight letter spacing (e.g., -0.025em)'),\n normal: z.string().optional().describe('Normal letter spacing (e.g., 0)'),\n wide: z.string().optional().describe('Wide letter spacing (e.g., 0.025em)'),\n wider: z.string().optional().describe('Wider letter spacing (e.g., 0.05em)'),\n }).optional(),\n}));\n\n/**\n * Spacing Units Schema\n * Defines spacing scale for margins, padding, gaps.\n */\nexport const SpacingSchema = lazySchema(() => z.object({\n '0': z.string().optional().describe('0 spacing (0)'),\n '1': z.string().optional().describe('Spacing unit 1 (e.g., 0.25rem)'),\n '2': z.string().optional().describe('Spacing unit 2 (e.g., 0.5rem)'),\n '3': z.string().optional().describe('Spacing unit 3 (e.g., 0.75rem)'),\n '4': z.string().optional().describe('Spacing unit 4 (e.g., 1rem)'),\n '5': z.string().optional().describe('Spacing unit 5 (e.g., 1.25rem)'),\n '6': z.string().optional().describe('Spacing unit 6 (e.g., 1.5rem)'),\n '8': z.string().optional().describe('Spacing unit 8 (e.g., 2rem)'),\n '10': z.string().optional().describe('Spacing unit 10 (e.g., 2.5rem)'),\n '12': z.string().optional().describe('Spacing unit 12 (e.g., 3rem)'),\n '16': z.string().optional().describe('Spacing unit 16 (e.g., 4rem)'),\n '20': z.string().optional().describe('Spacing unit 20 (e.g., 5rem)'),\n '24': z.string().optional().describe('Spacing unit 24 (e.g., 6rem)'),\n}));\n\n/**\n * Border Radius Schema\n * Rounded corners configuration.\n */\nexport const BorderRadiusSchema = lazySchema(() => z.object({\n none: z.string().optional().describe('No border radius (0)'),\n sm: z.string().optional().describe('Small border radius (e.g., 0.125rem)'),\n base: z.string().optional().describe('Base border radius (e.g., 0.25rem)'),\n md: z.string().optional().describe('Medium border radius (e.g., 0.375rem)'),\n lg: z.string().optional().describe('Large border radius (e.g., 0.5rem)'),\n xl: z.string().optional().describe('Extra large border radius (e.g., 0.75rem)'),\n '2xl': z.string().optional().describe('2X large border radius (e.g., 1rem)'),\n full: z.string().optional().describe('Full border radius (50%)'),\n}));\n\n/**\n * Shadow Schema\n * Box shadow effects.\n */\nexport const ShadowSchema = lazySchema(() => z.object({\n none: z.string().optional().describe('No shadow'),\n sm: z.string().optional().describe('Small shadow'),\n base: z.string().optional().describe('Base shadow'),\n md: z.string().optional().describe('Medium shadow'),\n lg: z.string().optional().describe('Large shadow'),\n xl: z.string().optional().describe('Extra large shadow'),\n '2xl': z.string().optional().describe('2X large shadow'),\n inner: z.string().optional().describe('Inner shadow (inset)'),\n}));\n\n/**\n * Breakpoints Schema\n * Responsive design breakpoints.\n */\nexport const BreakpointsSchema = lazySchema(() => z.object({\n xs: z.string().optional().describe('Extra small breakpoint (e.g., 480px)'),\n sm: z.string().optional().describe('Small breakpoint (e.g., 640px)'),\n md: z.string().optional().describe('Medium breakpoint (e.g., 768px)'),\n lg: z.string().optional().describe('Large breakpoint (e.g., 1024px)'),\n xl: z.string().optional().describe('Extra large breakpoint (e.g., 1280px)'),\n '2xl': z.string().optional().describe('2X large breakpoint (e.g., 1536px)'),\n}));\n\n/**\n * Animation Schema\n * Animation timing and duration settings.\n */\nexport const AnimationSchema = lazySchema(() => z.object({\n duration: z.object({\n fast: z.string().optional().describe('Fast animation (e.g., 150ms)'),\n base: z.string().optional().describe('Base animation (e.g., 300ms)'),\n slow: z.string().optional().describe('Slow animation (e.g., 500ms)'),\n }).optional(),\n \n timing: z.object({\n linear: z.string().optional().describe('Linear timing function'),\n ease: z.string().optional().describe('Ease timing function'),\n ease_in: z.string().optional().describe('Ease-in timing function'),\n ease_out: z.string().optional().describe('Ease-out timing function'),\n ease_in_out: z.string().optional().describe('Ease-in-out timing function'),\n }).optional(),\n}));\n\n/**\n * Z-Index Scale Schema\n * Layering and stacking order.\n */\nexport const ZIndexSchema = lazySchema(() => z.object({\n base: z.number().optional().describe('Base z-index (e.g., 0)'),\n dropdown: z.number().optional().describe('Dropdown z-index (e.g., 1000)'),\n sticky: z.number().optional().describe('Sticky z-index (e.g., 1020)'),\n fixed: z.number().optional().describe('Fixed z-index (e.g., 1030)'),\n modalBackdrop: z.number().optional().describe('Modal backdrop z-index (e.g., 1040)'),\n modal: z.number().optional().describe('Modal z-index (e.g., 1050)'),\n popover: z.number().optional().describe('Popover z-index (e.g., 1060)'),\n tooltip: z.number().optional().describe('Tooltip z-index (e.g., 1070)'),\n}));\n\n/**\n * Theme Mode Schema\n */\nexport const ThemeModeSchema = lazySchema(() => z.enum(['light', 'dark', 'auto']));\n\n/** @deprecated Use ThemeModeSchema instead */\nexport const ThemeMode = ThemeModeSchema;\n\n/**\n * Density Mode Schema\n * Controls spacing and sizing for different use cases.\n */\nexport const DensityModeSchema = lazySchema(() => z.enum(['compact', 'regular', 'spacious']));\n\n/** @deprecated Use DensityModeSchema instead */\nexport const DensityMode = DensityModeSchema;\n\n/**\n * WCAG Contrast Level Schema\n * Web Content Accessibility Guidelines color contrast requirements.\n */\nexport const WcagContrastLevelSchema = lazySchema(() => z.enum(['AA', 'AAA']));\n\n/** @deprecated Use WcagContrastLevelSchema instead */\nexport const WcagContrastLevel = WcagContrastLevelSchema;\n\n/**\n * Theme Configuration Schema\n * Complete theme definition for brand customization.\n */\nexport const ThemeSchema = lazySchema(() => z.object({\n name: SnakeCaseIdentifierSchema.describe('Unique theme identifier (snake_case)'),\n label: z.string().describe('Human-readable theme name'),\n description: z.string().optional().describe('Theme description'),\n \n /** Theme mode */\n mode: ThemeModeSchema.default('light').describe('Theme mode (light, dark, or auto)'),\n \n /** Color system */\n colors: ColorPaletteSchema.describe('Color palette configuration'),\n \n /** Typography */\n typography: TypographySchema.optional().describe('Typography settings'),\n \n /** Spacing */\n spacing: SpacingSchema.optional().describe('Spacing scale. [EXPERIMENTAL — not enforced] generateThemeVars does not emit spacing tokens yet (liveness audit #1878/#1893).'),\n \n /** Border radius */\n borderRadius: BorderRadiusSchema.optional().describe('Border radius scale'),\n \n /** Shadows */\n shadows: ShadowSchema.optional().describe('Box shadow effects'),\n \n /** Breakpoints */\n breakpoints: BreakpointsSchema.optional().describe('Responsive breakpoints. [EXPERIMENTAL — not enforced] generateThemeVars does not emit breakpoint tokens yet (liveness audit #1878/#1893).'),\n \n /** Animation */\n animation: AnimationSchema.optional().describe('Animation settings'),\n \n /** Z-Index */\n zIndex: ZIndexSchema.optional().describe('Z-index scale for layering'),\n \n /** Custom CSS variables */\n customVars: z.record(z.string(), z.string()).optional().describe('Custom CSS variables (key-value pairs)'),\n \n /** Logo */\n logo: z.object({\n light: z.string().optional().describe('Logo URL for light mode'),\n dark: z.string().optional().describe('Logo URL for dark mode'),\n favicon: z.string().optional().describe('Favicon URL'),\n }).optional().describe('Logo assets'),\n \n /** Extends another theme */\n extends: z.string().optional().describe('Base theme to extend from'),\n\n /** Display density mode */\n density: DensityModeSchema.optional().describe('Display density: compact, regular, or spacious. [EXPERIMENTAL — not enforced] The theme engine does not consume theme-level density yet; view-level densityMode is a separate live setting (liveness audit #1878/#1893).'),\n\n /** WCAG contrast level requirement */\n wcagContrast: WcagContrastLevelSchema.optional().describe('WCAG color contrast level (AA or AAA)'),\n\n /** Right-to-left language support */\n rtl: z.boolean().optional().describe('Enable right-to-left layout direction. [EXPERIMENTAL — not enforced] No renderer reads theme.rtl yet (liveness audit #1878/#1893).'),\n\n /** Touch target accessibility configuration */\n touchTarget: TouchTargetConfigSchema.optional().describe('Touch target sizing defaults. [EXPERIMENTAL — not enforced] No renderer consumes touchTarget yet (liveness audit #1878/#1893).'),\n\n /** Keyboard navigation and focus management */\n keyboardNavigation: FocusManagementSchema.optional().describe('Keyboard focus management settings'),\n}));\n\nexport type Theme = z.infer<typeof ThemeSchema>;\n/** Authoring input for {@link Theme} — defaulted fields are optional. */\nexport type ThemeInput = z.input<typeof ThemeSchema>;\n\n/**\n * Type-safe factory for a UI theme. Validates at authoring time via\n * `.parse()` and accepts input-shape config (optional defaults, CEL\n * shorthand) — preferred over a bare `: Theme` literal.\n */\nexport function defineTheme(config: z.input<typeof ThemeSchema>): Theme {\n return ThemeSchema.parse(config);\n}\nexport type ColorPalette = z.infer<typeof ColorPaletteSchema>;\nexport type Typography = z.infer<typeof TypographySchema>;\nexport type Spacing = z.infer<typeof SpacingSchema>;\nexport type BorderRadius = z.infer<typeof BorderRadiusSchema>;\nexport type Shadow = z.infer<typeof ShadowSchema>;\nexport type Breakpoints = z.infer<typeof BreakpointsSchema>;\nexport type Animation = z.infer<typeof AnimationSchema>;\nexport type ZIndex = z.infer<typeof ZIndexSchema>;\nexport type ThemeMode = z.infer<typeof ThemeModeSchema>;\nexport type DensityMode = z.infer<typeof DensityModeSchema>;\nexport type WcagContrastLevel = z.infer<typeof WcagContrastLevelSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { I18nLabelSchema } from './i18n.zod';\n\n/**\n * Offline Strategy Schema\n * Determines how data is fetched when connectivity is limited.\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const OfflineStrategySchema = lazySchema(() => z.enum([\n 'cache_first',\n 'network_first',\n 'stale_while_revalidate',\n 'network_only',\n 'cache_only',\n]).describe('Data fetching strategy for offline/online transitions'));\n\nexport type OfflineStrategy = z.infer<typeof OfflineStrategySchema>;\n\n/**\n * Conflict Resolution Strategy Enum\n */\nexport const ConflictResolutionSchema = lazySchema(() => z.enum([\n 'client_wins',\n 'server_wins',\n 'manual',\n 'last_write_wins',\n]).describe('How to resolve conflicts when syncing offline changes'));\n\nexport type ConflictResolution = z.infer<typeof ConflictResolutionSchema>;\n\n/**\n * Sync Configuration Schema\n * Controls how offline mutations are synchronized with the server.\n */\nexport const SyncConfigSchema = lazySchema(() => z.object({\n strategy: OfflineStrategySchema.default('network_first').describe('Sync fetch strategy'),\n conflictResolution: ConflictResolutionSchema.default('last_write_wins').describe('Conflict resolution policy'),\n retryInterval: z.number().optional().describe('Retry interval in milliseconds between sync attempts'),\n maxRetries: z.number().optional().describe('Maximum number of sync retry attempts'),\n batchSize: z.number().optional().describe('Number of mutations to sync per batch'),\n}).describe('Offline-to-online synchronization configuration'));\n\nexport type SyncConfig = z.infer<typeof SyncConfigSchema>;\n\n/**\n * Persist Storage Backend Enum\n */\nexport const PersistStorageSchema = lazySchema(() => z.enum([\n 'indexeddb',\n 'localstorage',\n 'sqlite',\n]).describe('Client-side storage backend for offline cache'));\n\nexport type PersistStorage = z.infer<typeof PersistStorageSchema>;\n\n/**\n * Eviction Policy Enum\n */\nexport const EvictionPolicySchema = lazySchema(() => z.enum([\n 'lru',\n 'lfu',\n 'fifo',\n]).describe('Cache eviction policy'));\n\nexport type EvictionPolicy = z.infer<typeof EvictionPolicySchema>;\n\n/**\n * Offline Cache Configuration Schema\n * Controls how data is persisted on the client for offline access.\n */\nexport const OfflineCacheConfigSchema = lazySchema(() => z.object({\n maxSize: z.number().optional().describe('Maximum cache size in bytes'),\n ttl: z.number().optional().describe('Time-to-live for cached entries in milliseconds'),\n persistStorage: PersistStorageSchema.default('indexeddb').describe('Storage backend'),\n evictionPolicy: EvictionPolicySchema.default('lru').describe('Cache eviction policy when full'),\n}).describe('Client-side offline cache configuration'));\n\nexport type OfflineCacheConfig = z.infer<typeof OfflineCacheConfigSchema>;\n\n/**\n * Offline Configuration Schema\n * Top-level offline support configuration for an application or component.\n */\nexport const OfflineConfigSchema = lazySchema(() => z.object({\n enabled: z.boolean().default(false).describe('Enable offline support'),\n strategy: OfflineStrategySchema.default('network_first').describe('Default offline fetch strategy'),\n cache: OfflineCacheConfigSchema.optional().describe('Cache settings for offline data'),\n sync: SyncConfigSchema.optional().describe('Sync settings for offline mutations'),\n offlineIndicator: z.boolean().default(true).describe('Show a visual indicator when offline'),\n offlineMessage: I18nLabelSchema.optional().describe('Customizable offline status message shown to users'),\n queueMaxSize: z.number().optional().describe('Maximum number of queued offline mutations'),\n}).describe('Offline support configuration'));\n\nexport type OfflineConfig = z.infer<typeof OfflineConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\n\n/**\n * Transition Preset Schema\n * Common animation transition presets.\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const TransitionPresetSchema = lazySchema(() => z.enum([\n 'fade',\n 'slide_up',\n 'slide_down',\n 'slide_left',\n 'slide_right',\n 'scale',\n 'rotate',\n 'flip',\n 'none',\n]).describe('Transition preset type'));\n\nexport type TransitionPreset = z.infer<typeof TransitionPresetSchema>;\n\n/**\n * Easing Function Schema\n * Supported animation easing/timing functions.\n */\nexport const EasingFunctionSchema = lazySchema(() => z.enum([\n 'linear',\n 'ease',\n 'ease_in',\n 'ease_out',\n 'ease_in_out',\n 'spring',\n]).describe('Animation easing function'));\n\nexport type EasingFunction = z.infer<typeof EasingFunctionSchema>;\n\n/**\n * Transition Configuration Schema\n * Defines a single animation transition with timing and easing options.\n */\nexport const TransitionConfigSchema = lazySchema(() => z.object({\n preset: TransitionPresetSchema.optional().describe('Transition preset to apply'),\n duration: z.number().optional().describe('Transition duration in milliseconds'),\n easing: EasingFunctionSchema.optional().describe('Easing function for the transition'),\n delay: z.number().optional().describe('Delay before transition starts in milliseconds'),\n customKeyframes: z.string().optional().describe('CSS @keyframes name for custom animations'),\n themeToken: z.string().optional().describe('Reference to a theme animation token (e.g. \"animation.duration.fast\")'),\n}).describe('Animation transition configuration'));\n\nexport type TransitionConfig = z.infer<typeof TransitionConfigSchema>;\n\n/**\n * Animation Trigger Schema\n * Events that can trigger an animation.\n */\nexport const AnimationTriggerSchema = lazySchema(() => z.enum([\n 'on_mount',\n 'on_unmount',\n 'on_hover',\n 'on_focus',\n 'on_click',\n 'on_scroll',\n 'on_visible',\n]).describe('Event that triggers the animation'));\n\nexport type AnimationTrigger = z.infer<typeof AnimationTriggerSchema>;\n\n/**\n * Component Animation Schema\n * Animation configuration for an individual UI component.\n */\nexport const ComponentAnimationSchema = lazySchema(() => z.object({\n label: I18nLabelSchema.optional().describe('Descriptive label for this animation configuration'),\n enter: TransitionConfigSchema.optional().describe('Enter/mount animation'),\n exit: TransitionConfigSchema.optional().describe('Exit/unmount animation'),\n hover: TransitionConfigSchema.optional().describe('Hover state animation'),\n trigger: AnimationTriggerSchema.optional().describe('When to trigger the animation'),\n reducedMotion: z.enum(['respect', 'disable', 'alternative']).default('respect')\n .describe('Accessibility: how to handle prefers-reduced-motion'),\n}).merge(AriaPropsSchema.partial()).describe('Component-level animation configuration'));\n\nexport type ComponentAnimation = z.infer<typeof ComponentAnimationSchema>;\n\n/**\n * Page Transition Schema\n * Defines the animation used when navigating between pages.\n */\nexport const PageTransitionSchema = lazySchema(() => z.object({\n type: TransitionPresetSchema.default('fade').describe('Page transition type'),\n duration: z.number().default(300).describe('Transition duration in milliseconds'),\n easing: EasingFunctionSchema.default('ease_in_out').describe('Easing function for the transition'),\n crossFade: z.boolean().default(false).describe('Whether to cross-fade between pages'),\n}).describe('Page-level transition configuration'));\n\nexport type PageTransition = z.infer<typeof PageTransitionSchema>;\n\n/**\n * Motion Configuration Schema\n * Top-level animation and motion design configuration.\n */\nexport const MotionConfigSchema = lazySchema(() => z.object({\n label: I18nLabelSchema.optional().describe('Descriptive label for the motion configuration'),\n defaultTransition: TransitionConfigSchema.optional().describe('Default transition applied to all animations'),\n pageTransitions: PageTransitionSchema.optional().describe('Page navigation transition settings'),\n componentAnimations: z.record(z.string(), ComponentAnimationSchema).optional()\n .describe('Component name to animation configuration mapping'),\n reducedMotion: z.boolean().default(false).describe('When true, respect prefers-reduced-motion and suppress animations globally'),\n enabled: z.boolean().default(true).describe('Enable or disable all animations globally'),\n}).describe('Top-level motion and animation design configuration'));\n\nexport type MotionConfig = z.infer<typeof MotionConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\n\n/**\n * Notification Type Schema\n * Defines the visual presentation style of the notification.\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const NotificationTypeSchema = lazySchema(() => z.enum([\n 'toast',\n 'snackbar',\n 'banner',\n 'alert',\n 'inline',\n]).describe('Notification presentation style'));\n\nexport type NotificationType = z.infer<typeof NotificationTypeSchema>;\n\n/**\n * Notification Severity Schema\n * Indicates the urgency and visual treatment of the notification.\n */\nexport const NotificationSeveritySchema = lazySchema(() => z.enum([\n 'info',\n 'success',\n 'warning',\n 'error',\n]).describe('Notification severity level'));\n\nexport type NotificationSeverity = z.infer<typeof NotificationSeveritySchema>;\n\n/**\n * Notification Position Schema\n * Screen position for rendering notifications.\n */\nexport const NotificationPositionSchema = lazySchema(() => z.enum([\n 'top_left',\n 'top_center',\n 'top_right',\n 'bottom_left',\n 'bottom_center',\n 'bottom_right',\n]).describe('Screen position for notification placement'));\n\nexport type NotificationPosition = z.infer<typeof NotificationPositionSchema>;\n\n/**\n * Notification Action Schema\n * Defines an interactive action button within a notification.\n */\nexport const NotificationActionSchema = lazySchema(() => z.object({\n label: I18nLabelSchema.describe('Action button label'),\n action: z.string().describe('Action identifier to execute'),\n variant: z.enum(['primary', 'secondary', 'link']).default('primary')\n .describe('Button variant style'),\n}).describe('Notification action button'));\n\nexport type NotificationAction = z.infer<typeof NotificationActionSchema>;\n\n/**\n * Notification Schema\n * Defines a single notification instance with content, behavior, and positioning.\n */\nexport const NotificationSchema = lazySchema(() => z.object({\n type: NotificationTypeSchema.default('toast').describe('Notification presentation style'),\n severity: NotificationSeveritySchema.default('info').describe('Notification severity level'),\n title: I18nLabelSchema.optional().describe('Notification title'),\n message: I18nLabelSchema.describe('Notification message body'),\n icon: z.string().optional().describe('Icon name override'),\n duration: z.number().optional().describe('Auto-dismiss duration in ms, omit for persistent'),\n dismissible: z.boolean().default(true).describe('Allow user to dismiss the notification'),\n actions: z.array(NotificationActionSchema).optional().describe('Action buttons'),\n position: NotificationPositionSchema.optional().describe('Override default position'),\n}).merge(AriaPropsSchema.partial()).describe('Notification instance definition'));\n\nexport type Notification = z.infer<typeof NotificationSchema>;\n\n/**\n * Notification Config Schema\n * Top-level notification system configuration.\n */\nexport const NotificationConfigSchema = lazySchema(() => z.object({\n defaultPosition: NotificationPositionSchema.default('top_right')\n .describe('Default screen position for notifications'),\n defaultDuration: z.number().default(5000)\n .describe('Default auto-dismiss duration in ms'),\n maxVisible: z.number().default(5)\n .describe('Maximum number of notifications visible at once'),\n stackDirection: z.enum(['up', 'down']).default('down')\n .describe('Stack direction for multiple notifications'),\n pauseOnHover: z.boolean().default(true)\n .describe('Pause auto-dismiss timer on hover'),\n}).describe('Global notification system configuration'));\n\nexport type NotificationConfig = z.infer<typeof NotificationConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\n\n/**\n * Drag Handle Schema\n * Defines how a drag interaction is initiated on an element.\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const DragHandleSchema = lazySchema(() => z.enum([\n 'element',\n 'handle',\n 'grip_icon',\n]).describe('Drag initiation method'));\n\nexport type DragHandle = z.infer<typeof DragHandleSchema>;\n\n/**\n * Drop Effect Schema\n * Visual feedback indicating the result of a drop operation.\n */\nexport const DropEffectSchema = lazySchema(() => z.enum([\n 'move',\n 'copy',\n 'link',\n 'none',\n]).describe('Drop operation effect'));\n\nexport type DropEffect = z.infer<typeof DropEffectSchema>;\n\n/**\n * Drag Constraint Schema\n * Constrains drag movement along axes, within bounds, or to a grid.\n */\nexport const DragConstraintSchema = lazySchema(() => z.object({\n axis: z.enum(['x', 'y', 'both']).default('both').describe('Constrain drag axis'),\n bounds: z.enum(['parent', 'viewport', 'none']).default('none').describe('Constrain within bounds'),\n grid: z.tuple([z.number(), z.number()]).optional().describe('Snap to grid [x, y] in pixels'),\n}).describe('Drag movement constraints'));\n\nexport type DragConstraint = z.infer<typeof DragConstraintSchema>;\n\n/**\n * Drop Zone Schema\n * Configures a container that accepts dragged items.\n */\nexport const DropZoneSchema = lazySchema(() => z.object({\n label: I18nLabelSchema.optional().describe('Accessible label for the drop zone'),\n accept: z.array(z.string()).describe('Accepted drag item types'),\n maxItems: z.number().optional().describe('Maximum items allowed in drop zone'),\n highlightOnDragOver: z.boolean().default(true).describe('Highlight drop zone when dragging over'),\n dropEffect: DropEffectSchema.default('move').describe('Visual effect on drop'),\n}).merge(AriaPropsSchema.partial()).describe('Drop zone configuration'));\n\nexport type DropZone = z.infer<typeof DropZoneSchema>;\n\n/**\n * Drag Item Schema\n * Configures a draggable element including handle, constraints, and preview.\n */\nexport const DragItemSchema = lazySchema(() => z.object({\n type: z.string().describe('Drag item type identifier for matching with drop zones'),\n label: I18nLabelSchema.optional().describe('Accessible label describing the draggable item'),\n handle: DragHandleSchema.default('element').describe('How to initiate drag'),\n constraint: DragConstraintSchema.optional().describe('Drag movement constraints'),\n preview: z.enum(['element', 'custom', 'none']).default('element').describe('Drag preview type'),\n disabled: z.boolean().default(false).describe('Disable dragging'),\n}).merge(AriaPropsSchema.partial()).describe('Draggable item configuration'));\n\nexport type DragItem = z.infer<typeof DragItemSchema>;\n\n/**\n * Drag and Drop Configuration Schema\n * Top-level drag-and-drop interaction configuration for a component.\n */\nexport const DndConfigSchema = lazySchema(() => z.object({\n enabled: z.boolean().default(false).describe('Enable drag and drop'),\n dragItem: DragItemSchema.optional().describe('Configuration for draggable item'),\n dropZone: DropZoneSchema.optional().describe('Configuration for drop target'),\n sortable: z.boolean().default(false).describe('Enable sortable list behavior'),\n autoScroll: z.boolean().default(true).describe('Auto-scroll during drag near edges'),\n touchDelay: z.number().default(200).describe('Delay in ms before drag starts on touch devices'),\n}).describe('Drag and drop interaction configuration'));\n\nexport type DndConfig = z.infer<typeof DndConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\n/**\n * @module ui/portal\n *\n * Portal Protocol — Metadata-driven external-user UI projection.\n *\n * A Portal is **not** a new application or permission model. It is a\n * declarative projection of the existing app / view / action surface,\n * scoped to a route prefix, a set of admitted positions, and an optional\n * anonymous entry surface.\n *\n * Five invariants this schema preserves:\n * 1. Zero business code — layout is an enum + plugin id; theme is tokens;\n * navigation is references to existing metadata.\n * 2. Data plane is untouched — portal cannot declare objects, fields,\n * flows, or permissions. Data API (`/api/v1/data/...`) is unaware of\n * portals.\n * 3. Portal ≠ permission boundary. The permission model is (permission\n * sets distributed via positions, ADR-0090). Portals only narrow the\n * UI projection; hiding a view in `navigation` is UX, not security.\n * 4. Stackable — the same user/position can be admitted by multiple\n * portals. Routing or a picker decides which one is rendered.\n * 5. Template-first — a template author ships `customer.portal.ts` and\n * the platform guarantees the rendering shell.\n *\n * Architectural reach (consumer guidance, not part of the schema):\n * - Dispatcher / HonoServer: at boot, enumerate portals and register\n * `/<routePrefix>/*` route families with a per-portal auth scope.\n * - Auth middleware: admit the request if one of the caller's positions\n * ∈ `portal.positions`, or it matches `anonymousEntry.routes[*]`.\n * - objectui LayoutDispatcher: select shell from `layout`.\n * - objectui NavigationBuilder: render `navigation` (not the all-apps\n * grid).\n * - objectui ThemeProvider: inject `theme` as CSS variables.\n *\n * See framework issue\n * https://github.com/objectstack-ai/framework/issues/1294\n * for the design rationale.\n */\n\nimport { z } from 'zod';\nimport { lazySchema } from '../shared/lazy-schema';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { I18nLabelSchema } from './i18n.zod';\n\n// ---------------------------------------------------------------------------\n// Theme tokens (portal-local; intentionally narrower than AppBranding to keep\n// portal metadata declarative and platform-renderable without custom CSS)\n// ---------------------------------------------------------------------------\n\nexport const PortalThemeSchema = lazySchema(() => z.object({\n primaryColor: z.string().optional()\n .describe('Primary brand color (hex, rgb, hsl). Mapped to --portal-primary.'),\n accentColor: z.string().optional()\n .describe('Accent color used for highlights and CTAs.'),\n backgroundColor: z.string().optional()\n .describe('Page background color.'),\n surfaceColor: z.string().optional()\n .describe('Card / surface background color.'),\n textColor: z.string().optional()\n .describe('Primary text color.'),\n logoUrl: z.string().optional()\n .describe('Absolute or relative URL to the portal header logo (SVG or PNG).'),\n faviconUrl: z.string().optional()\n .describe('Absolute or relative URL to the portal favicon.'),\n fontFamily: z.string().optional()\n .describe('CSS font-family stack for the portal.'),\n customCss: z.string().optional()\n .describe('OPTIONAL escape hatch: raw CSS appended last. Discouraged; prefer tokens.'),\n}));\n\n// ---------------------------------------------------------------------------\n// Navigation — references to existing metadata. Discriminated union mirrors\n// app.zod.ts shape but is intentionally a much smaller surface: portals\n// expose a flat list of entry points, not a deep group tree.\n// ---------------------------------------------------------------------------\n\nconst BasePortalNavItemSchema = z.object({\n id: SnakeCaseIdentifierSchema\n .describe('Unique identifier for this portal nav item (lowercase snake_case).'),\n label: I18nLabelSchema.describe('Display label.'),\n icon: z.string().optional().describe('Icon name (Lucide).'),\n order: z.number().optional().describe('Sort order; lower appears first.'),\n badge: z.union([z.string(), z.number()]).optional()\n .describe('Optional badge (e.g. unread count).'),\n});\n\nexport const PortalViewNavItemSchema = BasePortalNavItemSchema.extend({\n type: z.literal('view'),\n /** Fully-qualified view reference: `<object_name>.<view_id>` */\n viewRef: z.string().describe('Reference to an existing view, e.g. \"helpdesk_ticket.list.my_tickets\".'),\n});\n\nexport const PortalActionNavItemSchema = BasePortalNavItemSchema.extend({\n type: z.literal('action'),\n /** Fully-qualified action reference: `<object_name>.<action_id>` */\n actionRef: z.string().describe('Reference to an existing action, e.g. \"helpdesk_ticket.create\".'),\n});\n\nexport const PortalDashboardNavItemSchema = BasePortalNavItemSchema.extend({\n type: z.literal('dashboard'),\n dashboardName: SnakeCaseIdentifierSchema.describe('Existing dashboard id.'),\n});\n\nexport const PortalUrlNavItemSchema = BasePortalNavItemSchema.extend({\n type: z.literal('url'),\n url: z.string().describe('Absolute or root-relative URL.'),\n target: z.enum(['_self', '_blank']).optional().default('_self'),\n});\n\nexport const PortalNavItemSchema = z.discriminatedUnion('type', [\n PortalViewNavItemSchema,\n PortalActionNavItemSchema,\n PortalDashboardNavItemSchema,\n PortalUrlNavItemSchema,\n]);\n\n// ---------------------------------------------------------------------------\n// Anonymous entry — declarative, with mandatory rate-limit + captcha hooks\n// for any unauthenticated mutation. Read-only views (e.g. public KB) only\n// need a rate-limit budget.\n// ---------------------------------------------------------------------------\n\nexport const PortalRateLimitSchema = lazySchema(() => z.object({\n /** Token-bucket rule string, e.g. \"5/hour/ip\" or \"100/day/tenant\". */\n rule: z.string().describe('Rate-limit rule string, e.g. \"5/hour/ip\", \"100/day/tenant\".'),\n /** Scope key controlled by the runtime. */\n scope: z.enum(['ip', 'tenant', 'route']).default('ip')\n .describe('Counter scope. \"ip\" buckets per requester; \"tenant\" per portal owner; \"route\" global per route.'),\n}));\n\nexport const PortalAnonymousRouteSchema = lazySchema(() => z.object({\n /** Portal-relative path, must begin with `/`. */\n path: z.string().describe('Path within the portal, e.g. \"/submit\" or \"/kb\".'),\n /** Exactly one of these must be set. */\n viewRef: z.string().optional()\n .describe('Reference to a public view (read-only).'),\n actionRef: z.string().optional()\n .describe('Reference to an action to perform anonymously (mutation).'),\n rateLimit: PortalRateLimitSchema.optional()\n .describe('Rate-limit for anonymous traffic on this route.'),\n captcha: z.boolean().optional().default(false)\n .describe('Require CAPTCHA / proof-of-work challenge before invoking.'),\n /**\n * For action routes that need a deferred identity bind (e.g. anonymous\n * ticket submission → magic-link verification of the supplied email).\n * The runtime captures the input field, sends a magic link, and on\n * verification re-attributes the created record to the new user.\n */\n bindIdentityFromField: z.string().optional()\n .describe('Field name on the action input to use for magic-link identity binding (e.g. \"customer_email\").'),\n}));\n\nexport const PortalAnonymousEntrySchema = lazySchema(() => z.object({\n routes: z.array(PortalAnonymousRouteSchema)\n .describe('List of anonymous-accessible routes.'),\n /** Default rate-limit applied when a route does not specify one. */\n defaultRateLimit: PortalRateLimitSchema.optional(),\n}));\n\n// ---------------------------------------------------------------------------\n// SEO + locale + auth modes\n// ---------------------------------------------------------------------------\n\nexport const PortalSeoSchema = lazySchema(() => z.object({\n title: z.string().optional().describe('Default <title>.'),\n description: z.string().optional().describe('Default <meta name=\"description\">.'),\n openGraphImage: z.string().optional().describe('Default og:image URL.'),\n robots: z.enum(['index', 'noindex']).optional().default('index'),\n}));\n\nexport const PortalAuthModeSchema = lazySchema(() => z.union([\n z.literal('authenticated'),\n z.literal('magic-link'),\n z.literal('anonymous'),\n // SSO provider, e.g. \"sso:google\", \"sso:azure-ad\", \"sso:saml:<idp-id>\".\n z.string().regex(/^sso:[a-z][a-z0-9_-]*(?::[a-z0-9_-]+)?$/i,\n 'SSO mode must be \"sso:<provider>\" or \"sso:<protocol>:<idp-id>\"'),\n]));\n\nexport const PortalLayoutSchema = lazySchema(() => z.union([\n z.literal('console'),\n z.literal('minimal'),\n z.literal('embedded'),\n // Plugin shell: \"custom:<plugin-id>\" or \"custom:<plugin-id>/<layout-id>\".\n z.string().regex(/^custom:[a-z][a-z0-9_-]*(?:\\/[a-z0-9_-]+)?$/i,\n 'Custom layout must be \"custom:<plugin-id>\" or \"custom:<plugin-id>/<layout-id>\"'),\n]));\n\n// ---------------------------------------------------------------------------\n// Portal — top-level metadata kind\n// ---------------------------------------------------------------------------\n\nexport const PortalSchema = lazySchema(() => z.object({\n /** Discriminator for the metadata registry. */\n kind: z.literal('portal').describe('Metadata kind discriminator.'),\n\n /** Machine name (id). Unique per tenant. */\n id: SnakeCaseIdentifierSchema\n .describe('Portal unique machine name (lowercase snake_case).'),\n\n /** Display label, i18n. */\n label: I18nLabelSchema.describe('Portal display label.'),\n\n /** Optional description (i18n). */\n description: I18nLabelSchema.optional(),\n\n // ---------------- Routing ----------------\n\n /**\n * Root path the portal is mounted at. MUST be absolute and start with `/`.\n * Multiple portals cannot share the same `routePrefix` within a tenant.\n * Example: \"/portal/helpdesk\".\n */\n routePrefix: z.string()\n .regex(/^\\/[a-z0-9/_-]*$/i, 'routePrefix must start with \"/\" and be url-safe')\n .describe('Root URL path for the portal (must start with \"/\").'),\n\n /**\n * Optional vanity domain. When set, the platform serves the portal on\n * this hostname in addition to (or instead of) `routePrefix` on the\n * default domain. Subject to TLS provisioning and DNS verification.\n */\n domain: z.string().optional()\n .describe('Optional vanity domain (e.g. \"support.acme.com\").'),\n\n // ---------------- Shell ----------------\n\n layout: PortalLayoutSchema.default('minimal')\n .describe('Shell layout for the portal.'),\n\n theme: PortalThemeSchema.optional().describe('Theme tokens.'),\n\n /**\n * Locale resolution. \"auto\" → use Accept-Language; otherwise force a\n * specific locale (e.g. \"en\", \"zh-CN\").\n */\n locale: z.union([z.literal('auto'), z.string()]).optional().default('auto')\n .describe('Locale resolution strategy.'),\n\n /** SEO metadata defaults for unauthenticated pages. */\n seo: PortalSeoSchema.optional(),\n\n // ---------------- Auth ----------------\n\n authMode: PortalAuthModeSchema.default('authenticated')\n .describe('Authentication mode for the portal.'),\n\n /**\n * Positions admitted to the portal (ADR-0090 — formerly `profiles`; the\n * Profile concept was removed by D2). A user is allowed in iff they hold\n * at least one of the listed positions. Use the built-in `guest` position\n * for anonymous-only portals (D9). **This is a UI gate, not the source of\n * truth — the data layer still enforces permission sets + sharing on\n * every API call.**\n */\n positions: z.array(SnakeCaseIdentifierSchema)\n .min(1, \"A portal must admit at least one position (use the built-in 'guest' position for anonymous-only portals).\")\n .describe('Positions admitted to the portal.'),\n\n /**\n * Tombstone for the removed `profiles` key (ADR-0090 D2): reject loudly\n * with the FROM → TO prescription instead of silently stripping — a\n * silently-dropped admission gate is exactly the class of authoring error\n * the vocabulary freeze exists to prevent.\n */\n profiles: z\n .unknown()\n .optional()\n .superRefine((v, ctx) => {\n if (v !== undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n \"'profiles' was removed (ADR-0090 D2 — the Profile concept no longer exists). \" +\n \"Declare `positions` instead: the flat distribution groups admitted to this portal \" +\n \"(use the built-in 'guest' position for anonymous-only portals).\",\n });\n }\n }),\n\n /**\n * Anonymous entry surface — declarative routes that can be hit without\n * a session. The runtime impersonates a tenant-local `system.anonymous`\n * principal, applies the route's rate-limit + captcha, then runs the\n * referenced view/action.\n */\n anonymousEntry: PortalAnonymousEntrySchema.optional(),\n\n // ---------------- Navigation ----------------\n\n navigation: z.array(PortalNavItemSchema)\n .describe('Flat list of portal entry points (references to existing metadata).'),\n\n /**\n * Optional default route. If omitted, the runtime picks the first\n * `navigation` entry.\n */\n defaultRoute: z.object({\n viewRef: z.string().optional(),\n actionRef: z.string().optional(),\n dashboardName: SnakeCaseIdentifierSchema.optional(),\n }).optional().describe('Landing surface when the user hits the portal root.'),\n\n // ---------------- Embedding ----------------\n\n /**\n * Whether the portal may be rendered inside an `<iframe>`. Controls\n * `X-Frame-Options` / `frame-ancestors` CSP headers.\n */\n embeddable: z.boolean().optional().default(false),\n\n /**\n * Allowed embed origins (CSP `frame-ancestors`). Ignored when\n * `embeddable: false`.\n */\n allowedEmbedOrigins: z.array(z.string()).optional(),\n\n /** Whether the portal is active. */\n active: z.boolean().optional().default(true),\n}).describe('Portal projection. [EXPERIMENTAL — not enforced] PortalSchema is not registered as an authorable metadata type; no dispatcher route family, auth scope, LayoutDispatcher, NavigationBuilder or ThemeProvider consumes it yet. The entire schema is a forward-looking design (framework #1294); authoring a portal today is a no-op (liveness audit #1878/#1893).'));\n\n// ---------------------------------------------------------------------------\n// Factory + types\n// ---------------------------------------------------------------------------\n\nexport const Portal = {\n create: (config: z.input<typeof PortalSchema>): Portal => PortalSchema.parse(config),\n} as const;\n\nexport function definePortal(config: z.input<typeof PortalSchema>): Portal {\n return PortalSchema.parse(config);\n}\n\nexport type Portal = z.infer<typeof PortalSchema>;\nexport type PortalInput = z.input<typeof PortalSchema>;\nexport type PortalTheme = z.infer<typeof PortalThemeSchema>;\nexport type PortalNavItem = z.infer<typeof PortalNavItemSchema>;\nexport type PortalViewNavItem = z.infer<typeof PortalViewNavItemSchema>;\nexport type PortalActionNavItem = z.infer<typeof PortalActionNavItemSchema>;\nexport type PortalDashboardNavItem = z.infer<typeof PortalDashboardNavItemSchema>;\nexport type PortalUrlNavItem = z.infer<typeof PortalUrlNavItemSchema>;\nexport type PortalAnonymousEntry = z.infer<typeof PortalAnonymousEntrySchema>;\nexport type PortalAnonymousRoute = z.infer<typeof PortalAnonymousRouteSchema>;\nexport type PortalRateLimit = z.infer<typeof PortalRateLimitSchema>;\nexport type PortalSeo = z.infer<typeof PortalSeoSchema>;\nexport type PortalAuthMode = z.infer<typeof PortalAuthModeSchema>;\nexport type PortalLayout = z.infer<typeof PortalLayoutSchema>;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/shared/lazy-schema.ts","../../src/ui/i18n.zod.ts","../../src/ui/chart.zod.ts","../../src/ui/responsive.zod.ts","../../src/shared/identifiers.zod.ts","../../src/shared/expression.zod.ts","../../src/ui/sharing.zod.ts","../../src/kernel/metadata-protection.zod.ts","../../src/shared/protection.zod.ts","../../src/ui/app.zod.ts","../../src/shared/visibility.ts","../../src/data/filter.zod.ts","../../src/data/field.zod.ts","../../src/shared/http.zod.ts","../../src/ui/view.zod.ts","../../src/ui/dashboard.zod.ts","../../src/ui/report.zod.ts","../../src/data/query.zod.ts","../../src/ui/dataset.zod.ts","../../src/ui/report.form.ts","../../src/ui/view.form.ts","../../src/ui/app.form.ts","../../src/ui/dashboard.form.ts","../../src/ui/dataset.form.ts","../../src/ui/action.form.ts","../../src/ui/page.form.ts","../../src/data/hook-body.zod.ts","../../src/kernel/public-auth-features.ts","../../src/ui/action.zod.ts","../../src/shared/enums.zod.ts","../../src/ui/page.zod.ts","../../src/ui/widget.zod.ts","../../src/data/feed.zod.ts","../../src/ui/component.zod.ts","../../src/ui/react-blocks.ts","../../src/ui/touch.zod.ts","../../src/ui/keyboard.zod.ts","../../src/ui/theme.zod.ts","../../src/ui/offline.zod.ts","../../src/ui/animation.zod.ts","../../src/ui/notification.zod.ts","../../src/ui/dnd.zod.ts","../../src/ui/portal.zod.ts"],"names":["z"],"mappings":";;;;;AAoBO,SAAS,WAAmC,OAAA,EAAqB;AACtE,EAAA,IAAI,OAAO,OAAA,KAAY,WAAA,IAAe,OAAA,CAAQ,GAAA,EAAK,qBAAqB,GAAA,EAAK;AAC3E,IAAA,OAAO,OAAA,EAAQ;AAAA,EACjB;AAEA,EAAA,IAAI,MAAA;AACJ,EAAA,MAAM,UAAU,MAAS;AACvB,IAAA,IAAI,MAAA,KAAW,MAAA,EAAW,MAAA,GAAS,OAAA,EAAQ;AAC3C,IAAA,OAAO,MAAA;AAAA,EACT,CAAA;AAEA,EAAA,MAAM,MAAA,GAAS,SAAS,OAAA,GAAU;AAAA,EAAC,CAAA;AAwBnC,EAAA,IAAI,SAAA;AACJ,EAAA,MAAM,aAAA,GAAgB,CAAC,IAAA,KAAgC;AACrD,IAAA,MAAM,UAAW,IAAA,CAAuD,IAAA;AACxE,IAAA,IAAI,CAAC,OAAA,IAAW,OAAO,OAAA,CAAQ,sBAAsB,UAAA,EAAY;AAC/D,MAAA,OAAO,OAAA;AAAA,IACT;AACA,IAAA,MAAM,WAAW,OAAA,CAAQ,iBAAA;AACzB,IAAA,OAAO,MAAA,CAAO,OAAO,OAAA,EAAmB;AAAA,MACtC,iBAAA,EAAmB;AAAA,QACjB,UAAA,EAAY,IAAA;AAAA,QACZ,KAAA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ACrB,OAAA,EACE;AAAA,OAGH,CAAA;AAAA,IACH;AAAA,EACF,CAAC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQH,cAAA,EAAgB,2BAA2B,QAAA,EAAS;AAAA;AAAA,EAIpD,YAAYA,CAAAA,CAAE,KAAA,CAAM,mBAAmB,CAAA,CACpC,SAAS,qEAAqE,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjF,YAAA,EAAcA,EAAE,MAAA,CAAO;AAAA,IACrB,OAAA,EAASA,CAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,IAC7B,SAAA,EAAWA,CAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,IAC/B,aAAA,EAAe,0BAA0B,QAAA;AAAS,GACnD,CAAA,CAAE,QAAA,EAAS,CAAE,SAAS,qDAAqD,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ5E,YAAYA,CAAAA,CAAE,OAAA,GAAU,QAAA,EAAS,CAAE,QAAQ,KAAK,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMhD,qBAAqBA,CAAAA,CAAE,KAAA,CAAMA,EAAE,MAAA,EAAQ,EAAE,QAAA,EAAS;AAAA;AAAA,EAGlD,QAAQA,CAAAA,CAAE,OAAA,GAAU,QAAA,EAAS,CAAE,QAAQ,IAAI;AAC7C,CAAC,CAAA,CAAE,QAAA,CAAS,uWAAkW,CAAC;AAMxW,IAAM,MAAA,GAAS;AAAA,EACpB,MAAA,EAAQ,CAAC,MAAA,KAAiD,YAAA,CAAa,MAAM,MAAM;AACrF;AAEO,SAAS,aAAa,MAAA,EAA8C;AACzE,EAAA,OAAO,YAAA,CAAa,MAAM,MAAM,CAAA;AAClC","file":"index.mjs","sourcesContent":["// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { z } from 'zod';\n\n/**\n * Wrap a Zod schema constructor so its body is only evaluated on first use.\n *\n * Why: building Zod schemas at module-load creates millions of closures that\n * dominate dev-server RSS even though most schemas are never parsed in a\n * given session. Wrapping the constructor in a Proxy defers allocation until\n * the first property access (`.parse`, `.shape`, `._def`, etc.) and reuses\n * a single cached instance thereafter.\n *\n * Type system: the returned Proxy is structurally indistinguishable from the\n * underlying ZodType, so `z.infer<typeof X>` and `.parse()` callers do not\n * need to change.\n *\n * Emergency rollback: set `OS_EAGER_SCHEMAS=1` to evaluate the\n * factory immediately and bypass the Proxy entirely.\n */\nexport function lazySchema<T extends z.ZodTypeAny>(factory: () => T): T {\n if (typeof process !== 'undefined' && process.env?.OS_EAGER_SCHEMAS === '1') {\n return factory();\n }\n\n let cached: T | undefined;\n const resolve = (): T => {\n if (cached === undefined) cached = factory();\n return cached;\n };\n\n const target = function lazyZod() {} as unknown as T;\n\n /**\n * Memoised `_zod` facade (one per proxy — `_zod.run` is the parse hot path).\n *\n * Why it exists: zod's `toJSONSchema` traversal keys its `seen` map on the\n * node object it was handed — this Proxy, wherever the schema is referenced\n * lazily (a `z.lazy(() => X)` recursion getter, or a direct conversion\n * root). But zod's per-type JSON-Schema hooks close over the REAL instance\n * at construction time (`inst._zod.processJSONSchema = (ctx, …) =>\n * pipeProcessor(inst, ctx, …)`), and the wrapper-type processors\n * (pipe/lazy/optional/default/…) then resolve `ctx.seen.get(inst)` — which\n * misses when the entry was keyed on the Proxy, crashing with\n * `Cannot set properties of undefined (setting 'ref')`. Plain-object\n * schemas never look themselves up, which kept this latent until ADR-0089\n * D3a turned FormFieldSchema / PageComponentSchema into\n * `.strict().transform(…)` pipes.\n *\n * The facade prototype-delegates every `_zod` read to the real internals,\n * wrapping only `processJSONSchema` to alias the Proxy's `seen` entry onto\n * the real instance before delegating, so both identities resolve to the\n * same entry. If the real instance was already traversed under its own\n * identity it keeps its entry (alias, never clobber).\n */\n let zodFacade: object | undefined;\n const makeZodFacade = (real: T): object | undefined => {\n const realZod = (real as unknown as { _zod?: Record<string, unknown> })._zod;\n if (!realZod || typeof realZod.processJSONSchema !== 'function') {\n return realZod;\n }\n const delegate = realZod.processJSONSchema as (...a: unknown[]) => unknown;\n return Object.create(realZod as object, {\n processJSONSchema: {\n enumerable: true,\n value: (ctx: { seen?: Map<unknown, unknown> }, json: unknown, params: unknown) => {\n const seen = ctx?.seen;\n if (seen && typeof seen.get === 'function') {\n const entry = seen.get(proxy);\n if (entry !== undefined && !seen.has(real)) seen.set(real, entry);\n }\n return delegate(ctx, json, params);\n },\n },\n }) as object;\n };\n\n const proxy = new Proxy(target as object, {\n get(_t, prop) {\n const real = resolve() as unknown as Record<PropertyKey, unknown>;\n if (prop === '_zod') {\n zodFacade ??= makeZodFacade(real as unknown as T);\n return zodFacade;\n }\n const value = real[prop];\n if (typeof value === 'function') {\n return (value as (...a: unknown[]) => unknown).bind(real);\n }\n return value;\n },\n set(_t, prop, value) {\n const real = resolve() as unknown as Record<PropertyKey, unknown>;\n real[prop] = value;\n return true;\n },\n has(_t, prop) {\n return prop in (resolve() as object);\n },\n ownKeys() {\n return Reflect.ownKeys(resolve() as object);\n },\n getOwnPropertyDescriptor(_t, prop) {\n return Reflect.getOwnPropertyDescriptor(resolve() as object, prop);\n },\n getPrototypeOf() {\n return Reflect.getPrototypeOf(resolve() as object);\n },\n });\n\n return proxy as T;\n}\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * I18n Object Schema\n * Structured internationalization label with translation key and parameters.\n * \n * @example\n * ```typescript\n * const label: I18nObject = {\n * key: 'views.task_list.label',\n * defaultValue: 'Task List',\n * params: { count: 5 },\n * };\n * ```\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const I18nObjectSchema = lazySchema(() => z.object({\n /** Translation key (e.g., \"views.task_list.label\", \"apps.crm.description\") */\n key: z.string().describe('Translation key (e.g., \"views.task_list.label\")'),\n\n /** Default value when translation is not available */\n defaultValue: z.string().optional().describe('Fallback value when translation key is not found'),\n\n /** Interpolation parameters for dynamic translations */\n params: z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])).optional().describe('Interpolation parameters (e.g., { count: 5 })'),\n}));\n\nexport type I18nObject = z.infer<typeof I18nObjectSchema>;\n\n/**\n * I18n Label Schema\n * \n * A plain string label for display purposes.\n * i18n translation keys are auto-generated by the framework at registration time\n * based on a standardized naming convention (e.g., `apps.<packageId>.<name>.label`).\n * Developers only need to provide the default-language string; translations are\n * managed through translation files, not inline i18n objects.\n * \n * @example\n * ```typescript\n * const label: I18nLabel = \"All Active\";\n * ```\n */\nexport const I18nLabelSchema = lazySchema(() => z.string().describe('Display label (plain string; i18n keys are auto-generated by the framework)'));\n\nexport type I18nLabel = z.infer<typeof I18nLabelSchema>;\n\n/**\n * ARIA Accessibility Properties Schema\n * \n * Common ARIA attributes for UI components to support screen readers\n * and assistive technologies.\n * \n * Aligned with WAI-ARIA 1.2 specification.\n * \n * @see https://www.w3.org/TR/wai-aria-1.2/\n * \n * @example\n * ```typescript\n * const aria: AriaProps = {\n * ariaLabel: 'Close dialog',\n * ariaDescribedBy: 'dialog-description',\n * role: 'dialog',\n * };\n * ```\n */\nexport const AriaPropsSchema = lazySchema(() => z.object({\n /** Accessible label for screen readers */\n ariaLabel: I18nLabelSchema.optional().describe('Accessible label for screen readers (WAI-ARIA aria-label)'),\n\n /** ID of element that describes this component */\n ariaDescribedBy: z.string().optional().describe('ID of element providing additional description (WAI-ARIA aria-describedby)'),\n\n /** WAI-ARIA role override */\n role: z.string().optional().describe('WAI-ARIA role attribute (e.g., \"dialog\", \"navigation\", \"alert\")'),\n}).describe('ARIA accessibility attributes'));\n\nexport type AriaProps = z.infer<typeof AriaPropsSchema>;\n\n/**\n * Plural Rule Schema\n *\n * Defines plural forms for a translation key, following ICU MessageFormat / i18next conventions.\n * Supports zero, one, two, few, many, other forms per CLDR plural rules.\n *\n * @see https://unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules\n *\n * @example\n * ```typescript\n * const plural: PluralRule = {\n * key: 'items.count',\n * zero: 'No items',\n * one: '{count} item',\n * other: '{count} items',\n * };\n * ```\n */\nexport const PluralRuleSchema = lazySchema(() => z.object({\n /** Translation key for the plural form */\n key: z.string().describe('Translation key'),\n /** Form for zero quantity */\n zero: z.string().optional().describe('Zero form (e.g., \"No items\")'),\n /** Form for singular (1) */\n one: z.string().optional().describe('Singular form (e.g., \"{count} item\")'),\n /** Form for dual (2) — used in Arabic, Welsh, etc. */\n two: z.string().optional().describe('Dual form (e.g., \"{count} items\" for exactly 2)'),\n /** Form for few (2-4 in Slavic languages) */\n few: z.string().optional().describe('Few form (e.g., for 2-4 in some languages)'),\n /** Form for many (5+ in Slavic languages) */\n many: z.string().optional().describe('Many form (e.g., for 5+ in some languages)'),\n /** Default/fallback form */\n other: z.string().describe('Default plural form (e.g., \"{count} items\")'),\n}).describe('ICU plural rules for a translation key'));\n\nexport type PluralRule = z.infer<typeof PluralRuleSchema>;\n\n/**\n * Number Format Schema\n *\n * Defines number formatting rules for localization.\n *\n * @example\n * ```typescript\n * const format: NumberFormat = {\n * style: 'currency',\n * currency: 'USD',\n * minimumFractionDigits: 2,\n * };\n * ```\n */\nexport const NumberFormatSchema = lazySchema(() => z.object({\n style: z.enum(['decimal', 'currency', 'percent', 'unit']).default('decimal')\n .describe('Number formatting style'),\n currency: z.string().optional().describe('ISO 4217 currency code (e.g., \"USD\", \"EUR\")'),\n unit: z.string().optional().describe('Unit for unit formatting (e.g., \"kilometer\", \"liter\")'),\n minimumFractionDigits: z.number().optional().describe('Minimum number of fraction digits'),\n maximumFractionDigits: z.number().optional().describe('Maximum number of fraction digits'),\n useGrouping: z.boolean().optional().describe('Whether to use grouping separators (e.g., 1,000)'),\n}).describe('Number formatting rules'));\n\nexport type NumberFormat = z.infer<typeof NumberFormatSchema>;\n\n/**\n * Date Format Schema\n *\n * Defines date/time formatting rules for localization.\n *\n * @example\n * ```typescript\n * const format: DateFormat = {\n * dateStyle: 'medium',\n * timeStyle: 'short',\n * timeZone: 'America/New_York',\n * };\n * ```\n */\nexport const DateFormatSchema = lazySchema(() => z.object({\n dateStyle: z.enum(['full', 'long', 'medium', 'short']).optional()\n .describe('Date display style'),\n timeStyle: z.enum(['full', 'long', 'medium', 'short']).optional()\n .describe('Time display style'),\n timeZone: z.string().optional().describe('IANA time zone (e.g., \"America/New_York\")'),\n hour12: z.boolean().optional().describe('Use 12-hour format'),\n}).describe('Date/time formatting rules'));\n\nexport type DateFormat = z.infer<typeof DateFormatSchema>;\n\n/**\n * Locale Configuration Schema\n *\n * Defines a complete locale configuration including language code,\n * fallback chain, and formatting preferences.\n *\n * @example\n * ```typescript\n * const locale: LocaleConfig = {\n * code: 'zh-CN',\n * fallbackChain: ['zh-TW', 'en'],\n * direction: 'ltr',\n * numberFormat: { style: 'decimal', useGrouping: true },\n * dateFormat: { dateStyle: 'medium', timeStyle: 'short' },\n * };\n * ```\n */\nexport const LocaleConfigSchema = lazySchema(() => z.object({\n /** BCP 47 language code (e.g., \"en-US\", \"zh-CN\", \"ar-SA\") */\n code: z.string().describe('BCP 47 language code (e.g., \"en-US\", \"zh-CN\")'),\n\n /** Ordered fallback chain for missing translations */\n fallbackChain: z.array(z.string()).optional()\n .describe('Fallback language codes in priority order (e.g., [\"zh-TW\", \"en\"])'),\n\n /** Text direction */\n direction: z.enum(['ltr', 'rtl']).default('ltr')\n .describe('Text direction: left-to-right or right-to-left'),\n\n /** Default number formatting */\n numberFormat: NumberFormatSchema.optional().describe('Default number formatting rules'),\n\n /** Default date formatting */\n dateFormat: DateFormatSchema.optional().describe('Default date/time formatting rules'),\n}).describe('Locale configuration'));\n\nexport type LocaleConfig = z.infer<typeof LocaleConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\n\n/**\n * Unified Chart Type Taxonomy\n * \n * Shared by Dashboard and Report widgets.\n * Provides a comprehensive set of chart types for data visualization.\n */\n\n/**\n * Chart Type Enum\n * Categorized by visualization purpose\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const ChartTypeSchema = lazySchema(() => z.enum([\n // Comparison\n 'bar',\n 'horizontal-bar',\n 'column',\n\n // Trend\n 'line',\n 'area',\n\n // Distribution\n 'pie',\n 'donut',\n 'funnel',\n\n // Relationship\n 'scatter',\n\n // Composition\n 'treemap',\n 'sankey',\n\n // Performance (single value — metric/kpi render a number; gauge/solid-gauge/\n // bullet are honest single-value variants pending a real dial/target renderer)\n 'gauge',\n 'solid-gauge',\n 'metric',\n 'kpi',\n 'bullet',\n\n // Advanced\n 'radar',\n\n // Tabular\n 'table',\n 'pivot',\n]));\n\n// NOTE: the taxonomy lists only chart families the default Recharts renderer\n// draws DISTINCTLY. Two groups are intentionally absent:\n//\n// 1. Families requiring data/dependencies the platform does not model — OHLC\n// (candlestick/stock), per-record distributions (box-plot/violin), geo\n// (choropleth/bubble-map/gl-map), or extra renderers (sunburst, heatmap,\n// word-cloud, waterfall).\n// 2. VARIANTS that only render as their base chart, so advertising them lies\n// about the output: grouped-bar / stacked-bar / bi-polar-bar (→ bar, no\n// multi-series grouping/stacking), stacked-area (→ area), step-line / spline\n// (→ line), pyramid (→ funnel), bubble (→ scatter, no size encoding).\n//\n// Both can return via an opt-in renderer once there is a real renderer and a\n// data model to back them. (`metric`/`kpi` are kept as honest single-value\n// synonyms; `gauge`/`solid-gauge`/`bullet` render a value today and gain a dial\n// when a gauge renderer lands.)\n\nexport type ChartType = z.infer<typeof ChartTypeSchema>;\n\n/**\n * Chart Axis Schema\n * Definition for X and Y axes\n */\nexport const ChartAxisSchema = lazySchema(() => z.object({\n /** Data field to map to this axis */\n field: z.string().describe('Data field key'),\n \n /** Axis title */\n title: I18nLabelSchema.optional().describe('Axis display title'),\n\n /** Value formatting (d3-format or similar) */\n format: z.string().optional().describe('Value format string (e.g., \"$0,0.00\")'),\n \n /** Axis scale settings */\n min: z.number().optional().describe('Minimum value'),\n max: z.number().optional().describe('Maximum value'),\n stepSize: z.number().optional().describe('Step size for ticks'),\n \n /** Appearance */\n showGridLines: z.boolean().default(true),\n position: z.enum(['left', 'right', 'top', 'bottom']).optional().describe('Axis position'),\n \n /** Logarithmic scale */\n logarithmic: z.boolean().default(false),\n}));\n\n/**\n * Chart Series Schema\n * Defines a single data series in the chart\n */\nexport const ChartSeriesSchema = lazySchema(() => z.object({\n /** Field name for values */\n name: z.string().describe('Field name or series identifier'),\n \n /** Display label */\n label: I18nLabelSchema.optional().describe('Series display label'),\n \n /** Series type override (combo charts) */\n type: ChartTypeSchema.optional().describe('Override chart type for this series'),\n \n /** Specific color */\n color: z.string().optional().describe('Series color (hex/rgb/token)'),\n \n /** Stacking group */\n stack: z.string().optional().describe('Stack identifier to group series'),\n \n /** Axis binding */\n yAxis: z.enum(['left', 'right']).default('left').describe('Bind to specific Y-Axis'),\n\n /**\n * Series role.\n *\n * - `'primary'` (default) — normal styling using the chart palette.\n * - `'comparison'` — secondary period-over-period overlay; renderers\n * render it muted (lower opacity, dashed stroke for line/area,\n * lighter fill for bars) so it visually backgrounds against the\n * primary series. Pair with `DashboardWidget.compareTo` on data-\n * bound charts; for hand-authored series, set it directly.\n */\n variant: z.enum(['primary', 'comparison']).default('primary').optional().describe('Series visual role'),\n\n /** Override stroke dash pattern (e.g. \"4 4\" for dashed lines). */\n dashArray: z.string().optional().describe('SVG stroke-dasharray override'),\n\n /** Override series opacity (0–1). */\n opacity: z.number().min(0).max(1).optional().describe('Series opacity override'),\n}));\n\n/**\n * Chart Annotation Schema\n * Static lines or regions to highlight data\n */\nexport const ChartAnnotationSchema = lazySchema(() => z.object({\n type: z.enum(['line', 'region']).default('line'),\n axis: z.enum(['x', 'y']).default('y'),\n value: z.union([z.number(), z.string()]).describe('Start value'),\n endValue: z.union([z.number(), z.string()]).optional().describe('End value for regions'),\n color: z.string().optional(),\n label: I18nLabelSchema.optional(),\n style: z.enum(['solid', 'dashed', 'dotted']).default('dashed'),\n}));\n\n/**\n * Chart Interaction Schema\n */\nexport const ChartInteractionSchema = lazySchema(() => z.object({\n tooltips: z.boolean().default(true),\n zoom: z.boolean().default(false),\n brush: z.boolean().default(false),\n clickAction: z.string().optional().describe('Action ID to trigger on click'),\n}));\n\n/**\n * Chart Configuration Base\n * Common configuration for all chart types\n */\nexport const ChartConfigSchema = lazySchema(() => z.object({\n /** Chart Type */\n type: ChartTypeSchema,\n \n /** Titles */\n title: I18nLabelSchema.optional().describe('Chart title'),\n subtitle: I18nLabelSchema.optional().describe('Chart subtitle'),\n description: I18nLabelSchema.optional().describe('Accessibility description'),\n \n /** Axes Mapping */\n xAxis: ChartAxisSchema.optional().describe('X-Axis configuration'),\n yAxis: z.array(ChartAxisSchema).optional().describe('Y-Axis configuration (support dual axis)'),\n \n /** Series Configuration */\n series: z.array(ChartSeriesSchema).optional().describe('Defined series configuration'),\n \n /** Appearance. Either a positional palette (string[]) applied per category in\n * order, or a value→color map ({ value: color }, kanban-style). A value→color\n * map — and a select/lookup dimension's option colors — take precedence over\n * the positional palette per category, so semantic charts (health, status)\n * paint their own colors instead of the generic palette. */\n colors: z.union([\n z.array(z.string()),\n z.record(z.string(), z.string()),\n ]).optional().describe('Color palette (string[]) or value→color map ({ value: color })'),\n height: z.number().optional().describe('Fixed height in pixels'),\n \n /** Components */\n showLegend: z.boolean().default(true).describe('Display legend'),\n showDataLabels: z.boolean().default(false).describe('Display data labels'),\n \n /** Annotations & Reference Lines */\n annotations: z.array(ChartAnnotationSchema).optional(),\n \n /** Interactions */\n interaction: ChartInteractionSchema.optional(),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\nexport type ChartConfig = z.infer<typeof ChartConfigSchema>;\nexport type ChartAxis = z.infer<typeof ChartAxisSchema>;\nexport type ChartSeries = z.infer<typeof ChartSeriesSchema>;\nexport type ChartAnnotation = z.infer<typeof ChartAnnotationSchema>;\nexport type ChartInteraction = z.infer<typeof ChartInteractionSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * Breakpoint Name Enum\n * Matches the breakpoint names defined in theme.zod.ts BreakpointsSchema.\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const BreakpointName = z.enum(['xs', 'sm', 'md', 'lg', 'xl', '2xl']);\n\nexport type BreakpointName = z.infer<typeof BreakpointName>;\n\n/**\n * Responsive Configuration Schema\n *\n * Provides responsive layout configuration for UI components.\n * Maps breakpoint names to layout behavior (columns, visibility, order).\n *\n * Aligned with theme.zod.ts BreakpointsSchema for a unified responsive system.\n *\n * @example\n * ```typescript\n * const config: ResponsiveConfig = {\n * columns: { xs: 12, sm: 6, lg: 4 },\n * hiddenOn: ['xs'],\n * order: { xs: 2, lg: 1 },\n * };\n * ```\n */\n/**\n * Breakpoint Column Map Schema\n * Maps breakpoint names to grid column counts (1-12).\n * All entries are optional — only specified breakpoints are configured.\n */\nexport const BreakpointColumnMapSchema = lazySchema(() => z.object({\n xs: z.number().min(1).max(12).optional(),\n sm: z.number().min(1).max(12).optional(),\n md: z.number().min(1).max(12).optional(),\n lg: z.number().min(1).max(12).optional(),\n xl: z.number().min(1).max(12).optional(),\n '2xl': z.number().min(1).max(12).optional(),\n}).describe('Grid columns per breakpoint (1-12)'));\n\n/**\n * Breakpoint Order Map Schema\n * Maps breakpoint names to display order numbers.\n * All entries are optional — only specified breakpoints are configured.\n */\nexport const BreakpointOrderMapSchema = lazySchema(() => z.object({\n xs: z.number().optional(),\n sm: z.number().optional(),\n md: z.number().optional(),\n lg: z.number().optional(),\n xl: z.number().optional(),\n '2xl': z.number().optional(),\n}).describe('Display order per breakpoint'));\n\nexport const ResponsiveConfigSchema = lazySchema(() => z.object({\n /** Minimum breakpoint for visibility */\n breakpoint: BreakpointName.optional()\n .describe('Minimum breakpoint for visibility'),\n\n /** Hide on specific breakpoints */\n hiddenOn: z.array(BreakpointName).optional()\n .describe('Hide on these breakpoints'),\n\n /** Grid columns per breakpoint (1-12 column grid) */\n columns: BreakpointColumnMapSchema.optional().describe('Grid columns per breakpoint'),\n\n /** Display order per breakpoint */\n order: BreakpointOrderMapSchema.optional().describe('Display order per breakpoint'),\n}).describe('Responsive layout configuration'));\n\nexport type ResponsiveConfig = z.infer<typeof ResponsiveConfigSchema>;\n\n/**\n * Style Map Schema (ADR-0065)\n *\n * A CSS property → value map (camelCase keys, e.g. `flexDirection`). Values are\n * arbitrary CSS strings/numbers but authors should prefer design tokens\n * (`var(--space-6)`, `var(--surface)`) for consistency and AI-safety.\n */\nexport const StyleMapSchema = lazySchema(() =>\n z.record(z.string(), z.union([z.string(), z.number()]))\n .describe('CSS property → value map (camelCase keys; design tokens encouraged)'));\n\nexport type StyleMap = z.infer<typeof StyleMapSchema>;\n\n/**\n * Responsive Styles Schema (ADR-0065)\n *\n * Per-breakpoint CSS-property maps for the SDUI scoped-styling model. Compiled\n * to **id-scoped CSS at render** (objectui `SchemaRenderer`) — build-independent,\n * collision-free, responsive-correct. Desktop-first: `large` is the\n * unconditional base; `medium`/`small`/`xsmall` are `max-width` overrides.\n *\n * Distinct from {@link ResponsiveConfigSchema}, which configures *layout* (grid\n * columns / visibility / order) on the Tailwind `xs..2xl` axis. This styles a\n * node's own box; that arranges a node within a grid.\n */\nexport const ResponsiveStylesSchema = lazySchema(() => z.object({\n large: StyleMapSchema.optional().describe('Unconditional base (desktop-first)'),\n medium: StyleMapSchema.optional().describe('Applied at ≤ medium breakpoint'),\n small: StyleMapSchema.optional().describe('Applied at ≤ small breakpoint'),\n xsmall: StyleMapSchema.optional().describe('Applied at ≤ xsmall breakpoint'),\n}).describe('Per-breakpoint scoped style maps (ADR-0065)'));\n\nexport type ResponsiveStyles = z.infer<typeof ResponsiveStylesSchema>;\n\n/**\n * Performance Configuration Schema\n *\n * Defines performance optimization settings for UI components\n * such as lazy loading, virtual scrolling, and caching.\n *\n * @example\n * ```typescript\n * const perf: PerformanceConfig = {\n * lazyLoad: true,\n * virtualScroll: { enabled: true, itemHeight: 40, overscan: 5 },\n * cacheStrategy: 'stale-while-revalidate',\n * prefetch: true,\n * };\n * ```\n */\nexport const PerformanceConfigSchema = lazySchema(() => z.object({\n /** Enable lazy loading for this component */\n lazyLoad: z.boolean().optional()\n .describe('Enable lazy loading (defer rendering until visible)'),\n\n /** Virtual scrolling configuration for large datasets */\n virtualScroll: z.object({\n enabled: z.boolean().default(false).describe('Enable virtual scrolling'),\n itemHeight: z.number().optional().describe('Fixed item height in pixels (for estimation)'),\n overscan: z.number().optional().describe('Number of extra items to render outside viewport'),\n }).optional().describe('Virtual scrolling configuration'),\n\n /** Client-side caching strategy */\n cacheStrategy: z.enum([\n 'none',\n 'cache-first',\n 'network-first',\n 'stale-while-revalidate',\n ]).optional().describe('Client-side data caching strategy'),\n\n /** Enable data prefetching */\n prefetch: z.boolean().optional()\n .describe('Prefetch data before component is visible'),\n\n /** Maximum number of items to render before pagination */\n pageSize: z.number().optional()\n .describe('Number of items per page for pagination'),\n\n /** Debounce interval for user interactions (ms) */\n debounceMs: z.number().optional()\n .describe('Debounce interval for user interactions in milliseconds'),\n}).describe('Performance optimization configuration'));\n\nexport type PerformanceConfig = z.infer<typeof PerformanceConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * System Identifier Schema\n * \n * Universal naming convention for all machine identifiers (API Names) in ObjectStack.\n * Enforces lowercase with underscores or dots to ensure:\n * - Cross-platform compatibility (case-insensitive filesystems)\n * - URL-friendliness (no encoding needed)\n * - Database consistency (no collation issues)\n * - Security (no case-sensitivity bugs in permission checks)\n * \n * **Applies to all metadata that acts as a machine identifier:**\n * - Object names (tables/collections)\n * - Field names\n * - Role names\n * - Permission set names\n * - Action/trigger names\n * - Event keys\n * - App IDs\n * - Menu/page IDs\n * - Select option values\n * - Workflow names\n * - Webhook names\n * \n * **Naming Convention Summary:**\n * | Type | Pattern | Example |\n * |------|---------|---------|\n * | Machine ID | snake_case | `crm_account`, `btn_submit`, `role_admin` |\n * | Event keys | dot.notation | `user.login`, `order.created` |\n * | Labels | Any case | `Client Account`, `Submit Form` |\n * \n * @example Valid identifiers\n * - 'account'\n * - 'crm_account'\n * - 'user_profile'\n * - 'order.created' (for events)\n * - 'api_v2_endpoint'\n * \n * @example Invalid identifiers (will be rejected)\n * - 'Account' (uppercase)\n * - 'CrmAccount' (camelCase)\n * - 'crm-account' (kebab-case - use underscore instead)\n * - 'user profile' (spaces)\n */\nimport { lazySchema } from './lazy-schema';\nexport const SystemIdentifierSchema = lazySchema(() => z\n .string()\n .min(2, { message: 'System identifier must be at least 2 characters' })\n .regex(/^[a-z][a-z0-9_.]*$/, {\n message:\n 'System identifier must be lowercase, starting with a letter, and may contain letters, numbers, underscores, or dots (e.g., \"user_profile\" or \"order.created\")',\n })\n .describe('System identifier (lowercase with underscores or dots)'));\n\n/**\n * Strict Snake Case Identifier\n * \n * More restrictive than SystemIdentifierSchema - only allows underscores (no dots).\n * Use this for identifiers that should NOT contain dots (e.g., database table/column names).\n * \n * @example Valid\n * - 'account'\n * - 'crm_account'\n * - 'user_profile'\n * \n * @example Invalid\n * - 'user.profile' (dots not allowed)\n * - 'UserProfile' (uppercase)\n */\nexport const SnakeCaseIdentifierSchema = lazySchema(() => z\n .string()\n .min(2, { message: 'Identifier must be at least 2 characters' })\n .regex(/^[a-z][a-z0-9_]*$/, {\n message:\n 'Identifier must be lowercase snake_case, starting with a letter, and may contain only letters, numbers, and underscores (e.g., \"user_profile\")',\n })\n .describe('Snake case identifier (lowercase with underscores only)'));\n\n/**\n * Event Name Identifier\n * \n * Specialized identifier for event names that encourages dot notation.\n * Used in event-driven systems, message queues, and webhooks.\n * \n * Pattern: `namespace.action` or `entity.event_type`\n * \n * @example Valid\n * - 'user.created'\n * - 'order.paid'\n * - 'user.login_success'\n * - 'alarm.high_cpu'\n * \n * @example Invalid\n * - 'UserCreated' (camelCase)\n * - 'user_created' (should use dots for namespacing)\n */\nexport const EventNameSchema = lazySchema(() => z\n .string()\n .min(3, { message: 'Event name must be at least 3 characters' })\n .regex(/^[a-z][a-z0-9_.]*$/, {\n message:\n 'Event name must be lowercase with dots for namespacing (e.g., \"user.created\", \"order.paid\")',\n })\n .describe('Event name (lowercase with dot notation for namespacing)'));\n\n/**\n * Type Exports\n */\nexport type SystemIdentifier = z.infer<typeof SystemIdentifierSchema>;\nexport type SnakeCaseIdentifier = z.infer<typeof SnakeCaseIdentifierSchema>;\nexport type EventName = z.infer<typeof EventNameSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * # Expression Protocol\n *\n * Canonical wire format for all \"expression\"-shaped metadata across ObjectStack\n * (formula fields, predicates, conditions, criteria, visibility rules, seed\n * dynamic values, …).\n *\n * The persisted form is `{ dialect, source }` (and, after `objectstack\n * compile` normalization, `{ dialect, ast }`). String-only shorthand is\n * accepted at *input* time for developer ergonomics; build emits the canonical\n * envelope.\n *\n * ## Dialects\n *\n * | dialect | engine | use |\n * |:---|:---|:---|\n * | `cel` | `@objectstack/formula` (cel-js + ObjectStack stdlib) | formulas, predicates, seed dynamic values |\n * | `js` | sandboxed L2 hook bodies (`isolated-vm` / `quickjs`) | mapping, hook bodies |\n * | `cron` | `cron-parser` | job schedules |\n *\n * SQL fragments (analytics joins, partial indexes) are intentionally **not**\n * routed through this schema — they stay driver-native because their security\n * posture and portability story differ.\n *\n * @see content/docs/concepts/north-star.mdx §8 \"No private expression DSL\"\n */\n\n/**\n * Supported expression dialects.\n *\n * `js` was declared here but never shipped as an expression engine — it existed\n * only as a registry stub with no author helper (`cel`/`F`/`P` → CEL, `tmpl` →\n * template, `cron` → cron; nothing ever emitted `js`). Procedural JavaScript is\n * the L2 authoring surface — the sandboxed, capability-gated\n * `ScriptBody { language: 'js' }` in hook/action bodies — not an L1 expression\n * dialect. Retired in #3278; see ADR-0058 addendum.\n */\nexport const ExpressionDialect = z.enum(['cel', 'cron', 'template']);\nexport type ExpressionDialect = z.infer<typeof ExpressionDialect>;\n\n/**\n * Authorship metadata for an expression. Optional but encouraged for AI-\n * generated artifacts so audit/explanation tooling has something to render.\n */\nexport const ExpressionMetaSchema = z.object({\n /** Human-readable rationale (often AI-emitted). */\n rationale: z.string().optional(),\n /** Identifier of the agent / tool that produced this expression. */\n generatedBy: z.string().optional(),\n});\nexport type ExpressionMeta = z.infer<typeof ExpressionMetaSchema>;\n\n/**\n * Canonical Expression envelope.\n *\n * Phase 1 (M9.1): `source` is the canonical persisted form. `ast` is reserved\n * and accepted as opaque structured value — `objectstack compile` will fill it\n * in M9.2 with the engine's parsed AST so the artifact carries an AST-only\n * representation.\n *\n * Phase 2 (M9.2+): `ast` becomes required in build output; `source` is kept\n * only for round-trip / debug.\n */\nexport const ExpressionSchema = z.object({\n /** Which engine evaluates `source` / `ast`. */\n dialect: ExpressionDialect,\n /** Surface syntax. Required while `ast` is not yet populated. */\n source: z.string().min(1).optional(),\n /**\n * Engine-native AST. Opaque at the spec layer; each engine validates its own\n * shape. For `dialect: 'cel'` this is the cel-js parsed AST node.\n */\n ast: z.unknown().optional(),\n /** Optional authorship metadata. */\n meta: ExpressionMetaSchema.optional(),\n}).refine(e => e.source !== undefined || e.ast !== undefined, {\n message: 'Expression requires at least one of `source` or `ast`',\n});\nexport type Expression = z.infer<typeof ExpressionSchema>;\n\n/**\n * Author-time input shape: a bare string is shorthand for `{ dialect: 'cel',\n * source }`. Engines that need other dialects must use the full envelope.\n *\n * Build (`objectstack compile`) normalizes this union to `Expression` so the\n * persisted artifact never contains the bare-string form.\n */\nexport const ExpressionInputSchema = z.union([\n z.string().min(1).transform((source): Expression => ({ dialect: 'cel', source })),\n ExpressionSchema,\n]);\nexport type ExpressionInput = z.input<typeof ExpressionInputSchema>;\n\n/**\n * Cron-typed input shape: a bare string is shorthand for `{ dialect: 'cron',\n * source }` (not `cel`). Use this for `schedule` / `cronExpression` fields so\n * authors can write `'0 9 * * 1-5'` without manually wrapping.\n */\nexport const CronExpressionInputSchema = z.union([\n z.string().min(1).transform((source): Expression => ({ dialect: 'cron', source })),\n ExpressionSchema,\n]);\nexport type CronExpressionInput = z.input<typeof CronExpressionInputSchema>;\n\n/**\n * Template-typed input shape: a bare string is shorthand for\n * `{ dialect: 'template', source }`. Use this for notification subjects/bodies,\n * titleFormat, prompt templates — anything with `{{var}}` interpolation.\n */\nexport const TemplateExpressionInputSchema = z.union([\n z.string().min(1).transform((source): Expression => ({ dialect: 'template', source })),\n ExpressionSchema,\n]);\nexport type TemplateExpressionInput = z.input<typeof TemplateExpressionInputSchema>;\n\n/**\n * Predicate — an Expression whose evaluation is expected to be boolean.\n * Spec layer cannot enforce return type at parse time; this alias exists for\n * intent documentation and future runtime type-check wiring.\n */\nexport const PredicateSchema = ExpressionSchema;\nexport type Predicate = z.infer<typeof PredicateSchema>;\n\nexport const PredicateInputSchema = ExpressionInputSchema;\nexport type PredicateInput = z.input<typeof PredicateInputSchema>;\n\n/**\n * Construct an Expression literal from a CEL source string. Used by DX\n * shorthand (`cel\\`...\\``) and by codegen tools.\n */\nexport function expression(source: string, dialect: ExpressionDialect = 'cel', meta?: ExpressionMeta): Expression {\n return { dialect, source, ...(meta ? { meta } : {}) };\n}\n\n/**\n * Tagged-template helpers for inline expression authoring.\n *\n * ```ts\n * import { cel, F, P } from '@objectstack/spec';\n *\n * const f = { formula: F`record.amount * 0.1` };\n * const v = { visible: P`record.status == \"open\"` };\n * const d = { close_date: cel`now() + duration(\"P30D\")` };\n * ```\n *\n * Each helper produces an {@link Expression} envelope with `dialect: 'cel'`\n * and the rendered template string as `source`. The CLI `objectstack compile`\n * step (M9.2) parses these into ASTs at build time so the persisted artifact\n * is dialect-AST only.\n */\nfunction renderTemplate(strings: TemplateStringsArray, values: readonly unknown[]): string {\n if (values.length === 0) return strings[0] ?? '';\n let out = strings[0] ?? '';\n for (let i = 0; i < values.length; i++) {\n const v = values[i];\n // Inline literal substitution. Strings get JSON-escaped so `${name}` for\n // `name = 'O\\'Brien'` produces a valid CEL string literal. Numbers and\n // booleans render as their toString. Anything exotic should be passed via\n // the variable scope (record/input) rather than interpolated.\n if (typeof v === 'string') out += JSON.stringify(v);\n else if (typeof v === 'number' || typeof v === 'boolean') out += String(v);\n else if (v === null || v === undefined) out += 'null';\n else out += JSON.stringify(v);\n out += strings[i + 1] ?? '';\n }\n return out;\n}\n\n/** Tagged template — produces a CEL Expression envelope. */\nexport function cel(strings: TemplateStringsArray, ...values: unknown[]): Expression {\n return { dialect: 'cel', source: renderTemplate(strings, values) };\n}\n\n/** Formula alias of {@link cel} — semantic shorthand for computed-field formulas. */\nexport const F = cel;\n\n/** Predicate alias of {@link cel} — semantic shorthand for boolean conditions. */\nexport const P = cel;\n\n/**\n * Tagged template — produces a Mustache-template Expression envelope. Use for\n * notification subjects, prompt bodies, titleFormat strings, etc. Variable\n * scope is the same as CEL (`{{record.x}}`, `{{os.user.id}}`).\n */\nexport function tmpl(strings: TemplateStringsArray, ...values: unknown[]): Expression {\n // Templates do not get JSON.stringify on substitution — interpolation happens\n // at evaluate time via `{{path}}` markers, so we keep raw substitutions here.\n let out = strings[0] ?? '';\n for (let i = 0; i < values.length; i++) {\n out += String(values[i]);\n out += strings[i + 1] ?? '';\n }\n return { dialect: 'template', source: out };\n}\n\n/** Tagged template — produces a cron Expression envelope. */\nexport function cron(strings: TemplateStringsArray, ...values: unknown[]): Expression {\n let out = strings[0] ?? '';\n for (let i = 0; i < values.length; i++) {\n out += String(values[i]);\n out += strings[i + 1] ?? '';\n }\n return { dialect: 'cron', source: out };\n}\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\n/**\n * @module ui/sharing\n *\n * Sharing & Embedding Protocol\n *\n * Defines schemas for public link sharing, embed configuration,\n * domain restrictions, and password protection for apps, pages, and forms.\n */\n\nimport { z } from 'zod';\n\n/**\n * Sharing Config Schema\n * Configuration for public sharing of an app, page, or form.\n * Supports public links, password protection, domain restrictions, and expiration.\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const SharingConfigSchema = lazySchema(() => z.object({\n enabled: z.boolean().default(false).describe('Enable public sharing'),\n publicLink: z.string().optional().describe('Generated public share URL'),\n password: z.string().optional().describe('Password required to access shared link'),\n allowedDomains: z.array(z.string()).optional()\n .describe('Restrict access to specific email domains (e.g. [\"example.com\"])'),\n expiresAt: z.string().optional()\n .describe('Expiration date/time in ISO 8601 format'),\n allowAnonymous: z.boolean().optional().default(false)\n .describe('Allow access without authentication'),\n}));\n\n/**\n * Embed Config Schema\n * Configuration for iframe embedding of an app, page, or form.\n * Supports origin restrictions, display options, and responsive sizing.\n */\nexport const EmbedConfigSchema = lazySchema(() => z.object({\n enabled: z.boolean().default(false).describe('Enable iframe embedding'),\n allowedOrigins: z.array(z.string()).optional()\n .describe('Allowed iframe parent origins (e.g. [\"https://example.com\"])'),\n width: z.string().optional().default('100%').describe('Embed width (CSS value)'),\n height: z.string().optional().default('600px').describe('Embed height (CSS value)'),\n showHeader: z.boolean().optional().default(true).describe('Show interface header in embed'),\n showNavigation: z.boolean().optional().default(false).describe('Show navigation in embed'),\n responsive: z.boolean().optional().default(true).describe('Enable responsive resizing'),\n}));\n\n// Type Exports\nexport type SharingConfig = z.infer<typeof SharingConfigSchema>;\nexport type EmbedConfig = z.infer<typeof EmbedConfigSchema>;\n","// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * # Metadata Protection Model — Phase 1 (ADR-0010)\n *\n * Phase 1 introduces the **item-level lock** (`_lock`) and the\n * provenance / package tags that drive it. Later phases extend this\n * file with the path-level (`_frozenPaths`) and package-level\n * (`metadataDefaults`) layers; the wire shapes here are forward-\n * compatible with those additions.\n *\n * Wire / runtime contract:\n * - `_lock` — 4-state enum, controls overlay / delete actions.\n * - `_lockReason` — short, user-visible explanation surfaced in\n * `403 item_locked` errors and on Studio tooltips.\n * - `_lockSource` — which layer set the lock (Phase 1 only emits\n * `'artifact'`; `'package'` and `'env-forced'`\n * are reserved for Phase 3/2 respectively).\n * - `_provenance` — `'package'` for loader-introduced items,\n * `'org'` for tenant-authored, `'env-forced'`\n * reserved for emergency overrides.\n * - `_packageId` / `_packageVersion` — denormalised from the\n * registry tag so consumers don't need a second\n * round-trip to inspect provenance.\n *\n * See `docs/adr/0010-metadata-protection-model.md` for the full\n * design (industry references, 4-layer model, audit trail).\n */\n\n// ─────────────────────────────────────────────────────────────────────\n// Enums\n// ─────────────────────────────────────────────────────────────────────\n\n/**\n * 4-state lock enum.\n *\n * | Value | Save (PUT / publish / rollback) | Delete |\n * |---------------|---------------------------------|--------|\n * | `none` | allow | allow |\n * | `no-overlay` | **deny** (403 item_locked) | allow |\n * | `no-delete` | allow | **deny** |\n * | `full` | **deny** | **deny** |\n *\n * `allowRuntimeCreate` for **brand-new** items is governed by the\n * type-level L1 registry flag and is never affected by `_lock`\n * (which describes an existing item). See ADR-0010 §3.3.\n */\nexport const MetadataLockSchema = z.enum(['none', 'no-overlay', 'no-delete', 'full']);\nexport type MetadataLock = z.infer<typeof MetadataLockSchema>;\n\n/** Where the `_lock` declaration came from. Reserved enum for forward compatibility. */\nexport const MetadataLockSourceSchema = z.enum(['artifact', 'package', 'env-forced']);\nexport type MetadataLockSource = z.infer<typeof MetadataLockSourceSchema>;\n\n/** Where the metadata item originated. */\nexport const MetadataProvenanceSchema = z.enum(['package', 'org', 'env-forced']);\nexport type MetadataProvenance = z.infer<typeof MetadataProvenanceSchema>;\n\n// ─────────────────────────────────────────────────────────────────────\n// Mixin — raw shape that schemas spread into themselves\n// ─────────────────────────────────────────────────────────────────────\n\n/**\n * Raw shape spliced into each metadata Zod schema that wants to expose\n * the optional protection envelope to its TS authors. Implemented as a\n * Zod raw shape (not a wrapping schema) so it composes with the\n * existing `z.object({ ... })` patterns without needing to introduce\n * a refinement layer.\n *\n * Usage:\n * ```ts\n * const AppSchema = z.object({\n * name: z.string(),\n * // …\n * ...MetadataProtectionFields,\n * });\n * ```\n */\nexport const MetadataProtectionFields = {\n /**\n * Per-item lock declaration. Defaults to `'none'` when omitted.\n * Enforced by the runtime protocol on save / publish / rollback /\n * delete. See ADR-0010 §3.3.\n */\n _lock: MetadataLockSchema.optional().describe(\n 'Item-level lock — controls overlay & delete (ADR-0010).',\n ),\n\n /**\n * Short, user-visible explanation surfaced in `403 item_locked`\n * error envelopes and Studio tooltips. Keep < 200 chars.\n */\n _lockReason: z.string().max(500).optional().describe(\n 'Human-readable reason shown when a write is refused by _lock.',\n ),\n\n /**\n * Which layer asserted the lock — Phase 1 only emits `'artifact'`.\n * Reserved for Phase 2/3 (`'package'`, `'env-forced'`).\n */\n _lockSource: MetadataLockSourceSchema.optional().describe(\n 'Layer that set _lock (artifact | package | env-forced).',\n ),\n\n /**\n * `'package'` — introduced by a loader from npm-package source.\n * `'org'` — authored by a tenant via the metadata API.\n * `'env-forced'` — emergency overrides via the unlock list.\n */\n _provenance: MetadataProvenanceSchema.optional().describe(\n 'Origin of the item (package | org | env-forced).',\n ),\n\n /** Owning package machine id (e.g. `com.objectstack.setup`). */\n _packageId: z.string().optional().describe('Owning package machine id.'),\n\n /** Owning package semver. */\n _packageVersion: z.string().optional().describe('Owning package version.'),\n\n /**\n * Optional URL the Studio lock banner links to for more context.\n * Populated by the loader from the author-facing\n * `protection.docsUrl` field — see `shared/protection.zod.ts`.\n */\n _lockDocsUrl: z.string().optional().describe(\n 'Optional documentation link surfaced next to _lockReason.',\n ),\n} as const;\n\n// ─────────────────────────────────────────────────────────────────────\n// Helpers\n// ─────────────────────────────────────────────────────────────────────\n\n/**\n * Read the protection envelope off any candidate item. Safe to call\n * on `undefined`, primitives, or items that have no protection fields\n * at all — returns a fully-defaulted record.\n */\nexport function extractProtection(item: unknown): {\n lock: MetadataLock;\n lockReason: string | undefined;\n lockSource: MetadataLockSource | undefined;\n lockDocsUrl: string | undefined;\n provenance: MetadataProvenance | undefined;\n packageId: string | undefined;\n packageVersion: string | undefined;\n} {\n const empty = {\n lock: 'none' as MetadataLock,\n lockReason: undefined,\n lockSource: undefined,\n lockDocsUrl: undefined,\n provenance: undefined,\n packageId: undefined,\n packageVersion: undefined,\n };\n if (!item || typeof item !== 'object') return empty;\n const rec = item as Record<string, unknown>;\n const lockRaw = rec['_lock'];\n const lock = typeof lockRaw === 'string' && MetadataLockSchema.options.includes(lockRaw as MetadataLock)\n ? (lockRaw as MetadataLock)\n : 'none';\n const lockReason = typeof rec['_lockReason'] === 'string' ? (rec['_lockReason'] as string) : undefined;\n const lockSource = typeof rec['_lockSource'] === 'string'\n && MetadataLockSourceSchema.options.includes(rec['_lockSource'] as MetadataLockSource)\n ? (rec['_lockSource'] as MetadataLockSource)\n : undefined;\n const lockDocsUrl = typeof rec['_lockDocsUrl'] === 'string' ? (rec['_lockDocsUrl'] as string) : undefined;\n const provenance = typeof rec['_provenance'] === 'string'\n && MetadataProvenanceSchema.options.includes(rec['_provenance'] as MetadataProvenance)\n ? (rec['_provenance'] as MetadataProvenance)\n : undefined;\n const packageId = typeof rec['_packageId'] === 'string' ? (rec['_packageId'] as string) : undefined;\n const packageVersion = typeof rec['_packageVersion'] === 'string' ? (rec['_packageVersion'] as string) : undefined;\n return { lock, lockReason, lockSource, lockDocsUrl, provenance, packageId, packageVersion };\n}\n\n/**\n * Decide whether a write-style operation (PUT / publish / rollback)\n * is allowed under the given lock state.\n *\n * Returns `null` on allow. Returns a structured refusal envelope when\n * the lock blocks the operation; the protocol layer turns that into a\n * `403 item_locked` HTTP error.\n */\nexport function evaluateLockForWrite(lock: MetadataLock): { code: 'item_locked'; reason: string } | null {\n if (lock === 'no-overlay' || lock === 'full') {\n return { code: 'item_locked', reason: `Write refused — _lock=${lock}` };\n }\n return null;\n}\n\n/** Counterpart of {@link evaluateLockForWrite} for delete operations. */\nexport function evaluateLockForDelete(lock: MetadataLock): { code: 'item_locked'; reason: string } | null {\n if (lock === 'no-delete' || lock === 'full') {\n return { code: 'item_locked', reason: `Delete refused — _lock=${lock}` };\n }\n return null;\n}\n\n/**\n * Derive the read-side flags Studio needs to render the UI. The\n * `editable` / `deletable` / `resettable` triple is what the\n * `GET /meta/:type/:name` response carries in Phase 1. See ADR-0010 §5.\n */\nexport function resolveLockState(item: unknown, artifactBacked: boolean): {\n lock: MetadataLock;\n lockReason: string | undefined;\n lockSource: MetadataLockSource | undefined;\n lockDocsUrl: string | undefined;\n provenance: MetadataProvenance | undefined;\n packageId: string | undefined;\n packageVersion: string | undefined;\n editable: boolean;\n deletable: boolean;\n resettable: boolean;\n} {\n const p = extractProtection(item);\n const editable = p.lock !== 'no-overlay' && p.lock !== 'full';\n const deletable = p.lock !== 'no-delete' && p.lock !== 'full';\n // Reset only makes sense when there is something to reset *to* —\n // i.e. the artifact is package-backed and an overlay can be peeled\n // off. Phase 3 will surface this through a dedicated endpoint; for\n // Phase 1 we publish the boolean so Studio can pre-disable the\n // button when artifactBacked is false.\n const resettable = artifactBacked;\n return { ...p, editable, deletable, resettable };\n}\n","// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.\n\n/**\n * # Package-level metadata protection (ADR-0010 §3.7 — Phase 4.3)\n *\n * Public, type-safe author surface for package authors to declare\n * how much of one of their metadata items the runtime (and the\n * tenant's Studio) is allowed to mutate. Internally this is what\n * gets translated into the `_lock` / `_lockReason` / `_lockDocsUrl`\n * private envelope (`kernel/metadata-protection.zod.ts`) that the\n * protocol layer enforces.\n *\n * Why two layers?\n * - **`protection`** is the *author DX* surface — typed, validated,\n * and discoverable via IntelliSense on every `*.app.ts` /\n * `*.object.ts` / `*.view.ts` etc.\n * - **`_lock` envelope** is the *runtime* surface — strips off the\n * protection block on load and stamps the private fields so the\n * persistence and overlay layers don't drag the author-facing\n * block through every `sys_metadata` overlay diff.\n *\n * Example:\n * ```ts\n * export const SETUP_APP: App = {\n * name: 'setup',\n * label: 'Setup',\n * protection: {\n * lock: 'full',\n * reason: 'Core admin UI shipped by @objectstack/platform-objects.',\n * docsUrl: 'https://docs.objectstack.ai/adr/0010-metadata-protection',\n * },\n * // ...\n * };\n * ```\n *\n * The loader (`metadata/plugin.ts` + `objectql/registry.ts`) calls\n * {@link applyProtection} to translate this block into the private\n * `_lock` envelope at registration time. Authors should NEVER set\n * the underscored fields directly — they are an implementation\n * detail.\n *\n * See also:\n * - ADR-0010 §3.7 — Future work → now implemented.\n * - `kernel/metadata-protection.zod.ts` — the runtime envelope.\n */\n\nimport { z } from 'zod';\nimport {\n MetadataLockSchema,\n type MetadataLock,\n} from '../kernel/metadata-protection.zod';\n\n/**\n * Public protection block authored by package developers. Optional on\n * every lockable metadata type — omit to leave the item fully\n * overlay-editable and overlay-deletable (default behaviour).\n *\n * The shape is intentionally *small*: only the fields that have a\n * meaningful UX impact in Studio are exposed. Internal bookkeeping\n * (provenance, packageId, packageVersion) is auto-populated by the\n * loader and must not be supplied here.\n */\nexport const ProtectionSchema = z.object({\n /**\n * Lock policy for this item. See {@link MetadataLockSchema} for\n * the full semantics table.\n *\n * | Value | Save | Delete |\n * |---------------|------|--------|\n * | `none` | ✅ | ✅ |\n * | `no-overlay` | ❌ | ✅ |\n * | `no-delete` | ✅ | ❌ |\n * | `full` | ❌ | ❌ |\n *\n * `no-overlay` is recommended for \"structural\" items that should\n * stay authoritative but allow side-by-side extension (e.g. core\n * objects whose fields can be extended via `objectExtensions`).\n * `full` is for items that have no safe extension point at all\n * (e.g. the platform Setup app whose nav tree is wired directly\n * into framework code).\n */\n lock: MetadataLockSchema.describe(\n 'Lock policy — none | no-overlay | no-delete | full.',\n ),\n\n /**\n * Short user-visible explanation surfaced in `403 item_locked`\n * errors and the Studio lock banner. Aim for one sentence; the\n * banner truncates long values.\n */\n reason: z.string().min(1).max(500).describe(\n 'User-visible reason shown when the lock blocks an action.',\n ),\n\n /**\n * Optional documentation link rendered next to the reason in\n * the Studio lock banner. Use it to point operators at the\n * package's protection policy or to a \"how to customise this\"\n * guide. Must be a fully-qualified URL.\n */\n docsUrl: z.string().url().optional().describe(\n 'Optional URL the Studio banner links to for more context.',\n ),\n}).strict();\n\nexport type Protection = z.infer<typeof ProtectionSchema>;\n\n// ─────────────────────────────────────────────────────────────────────\n// Loader-side translation\n// ─────────────────────────────────────────────────────────────────────\n\n/** Loader context handed in by the registration pipeline. */\nexport interface ApplyProtectionContext {\n /** Owning package id (e.g. `com.objectstack.platform-objects`). */\n packageId?: string;\n /** Owning package semver. */\n packageVersion?: string;\n /**\n * `'package'` for items introduced by a package loader (default).\n * Pass `'env-forced'` when the runtime is materialising an\n * emergency override.\n */\n provenance?: 'package' | 'env-forced';\n}\n\n/**\n * Translate the author-facing `protection` block on `item` into the\n * private `_lock` envelope and strip the public block so it never\n * leaks into the overlay row.\n *\n * Safe to call on any object: items without `protection` are returned\n * unchanged (other than the standard `_packageId` / `_packageVersion`\n * stamping that always runs when the context supplies those fields).\n *\n * Always **mutates** `item` and returns it for chaining.\n */\nexport function applyProtection<T extends Record<string, unknown>>(\n item: T,\n ctx: ApplyProtectionContext = {},\n): T {\n if (!item || typeof item !== 'object') return item;\n\n // Stamp provenance / package coords first so they apply even when\n // there is no `protection` block. The loader pipeline used to do\n // _packageId stamping itself; centralising it here keeps the two\n // load paths (artifact loader + registry.registerItem) consistent.\n if (ctx.packageId && (item as any)._packageId === undefined) {\n (item as any)._packageId = ctx.packageId;\n }\n if (ctx.packageVersion && (item as any)._packageVersion === undefined) {\n (item as any)._packageVersion = ctx.packageVersion;\n }\n // Only stamp provenance when we actually have package coords or an\n // author-facing protection block; otherwise leave the item alone so\n // that DB-only / test fixtures don't acquire an unexpected\n // `_provenance` field. The loader passes packageId for genuine\n // package items; bare `registerItem(type, item)` calls without a\n // package context still produce a clean item.\n const hasProtectionBlock =\n (item as any).protection\n && typeof (item as any).protection === 'object';\n if (\n (ctx.packageId || hasProtectionBlock)\n && (item as any)._provenance === undefined\n ) {\n (item as any)._provenance = ctx.provenance ?? 'package';\n }\n\n const block = (item as any).protection;\n if (!block || typeof block !== 'object') return item;\n\n // Author-facing block exists — translate to the private envelope.\n // We accept partial values (lock alone, reason alone) and let the\n // protocol layer fall back to defaults; full Zod validation runs\n // upstream when the schemas were composed with ProtectionSchema.\n const lock = block.lock as MetadataLock | undefined;\n const reason = typeof block.reason === 'string' ? block.reason : undefined;\n const docsUrl = typeof block.docsUrl === 'string' ? block.docsUrl : undefined;\n\n if (lock !== undefined) {\n (item as any)._lock = lock;\n }\n if (reason !== undefined) {\n (item as any)._lockReason = reason;\n }\n if (docsUrl !== undefined) {\n (item as any)._lockDocsUrl = docsUrl;\n }\n // Lock source is 'package' for anything that came through this\n // helper. Artifact-only items (no packageId) fall back to\n // 'artifact' to preserve the Phase-1 contract.\n if ((item as any)._lockSource === undefined) {\n (item as any)._lockSource = ctx.packageId ? 'package' : 'artifact';\n }\n\n // Strip the public block — it lives only on the author-side\n // module, never on the persisted overlay row.\n delete (item as any).protection;\n\n return item;\n}\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { ExpressionInputSchema } from '../shared/expression.zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\nimport { SharingConfigSchema, EmbedConfigSchema } from './sharing.zod';\n\n/**\n * Base Navigation Item Schema\n * Shared properties for all navigation types.\n * \n * **NAMING CONVENTION:**\n * Navigation item IDs are used in URLs and configuration and must be lowercase snake_case.\n * \n * @example Good IDs\n * - 'menu_accounts'\n * - 'page_dashboard'\n * - 'nav_settings'\n * \n * @example Bad IDs (will be rejected)\n * - 'MenuAccounts' (PascalCase)\n * - 'Page Dashboard' (spaces)\n */\nimport { lazySchema } from '../shared/lazy-schema';\nimport { MetadataProtectionFields } from '../kernel/metadata-protection.zod';\nimport { ProtectionSchema } from '../shared/protection.zod';\nconst BaseNavItemSchema = z.object({\n /** Unique identifier for the item */\n id: SnakeCaseIdentifierSchema.describe('Unique identifier for this navigation item (lowercase snake_case)'),\n \n /** Display label */\n label: I18nLabelSchema.describe('Display proper label'),\n \n /** Icon name (Lucide) */\n icon: z.string().optional().describe('Icon name'),\n\n /** Sort order within the same level (lower numbers appear first) */\n order: z.number().optional().describe('Sort order within the same level (lower = first)'),\n\n /** Badge text or count displayed on the navigation item (e.g. \"3\", \"New\") */\n badge: z.union([z.string(), z.number()]).optional().describe('Badge text or count displayed on the item'),\n\n /** Visual variant for the badge (consumed by objectui NavigationRenderer) */\n badgeVariant: z.enum(['default', 'secondary', 'destructive', 'outline']).optional().describe('Visual variant of the nav badge. Declared to match the objectui NavigationRenderer read (inverse-drift fix, liveness audit #1878/#1891/#1894).'),\n\n /** \n * Visibility condition. \n * Formula expression returning boolean. \n * e.g. \"user.is_admin || user.department == 'sales'\"\n */\n visible: ExpressionInputSchema.optional().describe('Visibility predicate (CEL). e.g. P`\\'org_admin\\' in current_user.positions`'),\n\n /** Permissions required to see/access this navigation item */\n requiredPermissions: z.array(z.string()).optional().describe('Permissions required to access this item'),\n\n /**\n * Capability gate — registered object name.\n *\n * When set, the frontend MUST hide (or render disabled) this navigation\n * entry if the named object is not registered in the runtime's\n * SchemaRegistry. Useful for cloud-only objects (e.g. `sys_app`,\n * `sys_package`, `sys_package_installation`) that don't exist in\n * single-environment runtimes — declaring the dependency here avoids\n * 404-when-clicked traps without hard-coding environment checks in the\n * UI.\n *\n * Independent of `visible` (CEL) and `requiredPermissions` (RBAC) —\n * this gates on runtime *capability*, not user authorization.\n */\n requiresObject: z.string().optional().describe('Hide/disable this entry unless the named object is registered in the runtime'),\n\n /**\n * Capability gate — registered service name.\n *\n * Same idea as `requiresObject` but keyed on a kernel service\n * (e.g. `'ai'`, `'tenant'`, `'realtime'`). Hide the entry when the\n * service isn't installed.\n */\n requiresService: z.string().optional().describe('Hide/disable this entry unless the named kernel service is registered'),\n});\n\n/**\n * 1. Object Navigation Item\n *\n * Navigates to an object's list view by default. When `recordId` is set,\n * navigates directly to that record's detail page instead — useful for\n * \"My Profile\", \"My Settings\", or any other always-one-row entry where\n * dropping the user on a list view first would be wrong UX.\n *\n * `recordId` supports a small set of template variables resolved at render\n * time by the shell (see Console's `AppSidebar` / `AppContent`):\n * - `{current_user_id}` — the signed-in user's id\n * - `{current_org_id}` — the active organization id\n * These mirror the variables already understood by the view-layer\n * filter resolver (see e.g. `sys_user.me` listView), so authors only\n * have to learn one vocabulary.\n *\n * @example List view (existing behaviour)\n * ```ts\n * { id: 'nav_users', type: 'object', label: 'Users',\n * objectName: 'sys_user', viewName: 'all_users' }\n * ```\n *\n * @example Direct-to-record (new)\n * ```ts\n * { id: 'nav_profile', type: 'object', label: 'My Profile',\n * objectName: 'sys_user', recordId: '{current_user_id}' }\n * ```\n *\n * @example Parameterized slice on the bare data surface (objectui ADR-0055)\n * ```ts\n * { id: 'nav_my_open', type: 'object', label: 'My Open Tickets',\n * objectName: 'ticket', filters: { owner_id: '{current_user_id}', status: 'open' } }\n * ```\n */\nexport const ObjectNavItemSchema = lazySchema(() => BaseNavItemSchema.extend({\n type: z.literal('object'),\n objectName: z.string().describe('Target object name'),\n viewName: z.string().optional().describe('Default list view to open. Defaults to \"all\". Ignored when `recordId` is set.'),\n /**\n * When set, navigate straight to the detail page of this specific\n * record instead of the object's list view. Supports template\n * variables `{current_user_id}` and `{current_org_id}` resolved by\n * the shell at render time. Mutually exclusive with `viewName`\n * (viewName is ignored if both are set).\n */\n recordId: z.string().optional().describe(\n 'Navigate directly to this record id instead of the list view. Supports template vars: {current_user_id}, {current_org_id}.',\n ),\n /**\n * Open the record in view (default) or edit mode. Only meaningful\n * when `recordId` is set.\n */\n recordMode: z.enum(['view', 'edit']).optional().describe(\n 'Open the record in view (default) or edit mode. Only meaningful when `recordId` is set.',\n ),\n /**\n * URL filter conditions — the entry targets the parameterized bare data\n * surface (`/:objectName/data`, objectui ADR-0055) with each entry\n * serialized as a `filter[<field>]=<value>` search param (equality\n * semantics), instead of anchoring to a saved view. Use for one-off /\n * parameterized slices (dashboard drill-throughs, \"assigned to me\"\n * links); a slice worth curating and reusing belongs in a named view\n * via `viewName`. Values support the same template variables as\n * `recordId`. Precedence: `recordId` → `filters` → `viewName`.\n *\n * Mutually exclusive with `recordId` / `viewName` — enforced by\n * {@link NavigationItemSchema} (see `objectNavTargetExclusivity`) so the\n * ambiguous combination is unrepresentable rather than silently resolved\n * by precedence.\n */\n filters: z.record(z.string(), z.string()).optional().describe(\n 'URL filter conditions — targets the /:objectName/data bare surface via filter[<field>]=<value> params instead of a saved view. Values support template vars {current_user_id}, {current_org_id}. Mutually exclusive with recordId/viewName.',\n ),\n}));\n\n/**\n * Correct-by-construction guard (ADR-0053 philosophy): `filters` combined\n * with `recordId` or `viewName` is an authoring ambiguity — runtime\n * precedence would silently ignore one of them (a stale `recordId` hijacks\n * a configured `filters` slice). Reject it at validation with the fix in\n * the message. The legacy `recordId` + `viewName` combination stays\n * tolerated: it predates this guard and is documented as \"viewName is\n * ignored when recordId is set\".\n */\nconst objectNavTargetExclusivity = (\n item: { filters?: unknown; recordId?: unknown; viewName?: unknown },\n ctx: z.RefinementCtx,\n): void => {\n if (item.filters && (item.recordId || item.viewName)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['filters'],\n message:\n '`filters` cannot be combined with `recordId` or `viewName` — pick ONE landing: '\n + 'recordId (record deep-link), filters (/data slice), or viewName (named view). '\n + 'Remove the extra field(s); runtime precedence would silently ignore them.',\n });\n }\n};\n\n/**\n * 2. Dashboard Navigation Item\n * Navigates to a specific dashboard.\n */\nexport const DashboardNavItemSchema = lazySchema(() => BaseNavItemSchema.extend({\n type: z.literal('dashboard'),\n dashboardName: z.string().describe('Target dashboard name'),\n}));\n\n/**\n * 3. Page Navigation Item\n * Navigates to a custom UI page/component.\n */\nexport const PageNavItemSchema = lazySchema(() => BaseNavItemSchema.extend({\n type: z.literal('page'),\n pageName: z.string().describe('Target custom page component name'),\n params: z.record(z.string(), z.unknown()).optional().describe('Parameters passed to the page context'),\n}));\n\n/**\n * 4. URL Navigation Item\n * Navigates to an external or absolute URL.\n */\nexport const UrlNavItemSchema = lazySchema(() => BaseNavItemSchema.extend({\n type: z.literal('url'),\n url: z.string().describe('Target external URL'),\n target: z.enum(['_self', '_blank']).default('_self').describe('Link target window'),\n}));\n\n/**\n * 5. Report Navigation Item\n * Navigates to a specific report.\n */\nexport const ReportNavItemSchema = lazySchema(() => BaseNavItemSchema.extend({\n type: z.literal('report'),\n reportName: z.string().describe('Target report name'),\n}));\n\n/**\n * 6. Action Navigation Item\n * Triggers an action (e.g. opening a flow, running a script, or launching a screen action).\n */\nexport const ActionNavItemSchema = lazySchema(() => BaseNavItemSchema.extend({\n type: z.literal('action'),\n actionDef: z.object({\n actionName: z.string().describe('Action machine name to execute'),\n params: z.record(z.string(), z.unknown()).optional().describe('Parameters passed to the action'),\n }).describe('Action definition to execute when clicked'),\n}));\n\n/**\n * 7. Component Navigation Item\n * Navigates to a built-in front-end component registered in the runtime's\n * `ComponentRegistry` (e.g. `metadata:directory`, `metadata:resource`,\n * `setup:permission_matrix`). Unlike `page` (which resolves a user-defined\n * Page metadata record) and `url` (external link), `component` targets\n * a first-party UI shipped with the platform — typically admin/setup\n * surfaces that have no row in any data store.\n *\n * `params` are passed verbatim to the component as React props, so the\n * same component (e.g. `metadata:resource`) can be reused across many\n * nav entries with different `type` parameters.\n *\n * @example\n * ```ts\n * { id: 'nav_objects', type: 'component', label: 'Objects',\n * componentRef: 'metadata:resource', params: { type: 'object' } }\n * ```\n */\nexport const ComponentNavItemSchema = lazySchema(() => BaseNavItemSchema.extend({\n type: z.literal('component'),\n componentRef: z.string().describe('Component registry key (e.g. \"metadata:directory\")'),\n params: z.record(z.string(), z.unknown()).optional().describe('Props passed to the component'),\n}));\n\n/**\n * 8. Group Navigation Item\n * A container for child navigation items (Sub-menu).\n * Does not perform navigation itself.\n */\nexport const GroupNavItemSchema = lazySchema(() => BaseNavItemSchema.extend({\n type: z.literal('group'),\n expanded: z.boolean().default(false).describe('Default expansion state in sidebar'),\n // children property is added in the recursive definition below\n}));\n\n/**\n * 9. Separator Navigation Item\n * A visual divider in the navigation list. Renders no target; declared to\n * match the objectui renderer's `item.type === 'separator'` branch\n * (inverse-drift fix, liveness audit #1878/#1891/#1894).\n */\nconst SeparatorNavItemSchema = lazySchema(() => z.object({\n type: z.literal('separator'),\n id: SnakeCaseIdentifierSchema.optional().describe('Optional id for the separator'),\n order: z.number().optional().describe('Sort order within the same level (lower = first)'),\n}));\n\n/**\n * Recursive Union of all navigation item types.\n * Allows constructing an unlimited-depth navigation tree.\n */\nexport const NavigationItemSchema: z.ZodType<any> = z.lazy(() =>\n z.union([\n ObjectNavItemSchema.extend({\n children: z.array(NavigationItemSchema).optional().describe('Child navigation items (e.g. specific views)'),\n }).superRefine(objectNavTargetExclusivity),\n DashboardNavItemSchema,\n PageNavItemSchema,\n UrlNavItemSchema,\n ReportNavItemSchema,\n ActionNavItemSchema,\n ComponentNavItemSchema,\n SeparatorNavItemSchema,\n GroupNavItemSchema.extend({\n children: z.array(NavigationItemSchema).describe('Child navigation items'),\n })\n ])\n);\n\n/**\n * Navigation Contribution (ADR-0029 D7)\n *\n * Lets a package inject navigation items into an app it does **not** own —\n * the UI-layer analog of object `objectExtensions`. A capability plugin\n * contributes its menu entries into a shared admin app (e.g. `setup`) so the\n * app can be a thin \"shell + group anchors\" while each plugin ships the menu\n * for the objects it owns.\n *\n * The runtime merges all contributions into the owning app's `navigation`\n * tree by **target group id + priority** (lower priority applied first,\n * mirroring object extender ordering). When `group` is omitted the items are\n * appended at the app's top level. Contributed items keep the normal nav\n * gating fields (`requiresObject` / `requiredPermissions` / `visible`), so an\n * uninstalled capability simply contributes nothing and its slot stays empty.\n *\n * @example\n * {\n * app: 'setup',\n * group: 'group_integrations',\n * priority: 100,\n * items: [\n * { id: 'nav_webhooks', type: 'object', label: 'Webhooks', objectName: 'sys_webhook', requiresObject: 'sys_webhook' },\n * ],\n * }\n */\nexport const NavigationContributionSchema = lazySchema(() => z.object({\n app: SnakeCaseIdentifierSchema.describe('Target app name to contribute navigation into (e.g. \"setup\")'),\n group: SnakeCaseIdentifierSchema.optional().describe('Target group nav-item id to append into (e.g. \"group_integrations\"); omit to append at the app top level'),\n priority: z.number().int().min(0).default(200).describe('Merge priority within the target group — lower applied first (matches object extender priority)'),\n items: z.array(NavigationItemSchema).describe('Navigation items contributed into the target app/group'),\n}).describe('A navigation contribution: a package injecting nav items into an app it does not own (ADR-0029 D7)'));\nexport type NavigationContribution = z.infer<typeof NavigationContributionSchema>;\n\n/**\n * App Branding Configuration\n * Allows configuring the look and feel of the specific app.\n */\nexport const AppBrandingSchema = lazySchema(() => z.object({\n primaryColor: z.string().optional().describe('Primary theme color hex code'),\n accentColor: z.string().optional().describe('Accent color hex code (highlights, active states). Declared to match the objectui ConsoleLayout read of branding.accentColor (inverse-drift fix, liveness audit #1878/#1891/#1894).'),\n logo: z.string().optional().describe('Custom logo URL for this app'),\n favicon: z.string().optional().describe('Custom favicon URL for this app'),\n}));\n\n/**\n * Navigation Area Schema\n * \n * A logical grouping (zone/section) of navigation items, similar to Salesforce \"App Areas\"\n * or Dynamics 365 \"Site Map Areas\". Each area represents a business domain (e.g. Sales, Service, Settings)\n * and contains its own independent navigation tree.\n * \n * Areas allow large applications to partition navigation by business function while\n * keeping a single AppSchema definition. The runtime may render areas as top-level tabs,\n * sidebar sections, or a switchable navigation context.\n * \n * @example\n * ```ts\n * const salesArea: NavigationArea = {\n * id: 'area_sales',\n * label: 'Sales',\n * icon: 'briefcase',\n * order: 1,\n * navigation: [\n * { id: 'nav_leads', type: 'object', label: 'Leads', objectName: 'lead' },\n * { id: 'nav_opportunities', type: 'object', label: 'Opportunities', objectName: 'opportunity' },\n * ],\n * };\n * ```\n */\nexport const NavigationAreaSchema = lazySchema(() => z.object({\n /** Unique area identifier */\n id: SnakeCaseIdentifierSchema.describe('Unique area identifier (lowercase snake_case)'),\n\n /** Display label */\n label: I18nLabelSchema.describe('Area display label'),\n\n /** Icon name (Lucide) */\n icon: z.string().optional().describe('Area icon name'),\n\n /** Sort order among areas (lower = first) */\n order: z.number().optional().describe('Sort order among areas (lower = first)'),\n\n /** Area description */\n description: I18nLabelSchema.optional().describe('Area description'),\n\n /** \n * Visibility condition.\n * Formula expression returning boolean.\n */\n visible: ExpressionInputSchema.optional().describe('Visibility predicate (CEL) for this area.'),\n\n /** Permissions required to access this area */\n requiredPermissions: z.array(z.string()).optional().describe('Permissions required to access this area'),\n\n /** Navigation items within this area */\n navigation: z.array(NavigationItemSchema).describe('Navigation items within this area'),\n}));\n\n/**\n * App Context Selector Schema\n *\n * Declares a sidebar-level \"scope\" dropdown (e.g. a Package filter, an\n * Environment switcher, a Locale picker) whose **current value is exposed\n * as a navigation template variable** named after `id`.\n *\n * This is the metadata-driven way to add a control at the top of the\n * navigation that transparently scopes every child navigation item —\n * without wiring the value into each item by hand. The shell:\n * 1. Renders the dropdown (options pulled from `optionsSource.endpoint`).\n * 2. Holds the selected value (persisted per `persist`).\n * 3. Substitutes `{<id>}` into any nav item's `params` / `recordId`\n * exactly like the built-in `{current_user_id}` / `{current_org_id}`\n * variables (see `ObjectNavItem.recordId`).\n *\n * @example Package filter for the Studio workbench\n * ```ts\n * contextSelectors: [{\n * id: 'active_package',\n * label: 'Package',\n * icon: 'package',\n * optionsSource: {\n * endpoint: '/api/v1/packages',\n * valueKey: 'manifest.id',\n * labelKey: 'manifest.name',\n * // Only offer third-party / custom (project-scoped) packages;\n * // hide the platform's own system/cloud kernel packages.\n * filter: [{ key: 'manifest.scope', op: 'nin', value: ['system', 'cloud'] }],\n * },\n * }]\n * // …then in nav items:\n * { id: 'nav_objects', type: 'component', componentRef: 'metadata:resource',\n * params: { type: 'object', package: '{active_package}' } }\n * ```\n */\nexport const AppContextSelectorSchema = lazySchema(() => z.object({\n /**\n * Identifier — also the template-variable name the selected value is\n * exposed under. Reference it in nav items as `{<id>}`\n * (e.g. `id: 'active_package'` → `{active_package}`).\n */\n id: SnakeCaseIdentifierSchema.describe('Selector id; selected value is exposed as the nav template var {<id>}'),\n\n /** Display label for the dropdown. */\n label: I18nLabelSchema.describe('Dropdown label'),\n\n /** Icon name (Lucide). */\n icon: z.string().optional().describe('Icon name'),\n\n /**\n * Where the dropdown options come from. The shell fetches `endpoint`\n * and maps each row to `{ value: row[valueKey], label: row[labelKey] }`.\n * Re-uses existing REST surfaces (e.g. `/api/v1/packages`) so no\n * bespoke option API is required.\n */\n optionsSource: z.object({\n endpoint: z.string().describe('REST endpoint returning the option rows (e.g. /api/v1/packages)'),\n valueKey: z.string().default('id').describe('Row property used as the option value (dotted path allowed, e.g. \"manifest.id\")'),\n labelKey: z.string().default('name').describe('Row property used as the option label (dotted path allowed, e.g. \"manifest.name\")'),\n /**\n * Optional predicates applied to each fetched row before it becomes\n * an option. All predicates must pass (logical AND). Keys are dotted\n * paths so nested fields (e.g. `manifest.scope`) can be reached.\n *\n * This keeps shared REST surfaces (e.g. `/api/v1/packages`) generic\n * while letting an individual selector narrow the list. For example,\n * the Studio package scope hides platform/kernel packages so only\n * `project`-scoped (third-party / custom) packages are selectable —\n * the scope dropdown is a developer affordance, not a place to\n * surface the platform's own internal `system`/`cloud` packages:\n *\n * ```ts\n * filter: [{ key: 'manifest.scope', op: 'nin', value: ['system', 'cloud'] }]\n * ```\n */\n filter: z.array(z.object({\n key: z.string().describe('Dotted path on each row to compare (e.g. \"manifest.scope\")'),\n op: z.enum(['eq', 'ne', 'in', 'nin']).default('eq')\n .describe('Comparison operator: eq | ne | in | nin'),\n value: z.union([z.string(), z.array(z.string())])\n .describe('Comparison value (string for eq/ne, string[] for in/nin)'),\n })).optional().describe('Predicates (AND) each option row must satisfy'),\n }).describe('Option data source'),\n\n /** Whether to prepend an \"All\" option that clears the scope. */\n includeAll: z.boolean().default(true).describe('Prepend an \"All\" option that clears the scope'),\n\n /** Value emitted when \"All\" is selected (empty string = no filter). */\n allValue: z.string().default('').describe('Template value when \"All\" is selected (empty = no filter)'),\n\n /** How the selection is persisted across navigation. */\n persist: z.enum(['query', 'session', 'none']).default('query')\n .describe('Persist selection via URL query, sessionStorage, or not at all'),\n\n /** Where the dropdown is rendered. */\n placement: z.enum(['sidebar_header', 'topbar']).default('sidebar_header')\n .describe('Render location in the app chrome'),\n}));\n\nexport type AppContextSelector = z.infer<typeof AppContextSelectorSchema>;\n\n/**\n * Schema for Applications (Apps).\n * A logical container for business functionality (e.g., \"Sales CRM\", \"HR Portal\").\n * \n * **NAMING CONVENTION:**\n * App names are used in URLs and routing and must be lowercase snake_case.\n * Prefix with 'app_' is recommended for clarity.\n * \n * @example Good app names\n * - 'app_crm'\n * - 'app_finance'\n * - 'app_portal'\n * - 'sales_app'\n * \n * @example Bad app names (will be rejected)\n * - 'CRM' (uppercase)\n * - 'FinanceApp' (mixed case)\n * - 'Sales App' (spaces)\n */\n/**\n * App Configuration Schema\n * Defines a business application container, including its navigation, branding, and permissions.\n * \n * The App is the top-level navigation shell. The `navigation[]` field holds the complete\n * sidebar tree with unlimited nesting depth via `type: 'group'` items. Pages are referenced\n * by name via `type: 'page'` items and defined independently.\n * \n * @example CRM App with nested navigation tree\n * {\n * name: \"crm\",\n * label: \"Sales CRM\",\n * icon: \"briefcase\",\n * navigation: [\n * { type: \"group\", id: \"grp_sales\", label: \"Sales Cloud\", expanded: true, children: [\n * { type: \"page\", id: \"nav_pipeline\", label: \"Pipeline\", pageName: \"page_pipeline\" },\n * { type: \"page\", id: \"nav_accounts\", label: \"Accounts\", pageName: \"page_accounts\" },\n * ]},\n * { type: \"page\", id: \"nav_settings\", label: \"Settings\", pageName: \"admin_settings\" },\n * ]\n * }\n */\nexport const AppSchema = lazySchema(() => z.object({\n /** Machine name (id) */\n name: SnakeCaseIdentifierSchema.describe('App unique machine name (lowercase snake_case)'),\n \n /** Display label */\n label: I18nLabelSchema.describe('App display label'),\n\n /** App version */\n version: z.string().optional().describe('App version'),\n \n /** Description */\n description: I18nLabelSchema.optional().describe('App description'),\n \n /** Icon name (Lucide) */\n icon: z.string().optional().describe('App icon used in the App Launcher'),\n \n /** Branding/Theming Configuration */\n branding: AppBrandingSchema.optional().describe('App-specific branding'),\n \n /** Application status */\n active: z.boolean().optional().default(true).describe('Whether the app is enabled'),\n\n /** Is this the default app for new users? */\n isDefault: z.boolean().optional().default(false).describe('Is default app'),\n\n /**\n * Hide this app from the top-level App Switcher.\n *\n * Hidden apps stay fully routable and permission-checked — they just\n * don't appear in the apps dropdown. The shell is expected to surface\n * them through the avatar / user dropdown instead, so this is the\n * right knob for personal-settings-style apps (\"Account\") that would\n * feel out of place next to business apps (CRM, HR, Setup).\n *\n * Mirrors GitHub Settings / Google account chip / Salesforce\n * \"Personal Settings\" — visible to every user, but reached from the\n * avatar rather than the app launcher.\n */\n hidden: z.boolean().optional()\n .describe('Hide from the App Switcher; the shell surfaces hidden apps via the avatar menu instead'),\n \n /** \n * Full Navigation Tree — supports unlimited nesting depth.\n * Pages are referenced by name via `type: 'page'` items.\n * Groups can contain other groups for arbitrary sidebar depth.\n * \n * For simple apps, use `navigation` directly.\n * For enterprise apps with multiple business domains, use `areas` instead.\n */\n navigation: z.array(NavigationItemSchema).optional()\n .describe('Full navigation tree for the app sidebar'),\n\n /**\n * Navigation Areas — partitions navigation by business domain.\n * Each area defines an independent navigation tree (e.g. Sales, Service, Settings).\n * When areas are defined, they take precedence over the top-level `navigation` array.\n * \n * @example\n * ```ts\n * areas: [\n * { id: 'area_sales', label: 'Sales', icon: 'briefcase', order: 1, navigation: [...] },\n * { id: 'area_service', label: 'Service', icon: 'headset', order: 2, navigation: [...] },\n * ]\n * ```\n */\n areas: z.array(NavigationAreaSchema).optional()\n .describe('Navigation areas for partitioning navigation by business domain'),\n\n /**\n * App-level context selectors — sidebar/topbar \"scope\" dropdowns whose\n * selected value is injected into navigation items as a template\n * variable (`{<id>}`). Use to add a Package / Environment / Locale\n * filter that transparently scopes every child nav item. See\n * {@link AppContextSelectorSchema}.\n */\n contextSelectors: z.array(AppContextSelectorSchema).optional()\n .describe('App-level scope dropdowns whose value is injected into nav items as {<id>} template vars'),\n \n /** \n * App-level Home Page Override\n * ID of the navigation item to act as the landing page.\n * If not set, usually defaults to the first navigation item.\n */\n homePageId: z.string().optional().describe('ID of the navigation item to serve as landing page'),\n\n /** \n * Access Control\n * List of permissions required to access this app.\n * Modern replacement for role/profile based assignment.\n * Example: [\"app.access.crm\"]\n */\n requiredPermissions: z.array(z.string()).optional().describe('Permissions required to access this app'),\n \n /** \n * Package Components (For config file convenience)\n * In a real monorepo these might be auto-discovered, but here we allow explicit registration.\n */\n objects: z.array(z.unknown()).optional().describe('Objects belonging to this app'),\n apis: z.array(z.unknown()).optional().describe('Custom APIs belonging to this app'),\n\n /** Sharing configuration for public access */\n sharing: SharingConfigSchema.optional().describe('Public sharing configuration'),\n\n /** Embed configuration for iframe embedding */\n embed: EmbedConfigSchema.optional().describe('Iframe embedding configuration'),\n\n /** Mobile navigation mode */\n mobileNavigation: z.object({\n mode: z.enum(['drawer', 'bottom_nav', 'hamburger']).default('drawer')\n .describe('Mobile navigation mode: drawer sidebar, bottom navigation bar, or hamburger menu'),\n bottomNavItems: z.array(z.string()).optional()\n .describe('Navigation item IDs to show in bottom nav (max 5)'),\n }).optional().describe('Mobile-specific navigation configuration'),\n\n /**\n * Default AI Copilot for this app.\n *\n * When set, the ambient chat endpoint (`POST /api/v1/ai/chat` with\n * `context.appName`) auto-resolves to this agent without the user\n * having to pick from a list. The agent's `skills[]` are loaded\n * from the SkillRegistry and exposed to the LLM.\n *\n * Mirrors the Salesforce Agentforce / ServiceNow Now Assist pattern\n * where each application surface has one ambient copilot.\n *\n * @example\n * ```ts\n * defineApp({ name: 'crm', defaultAgent: 'sales_copilot', ... })\n * ```\n */\n defaultAgent: SnakeCaseIdentifierSchema.optional()\n .describe('Name of the default AI agent for this app (used by the ambient chat endpoint)'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes for the application'),\n\n /**\n * ADR-0010 §3.7 — Package-level protection envelope. Package\n * authors declare lock policy here; the loader translates it\n * into the private `_lock` envelope at registration time and\n * strips this block before persistence. See\n * `shared/protection.zod.ts`.\n */\n protection: ProtectionSchema.optional().describe(\n 'Package author protection block — lock policy for this app.',\n ),\n\n // ADR-0010 — runtime protection envelope (internal — set by loader).\n ...MetadataProtectionFields,\n}));\n\n/**\n * App Factory Helper\n */\nexport const App = {\n create: (config: z.input<typeof AppSchema>): App => AppSchema.parse(config),\n} as const;\n\n/**\n * Type-safe factory for creating application definitions.\n *\n * Validates the config at creation time using Zod `.parse()`.\n *\n * @example CRM App with nested navigation tree\n * ```ts\n * const crmApp = defineApp({\n * name: 'crm',\n * label: 'Sales CRM',\n * navigation: [\n * { id: 'grp_sales', type: 'group', label: 'Sales Cloud', expanded: true, children: [\n * { id: 'nav_pipeline', type: 'page', label: 'Pipeline', pageName: 'page_pipeline' },\n * { id: 'nav_accounts', type: 'page', label: 'Accounts', pageName: 'page_accounts' },\n * ]},\n * { id: 'nav_settings', type: 'page', label: 'Settings', pageName: 'admin_settings' },\n * ],\n * });\n * ```\n */\nexport function defineApp(config: z.input<typeof AppSchema>): App {\n return AppSchema.parse(config);\n}\n\n// Main Types\nexport type App = z.infer<typeof AppSchema>;\nexport type AppInput = z.input<typeof AppSchema>;\nexport type AppBranding = z.infer<typeof AppBrandingSchema>;\nexport type NavigationItem = z.infer<typeof NavigationItemSchema>;\nexport type NavigationArea = z.infer<typeof NavigationAreaSchema>;\n\n// Discriminated Item Types (Helper exports)\nexport type ObjectNavItem = z.infer<typeof ObjectNavItemSchema>;\nexport type DashboardNavItem = z.infer<typeof DashboardNavItemSchema>;\nexport type PageNavItem = z.infer<typeof PageNavItemSchema>;\nexport type UrlNavItem = z.infer<typeof UrlNavItemSchema>;\nexport type ReportNavItem = z.infer<typeof ReportNavItemSchema>;\nexport type ActionNavItem = z.infer<typeof ActionNavItemSchema>;\nexport type ComponentNavItem = z.infer<typeof ComponentNavItemSchema>;\nexport type GroupNavItem = z.infer<typeof GroupNavItemSchema> & { children: NavigationItem[] };\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { z } from 'zod';\n\n/**\n * # Conditional-visibility predicate normalization (ADR-0089)\n *\n * One concept — *\"show this only when the CEL predicate is TRUE\"* — used to be\n * spelled three different ways depending on the layer:\n *\n * | Layer | Legacy key | Canonical |\n * |:------------------------------|:-------------|:-------------|\n * | Data field / field option | `visibleWhen`| `visibleWhen`|\n * | View form section / field | `visibleOn` | `visibleWhen`|\n * | Page component | `visibility` | `visibleWhen`|\n *\n * ADR-0089 makes **`visibleWhen`** the single canonical key across all layers\n * (aligning with the `readonlyWhen` / `requiredWhen` family and the resolved\n * `conditionalRequired → requiredWhen` precedent). `visibleOn` and `visibility`\n * stay accepted as `@deprecated` aliases and are folded into `visibleWhen`\n * **once, at the schema boundary** (a zod `.transform()`), so no renderer or\n * validator has to re-implement the fallback.\n *\n * The *binding root* is still determined by the layer — runtime record surfaces\n * bind `record` + `current_user`; metadata-editing forms bind `data` — this\n * unifies the *name*, not the environment.\n */\n\n/** Deprecated alias keys folded into the canonical `visibleWhen`. */\nexport const VISIBILITY_ALIAS_KEYS = ['visibleOn', 'visibility'] as const;\n\n/** Object carrying the canonical key and/or its deprecated aliases. */\ntype WithVisibilityAliases = {\n visibleWhen?: unknown;\n visibleOn?: unknown;\n visibility?: unknown;\n};\n\n/**\n * Fold the deprecated `visibleOn` / `visibility` aliases into the canonical\n * `visibleWhen` and drop the aliases from the output (ADR-0089 D2). The\n * canonical key wins when present; otherwise the first defined alias is used.\n *\n * Designed to be used as a zod `.transform()` on any object schema that carries\n * a conditional-visibility predicate:\n *\n * ```ts\n * z.object({ ..., visibleWhen: Expr.optional(), visibleOn: Expr.optional() })\n * .transform(normalizeVisibleWhen)\n * ```\n */\nexport function normalizeVisibleWhen<T extends WithVisibilityAliases>(\n input: T,\n): Omit<T, 'visibleOn' | 'visibility'> {\n const { visibleOn, visibility, ...rest } = input;\n const canonical =\n rest.visibleWhen !== undefined\n ? rest.visibleWhen\n : visibleOn !== undefined\n ? visibleOn\n : visibility;\n\n if (canonical === undefined) {\n // Nothing to fold — strip the (absent) aliases and return as-is.\n return rest as Omit<T, 'visibleOn' | 'visibility'>;\n }\n return { ...rest, visibleWhen: canonical } as Omit<T, 'visibleOn' | 'visibility'>;\n}\n\n/** A key that is (or is a likely mis-spelling of) the visibility predicate. */\nfunction looksLikeVisibilityKey(key: string): boolean {\n return /vis|conceal|hidden|show.?when/i.test(key);\n}\n\n/**\n * Custom zod `error` for the `.strict()` view/page schemas (ADR-0089 D3a).\n *\n * With `.strict()`, a key these schemas do not declare — a stale `visibleOn` past\n * removal, a `visibleWhen` typo, or a wrong-layer paste — is now a **loud parse\n * error** instead of a silent strip (ADR-0049 enforce-or-remove, ADR-0078\n * no-silently-inert). This error map turns that rejection into a *fixable* one: it\n * always names the offending key(s), and when a key looks like the\n * conditional-visibility predicate it points the author at the canonical\n * `visibleWhen`. Every other issue code defers to zod's default (`undefined`).\n *\n * Wire it as the object's `error` alongside `.strict()`:\n *\n * ```ts\n * z.object({ ..., visibleWhen: Expr.optional() }, { error: strictVisibilityError })\n * .strict()\n * .transform(normalizeVisibleWhen)\n * ```\n */\nexport const strictVisibilityError: z.core.$ZodErrorMap = (issue) => {\n if (issue.code !== 'unrecognized_keys') return undefined;\n const keys = (issue as { keys?: readonly string[] }).keys ?? [];\n const list = keys.map((k) => `\\`${k}\\``).join(', ');\n const base =\n `Unrecognized key(s) on this view/page schema: ${list}. ` +\n `Before ADR-0089 D3a these were dropped silently, shipping inert metadata; ` +\n `a mis-layered or stale key is now a loud parse error.`;\n if (keys.some(looksLikeVisibilityKey)) {\n return (\n base +\n ' If this is the conditional-visibility predicate, the canonical key is ' +\n '`visibleWhen` (ADR-0089) — `visibleOn` (view form) and `visibility` (page ' +\n 'component) are still accepted as deprecated aliases.'\n );\n }\n return base;\n};\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * Unified Query DSL Specification\n * \n * Based on industry best practices from:\n * - Prisma ORM\n * - Strapi CMS\n * - TypeORM\n * - LoopBack Framework\n * \n * Version: 1.0.0\n * Status: Draft\n * \n * Objective: Define a JSON-based, database-agnostic query syntax standard\n * for data filtering interactions between frontend and backend APIs.\n * \n * Design Principles:\n * 1. Declarative: Frontend describes \"what data to get\", not \"how to query\"\n * 2. Database Agnostic: Syntax contains no database-specific directives\n * 3. Type Safe: Structure can be statically inferred by TypeScript\n * 4. Convention over Configuration: Implicit syntax for common queries\n */\n\n/**\n * Field Reference\n * Represents a reference to another field/column instead of a literal value.\n * Used for joins (ON clause) and cross-field comparisons.\n * \n * @example\n * // user.id = order.owner_id\n * { \"$eq\": { \"$field\": \"order.owner_id\" } }\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const FieldReferenceSchema = lazySchema(() => z.object({\n $field: z.string().describe('Field Reference/Column Name')\n}));\n\nexport type FieldReference = z.infer<typeof FieldReferenceSchema>;\n\n// ============================================================================\n// 3.1 Comparison Operators\n// ============================================================================\n\n/**\n * Comparison operators for equality and inequality checks.\n * Supported data types: Any\n */\nexport const EqualityOperatorSchema = lazySchema(() => z.object({\n /** Equal to (default) - SQL: = | MongoDB: $eq */\n $eq: z.any().optional(),\n \n /** Not equal to - SQL: <> or != | MongoDB: $ne */\n $ne: z.any().optional(),\n}));\n\n/**\n * Comparison operators for numeric and date comparisons.\n * Supported data types: Number, Date\n */\nexport const ComparisonOperatorSchema = lazySchema(() => z.object({\n /** Greater than - SQL: > | MongoDB: $gt */\n $gt: z.union([z.number(), z.date(), FieldReferenceSchema]).optional(),\n \n /** Greater than or equal to - SQL: >= | MongoDB: $gte */\n $gte: z.union([z.number(), z.date(), FieldReferenceSchema]).optional(),\n \n /** Less than - SQL: < | MongoDB: $lt */\n $lt: z.union([z.number(), z.date(), FieldReferenceSchema]).optional(),\n \n /** Less than or equal to - SQL: <= | MongoDB: $lte */\n $lte: z.union([z.number(), z.date(), FieldReferenceSchema]).optional(),\n}));\n\n// ============================================================================\n// 3.2 Set & Range Operators\n// ============================================================================\n\n/**\n * Set operators for membership checks.\n */\nexport const SetOperatorSchema = lazySchema(() => z.object({\n /** In list - SQL: IN (?, ?, ?) | MongoDB: $in */\n $in: z.array(z.any()).optional(),\n \n /** Not in list - SQL: NOT IN (...) | MongoDB: $nin */\n $nin: z.array(z.any()).optional(),\n}));\n\n/**\n * Range operator for interval checks (closed interval).\n * SQL: BETWEEN ? AND ? | MongoDB: $gte AND $lte\n */\nexport const RangeOperatorSchema = lazySchema(() => z.object({\n /** Between (inclusive) - takes [min, max] array */\n $between: z.tuple([\n z.union([z.number(), z.date(), FieldReferenceSchema]),\n z.union([z.number(), z.date(), FieldReferenceSchema])\n ]).optional(),\n}));\n\n// ============================================================================\n// 3.3 String-Specific Operators\n// ============================================================================\n\n/**\n * String pattern matching operators.\n * Note: Case sensitivity should be handled at backend level.\n */\nexport const StringOperatorSchema = lazySchema(() => z.object({\n /** Contains substring - SQL: LIKE %?% | MongoDB: $regex */\n $contains: z.string().optional(),\n \n /** Does not contain substring - SQL: NOT LIKE %?% | MongoDB: $not: $regex */\n $notContains: z.string().optional(),\n \n /** Starts with prefix - SQL: LIKE ?% | MongoDB: $regex */\n $startsWith: z.string().optional(),\n \n /** Ends with suffix - SQL: LIKE %? | MongoDB: $regex */\n $endsWith: z.string().optional(),\n}));\n\n// ============================================================================\n// 3.5 Special Operators\n// ============================================================================\n\n/**\n * Special check operators for null and existence.\n */\nexport const SpecialOperatorSchema = lazySchema(() => z.object({\n /** Is null check - SQL: IS NULL (true) / IS NOT NULL (false) | MongoDB: field: null */\n $null: z.boolean().optional(),\n \n /** Field exists check (primarily for NoSQL) - MongoDB: $exists */\n $exists: z.boolean().optional(),\n}));\n\n// ============================================================================\n// Combined Field Operators\n// ============================================================================\n\n/**\n * All field-level operators combined.\n * These can be applied to individual fields in a filter.\n */\nexport const FieldOperatorsSchema = lazySchema(() => z.object({\n // Equality\n $eq: z.any().optional(),\n $ne: z.any().optional(),\n \n // Comparison (numeric/date)\n $gt: z.union([z.number(), z.date(), FieldReferenceSchema]).optional(),\n $gte: z.union([z.number(), z.date(), FieldReferenceSchema]).optional(),\n $lt: z.union([z.number(), z.date(), FieldReferenceSchema]).optional(),\n $lte: z.union([z.number(), z.date(), FieldReferenceSchema]).optional(),\n \n // Set & Range\n $in: z.array(z.any()).optional(),\n $nin: z.array(z.any()).optional(),\n $between: z.tuple([\n z.union([z.number(), z.date(), FieldReferenceSchema]),\n z.union([z.number(), z.date(), FieldReferenceSchema])\n ]).optional(),\n \n // String-specific\n $contains: z.string().optional(),\n $notContains: z.string().optional(),\n $startsWith: z.string().optional(),\n $endsWith: z.string().optional(),\n \n // Special\n $null: z.boolean().optional(),\n $exists: z.boolean().optional(),\n}));\n\n// ============================================================================\n// 3.4 Logical Operators & Recursive Filter Structure\n// ============================================================================\n\n/**\n * Recursive filter type that supports:\n * 1. Implicit equality: { field: value }\n * 2. Explicit operators: { field: { $op: value } }\n * 3. Logical combinations: { $and: [...], $or: [...], $not: {...} }\n * 4. Nested relations: { relation: { field: value } }\n */\nexport type FilterCondition = {\n [key: string]: \n | any // Implicit equality: key: value\n | z.infer<typeof FieldOperatorsSchema> // Explicit operators: key: { $op: value }\n | FilterCondition; // Nested relation: key: { nested: ... }\n} & {\n /** Logical AND - combines all conditions that must be true */\n $and?: FilterCondition[];\n \n /** Logical OR - at least one condition must be true */\n $or?: FilterCondition[];\n \n /** Logical NOT - negates the condition */\n $not?: FilterCondition;\n};\n\n/**\n * Zod schema for recursive filter validation.\n * Uses z.lazy() to handle recursive structure.\n */\nexport const FilterConditionSchema: z.ZodType<FilterCondition> = z.lazy(() =>\n z.record(z.string(), z.unknown()).and(\n z.object({\n $and: z.array(FilterConditionSchema).optional(),\n $or: z.array(FilterConditionSchema).optional(),\n $not: FilterConditionSchema.optional(),\n })\n )\n);\n\n// ============================================================================\n// Query Filter Wrapper\n// ============================================================================\n\n/**\n * Top-level query filter wrapper.\n * This is typically used as the \"where\" clause in a query.\n * \n * @example\n * ```typescript\n * const filter: QueryFilter = {\n * where: {\n * status: \"active\", // Implicit equality\n * age: { $gte: 18 }, // Explicit operator\n * $or: [ // Logical combination\n * { role: \"admin\" },\n * { email: { $contains: \"@company.com\" } }\n * ],\n * profile: { // Nested relation\n * verified: true\n * }\n * }\n * }\n * ```\n */\nexport const QueryFilterSchema = lazySchema(() => z.object({\n where: FilterConditionSchema.optional(),\n}));\n\n// ============================================================================\n// TypeScript Type Exports\n// ============================================================================\n\n/**\n * Type-safe filter operators for use in TypeScript.\n * \n * @example\n * ```typescript\n * type UserFilter = Filter<User>;\n * \n * const filter: UserFilter = {\n * age: { $gte: 18 },\n * email: { $contains: \"@example.com\" }\n * };\n * ```\n */\nexport type Filter<T = any> = {\n [K in keyof T]?: \n | T[K] // Implicit equality\n | {\n $eq?: T[K];\n $ne?: T[K];\n $gt?: T[K] extends number | Date ? T[K] : never;\n $gte?: T[K] extends number | Date ? T[K] : never;\n $lt?: T[K] extends number | Date ? T[K] : never;\n $lte?: T[K] extends number | Date ? T[K] : never;\n $in?: T[K][];\n $nin?: T[K][];\n $between?: T[K] extends number | Date ? [T[K], T[K]] : never;\n $contains?: T[K] extends string ? string : never;\n $notContains?: T[K] extends string ? string : never;\n $startsWith?: T[K] extends string ? string : never;\n $endsWith?: T[K] extends string ? string : never;\n $null?: boolean;\n $exists?: boolean;\n }\n | (T[K] extends object ? Filter<T[K]> : never); // Nested relation\n} & {\n $and?: Filter<T>[];\n $or?: Filter<T>[];\n $not?: Filter<T>;\n};\n\n/**\n * Scalar types supported by the filter system.\n */\nexport type Scalar = string | number | boolean | Date | null;\n\n// Export inferred types\nexport type FieldOperators = z.infer<typeof FieldOperatorsSchema>;\nexport type QueryFilter = z.infer<typeof QueryFilterSchema>;\n\n// ============================================================================\n// Normalization Utilities (Internal Representation)\n// ============================================================================\n\n/**\n * Normalized filter AST structure.\n * This is the internal representation after converting all syntactic sugar\n * to explicit operators.\n * \n * Stage 1: Normalization Pass\n * Input: { age: 18, role: \"admin\" }\n * Output: { $and: [{ age: { $eq: 18 } }, { role: { $eq: \"admin\" } }] }\n * \n * This simplifies adapter implementation by providing a consistent structure.\n */\nexport const NormalizedFilterSchema: z.ZodType<any> = z.lazy(() => \n z.object({\n $and: z.array(\n z.union([\n // Field condition: { field: { $op: value } }\n z.record(z.string(), FieldOperatorsSchema),\n // Nested logical group\n NormalizedFilterSchema,\n ])\n ).optional(),\n \n $or: z.array(\n z.union([\n z.record(z.string(), FieldOperatorsSchema),\n NormalizedFilterSchema,\n ])\n ).optional(),\n \n $not: z.union([\n z.record(z.string(), FieldOperatorsSchema),\n NormalizedFilterSchema,\n ]).optional(),\n })\n);\n\nexport type NormalizedFilter = z.infer<typeof NormalizedFilterSchema>;\n\n// ============================================================================\n// AST Array Format Detection & Validation\n// ============================================================================\n\n/**\n * Set of valid AST comparison operators (case-insensitive).\n * Used by `isFilterAST()` to validate AST structure beyond `Array.isArray`.\n */\nexport const VALID_AST_OPERATORS = new Set([\n '=', '==', '!=', '<>', '>', '>=', '<', '<=',\n 'in', 'nin', 'not_in',\n 'contains', 'notcontains', 'not_contains', 'like',\n 'startswith', 'starts_with',\n 'endswith', 'ends_with',\n 'between',\n // Null / empty predicates. `is_null` / `is_not_null` are canonical; `isnull`,\n // `isnotnull`, `is_empty`, `is_not_empty` are the alias spellings the ObjectUI\n // `data-objectstack` adapter emits and the driver-sql/#2704 fix accepts — kept\n // in sync here so `parseFilterAST()` never treats them as an unknown operator.\n 'is_null', 'is_not_null',\n 'isnull', 'isnotnull', 'is_empty', 'is_not_empty',\n]);\n\n/**\n * Detect whether a value is a valid Filter AST array structure.\n *\n * A valid AST is one of:\n * - Comparison node: `[field: string, operator: string, value: unknown]` where operator is a known operator\n * - Logical node: `[\"and\" | \"or\", ...children]` where children are valid AST nodes\n * - Legacy flat array: `[[cond], [cond], ...]` where all elements are sub-arrays (each a valid AST node)\n *\n * This replaces the naïve `Array.isArray(filter)` check, preventing accidental\n * misidentification of arbitrary arrays as filter ASTs.\n *\n * @example\n * isFilterAST([\"status\", \"=\", \"active\"]) // true\n * isFilterAST([\"and\", [\"a\", \"=\", 1], [\"b\", \">\", 2]]) // true\n * isFilterAST([[\"a\", \"=\", 1], [\"b\", \"=\", 2]]) // true (legacy)\n * isFilterAST([1, 2, 3]) // false\n * isFilterAST(\"not an array\") // false\n * isFilterAST({ status: \"active\" }) // false\n */\nexport function isFilterAST(filter: unknown): boolean {\n if (!Array.isArray(filter) || filter.length === 0) return false;\n\n const first = filter[0];\n\n // Logical node: [\"and\", ...] or [\"or\", ...]\n if (typeof first === 'string') {\n const lower = first.toLowerCase();\n if (lower === 'and' || lower === 'or') {\n return filter.length >= 2 && filter.slice(1).every((child: unknown) => isFilterAST(child));\n }\n\n // Comparison node: [field, operator, value]\n if (filter.length >= 2 && typeof filter[1] === 'string') {\n return VALID_AST_OPERATORS.has(filter[1].toLowerCase());\n }\n }\n\n // Legacy flat array: [[cond], [cond], ...]\n if (filter.every((item: unknown) => isFilterAST(item))) {\n return filter.length > 0;\n }\n\n return false;\n}\n\n// ============================================================================\n// AST Array → FilterCondition Conversion\n// ============================================================================\n\n/**\n * Operator mapping from AST infix operators to FilterCondition `$`-prefixed operators.\n */\nconst AST_OPERATOR_MAP: Record<string, string> = {\n '=': '$eq',\n '==': '$eq',\n '!=': '$ne',\n '<>': '$ne',\n '>': '$gt',\n '>=': '$gte',\n '<': '$lt',\n '<=': '$lte',\n 'in': '$in',\n 'nin': '$nin',\n 'not_in': '$nin',\n 'contains': '$contains',\n 'notcontains': '$notContains',\n 'not_contains': '$notContains',\n 'like': '$contains',\n 'startswith': '$startsWith',\n 'starts_with': '$startsWith',\n 'endswith': '$endsWith',\n 'ends_with': '$endsWith',\n 'between': '$between',\n 'is_null': '$null',\n 'is_not_null': '$null',\n 'isnull': '$null',\n 'isnotnull': '$null',\n 'is_empty': '$null',\n 'is_not_empty': '$null',\n};\n\n/**\n * Convert a single AST comparison node `[field, operator, value]` to a FilterCondition object.\n */\nfunction convertComparison(node: [string, string, unknown]): FilterCondition {\n const [field, operator, value] = node;\n const op = operator.toLowerCase();\n\n // Special case: equality shorthand\n if (op === '=' || op === '==') {\n return { [field]: value } as FilterCondition;\n }\n\n // Null / empty predicates — direction comes from the operator NAME, not the\n // (filler) value: the ObjectUI client sends a truthy placeholder value for\n // both `isnull` and `isnotnull`, so keying off `value` would collapse them.\n if (op === 'is_null' || op === 'isnull' || op === 'is_empty') {\n return { [field]: { $null: true } } as FilterCondition;\n }\n if (op === 'is_not_null' || op === 'isnotnull' || op === 'is_not_empty') {\n return { [field]: { $null: false } } as FilterCondition;\n }\n\n const mapped = AST_OPERATOR_MAP[op];\n if (mapped) {\n return { [field]: { [mapped]: value } } as FilterCondition;\n }\n\n // Fallback: use the operator as-is with $ prefix\n return { [field]: { [`$${op}`]: value } } as FilterCondition;\n}\n\n/**\n * Parse a filter from AST array format to FilterCondition object format.\n *\n * The AST array format is used by the ObjectUI client and the `FilterBuilder`:\n * - Comparison: `[field, operator, value]` → `{ field: value }` or `{ field: { $op: value } }`\n * - Logical AND: `[\"and\", cond1, cond2, ...]` → `{ $and: [...] }`\n * - Logical OR: `[\"or\", cond1, cond2, ...]` → `{ $or: [...] }`\n *\n * If the input is already a FilterCondition object (not an array), it is returned as-is.\n * If the input is `null` or `undefined`, it is returned as-is.\n *\n * @example\n * // Simple condition\n * parseFilterAST([\"status\", \"=\", \"active\"])\n * // → { status: \"active\" }\n *\n * @example\n * // Compound AND\n * parseFilterAST([\"and\", [\"priority\", \"=\", \"high\"], [\"status\", \"=\", \"active\"]])\n * // → { $and: [{ priority: \"high\" }, { status: \"active\" }] }\n *\n * @example\n * // Object passthrough\n * parseFilterAST({ status: \"active\" })\n * // → { status: \"active\" }\n */\nexport function parseFilterAST(filter: unknown): FilterCondition | undefined {\n if (filter == null) return undefined;\n if (!Array.isArray(filter)) return filter as FilterCondition;\n if (filter.length === 0) return undefined;\n\n const first = filter[0];\n\n // Logical node: [\"and\", cond1, cond2, ...] or [\"or\", cond1, cond2, ...]\n if (typeof first === 'string' && (first.toLowerCase() === 'and' || first.toLowerCase() === 'or')) {\n const logicOp = `$${first.toLowerCase()}` as '$and' | '$or';\n const children = filter.slice(1).map((child: unknown) => parseFilterAST(child)).filter(Boolean) as FilterCondition[];\n if (children.length === 0) return undefined;\n if (children.length === 1) return children[0];\n return { [logicOp]: children } as FilterCondition;\n }\n\n // Comparison node: [field, operator, value]\n if (filter.length >= 2 && typeof first === 'string') {\n return convertComparison(filter as [string, string, unknown]);\n }\n\n // Legacy flat array: [[field, op, val], [field, op, val], ...]\n // All elements are sub-arrays → treat as implicit AND\n if (filter.every((item: unknown) => Array.isArray(item))) {\n const children = filter.map((child: unknown) => parseFilterAST(child)).filter(Boolean) as FilterCondition[];\n if (children.length === 0) return undefined;\n if (children.length === 1) return children[0];\n return { $and: children } as FilterCondition;\n }\n\n return undefined;\n}\n\n// ============================================================================\n// Constants & Metadata\n// ============================================================================\n\n/**\n * All supported operator keys.\n * Useful for validation and parsing.\n */\nexport const FILTER_OPERATORS = [\n // Equality\n '$eq', '$ne',\n // Comparison\n '$gt', '$gte', '$lt', '$lte',\n // Set & Range\n '$in', '$nin', '$between',\n // String\n '$contains', '$notContains', '$startsWith', '$endsWith',\n // Special\n '$null', '$exists',\n] as const;\n\n/**\n * Logical operator keys.\n */\nexport const LOGICAL_OPERATORS = ['$and', '$or', '$not'] as const;\n\n/**\n * All operator keys (field + logical).\n */\nexport const ALL_OPERATORS = [...FILTER_OPERATORS, ...LOGICAL_OPERATORS] as const;\n\nexport type FilterOperatorKey = typeof FILTER_OPERATORS[number];\nexport type LogicalOperatorKey = typeof LOGICAL_OPERATORS[number];\nexport type OperatorKey = typeof ALL_OPERATORS[number];\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { SystemIdentifierSchema } from '../shared/identifiers.zod';\nimport { ExpressionInputSchema } from '../shared/expression.zod';\nimport { FilterConditionSchema } from './filter.zod';\n\n/**\n * Field Type Enum\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const FieldType = z.enum([\n // Core Text. 'password' on a generic (non-better-auth) object is plaintext at\n // rest but masked to SECRET_MASK on read — the auth subsystem's one-way\n // hashing applies only to its own identity tables, never to an authored\n // 'password' field. Prefer 'secret' for reversible machine credentials. See\n // ADR-0100.\n 'text', 'textarea', 'email', 'url', 'phone', 'password',\n // Secret — reversible, encrypted-at-rest value (DB password, API key, token).\n // UNLIKE 'password' (masked-on-read but plaintext at rest, or one-way hashed\n // inside the auth subsystem), a 'secret' is round-tripped: the engine encrypts\n // it on write via the registered ICryptoProvider, stores the ciphertext handle\n // in `sys_secret`, persists only an opaque ref on the row, and masks it on\n // read. Fail-closed: no provider ⇒ writes throw rather than persist cleartext.\n // See ADR-0100.\n 'secret',\n // Rich Content\n 'markdown', 'html', 'richtext',\n // Numbers\n 'number', 'currency', 'percent', \n // Date & Time\n 'date', 'datetime', 'time',\n // Logic\n 'boolean', 'toggle', // Toggle is a distinct UI from checkbox\n // Selection\n 'select', // Single select dropdown\n 'multiselect', // Multi select (often tags)\n 'radio', // Radio group\n 'checkboxes', // Checkbox group\n // Relational\n 'lookup', 'master_detail', // Dynamic reference\n 'tree', // Hierarchical reference\n // User reference — a lookup specialized to the `sys_user` system object (person\n // picker; single, or multiple for collaborators/watchers). Stored IDENTICALLY to\n // 'lookup' (FK string column → sys_user.id; `multiple` ⇒ JSON) and resolved via the\n // same $expand machinery. The distinct type exists for modelling discoverability\n // (Studio/AI field palette), the user-search picker, and `current_user` defaults —\n // NOT a separate storage primitive. Ownership stays the existing `owner_id`\n // convention (plugin-security); a declarative `owner` is a possible future flag.\n 'user',\n // Media\n 'image', 'file', 'avatar', 'video', 'audio',\n // Calculated / System\n 'formula', 'summary', 'autonumber',\n // Embedded structured values (stored as JSON on the parent row — no separate table / FK)\n 'composite', // Single embedded sub-object with declared sub-fields (≈ Strapi component / ACF group)\n 'repeater', // Repeating embedded sub-object array with declared sub-fields (≈ Strapi repeatable component / ACF repeater)\n 'record', // Name-keyed map of embedded sub-objects (Record<string, SubObject>). Insertion order = display order. Used for collections where each item has a stable machine name (e.g. object.fields). See ADR-0007.\n // Enhanced Types\n 'location', // GPS coordinates\n 'address', // Structured address\n 'code', // Code editor (JSON/SQL/JS)\n 'json', // Structured JSON data (untyped escape hatch)\n 'color', // Color picker\n 'rating', // Star rating\n 'slider', // Numeric slider\n 'signature', // Digital signature\n 'qrcode', // QR code / Barcode\n 'progress', // Progress bar\n 'tags', // Simple tag list\n // AI/ML Types\n 'vector', // Vector embeddings for AI/ML (semantic search, RAG)\n]);\n\nexport type FieldType = z.infer<typeof FieldType>;\n\n/**\n * Select Option Schema\n * \n * Defines option values for select/picklist fields.\n * \n * **CRITICAL RULE**: The `value` field is a machine identifier that gets stored in the database.\n * It MUST be lowercase to avoid case-sensitivity issues in queries and comparisons.\n * \n * @example Good\n * { label: 'New', value: 'new' }\n * { label: 'In Progress', value: 'in_progress' }\n * { label: 'Closed Won', value: 'closed_won' }\n * \n * @example Bad (will be rejected)\n * { label: 'New', value: 'New' } // uppercase\n * { label: 'In Progress', value: 'In Progress' } // spaces and uppercase\n * { label: 'Closed Won', value: 'Closed_Won' } // mixed case\n */\nexport const SelectOptionSchema = lazySchema(() => z.object({\n label: z.string().describe('Display label (human-readable, any case allowed)'),\n value: SystemIdentifierSchema.describe('Stored value (lowercase machine identifier)'),\n color: z.string().optional().describe('Color code for badges/charts'),\n default: z.boolean().optional().describe('Is default option'),\n /**\n * Per-option visibility predicate (CEL) — the option is offered only when this\n * evaluates TRUE. Omit = always available. Evaluated against the SAME binding\n * environment as field-level `visibleWhen` (live `record` + `current_user`), so\n * it expresses BOTH cascading/dependent options (`record.country == 'cn'`) AND\n * role/context gating (`'admin' in current_user.positions`). When it references\n * sibling fields, declare those on the field's `dependsOn` so the form can gate\n * and re-evaluate the option list as the parent changes.\n *\n * ⚠️ Client-side hiding is UX, not authorization. When an option is gated for\n * access-control reasons the server MUST also reject writes of its value (the\n * rule-validator evaluates the picked value's `visibleWhen`) — hiding it in the\n * dropdown alone is bypassable.\n */\n visibleWhen: ExpressionInputSchema.optional().describe(\"Per-option visibility predicate (CEL) — option is offered only when TRUE (else omitted). Same env as field visibleWhen (record + current_user). e.g. P`record.country == 'cn'` or P`'admin' in current_user.positions`\"),\n}));\n\n/**\n * Location Coordinates Schema\n * GPS coordinates for location field type\n */\nexport const LocationCoordinatesSchema = lazySchema(() => z.object({\n latitude: z.number().min(-90).max(90).describe('Latitude coordinate'),\n longitude: z.number().min(-180).max(180).describe('Longitude coordinate'),\n altitude: z.number().optional().describe('Altitude in meters'),\n accuracy: z.number().optional().describe('Accuracy in meters'),\n}));\n\n/**\n * Currency Configuration Schema\n * Configuration for currency field type supporting multi-currency\n * \n * Note: Currency codes are validated by length only (3 characters) to support:\n * - Standard ISO 4217 codes (USD, EUR, CNY, etc.)\n * - Cryptocurrency codes (BTC, ETH, etc.)\n * - Custom business-specific codes\n * Stricter validation can be implemented at the application layer based on business requirements.\n */\nexport const CurrencyConfigSchema = lazySchema(() => z.object({\n precision: z.number().int().min(0).max(10).default(2).describe('Decimal precision (default: 2)'),\n currencyMode: z.enum(['dynamic', 'fixed']).default('dynamic').describe('Currency mode: dynamic (user selectable) or fixed (single currency)'),\n defaultCurrency: z.string().length(3).default('CNY').describe('Default or fixed currency code (ISO 4217, e.g., USD, CNY, EUR)'),\n}));\n\n/**\n * Currency Value Schema\n * Runtime value structure for currency fields\n * \n * Note: Currency codes are validated by length only (3 characters) to support flexibility.\n * See CurrencyConfigSchema for details on currency code validation strategy.\n */\nexport const CurrencyValueSchema = lazySchema(() => z.object({\n value: z.number().describe('Monetary amount'),\n currency: z.string().length(3).describe('Currency code (ISO 4217)'),\n}));\n\n/**\n * Address Schema\n * Structured address for address field type\n */\nexport const AddressSchema = lazySchema(() => z.object({\n street: z.string().optional().describe('Street address'),\n city: z.string().optional().describe('City name'),\n state: z.string().optional().describe('State/Province'),\n postalCode: z.string().optional().describe('Postal/ZIP code'),\n country: z.string().optional().describe('Country name or code'),\n countryCode: z.string().optional().describe('ISO country code (e.g., US, GB)'),\n formatted: z.string().optional().describe('Formatted address string'),\n}));\n\n/**\n * Data Quality Rules Schema\n * Defines data quality validation and monitoring for fields\n * \n * @example Unique SSN field with completeness requirement\n * {\n * uniqueness: true,\n * completeness: 0.95, // 95% of records must have this field\n * accuracy: {\n * source: 'government_db',\n * threshold: 0.98\n * }\n * }\n */\nexport const DataQualityRulesSchema = lazySchema(() => z.object({\n /** Enforce uniqueness constraint */\n uniqueness: z.boolean().default(false).describe('Enforce unique values across all records'),\n \n /** Completeness ratio (0-1) indicating minimum percentage of non-null values */\n completeness: z.number().min(0).max(1).default(0).describe('Minimum ratio of non-null values (0-1, default: 0 = no requirement)'),\n \n /** Accuracy validation against authoritative source */\n accuracy: z.object({\n source: z.string().describe('Reference data source for validation (e.g., \"api.verify.com\", \"master_data\")'),\n threshold: z.number().min(0).max(1).describe('Minimum accuracy threshold (0-1, e.g., 0.95 = 95% match required)'),\n }).optional().describe('Accuracy validation configuration'),\n}));\n\n/**\n * Computed Field Caching Schema\n * Configuration for caching computed/formula field results\n * \n * @example Cache product price with 1-hour TTL, invalidate on inventory changes\n * {\n * enabled: true,\n * ttl: 3600,\n * invalidateOn: ['inventory.quantity', 'pricing.discount']\n * }\n */\nexport const ComputedFieldCacheSchema = lazySchema(() => z.object({\n /** Enable caching for this computed field */\n enabled: z.boolean().describe('Enable caching for computed field results'),\n \n /** Time-to-live in seconds */\n ttl: z.number().min(0).describe('Cache TTL in seconds (0 = no expiration)'),\n \n /** Array of field paths that trigger cache invalidation when changed */\n invalidateOn: z.array(z.string()).describe('Field paths that invalidate cache (e.g., [\"inventory.quantity\", \"pricing.base_price\"])'),\n}));\n\n/**\n * Field Schema - Best Practice Enterprise Pattern\n */\n/**\n * Field Definition Schema\n * Defines the properties, type, and behavior of a single field (column) on an object.\n * \n * @example Lookup Field\n * {\n * name: \"account_id\",\n * label: \"Account\",\n * type: \"lookup\",\n * reference: \"accounts\",\n * required: true\n * }\n * \n * @example Select Field\n * {\n * name: \"status\",\n * label: \"Status\",\n * type: \"select\",\n * options: [\n * { label: \"Open\", value: \"open\" },\n * { label: \"Closed\", value: \"closed\" }\n * ],\n * defaultValue: \"open\"\n * }\n */\nexport const FieldSchema = lazySchema(() => z.object({\n /** Identity */\n name: z.string().regex(/^[a-z_][a-z0-9_]*$/).describe('Machine name (snake_case)').optional(),\n label: z.string().optional().describe('Human readable label'),\n type: FieldType.describe('Field Data Type'),\n description: z.string().optional().describe('Tooltip/Help text'),\n format: z.string().optional().describe('Format string (e.g. email, phone)'),\n\n // `columnName` removed in the 16.x line (#2377, ADR-0049): the SQL driver\n // hardcodes the physical column = field key (createColumn never reads it), so\n // a custom column name was silently ignored. External/federated objects map\n // physical columns via `external.columnMap` (ADR-0062 D7 / ADR-0015).\n\n /** Database Constraints */\n required: z.boolean().default(false).describe('Is required'),\n searchable: z.boolean().default(false).describe('Is searchable'),\n multiple: z.boolean().default(false).describe('Allow multiple values (Stores as Array/JSON). Applicable for select, lookup, file, image.'),\n unique: z.boolean().default(false).describe('Is unique constraint'),\n defaultValue: z.unknown().optional().describe('Default value'),\n \n /** Text/String Constraints */\n maxLength: z.number().optional().describe('Max character length'),\n minLength: z.number().optional().describe('Min character length'),\n \n /** Number Constraints */\n precision: z.number().optional().describe('Total digits'),\n scale: z.number().optional().describe('Decimal places'),\n min: z.number().optional().describe('Minimum value'),\n max: z.number().optional().describe('Maximum value'),\n\n /** Selection Options */\n options: z.array(SelectOptionSchema).optional().describe('Static options for select/multiselect'),\n\n /**\n * Relationship Config\n * \n * Used by `lookup` and `master_detail` field types to define cross-object references.\n * The `reference` property is **required** for these types — it identifies the target\n * object whose records this field links to. The engine uses `reference` during $expand\n * post-processing to resolve foreign key IDs into full related objects via batch queries.\n * \n * For `master_detail` fields, the parent record controls the lifecycle of child records\n * (e.g., cascade delete). For `lookup` fields, the reference is a soft link.\n */\n reference: z.string().optional().describe(\n 'Target object name (snake_case) for lookup/master_detail fields. '\n + 'Required for relationship types. Used by $expand to resolve foreign key IDs into full objects.'\n ),\n // `referenceFilters` (string[]) removed in the 16.x line (#2377, ADR-0049):\n // the lookup picker reads the structured `lookupFilters` ({field,operator,value}),\n // never this string[] form — as authored it filtered nothing. Use `lookupFilters`.\n deleteBehavior: z.enum(['set_null', 'cascade', 'restrict']).optional().default('set_null').describe('What happens if referenced record is deleted'),\n /**\n * Master-detail INLINE EDITING. On a child's `master_detail`/`lookup` field\n * (whose `reference` is the parent object), declare that \"this child is\n * entered/edited inline within the parent's form\". The parent's standard\n * create/edit form then renders the children and saves parent + children in\n * ONE atomic transaction — no form view config and no bespoke page. The intent\n * lives here in the data model; forms derive the UI.\n *\n * The value also selects the EDITING FORM FACTOR:\n * - `true` → auto: the UI picks `grid` or `form` from the child's shape\n * (rich types / many fields → `form`, else `grid`).\n * - `'grid'` → an editable line-item grid (fast bulk entry; thin children\n * like invoice lines / order items).\n * - `'form'` → a compact read-only list; \"Add\" / per-row edit opens the\n * child's FULL form (fat children with rich types, e.g. long\n * text, attachments, many fields).\n * Use for true line-item/composition children; leave off for associations\n * (comments, attachments) — surface those as detail-page related lists.\n */\n inlineEdit: z.union([z.boolean(), z.enum(['grid', 'form'])]).optional().describe('Edit these child records inline within the parent\\'s form (atomic master-detail). true = auto-pick grid/form by child shape; \\'grid\\' = editable line-item grid; \\'form\\' = list + per-row full form.'),\n /** Optional section title for the inline grid (defaults to the child object label). */\n inlineTitle: z.string().optional().describe('Title for the inline master-detail grid'),\n /** Optional explicit grid columns for the inline editor (derived from the child object when omitted). */\n inlineColumns: z.array(z.any()).optional().describe('Explicit columns for the inline grid (derived from the child object when omitted)'),\n /** Optional numeric child field summed for the inline grid running total. */\n inlineAmountField: z.string().optional().describe('Numeric child field summed for the inline grid total'),\n\n /**\n * Detail-page RELATED LIST — the read-side mirror of `inlineEdit`. On a\n * child's `master_detail`/`lookup` field (whose `reference` is the parent),\n * this governs whether/how the child collection appears as a related list on\n * the parent's record DETAIL page. Owned children (`master_detail`) and\n * `lookup` children are shown by default (derived from the relationship);\n * set `relatedList: false` to suppress a child from the detail page (e.g.\n * noisy audit/association links you don't want surfaced). Where `inlineEdit`\n * pulls a child INTO the parent's entry form (write side), `relatedList`\n * controls its appearance on the parent's detail page (read side). The intent\n * lives here in the data model; the detail page derives the UI.\n *\n * Tri-state (ADR-0085 semantic-role style — this is a PROMINENCE hint, NOT a\n * layout switch):\n * - `false` → suppress this child from the parent's detail page.\n * - `true` / absent → shown; stacks with the other non-primary children\n * under a single shared \"Related\" tab. Only `'primary'`\n * earns its own tab — there is no count-based auto-split.\n * - `'primary'` → CORE relationship: always surfaced prominently. The\n * detail renderer promotes it to its own tab regardless\n * of child count. This states business intent (true\n * across every surface — detail tab, mobile card, AI\n * summary, search facet); \"primary → own tab\" is only\n * the DETAIL renderer's interpretation. Being prominence\n * (not a `relatedLayout` switch) is what admits it to the\n * object model under ADR-0085's admission test.\n */\n relatedList: z.union([z.boolean(), z.literal('primary')]).optional().describe('Show this child collection as a related list on the parent\\'s detail page (read-side mirror of inlineEdit). false = suppress; true/absent = shown (stacked under the shared \"Related\" tab); \\'primary\\' = core relationship, promoted to its own tab. Prominence intent, not a layout switch (ADR-0085).'),\n /** Optional section title for the detail-page related list (defaults to the child object label). */\n relatedListTitle: z.string().optional().describe('Title for the detail-page related list'),\n /** Optional explicit columns for the detail-page related list (derived from the child object when omitted). */\n relatedListColumns: z.array(z.any()).optional().describe('Explicit columns for the detail-page related list (derived from the child object when omitted)'),\n\n /**\n * LOOKUP PICKER (forward) config — how THIS lookup/master_detail field's\n * record picker presents and scopes candidate records when the user selects a\n * related record. Read-side mirror is relatedList* (the PARENT's detail-page\n * list of children); these configure the CHILD-side picker that chooses the\n * parent. All optional: the renderer auto-derives a sensible multi-column\n * result from the referenced object's schema when omitted (objectui\n * packages/fields: LookupField / RecordPickerDialog / deriveLookupColumns,\n * which read both these camelCase keys and their snake_case aliases).\n */\n displayField: z.string().optional().describe(\"Field shown as each candidate's label in the picker/popover (defaults to the referenced object's name/title).\"),\n descriptionField: z.string().optional().describe('Secondary field shown under the label in the quick-select popover.'),\n lookupColumns: z.array(z.union([z.string(), z.object({\n field: z.string(),\n label: z.string().optional(),\n width: z.string().optional(),\n type: z.string().optional(),\n })])).optional().describe('Explicit columns for the record-picker table; auto-derived from the referenced object when omitted.'),\n lookupPageSize: z.number().int().positive().optional().describe('Rows per page in the record-picker dialog (default 10).'),\n lookupFilters: z.array(z.object({\n field: z.string(),\n operator: z.enum(['eq', 'ne', 'gt', 'lt', 'gte', 'lte', 'contains', 'in', 'notIn']),\n value: z.any(),\n })).optional().describe('Base filters restricting which records are selectable (e.g. only active). The structured, picker-honoured lookup filter.'),\n dependsOn: z.array(z.union([z.string(), z.object({\n field: z.string(),\n param: z.string().optional(),\n })])).optional().describe(\"Declares that this field's available values depend on the value of other field(s) on the same record — the form gates the field until they are set and re-evaluates as they change. For `lookup`/`master_detail` it scopes the candidate query (string = same local/remote key; {field,param} when the remote filter key differs — the {field,param} form is lookup-only). For `select`/`multiselect`/`radio` the actual per-option rule lives in each option's `visibleWhen`; list the referenced fields here (string form) so the option list gates and refreshes with the parent.\"),\n allowCreate: z.boolean().optional().describe('Allow inline quick-create from the record picker: when no match exists the user can create a record from the typed text (optimistic dataSource.create with the display field). Best for simple objects whose only required field is the display field.'),\n\n /** Calculation — CEL formula. Plain string accepted for back-compat; build emits canonical envelope. */\n expression: ExpressionInputSchema.optional().describe('Formula expression (CEL). e.g. F`record.amount * 0.1`'),\n /**\n * The value type a `formula` field computes, declared at authoring (the way\n * Salesforce/Airtable carry a formula's result type). Lets consumers — dataset\n * measures, display formatting, validation — read a declared type instead of\n * re-parsing the expression. Authoring stamps it from the inferred CEL type;\n * absent when the type can't be proven (an ambiguous/`dyn` expression).\n */\n returnType: z.enum(['number', 'text', 'boolean', 'date']).optional()\n .describe('Inferred value type of a formula field (number/text/boolean/date)'),\n summaryOperations: z.object({\n object: z.string().describe('Source child object name for roll-up'),\n field: z.string().describe('Field on child object to aggregate (ignored for count)'),\n function: z.enum(['count', 'sum', 'min', 'max', 'avg']).describe('Aggregation function to apply'),\n relationshipField: z.string().optional().describe('FK field on the child pointing back to this parent. Auto-detected from the child\\'s lookup/master_detail field referencing this object when omitted; set explicitly only when the child has more than one such reference.'),\n /**\n * Optional predicate that restricts WHICH child rows are aggregated — a\n * FilterCondition (the same object DSL as a query `where`), evaluated against\n * each child row. Omit to aggregate every child. This is what lets several\n * summaries roll up the SAME child object into different totals — e.g.\n * `content_publication.total_signups` = count of engagement rows where\n * `{ type: 'signup' }` vs `total_clicks` where `{ type: 'click' }`, or\n * `procurement_order.received_amount` = sum of receipt lines where\n * `{ status: 'received' }`. The engine ANDs it with the parent-FK match, so\n * a child moving in or out of the predicate (a status change) recomputes the\n * parent on its next write like any other child update.\n */\n filter: FilterConditionSchema.optional().describe(\"Predicate restricting which child rows are aggregated (a query `where` FilterCondition, e.g. { status: 'received' } or { type: { $in: ['signup','trial'] } }). Omit to aggregate all children. Lets one child object feed multiple filtered roll-ups.\"),\n }).optional().describe('Roll-up summary definition. The engine recomputes the value when child records are inserted/updated/deleted.'),\n\n /** Enhanced Field Type Configurations */\n // Pruned 2026-06 — per-type *display* knobs that were dead in both layers (no\n // runtime reader; renderers ignore them). See\n // docs/audits/2026-06-dead-surface-disposition-plan.md (P2 field prune): code\n // theme/lineNumbers, rating allowHalf, location displayMap/allowGeocoding, address\n // addressFormat, color colorFormat/allowAlpha/presetColors, slider showValue/marks,\n // barcode/qr barcodeFormat/qrErrorCorrection/displayValue/allowScanning.\n language: z.string().optional().describe('Programming language for syntax highlighting (e.g., javascript, python, sql)'),\n step: z.number().optional().describe('Step increment for slider (default: 1)'),\n\n // Currency field config\n currencyConfig: CurrencyConfigSchema.optional().describe('Configuration for currency field type'),\n\n // Vector field — flat dimensionality (the live authoring path).\n // The renderer reads this flat sibling (objectui VectorField.tsx:11).\n dimensions: z.number().int().min(1).max(10000).optional().describe('Vector dimensionality (e.g., 1536 for OpenAI embeddings)'),\n\n /**\n * Track this field's value changes on the record **activity timeline**. When\n * TRUE, the platform's activity writer renders each change as a human-readable\n * entry (\"<label>: <old> → <new>\") instead of a generic \"Updated <object>\"\n * row — no app code required. Opt-in per field (cf. Salesforce Feed Tracking,\n * ServiceNow field auditing, Dataverse column auditing). The writer already\n * captures the field diff; this flag controls whether it is surfaced legibly.\n *\n * Unlike the pruned `auditTrail` below, this flag HAS a runtime consumer\n * (`@objectstack/plugin-audit` audit-writers), satisfying enforce-or-remove\n * (ADR-0049). See ADR-0052 §5b.\n */\n trackHistory: z.boolean().optional().describe(\"Render this field's value changes as human-readable entries on the record activity timeline (ADR-0052 §5b). Opt-in per field.\"),\n\n // Pruned 2026-06 (dead in both layers — aspirational governance with no runtime\n // consumer; encryption/masking implied at-rest protection that never happened —\n // the real channel is type:'secret'). See\n // docs/audits/2026-06-dead-surface-disposition-plan.md (P0/P2 field prune):\n // encryptionConfig, maskingRule, auditTrail, cached, dataQuality.\n\n /** Layout & Grouping */\n group: z.string().optional().describe('Field group name for organizing fields in forms and layouts (e.g., \"contact_info\", \"billing\", \"system\")'),\n\n /**\n * Conditional field rules (CEL predicates over `record`). Evaluated on BOTH\n * sides: the client form toggles the field's visibility / read-only / required\n * state live as the record changes (UX), and the server enforces\n * `requiredWhen` and ignores writes to a field whose `readonlyWhen` is TRUE\n * (so the rule can't be bypassed). e.g. `P\\`record.status == 'paid'\\``.\n */\n visibleWhen: ExpressionInputSchema.optional().describe(\"Predicate (CEL) — field is shown only when TRUE (else hidden). e.g. P`record.type == 'invoice'`\"),\n readonlyWhen: ExpressionInputSchema.optional().describe(\"Predicate (CEL) — field is read-only when TRUE. e.g. P`record.status == 'paid'`\"),\n requiredWhen: ExpressionInputSchema.optional().describe(\"Predicate (CEL) — field is required when TRUE. Canonical name for `conditionalRequired`.\"),\n\n /** Conditional Requirements\n * @deprecated Alias of `requiredWhen` — kept for back-compat. */\n conditionalRequired: ExpressionInputSchema.optional().describe('Predicate (CEL) — field is required when TRUE. Alias of `requiredWhen`.'),\n\n /**\n * Form widget override. Names a registered field/UI component to render this\n * field with, overriding the default widget derived from `type`. Honored by\n * the generic object form (objectui `ObjectForm`/`form.tsx` resolve\n * `widget || type`, looking the value up as `field:<widget>` in the component\n * registry). Use it when the raw `type` renderer would force a user to type\n * machine data that should be *picked* instead — e.g. an object-name field\n * (`widget: 'object-ref'`), a stored FilterCondition (`widget:\n * 'filter-condition'`), or a recipient reference whose target depends on a\n * sibling field (`widget: 'recipient-picker'`). Unknown/unregistered values\n * fall back to the `type` renderer, so it degrades safely.\n */\n widget: z.string().optional().describe('Form widget override — names a registered field component (resolved as `field:<widget>`) to render this field instead of the `type` default. Degrades to the `type` renderer when unregistered. e.g. \"object-ref\", \"filter-condition\", \"recipient-picker\".'),\n\n /** Security & Visibility */\n hidden: z.boolean().default(false).describe('Hidden from default UI'),\n readonly: z.boolean().default(false).describe('Read-only — never editable in forms, AND server-enforced on BOTH write paths: a non-system write to this field is silently dropped from the payload on UPDATE (#2948/#3003) and on INSERT (#3043; a create can no longer directly seed e.g. `approval_status: \"approved\"`), symmetric with `readonlyWhen`. A stripped INSERT field still falls back to its `defaultValue`; system-context writes (import, seed replay, migration) are exempt.'),\n\n /**\n * [ADR-0066 D3] Capabilities required to READ/EDIT this field. A field\n * declaring `requiredPermissions` is masked on read and denied on write unless\n * the caller holds ALL listed capabilities — an AND-gate that is strictest-wins\n * over permission-set field grants. Enforced by plugin-security's FieldMasker.\n */\n requiredPermissions: z.array(z.string()).optional().describe('[ADR-0066 D3] Capabilities required to read/edit this field (mask on read, deny on write; AND-gate).'),\n system: z.boolean().optional().describe('Auto-injected system/audit field (e.g. created_at, updated_by, organization_id). Tools that surface system fields separately from author-declared business fields should branch on this flag.'),\n sortable: z.boolean().optional().default(true).describe('Whether field is sortable in list views'),\n inlineHelpText: z.string().optional().describe('Help text displayed below the field in forms'),\n /**\n * Auto-number display format. Literal text interleaved with `{...}` tokens:\n *\n * - `{0000}` — the sequence counter, zero-padded to that many digits as a\n * MINIMUM width (at most one slot; omit it and the bare number is\n * appended). Past that width the number simply grows — it never wraps.\n * - `{YYYY} {YY} {MM} {DD} {YYYYMMDD}` — generation date in the request's\n * business timezone (`ExecutionContext.timezone`, ADR-0053; UTC fallback).\n * - `{field_name}` — the value of another field on the SAME record\n * (e.g. `{island_zone}`, `{plan_no}`), interpolated as text.\n *\n * The counter is scoped to whatever renders BEFORE the `{0000}` slot, so the\n * period/group resets fall out automatically — no separate reset config:\n * - `AD{YYYYMMDD}{0000}` → `AD202606170032` (resets each day)\n * - `{section}{island_zone}{000}` → `JYG1A001` (per island)\n * - `{plan_no}{000}` → `…PROD20260617001001` (per parent record)\n * A fixed-prefix format with no date/field token (e.g. `CASE-{0000}`) keeps a\n * single global counter — fully backward compatible.\n *\n * A `{field}` token must name an EXISTING field that is SET before the record\n * is created (mark it `required: true`). An empty interpolated field would\n * collapse the number into the wrong counter scope, so generation throws\n * instead; `objectstack compile` lints this (unknown field → build error,\n * optional field → warning).\n */\n autonumberFormat: z.string().optional().describe('Auto-number format: literal text + {0000} counter, {YYYY}/{MM}/{DD}/{YYYYMMDD} date tokens (business tz), and {field_name} interpolation. Counter resets per rendered prefix (e.g. AD{YYYYMMDD}{0000} resets daily).'),\n // `index` (field-level bool) removed in the 16.x line (#2377, ADR-0049): the\n // driver builds indexes from the object's `indexes[]` array; a field-level\n // `index: true` created no index. Declare the index in object `indexes[]`.\n externalId: z.boolean().default(false).describe('Is external ID for upsert operations'),\n}));\n\nexport type Field = z.infer<typeof FieldSchema>;\nexport type SelectOption = z.infer<typeof SelectOptionSchema>;\nexport type LocationCoordinates = z.infer<typeof LocationCoordinatesSchema>;\nexport type Address = z.infer<typeof AddressSchema>;\nexport type CurrencyConfig = z.infer<typeof CurrencyConfigSchema>;\nexport type CurrencyConfigInput = z.input<typeof CurrencyConfigSchema>;\nexport type CurrencyValue = z.infer<typeof CurrencyValueSchema>;\nexport type DataQualityRules = z.infer<typeof DataQualityRulesSchema>;\nexport type DataQualityRulesInput = z.input<typeof DataQualityRulesSchema>;\nexport type ComputedFieldCache = z.infer<typeof ComputedFieldCacheSchema>;\n\n/**\n * Field Factory Helper\n */\nexport type FieldInput = Omit<Partial<Field>, 'type'>;\n\nexport const Field = {\n text: (config: FieldInput = {}) => ({ type: 'text', ...config } as const),\n textarea: (config: FieldInput = {}) => ({ type: 'textarea', ...config } as const),\n number: (config: FieldInput = {}) => ({ type: 'number', ...config } as const),\n boolean: (config: FieldInput = {}) => ({ type: 'boolean', ...config } as const),\n date: (config: FieldInput = {}) => ({ type: 'date', ...config } as const),\n datetime: (config: FieldInput = {}) => ({ type: 'datetime', ...config } as const),\n currency: (config: FieldInput = {}) => ({ type: 'currency', ...config } as const),\n percent: (config: FieldInput = {}) => ({ type: 'percent', ...config } as const),\n url: (config: FieldInput = {}) => ({ type: 'url', ...config } as const),\n email: (config: FieldInput = {}) => ({ type: 'email', ...config } as const),\n phone: (config: FieldInput = {}) => ({ type: 'phone', ...config } as const),\n image: (config: FieldInput = {}) => ({ type: 'image', ...config } as const),\n file: (config: FieldInput = {}) => ({ type: 'file', ...config } as const),\n avatar: (config: FieldInput = {}) => ({ type: 'avatar', ...config } as const),\n formula: (config: FieldInput = {}) => ({ type: 'formula', ...config } as const),\n summary: (config: FieldInput = {}) => ({ type: 'summary', ...config } as const),\n autonumber: (config: FieldInput = {}) => ({ type: 'autonumber', ...config } as const),\n markdown: (config: FieldInput = {}) => ({ type: 'markdown', ...config } as const),\n html: (config: FieldInput = {}) => ({ type: 'html', ...config } as const),\n password: (config: FieldInput = {}) => ({ type: 'password', ...config } as const),\n /**\n * Secret field — reversible encrypted-at-rest value (DB password, API key,\n * token). Encrypted on write to `sys_secret` via the registered\n * ICryptoProvider; only an opaque ref is persisted on the row; masked on\n * read. Distinct from `password` (one-way hash, owned by the auth subsystem).\n */\n secret: (config: FieldInput = {}) => ({ type: 'secret', ...config } as const),\n \n /**\n * Select field helper with backward-compatible API\n * \n * Automatically converts option values to lowercase to enforce naming conventions.\n * \n * @example Old API (array first) - auto-converts to lowercase\n * Field.select(['High', 'Low'], { label: 'Priority' })\n * // Results in: [{ label: 'High', value: 'high' }, { label: 'Low', value: 'low' }]\n * \n * @example New API (config object) - enforces lowercase\n * Field.select({ options: [{label: 'High', value: 'high'}], label: 'Priority' })\n * \n * @example Multi-word values - converts to snake_case\n * Field.select(['In Progress', 'Closed Won'], { label: 'Status' })\n * // Results in: [{ label: 'In Progress', value: 'in_progress' }, { label: 'Closed Won', value: 'closed_won' }]\n */\n select: (optionsOrConfig: SelectOption[] | string[] | FieldInput & { options: SelectOption[] | string[] }, config?: FieldInput) => {\n // Helper function to convert string to lowercase snake_case\n const toSnakeCase = (str: string): string => {\n return str\n .toLowerCase()\n .replace(/\\s+/g, '_') // Replace spaces with underscores\n .replace(/[^a-z0-9_]/g, ''); // Remove invalid characters (keeping underscores only)\n };\n\n // Support both old and new signatures:\n // Old: Field.select(['a', 'b'], { label: 'X' })\n // New: Field.select({ options: [{label: 'A', value: 'a'}], label: 'X' })\n let options: SelectOption[];\n let finalConfig: FieldInput;\n \n if (Array.isArray(optionsOrConfig)) {\n // Old signature: array as first param\n options = optionsOrConfig.map(o => \n typeof o === 'string' \n ? { label: o, value: toSnakeCase(o) } // Auto-convert string to snake_case\n : { ...o, value: o.value.toLowerCase() } // Ensure value is lowercase\n );\n finalConfig = config || {};\n } else {\n // New signature: config object with options\n options = (optionsOrConfig.options || []).map(o => \n typeof o === 'string' \n ? { label: o, value: toSnakeCase(o) } // Auto-convert string to snake_case\n : { ...o, value: o.value.toLowerCase() } // Ensure value is lowercase\n );\n // Remove options from config to avoid confusion\n const { options: _, ...restConfig } = optionsOrConfig;\n finalConfig = restConfig;\n }\n \n return { type: 'select', options, ...finalConfig } as const;\n },\n\n \n lookup: (reference: string, config: FieldInput = {}) => ({ \n type: 'lookup', \n reference, \n ...config \n } as const),\n \n masterDetail: (reference: string, config: FieldInput = {}) => ({\n type: 'master_detail',\n reference,\n ...config\n } as const),\n\n /**\n * User field — a person picker. Semantic specialization of `lookup` with the\n * target fixed to the `sys_user` system object: stored identically (FK string\n * column → sys_user.id; `multiple: true` ⇒ JSON array) and resolved via the same\n * $expand machinery. The distinct `user` type drives the Studio/AI field palette,\n * the user-search picker, and `current_user` defaults — without re-implementing\n * lookup storage.\n *\n * @example Single assignee\n * Field.user({ label: 'Assignee' })\n * @example Collaborators / watchers (multi)\n * Field.user({ label: 'Watchers', multiple: true })\n * @example Auto-fill the acting user on create\n * Field.user({ label: 'Reporter', defaultValue: 'current_user' })\n */\n user: (config: FieldInput = {}) => ({\n type: 'user',\n reference: 'sys_user',\n ...config,\n } as const),\n\n // Enhanced Field Type Helpers\n location: (config: FieldInput = {}) => ({ \n type: 'location', \n ...config \n } as const),\n \n address: (config: FieldInput = {}) => ({ \n type: 'address', \n ...config \n } as const),\n \n richtext: (config: FieldInput = {}) => ({ \n type: 'richtext', \n ...config \n } as const),\n \n code: (language?: string, config: FieldInput = {}) => ({ \n type: 'code', \n language,\n ...config \n } as const),\n \n color: (config: FieldInput = {}) => ({ \n type: 'color', \n ...config \n } as const),\n \n rating: (max: number = 5, config: FieldInput = {}) => ({\n type: 'rating',\n max,\n ...config\n } as const),\n \n signature: (config: FieldInput = {}) => ({ \n type: 'signature', \n ...config \n } as const),\n \n slider: (config: FieldInput = {}) => ({ \n type: 'slider', \n ...config \n } as const),\n \n qrcode: (config: FieldInput = {}) => ({ \n type: 'qrcode', \n ...config \n } as const),\n \n json: (config: FieldInput = {}) => ({ \n type: 'json', \n ...config \n } as const),\n \n vector: (dimensions: number, config: FieldInput = {}) => ({\n type: 'vector',\n dimensions,\n ...config\n } as const),\n};\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * Shared HTTP Schemas\n * \n * Common HTTP-related schemas used across API and System protocols.\n * These schemas ensure consistency across different parts of the stack.\n */\n\n// ==========================================\n// Basic HTTP Types\n// ==========================================\n\n/**\n * HTTP Method Enum\n */\nimport { lazySchema } from './lazy-schema';\nexport const HttpMethod = z.enum([\n 'GET', \n 'POST', \n 'PUT', \n 'DELETE', \n 'PATCH', \n 'HEAD', \n 'OPTIONS'\n]);\n\nexport type HttpMethod = z.infer<typeof HttpMethod>;\n\n/**\n * HTTP Method Schema (subset for UI/View data sources)\n * Common HTTP methods used in view data source configurations.\n * Migrated from ui/view.zod.ts to shared for reuse across modules.\n */\nexport const HttpMethodSchema = lazySchema(() => z.enum(['GET', 'POST', 'PUT', 'PATCH', 'DELETE']));\n\nexport type HttpMethodType = z.infer<typeof HttpMethodSchema>;\n\n/**\n * HTTP Request Configuration Schema\n * Defines a complete HTTP request configuration used by API data providers.\n * Migrated from ui/view.zod.ts to shared for reuse across modules.\n */\nexport const HttpRequestSchema = lazySchema(() => z.object({\n url: z.string().describe('API endpoint URL'),\n method: HttpMethodSchema.optional().default('GET').describe('HTTP method'),\n headers: z.record(z.string(), z.string()).optional().describe('Custom HTTP headers'),\n params: z.record(z.string(), z.unknown()).optional().describe('Query parameters'),\n body: z.unknown().optional().describe('Request body for POST/PUT/PATCH'),\n}));\n\nexport type HttpRequest = z.infer<typeof HttpRequestSchema>;\n\n// ==========================================\n// CORS Configuration\n// ==========================================\n\n/**\n * CORS Configuration Schema\n * Cross-Origin Resource Sharing configuration\n * \n * Used by:\n * - api/router.zod.ts (RouterConfigSchema)\n * - system/http-server.zod.ts (HttpServerConfigSchema)\n * \n * @example\n * {\n * \"enabled\": true,\n * \"origins\": [\"http://localhost:3000\", \"https://app.example.com\"],\n * \"methods\": [\"GET\", \"POST\", \"PUT\", \"DELETE\"],\n * \"credentials\": true,\n * \"maxAge\": 86400\n * }\n */\nexport const CorsConfigSchema = lazySchema(() => z.object({\n /**\n * Enable CORS\n */\n enabled: z.boolean().default(true).describe('Enable CORS'),\n \n /**\n * Allowed origins (* for all)\n */\n origins: z.union([\n z.string(),\n z.array(z.string())\n ]).default('*').describe('Allowed origins (* for all)'),\n \n /**\n * Allowed HTTP methods\n */\n methods: z.array(HttpMethod).optional().describe('Allowed HTTP methods'),\n \n /**\n * Allow credentials (cookies, authorization headers)\n */\n credentials: z.boolean().default(false).describe('Allow credentials (cookies, authorization headers)'),\n \n /**\n * Preflight cache duration in seconds\n */\n maxAge: z.number().int().optional().describe('Preflight cache duration in seconds'),\n}));\n\nexport type CorsConfig = z.infer<typeof CorsConfigSchema>;\n\n// ==========================================\n// Rate Limiting\n// ==========================================\n\n/**\n * Rate Limit Configuration Schema\n * \n * Used by:\n * - api/endpoint.zod.ts (ApiEndpointSchema)\n * - system/http-server.zod.ts (HttpServerConfigSchema)\n * \n * @example\n * {\n * \"enabled\": true,\n * \"windowMs\": 60000,\n * \"maxRequests\": 100\n * }\n */\nexport const RateLimitConfigSchema = lazySchema(() => z.object({\n /**\n * Enable rate limiting\n */\n enabled: z.boolean().default(false).describe('Enable rate limiting'),\n \n /**\n * Time window in milliseconds\n */\n windowMs: z.number().int().default(60000).describe('Time window in milliseconds'),\n \n /**\n * Max requests per window\n */\n maxRequests: z.number().int().default(100).describe('Max requests per window'),\n}));\n\nexport type RateLimitConfig = z.infer<typeof RateLimitConfigSchema>;\n\n// ==========================================\n// Static File Serving\n// ==========================================\n\n/**\n * Static Mount Configuration Schema\n * Configuration for serving static files\n * \n * Used by:\n * - api/router.zod.ts (RouterConfigSchema)\n * - system/http-server.zod.ts (HttpServerConfigSchema)\n * \n * @example\n * {\n * \"path\": \"/static\",\n * \"directory\": \"./public\",\n * \"cacheControl\": \"public, max-age=31536000\"\n * }\n */\nexport const StaticMountSchema = lazySchema(() => z.object({\n /**\n * URL path to serve from\n */\n path: z.string().describe('URL path to serve from'),\n \n /**\n * Physical directory to serve\n */\n directory: z.string().describe('Physical directory to serve'),\n \n /**\n * Cache-Control header value\n */\n cacheControl: z.string().optional().describe('Cache-Control header value'),\n}));\n\nexport type StaticMount = z.infer<typeof StaticMountSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { ProtectionSchema } from '../shared/protection.zod';\nimport { MetadataProtectionFields } from '../kernel/metadata-protection.zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { ExpressionInputSchema } from '../shared/expression.zod';\nimport { normalizeVisibleWhen, strictVisibilityError } from '../shared/visibility';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\nimport { SharingConfigSchema } from './sharing.zod';\nimport { ResponsiveConfigSchema, PerformanceConfigSchema } from './responsive.zod';\nimport { FieldType, SelectOptionSchema } from '../data/field.zod';\n\n/**\n * HTTP Method Enum & HTTP Request Schema\n * Migrated to shared/http.zod.ts. Re-exported here for backward compatibility.\n */\nimport { HttpMethodSchema, HttpRequestSchema } from '../shared/http.zod';\nimport { lazySchema } from '../shared/lazy-schema';\nexport { HttpMethodSchema, HttpRequestSchema };\n\n/**\n * View Data Source Configuration\n * Supports three modes:\n * 1. 'object': Standard Protocol - Auto-connects to ObjectStack Metadata and Data APIs\n * 2. 'api': Custom API - Explicitly provided API URLs\n * 3. 'value': Static Data - Hardcoded data array\n */\nexport const ViewDataSchema = lazySchema(() => z.discriminatedUnion('provider', [\n z.object({\n provider: z.literal('object'),\n object: z.string().describe('Target object name'),\n }),\n z.object({\n provider: z.literal('api'),\n read: HttpRequestSchema.optional().describe('Configuration for fetching data'),\n write: HttpRequestSchema.optional().describe('Configuration for submitting data (for forms/editable tables)'),\n }),\n z.object({\n provider: z.literal('value'),\n items: z.array(z.unknown()).describe('Static data array'),\n }),\n /**\n * Schema-bound data source — used by standalone forms whose data is\n * shaped by a JSON Schema (or Zod-derived schema) rather than by an\n * ObjectQL object. Powers the metadata editor, action input dialogs,\n * and any Form that is not bound to a CRUD object.\n */\n z.object({\n provider: z.literal('schema'),\n /** Schema identifier (e.g. metadata type name \"report\"). Resolved at runtime against /meta entries. */\n schemaId: z.string().describe('Schema identifier — typically the metadata type name'),\n /** Optional inline JSON Schema; when omitted the runtime resolves schemaId from the server. */\n schema: z.record(z.string(), z.unknown()).optional().describe('Inline JSON Schema (Draft 2020-12). Optional when schemaId is resolvable.'),\n }),\n]));\n\n/**\n * Canonical filter operators for view filter rules.\n *\n * This is the SINGLE authoring vocabulary for `ViewFilterRule.operator`.\n * Exposing it as an enum (rather than a free `z.string()`) lets JSON-Schema\n * consumers — notably ObjectUI's SchemaForm — auto-render an operator\n * dropdown, and rejects genuinely unknown operators at parse time.\n *\n * Unary operators (`is_empty`, `is_not_empty`, `is_null`, `is_not_null`) take\n * no `value`. `before` / `after` are the date-friendly spellings of\n * `less_than` / `greater_than`; `between` expects a two-element `value` array.\n *\n * Note: relative-date operators (`this_quarter`, `last_7_days`, …) are NOT\n * filter-rule operators — they are date-range presets and live on dashboard\n * date-range config (`DashboardFilterSchema.defaultRange`), not here.\n */\nexport const VIEW_FILTER_OPERATORS = [\n 'equals', 'not_equals',\n 'contains', 'not_contains',\n 'starts_with', 'ends_with',\n 'greater_than', 'less_than',\n 'greater_than_or_equal', 'less_than_or_equal',\n 'in', 'not_in',\n 'is_empty', 'is_not_empty',\n 'is_null', 'is_not_null',\n 'before', 'after', 'between',\n] as const;\n\nexport type ViewFilterOperator = (typeof VIEW_FILTER_OPERATORS)[number];\n\n/**\n * Legacy operator spellings normalized to the canonical vocabulary above.\n *\n * These are historical shorthand (`eq`, `gt`) and camelCase (`notEquals`,\n * `greaterThan`) forms that older authoring tools and already-stored view\n * metadata may still carry. They are folded to canonical on parse so every\n * downstream consumer sees exactly one vocabulary — one strict contract, not\n * N dialects. Deprecated: new producers MUST emit the canonical forms; these\n * aliases are a migration bridge and may be dropped in a future major.\n */\nexport const VIEW_FILTER_OPERATOR_ALIASES: Record<string, ViewFilterOperator> = {\n eq: 'equals',\n ne: 'not_equals', neq: 'not_equals', notequals: 'not_equals', notEquals: 'not_equals',\n notcontains: 'not_contains', notContains: 'not_contains',\n startswith: 'starts_with', startsWith: 'starts_with',\n endswith: 'ends_with', endsWith: 'ends_with',\n gt: 'greater_than', greaterthan: 'greater_than', greaterThan: 'greater_than',\n lt: 'less_than', lessthan: 'less_than', lessThan: 'less_than',\n gte: 'greater_than_or_equal', greaterorequal: 'greater_than_or_equal',\n greaterOrEqual: 'greater_than_or_equal', greaterThanOrEqual: 'greater_than_or_equal',\n lte: 'less_than_or_equal', lessorequal: 'less_than_or_equal',\n lessOrEqual: 'less_than_or_equal', lessThanOrEqual: 'less_than_or_equal',\n nin: 'not_in', notin: 'not_in', notIn: 'not_in',\n isempty: 'is_empty', isEmpty: 'is_empty',\n isnotempty: 'is_not_empty', isNotEmpty: 'is_not_empty',\n isnull: 'is_null', isNull: 'is_null',\n isnotnull: 'is_not_null', isNotNull: 'is_not_null',\n};\n\n/**\n * Fold a legacy operator spelling to its canonical form. Returns canonical\n * operators unchanged, maps known aliases, and returns unknown input verbatim\n * (so the enum's own validation reports it as invalid). Exported so producers\n * and renderers can normalize stored metadata against the SAME canonical map\n * the schema uses, instead of inventing a second dialect.\n */\nexport function normalizeFilterOperator(op: unknown): string {\n if (typeof op !== 'string') return op as string;\n if ((VIEW_FILTER_OPERATORS as readonly string[]).includes(op)) return op;\n return VIEW_FILTER_OPERATOR_ALIASES[op] ?? VIEW_FILTER_OPERATOR_ALIASES[op.toLowerCase()] ?? op;\n}\n\n/**\n * View Filter Rule Schema\n * Standardized filter condition used in list views, tabs, and page-level filters.\n * Uses a declarative array-of-objects format: [{ field, operator, value }].\n *\n * @example\n * ```ts\n * filter: [\n * { field: 'status', operator: 'equals', value: 'active' },\n * { field: 'close_date', operator: 'after', value: '2024-01-01' },\n * { field: 'archived_at', operator: 'is_empty' },\n * ]\n * ```\n */\nexport const ViewFilterRuleSchema = lazySchema(() => z.object({\n /** Field name to filter on */\n field: z.string().describe('Field name to filter on'),\n /**\n * Filter operator (canonical vocabulary). Legacy shorthand/camelCase\n * spellings (`eq`, `gt`, `isNull`, …) are accepted and normalized to\n * canonical on parse.\n */\n operator: z.preprocess(normalizeFilterOperator, z.enum(VIEW_FILTER_OPERATORS))\n .describe('Filter operator'),\n /** Filter value (optional for unary operators like is_empty, is_null) */\n value: z.union([z.string(), z.number(), z.boolean(), z.null(), z.array(z.union([z.string(), z.number()]))])\n .optional().describe('Filter value'),\n}).describe('View filter rule'));\n\nexport type ViewFilterRule = z.infer<typeof ViewFilterRuleSchema>;\n\n/**\n * Column Summary Function Schema\n * Aggregation function for column footer (Airtable-style column summaries)\n */\nexport const ColumnSummarySchema = lazySchema(() => z.enum([\n 'none',\n 'count',\n 'count_empty',\n 'count_filled',\n 'count_unique',\n 'percent_empty',\n 'percent_filled',\n 'sum',\n 'avg',\n 'min',\n 'max',\n]).describe('Aggregation function for column footer summary'));\n\n/**\n * List Column Configuration Schema\n * Detailed configuration for individual list view columns\n */\nexport const ListColumnSchema = lazySchema(() => z.object({\n field: z.string().describe('Field name (snake_case)'),\n label: I18nLabelSchema.optional().describe('Display label override'),\n width: z.number().positive().optional().describe('Column width in pixels'),\n align: z.enum(['left', 'center', 'right']).optional().describe('Text alignment'),\n hidden: z.boolean().optional().describe('Hide column by default'),\n sortable: z.boolean().optional().describe('Allow sorting by this column'),\n resizable: z.boolean().optional().describe('Allow resizing this column'),\n wrap: z.boolean().optional().describe('Allow text wrapping'),\n type: z.string().optional().describe('Renderer type override (e.g., \"currency\", \"date\")'),\n\n /** Pinning (Airtable-style frozen columns) */\n pinned: z.enum(['left', 'right']).optional().describe('Pin/freeze column to left or right side'),\n\n /** Column Footer Summary (Airtable-style aggregation) */\n summary: ColumnSummarySchema.optional().describe('Footer aggregation function for this column'),\n\n /** Interaction */\n link: z.boolean().optional().describe('Functions as the primary navigation link (triggers View navigation)'),\n action: z.string().optional().describe('Registered Action ID to execute when clicked'),\n}));\n\n/**\n * List View Selection Configuration\n */\nexport const SelectionConfigSchema = lazySchema(() => z.object({\n type: z.enum(['none', 'single', 'multiple']).default('none').describe('Selection mode'),\n}));\n\n/**\n * List View Pagination Configuration\n */\nexport const PaginationConfigSchema = lazySchema(() => z.object({\n pageSize: z.number().int().positive().default(25).describe('Number of records per page'),\n pageSizeOptions: z.array(z.number().int().positive()).optional().describe('Available page size options'),\n}));\n\n/**\n * Row Height / Density Schema (Airtable-style)\n * Controls the visual density of rows in a list view.\n */\nexport const RowHeightSchema = lazySchema(() => z.enum([\n 'compact', // Minimal padding, single line\n 'short', // Reduced padding\n 'medium', // Default padding\n 'tall', // Extra padding, multi-line preview\n 'extra_tall', // Maximum padding, rich content preview\n]).describe('Row height / density setting for list view'));\n\n/**\n * Grouping Field Configuration\n * Defines a single grouping level for record grouping.\n */\nexport const GroupingFieldSchema = lazySchema(() => z.object({\n field: z.string().describe('Field name to group by'),\n order: z.enum(['asc', 'desc']).default('asc').describe('Group sort order'),\n collapsed: z.boolean().default(false).describe('Collapse groups by default'),\n}));\n\n/**\n * Grouping Configuration Schema (Airtable-style)\n * Supports multi-level grouping for grid/gallery views.\n */\nexport const GroupingConfigSchema = lazySchema(() => z.object({\n fields: z.array(GroupingFieldSchema).min(1).describe('Fields to group by (supports up to 3 levels)'),\n}).describe('Record grouping configuration'));\n\n/**\n * Gallery View Configuration (Airtable-style)\n * Configures card layout for gallery/card views.\n */\nexport const GalleryConfigSchema = lazySchema(() => z.object({\n coverField: z.string().optional().describe('Attachment/image field to display as card cover'),\n coverFit: z.enum(['cover', 'contain']).default('cover').describe('Image fit mode for card cover'),\n cardSize: z.enum(['small', 'medium', 'large']).default('medium').describe('Card size in gallery view'),\n titleField: z.string().optional().describe('Field to display as card title'),\n visibleFields: z.array(z.string()).optional().describe('Fields to display on card body'),\n}).describe('Gallery/card view configuration'));\n\n/**\n * Timeline View Configuration (Airtable-style)\n * Configures timeline/chronological views.\n */\nexport const TimelineConfigSchema = lazySchema(() => z.object({\n startDateField: z.string().describe('Field for timeline item start date'),\n endDateField: z.string().optional().describe('Field for timeline item end date'),\n titleField: z.string().describe('Field to display as timeline item title'),\n groupByField: z.string().optional().describe('Field to group timeline rows'),\n colorField: z.string().optional().describe('Field to determine item color'),\n scale: z.enum(['hour', 'day', 'week', 'month', 'quarter', 'year']).default('week').describe('Default timeline scale'),\n}).describe('Timeline view configuration'));\n\n/**\n * View Sharing Configuration (Airtable-style)\n * Defines who can see and modify a view.\n */\nexport const ViewSharingSchema = lazySchema(() => z.object({\n type: z.enum(['personal', 'collaborative']).default('collaborative').describe('View ownership type'),\n lockedBy: z.string().optional().describe('User who locked the view configuration'),\n}).describe('View sharing and access configuration'));\n\n/**\n * Row Color Configuration (Airtable-style)\n * Defines how rows are colored based on field values.\n */\nexport const RowColorConfigSchema = lazySchema(() => z.object({\n field: z.string().describe('Field to derive color from (typically a select/status field)'),\n colors: z.record(z.string(), z.string()).optional().describe('Map of field value to color (hex/token)'),\n}).describe('Row color configuration based on field values'));\n\n/**\n * Visualization Type Schema\n * Whitelist of visualization types the user can switch between.\n * Maps to Airtable's \"Visualizations\" setting in Appearance panel.\n */\nexport const VisualizationTypeSchema = lazySchema(() => z.enum([\n 'grid',\n 'kanban',\n 'gallery',\n 'calendar',\n 'timeline',\n 'gantt',\n 'map',\n 'chart',\n 'tree',\n]).describe('Visualization type that users can switch to'));\n\n/**\n * User Actions Configuration Schema (Airtable Interface parity)\n * Controls which interactive actions are available to users in the view toolbar.\n * Each boolean toggles the corresponding toolbar element on/off.\n *\n * @see Airtable Interface → \"User actions\" panel\n */\nexport const UserActionsConfigSchema = lazySchema(() => z.object({\n sort: z.boolean().default(true).describe('Allow users to sort records'),\n search: z.boolean().default(true).describe('Allow users to search records'),\n filter: z.boolean().default(true).describe('Allow users to filter records'),\n refresh: z.boolean().default(true).describe('Allow users to reload the view data from the backend without a full page reload'),\n rowHeight: z.boolean().default(true).describe('Allow users to toggle row height/density'),\n addRecordForm: z.boolean().default(false).describe('Add records through a form instead of inline'),\n editInline: z.boolean().default(false).describe('Allow users to edit records inline — click a cell to edit it with the field\\'s type-aware widget (the same control the form uses). Off by default: the list is read-only unless the author opts in.'),\n buttons: z.array(z.string()).optional().describe('Custom action button IDs to show in the toolbar'),\n}).describe('User action toggles for the view toolbar'));\n\n/**\n * Appearance Configuration Schema (Airtable Interface parity)\n * Controls visual presentation options for the view.\n *\n * @see Airtable Interface → \"Appearance\" panel\n */\nexport const AppearanceConfigSchema = lazySchema(() => z.object({\n showDescription: z.boolean().default(true).describe('Show the view description text'),\n allowedVisualizations: z.array(VisualizationTypeSchema).optional()\n .describe('Whitelist of visualization types users can switch between (e.g. [\"grid\", \"gallery\", \"kanban\"])'),\n}).describe('Appearance and visualization configuration'));\n\n/**\n * View Tab Schema (Airtable Interface parity)\n * Defines a tab in a multi-tab view interface.\n * Each tab references a named list view and can be ordered, pinned, or set as default.\n *\n * @see Airtable Interface → \"Tabs\" panel\n */\nexport const ViewTabSchema = lazySchema(() => z.object({\n name: SnakeCaseIdentifierSchema.describe('Tab identifier (snake_case)'),\n label: I18nLabelSchema.optional().describe('Display label'),\n icon: z.string().optional().describe('Tab icon name'),\n view: z.string().optional().describe('Referenced list view name from listViews'),\n filter: z.array(ViewFilterRuleSchema).optional().describe('Tab-specific filter criteria'),\n order: z.number().int().min(0).optional().describe('Tab display order'),\n pinned: z.boolean().default(false).describe('Pin tab (cannot be removed by users)'),\n isDefault: z.boolean().default(false).describe('Set as the default active tab'),\n visible: z.boolean().default(true).describe('Tab visibility'),\n}).describe('Tab configuration for multi-tab view interface'));\n\n/**\n * User Filter Field Schema (ADR-0047)\n * One field exposed as a quick-filter control in the end-user filter bar.\n * Rendering details (widget, options) default to inference from the field\n * definition on the source object — authors only override when needed.\n *\n * @see Airtable Interface → \"User filters\" panel (Dropdowns element)\n */\nexport const UserFilterFieldSchema = lazySchema(() => z.object({\n field: z.string().describe('Field name on the source object (must exist — checked by reference diagnostics)'),\n label: I18nLabelSchema.optional().describe('Display label override (defaults to the field label)'),\n type: z.enum(['select', 'multi-select', 'boolean', 'date-range', 'text']).optional()\n .describe('Filter control type. Omit to infer from the field definition'),\n options: z.array(z.object({\n value: z.union([z.string(), z.number(), z.boolean()]).describe('Option value'),\n label: I18nLabelSchema.describe('Option label'),\n color: z.string().optional().describe('Option color token/hex'),\n })).optional().describe('Static options. Omit to derive from the field definition (select options / lookup records)'),\n showCount: z.boolean().optional().describe('Show per-option record counts'),\n defaultValues: z.array(z.union([z.string(), z.number(), z.boolean()])).optional()\n .describe('Pre-selected values when the view loads'),\n}).describe('Quick-filter field configuration'));\n\n/**\n * User Filters Schema (ADR-0047, Airtable Interface parity)\n * The end-user-facing quick-filter surface above a list. The author picks the\n * element style and which fields/presets are exposed; end users combine them\n * at runtime (session-scoped — selections never persist as metadata).\n *\n * Distinct from `ListView.filter` (the always-on base criteria) and from the\n * advanced filter builder (`userActions.filter` toggle).\n *\n * @see Airtable Interface → \"User filters\" panel (Elements: tabs / dropdowns)\n */\nexport const UserFiltersSchema = lazySchema(() => z.object({\n // `toggle` is DEPRECATED (ADR-0047 §3.4a): it overlaps `tabs` (presets) and\n // `dropdown` (per-field values) without adding expressive power, needs\n // per-field defaultValues to be useful, and authoring tooling no longer\n // offers it (None / Tabs / Dropdown only). Kept in the enum so existing\n // configs keep rendering; do not author new `toggle` filters.\n element: z.enum(['dropdown', 'tabs', 'toggle']).default('dropdown')\n .describe('Filter control style: \"dropdown\" (per-field value selectors) or \"tabs\" (named presets). \"toggle\" is deprecated.'),\n fields: z.array(UserFilterFieldSchema).optional()\n .describe('Fields exposed as quick filters (dropdown/toggle elements)'),\n tabs: z.array(ViewTabSchema).optional()\n .describe('Named filter presets rendered as tabs (tabs element). Reuses ViewTabSchema'),\n showAllRecords: z.boolean().optional()\n .describe('Show an \"All records\" tab before the presets (tabs element)'),\n}).describe('End-user quick-filter configuration (Airtable \"User filters\" parity)'));\n\n/**\n * Add Record Configuration Schema (Airtable Interface parity)\n * Configures the \"Add Record\" entry point for a list view.\n *\n * @see Airtable Interface → \"+ Add record\" button\n */\nexport const AddRecordConfigSchema = lazySchema(() => z.object({\n enabled: z.boolean().default(true).describe('Show the add record entry point'),\n position: z.enum(['top', 'bottom', 'both']).default('bottom').describe('Position of the add record button'),\n mode: z.enum(['inline', 'form', 'modal']).default('inline').describe('How to add a new record'),\n formView: z.string().optional().describe('Named form view to use when mode is \"form\" or \"modal\"'),\n}).describe('Add record entry point configuration'));\n\n/**\n * Kanban Settings\n */\nexport const KanbanConfigSchema = lazySchema(() => z.object({\n groupByField: z.string().describe('Field to group columns by (usually status/select)'),\n summarizeField: z.string().optional().describe('Field to sum at top of column (e.g. amount)'),\n columns: z.array(z.string()).describe('Fields to show on cards'),\n}));\n\n/**\n * List Chart View Configuration (Airtable-style)\n * Configures aggregate chart visualizations (bar/line/pie/area/scatter)\n * when used as a `type: 'chart'` ListView. Distinct from the full-featured\n * `ChartConfigSchema` in `chart.zod.ts` (which is for embedded reports).\n */\nexport const ListChartConfigSchema = lazySchema(() => z.object({\n chartType: z.enum(['bar', 'line', 'pie', 'area', 'scatter']).default('bar').describe('Chart visualisation type'),\n /**\n * ADR-0021 — the semantic-layer `dataset` this chart binds to. Selects\n * dimensions/measures BY NAME so the chart's numbers stay consistent with\n * every other surface using the same dataset. This is the single author-facing\n * shape (the legacy inline `xAxisField` + `yAxisFields` + `aggregation` query\n * was removed in the cutover).\n */\n dataset: SnakeCaseIdentifierSchema.describe('Dataset name to bind (ADR-0021)'),\n /** Dimension names (from the dataset) for X / group / split. */\n dimensions: z.array(z.string()).optional().describe('Dimension names — X/group/split'),\n /** Measure names (from the dataset) for the value axis. */\n values: z.array(z.string()).min(1).describe('Measure names — Y (at least one)'),\n}).describe('List chart view configuration'));\n\n/**\n * Calendar Settings\n */\nexport const CalendarConfigSchema = lazySchema(() => z.object({\n startDateField: z.string().describe('Field providing the event start date/time'),\n endDateField: z.string().optional().describe('Field providing the event end date/time (defaults to a single-day event)'),\n titleField: z.string().describe('Field displayed as the event title'),\n colorField: z.string().optional().describe('Field whose value determines the event color'),\n}));\n\n/**\n * Quick filter dimension for the Gantt toolbar.\n */\nexport const GanttQuickFilterSchema = lazySchema(() => z.object({\n field: z.string().describe('Record field / dot-path the dimension filters on'),\n label: z.string().optional().describe('Trigger label (falls back to the field label)'),\n options: z.array(z.union([\n z.string(),\n z.object({\n value: z.union([z.string(), z.number()]),\n label: z.string().optional(),\n }),\n ])).optional().describe('Explicit option override for fixed enums'),\n}));\n\n/**\n * Gantt Settings\n *\n * Beyond the core timeline fields, the renderer supports a two-level\n * parent/child hierarchy (parentField/typeField), planned-vs-actual baselines,\n * dynamic grouping, a resource/workload view, hover tooltips and quick filters.\n */\nexport const GanttConfigSchema = lazySchema(() => z.object({\n startDateField: z.string().describe('Field providing the task start date'),\n endDateField: z.string().describe('Field providing the task end date'),\n titleField: z.string().describe('Field displayed as the task title'),\n progressField: z.string().optional().describe('Field providing the task completion percentage'),\n dependenciesField: z.string().optional().describe(\"Field listing the task's predecessor (dependency) record ids\"),\n colorField: z.string().optional().describe('Field that drives the bar color'),\n // Two-level hierarchy: a parent task id (summary bar) and a row type.\n parentField: z.string().optional().describe('Field holding the parent task id (builds the summary → step tree)'),\n typeField: z.string().optional().describe('Field whose value maps to task/summary/milestone'),\n // Planned-vs-actual reference bars.\n baselineStartField: z.string().optional().describe('Baseline (planned) start field'),\n baselineEndField: z.string().optional().describe('Baseline (planned) end field'),\n // Dynamic grouping: bucket leaf tasks under one synthesized summary per value.\n groupByField: z.string().optional().describe('Field to group leaf tasks by (synthesized summary rows)'),\n // Resource / workload view.\n resourceView: z.boolean().optional().describe('Render a per-resource workload histogram instead of the timeline'),\n assigneeField: z.string().optional().describe('Resource field to bucket load by (resource view)'),\n effortField: z.string().optional().describe('Per-task load units (resource view; default 1)'),\n capacity: z.number().optional().describe('Per-resource capacity ceiling; loads above this flag overload'),\n // Hover tooltip + quick filters.\n tooltipFields: z.array(z.union([\n z.string(),\n z.object({ field: z.string(), label: z.string().optional() }),\n ])).optional().describe('Fields to surface in the hover tooltip, in display order'),\n quickFilters: z.array(GanttQuickFilterSchema).optional().describe('Multi-select filter dropdowns rendered above the chart'),\n autoZoomToFilter: z.boolean().optional().describe('When true (default), filtering zooms the range to the filtered tasks'),\n// Forward-compatible: the gantt renderer (objectui plugin-gantt) keeps adding\n// config knobs (e.g. lockField / defaultCollapsedDepth) ahead of this schema.\n// Passthrough lets those extra fields reach the renderer instead of being\n// stripped here, so a renderer release no longer has to wait on a spec release.\n}).passthrough());\n\n/**\n * Tree (tree-grid) Settings\n *\n * Renders a self-referencing object as an indented, expand/collapse tree-grid.\n * Flat records are nested via a single-parent pointer field (`parentField`).\n * Unlike a fixed-depth `grouping`, a tree handles arbitrary depth (org charts,\n * category trees, BOMs, nested comments). When `parentField` is omitted the\n * renderer auto-detects the object's `tree`/self-reference field.\n */\nexport const TreeConfigSchema = lazySchema(() => z.object({\n parentField: z.string().optional().describe('Single-parent pointer field (auto-detected from the object schema when omitted)'),\n labelField: z.string().optional().describe('Field rendered indented in the first column (defaults to \"name\")'),\n fields: z.array(z.string()).optional().describe('Additional fields rendered as flat columns alongside the label'),\n defaultExpandedDepth: z.number().int().min(0).optional().describe('Initial expansion depth (0 = roots only; omit = expand all)'),\n// Forward-compatible: let renderer-ahead config knobs reach plugin-tree.\n}).passthrough());\n\n/**\n * Navigation Mode Enum\n * Defines how to navigate to the detail view from a list item.\n */\nexport const NavigationModeSchema = lazySchema(() => z.enum([\n 'page', // Navigate to a new route (default)\n 'drawer', // Open details in a side drawer/panel\n 'modal', // Open details in a modal dialog\n 'split', // Show details side-by-side with the list (master-detail)\n 'popover', // Show details in a popover (lightweight)\n 'new_window', // Open in new browser tab/window\n 'none' // No navigation (read-only list)\n]));\n\n/**\n * Navigation Configuration Schema\n */\nexport const NavigationConfigSchema = lazySchema(() => z.object({\n mode: NavigationModeSchema.default('page'),\n \n /** Target View Config */\n view: z.string().optional().describe('Name of the form view to use for details (e.g. \"summary_view\", \"edit_form\")'),\n \n /** Interaction Triggers */\n preventNavigation: z.boolean().default(false).describe('Disable standard navigation entirely'),\n openNewTab: z.boolean().default(false).describe('Force open in new tab (applies to page mode)'),\n \n /**\n * [#2578] Overlay size for a drawer/modal detail — coarse T-shirt buckets,\n * aligned with `FormView.modalSize` (`page` mode ignores it). `'auto'`\n * (default): the renderer derives the size from the object's field count and\n * clamps it to the client viewport, so AI writes nothing — it cannot know the\n * client width. Explicit buckets are a coarse, viewport-independent override.\n */\n size: z.enum(['auto', 'sm', 'md', 'lg', 'xl', 'full']).default('auto')\n .describe(\"[#2578] Overlay size bucket for drawer/modal detail: 'auto' (default — renderer derives from field count + viewport; AI writes nothing) or a coarse override sm/md/lg/xl/full. Prefer this over the pixel `width`; page mode ignores it.\"),\n\n /**\n * @deprecated [#2578 → `size`] A pixel/percent width cannot be authored blind:\n * the author (often an AI) does not know the client viewport. Kept only as a\n * renderer fallback for pre-#2578 metadata; new metadata sets `size` (or omits\n * it for `auto`).\n */\n width: z.union([z.string(), z.number()]).optional().describe('[DEPRECATED → size] Pixel/percent width of the drawer/modal (e.g. \"600px\"). A pixel width cannot be chosen at authoring time without knowing the client viewport — use the `size` bucket.'),\n}));\n\n/**\n * List View Schema (Expanded)\n * Defines how a collection of records is displayed to the user.\n * \n * **NAMING CONVENTION:**\n * View names (when provided) are machine identifiers and must be lowercase snake_case.\n * \n * @example Standard Grid\n * {\n * name: \"all_active\",\n * label: \"All Active\",\n * type: \"grid\",\n * columns: [\"name\", \"status\", \"created_at\"],\n * filter: [[\"status\", \"=\", \"active\"]]\n * }\n * \n * @example Kanban Board\n * {\n * type: \"kanban\",\n * columns: [\"name\", \"amount\"],\n * kanban: {\n * groupByField: \"stage\",\n * summarizeField: \"amount\",\n * columns: [\"name\", \"close_date\"]\n * }\n * }\n */\nexport const ListViewSchema = lazySchema(() => z.object({\n name: SnakeCaseIdentifierSchema.optional().describe('Internal view name (lowercase snake_case)'),\n label: I18nLabelSchema.optional(), // Display label override (supports i18n)\n type: z.enum([\n 'grid', // Standard Data Table\n 'kanban', // Board / Columns\n 'gallery', // Card Deck / Masonry\n 'calendar', // Monthly/Weekly/Daily\n 'timeline', // Chronological Stream (Feed)\n 'gantt', // Project Timeline\n 'map', // Geospatial\n 'chart', // Aggregate visualisation\n 'tree' // Self-referencing hierarchy (tree-grid)\n ]).default('grid'),\n \n /** Data Source Configuration */\n data: ViewDataSchema.optional().describe('Data source configuration (defaults to \"object\" provider)'),\n \n /** Shared Query Config */\n columns: z.union([\n z.array(z.string()), // Legacy: simple field names\n z.array(ListColumnSchema), // Enhanced: detailed column config\n ]).describe('Fields to display as columns'),\n filter: z.array(ViewFilterRuleSchema).optional().describe('Filter criteria (JSON Rules)'),\n /**\n * Sort order. Prefer the structured `{ field, order }[]` form.\n *\n * @deprecated The bare string form (`\"field desc\"`) is legacy and retained\n * only for backward compatibility (it was the exact shape that crashed the\n * renderer in objectui#2601 — kept covered by a live fixture). Removal will\n * go through its own deprecation cycle; do not drop it here.\n */\n sort: z.union([\n z.string(), //Legacy \"field desc\"\n z.array(z.object({\n field: z.string(),\n order: z.enum(['asc', 'desc'])\n }))\n ]).optional(),\n \n /** Search & Filter */\n searchableFields: z.array(z.string()).optional().describe('Fields enabled for search'),\n filterableFields: z.array(z.string()).optional().describe('Legacy shorthand for userFilters.fields — bare field names enabled for end-user filtering. Prefer userFilters'),\n\n /** User Filters (ADR-0047, Airtable Interface parity) */\n userFilters: UserFiltersSchema.optional()\n .describe('End-user quick-filter bar: dropdown/toggle fields or tab presets. Omit to let the renderer derive filters from select/boolean fields'),\n\n /** Grid Features */\n resizable: z.boolean().optional().describe('Enable column resizing'),\n striped: z.boolean().optional().describe('Striped row styling'),\n bordered: z.boolean().optional().describe('Show borders'),\n compactToolbar: z.boolean().optional().describe('Collapse Group/Color/Density/Hide-fields into a single View settings popover'),\n\n /** Selection */\n selection: SelectionConfigSchema.optional().describe('Row selection configuration'),\n\n /** Navigation / Interaction */\n navigation: NavigationConfigSchema.optional().describe('Configuration for item click navigation (page, drawer, modal, etc.)'),\n\n /** Pagination */\n pagination: PaginationConfigSchema.optional().describe('Pagination configuration'),\n\n /** Type Specific Config */\n kanban: KanbanConfigSchema.optional().describe('Kanban-board configuration — applies when the view renders as a kanban layout'),\n calendar: CalendarConfigSchema.optional().describe('Calendar configuration — applies when the view renders as a calendar layout'),\n gantt: GanttConfigSchema.optional().describe('Gantt-timeline configuration — applies when the view renders as a gantt layout'),\n gallery: GalleryConfigSchema.optional(),\n timeline: TimelineConfigSchema.optional(),\n chart: ListChartConfigSchema.optional(),\n tree: TreeConfigSchema.optional().describe('Tree/hierarchy configuration — applies when the view renders as a tree layout'),\n\n /** View Metadata (Airtable-style view management) */\n description: I18nLabelSchema.optional().describe('View description for documentation/tooltips'),\n sharing: ViewSharingSchema.optional().describe('View sharing and access configuration'),\n\n /** Row Height / Density (Airtable-style) */\n rowHeight: RowHeightSchema.optional().describe('Row height / density setting'),\n\n /** Record Grouping (Airtable-style) */\n grouping: GroupingConfigSchema.optional().describe('Group records by one or more fields'),\n\n /** Row Color (Airtable-style) */\n rowColor: RowColorConfigSchema.optional().describe('Color rows based on field value'),\n\n /** Field Visibility & Ordering per View (Airtable-style) */\n hiddenFields: z.array(z.string()).optional().describe('Fields to hide in this specific view'),\n fieldOrder: z.array(z.string()).optional().describe('Explicit field display order for this view'),\n\n /** Row & Bulk Actions */\n rowActions: z.array(z.string()).optional().describe('Actions available for individual row items'),\n bulkActions: z.array(z.string()).optional().describe('Actions available when multiple rows are selected'),\n bulkActionDefs: z.array(z.record(z.string(), z.any())).optional().describe('Rich bulk action definitions (schema-driven, executed via BulkActionDialog)'),\n\n /** Performance */\n virtualScroll: z.boolean().optional().describe('Enable virtual scrolling for large datasets'),\n\n /** Conditional Formatting */\n conditionalFormatting: z.array(z.object({\n condition: ExpressionInputSchema.describe('Predicate (CEL) to evaluate.'),\n style: z.record(z.string(), z.string()).describe('CSS styles to apply when condition is true'),\n })).optional().describe('Conditional formatting rules for list rows'),\n\n /** Inline Edit */\n inlineEdit: z.boolean().optional().describe('Allow inline editing of records directly in the list view'),\n\n /** Export */\n exportOptions: z.array(z.enum(['csv', 'xlsx', 'pdf', 'json'])).optional().describe('Available export format options'),\n\n /** User Actions (Airtable Interface parity) */\n userActions: UserActionsConfigSchema.optional().describe('User action toggles for the view toolbar'),\n\n /** Appearance (Airtable Interface parity) */\n appearance: AppearanceConfigSchema.optional().describe('Appearance and visualization configuration'),\n\n /** Tabs (Airtable Interface parity) */\n tabs: z.array(ViewTabSchema).optional().describe('Tab definitions for multi-tab view interface'),\n\n /** Add Record (Airtable Interface parity) */\n addRecord: AddRecordConfigSchema.optional().describe('Add record entry point configuration'),\n\n /** Record Count Display (Airtable Interface parity) */\n showRecordCount: z.boolean().optional().describe('Show record count at the bottom of the list'),\n\n /** Advanced: Allow Printing (Airtable Interface parity) */\n allowPrinting: z.boolean().optional().describe('Allow users to print the view'),\n\n /** Empty State */\n emptyState: z.object({\n title: I18nLabelSchema.optional(),\n message: I18nLabelSchema.optional(),\n icon: z.string().optional(),\n }).optional().describe('Empty state configuration when no records found'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes for the list view'),\n\n /** Responsive layout overrides per breakpoint */\n responsive: ResponsiveConfigSchema.optional().describe('Responsive layout configuration'),\n\n /** Performance optimization settings */\n performance: PerformanceConfigSchema.optional().describe('Performance optimization settings'),\n}));\n\n/**\n * Form Field Configuration Schema\n * Detailed configuration for individual form fields.\n * \n * Reuses Data.FieldType and related constraints from the Data protocol to avoid duplication.\n * The `type` field auto-infers widget rendering; explicit `widget` overrides are only needed\n * for custom components.\n * \n * @example Auto-inferred select widget\n * { field: 'status', type: 'select', options: [{ label: 'Open', value: 'open' }] }\n * \n * @example Lookup field with reference\n * { field: 'account_id', type: 'lookup', reference: 'account', label: 'Account' }\n * \n * @example Custom widget override\n * { field: 'filter', widget: 'filter-builder' }\n */\nexport const FormFieldSchema: z.ZodType<any> = lazySchema(() => z.object({\n /** Field name (snake_case) */\n field: z.string().describe('Field name (snake_case)'),\n \n /** Field type — reuses Data.FieldType. When set, widget is auto-inferred (can be overridden). */\n type: FieldType.optional().describe('Field type (auto-infers widget if omitted)'),\n \n /** Select/multiselect options — only needed when type=select/multiselect/radio/checkboxes */\n options: z.array(SelectOptionSchema).optional().describe('Options for select/multiselect/radio/checkboxes fields'),\n \n /** Reference object for lookup/master_detail fields */\n reference: z.string().optional().describe('Target object name for lookup/master_detail fields'),\n \n /** Text constraints */\n maxLength: z.number().optional().describe('Maximum character length (for text/textarea/email/url/phone)'),\n minLength: z.number().optional().describe('Minimum character length'),\n \n /** Number constraints */\n min: z.number().optional().describe('Minimum value (for number/currency/percent/slider)'),\n max: z.number().optional().describe('Maximum value'),\n precision: z.number().optional().describe('Total digits (for number/currency)'),\n scale: z.number().optional().describe('Decimal places'),\n \n /** Multi-value flag */\n multiple: z.boolean().optional().describe('Allow multiple values (for select/lookup/file/image)'),\n \n /** UI overrides */\n label: I18nLabelSchema.optional().describe('Display label override'),\n placeholder: I18nLabelSchema.optional().describe('Placeholder text'),\n helpText: I18nLabelSchema.optional().describe('Help/hint text'),\n readonly: z.boolean().optional().describe('Read-only override'),\n immutable: z.boolean().optional().describe('Editable on create, locked once the record exists (e.g. machine names).'),\n required: z.boolean().optional().describe('Required override'),\n hidden: z.boolean().optional().describe('Hidden override'),\n colSpan: z.number().int().min(1).max(4).optional().describe('[legacy — prefer `span`] Absolute column span (1-4). Fragile when the column count is derived per surface (mobile 1 / modal 2 / page 3-4): a fixed span only lines up at the width the author imagined. The renderer clamps it to the current column count. Prefer `span`.'),\n /**\n * [#2578] Relative field width — decoupled from the (often auto-derived)\n * column count, so it stays correct at 1/2/3/4 columns.\n */\n span: z.enum(['auto', 'full']).default('auto').describe(\"Relative field width. 'auto' (default — omit it): the renderer sizes the field from its widget type × the current column count (wide widgets like textarea/richtext/json/file/subform take the whole row). 'full': whole row at any column count. Prefer this over the absolute `colSpan`.\"),\n\n /** Custom widget override — only needed when auto-inference is insufficient */\n widget: z.string().optional().describe('Custom widget/component name (overrides type-based inference)'),\n\n /** For `code` fields: source language (e.g. 'javascript', 'sql', 'json', 'typescript', 'expression', 'cel'). Drives syntax highlighting. */\n language: z.string().optional().describe('Code editor language (for type=code)'),\n\n /**\n * Sub-fields for `composite` / `repeater` / `record` types — declares\n * the inner shape of an embedded sub-object (composite), each row of\n * an embedded sub-object array (repeater), or each entry of a name-keyed\n * map (record). Recursive: any of the three can nest.\n *\n * Use `lookup` / `master_detail` instead when the children are independent\n * records with their own IDs in a separate object/table.\n */\n fields: z.array(z.lazy(() => FormFieldSchema)).optional()\n .describe('Sub-fields for composite/repeater/record types'),\n\n /**\n * For `record`-typed fields only. Declares how the map key is sourced,\n * displayed, and validated when an admin creates a new entry.\n *\n * The same identifier is also stored as `name` on the inner value (so\n * `record.fields[k].name === k`). Most callers can omit this and accept\n * the defaults: `{ field: 'name', label: 'Name', regex: /^[a-z_][a-z0-9_]*$/, immutable: true }`.\n *\n * See ADR-0007 (record form field type).\n */\n keyField: z.object({\n field: z.string().default('name').describe('Property name that holds the key inside each item (defaults to \"name\")'),\n label: I18nLabelSchema.optional().describe('Display label for the key column'),\n placeholder: I18nLabelSchema.optional().describe('Placeholder when entering a new key'),\n helpText: I18nLabelSchema.optional().describe('Help text under the key input'),\n /** Validation pattern serialised as a regex source string (no flags). */\n regex: z.string().optional().describe('JS regex source string the key must match (no flags)'),\n /** Renamable after creation? Defaults to false — keys are usually identifiers. */\n immutable: z.boolean().default(true).describe('If true, the key is read-only after creation'),\n }).optional().describe('Key column config for record-typed fields'),\n\n dependsOn: z.string().optional().describe('Parent field name for cascading'),\n /**\n * Conditional-visibility predicate (CEL) — the field is shown only when TRUE\n * (ADR-0089, canonical `*When` name). Binding root depends on the surface:\n * runtime record forms bind `record` + `current_user`; metadata-editing forms\n * (`*.form.ts`) bind the row under edit as `data`.\n */\n visibleWhen: ExpressionInputSchema.optional().describe(\"Visibility predicate (CEL) — field shown only when TRUE. Root: `record`+`current_user` (runtime forms) or `data` (metadata forms). e.g. P`record.priority == 'urgent'`\"),\n /** @deprecated ADR-0089 — use `visibleWhen`. Accepted and normalized to `visibleWhen` at parse. */\n visibleOn: ExpressionInputSchema.optional().describe('[DEPRECATED → `visibleWhen`] Visibility predicate (CEL). Normalized to `visibleWhen` at parse.'),\n disclosure: z.enum(['inline', 'popover']).optional().describe('Composite rendering: inline bordered box (default) or a summary line + gear popover (progressive disclosure).'),\n}, { error: strictVisibilityError }).strict().transform(normalizeVisibleWhen));\n\n/**\n * Form Layout Section\n */\nexport const FormSectionSchema = lazySchema(() => z.object({\n /**\n * Stable identifier for translation lookup. snake_case convention.\n * When provided, translation bundles can target this section's `label`\n * and `description` via `metadataForms.<type>.sections.<name>`.\n * Optional for backward-compat with sections that only have a `label`.\n */\n name: z.string().optional().describe('Stable section identifier for i18n lookup (snake_case)'),\n label: I18nLabelSchema.optional(),\n description: z.string().optional().describe('Optional description rendered under the section header.'),\n collapsible: z.boolean().default(false),\n collapsed: z.boolean().default(false),\n /**\n * Conditional-visibility predicate (CEL) — the whole section is shown only\n * when TRUE (ADR-0089, canonical `*When` name). Same per-layer binding root as\n * {@link FormFieldSchema.visibleWhen}: `record`+`current_user` in runtime\n * forms, `data` in metadata-editing forms.\n */\n visibleWhen: ExpressionInputSchema.optional().describe('Visibility predicate (CEL) — section shown only when TRUE. Root: `record`+`current_user` (runtime forms) or `data` (metadata forms).'),\n /** @deprecated ADR-0089 — use `visibleWhen`. Accepted and normalized to `visibleWhen` at parse. */\n visibleOn: ExpressionInputSchema.optional().describe('[DEPRECATED → `visibleWhen`] Visibility predicate (CEL). Hides the whole section when false. Normalized to `visibleWhen` at parse.'),\n columns: z.union([\n z.enum(['1', '2', '3', '4']),\n z.literal(1),\n z.literal(2),\n z.literal(3),\n z.literal(4),\n ]).default(1).transform(val => (typeof val === 'string' ? parseInt(val) : val) as 1 | 2 | 3 | 4),\n fields: z.array(z.union([\n z.string(), // Legacy: simple field name\n FormFieldSchema, // Enhanced: detailed field config\n ])),\n}, { error: strictVisibilityError }).strict().transform(normalizeVisibleWhen));\n\n/**\n * A single form action button (submit / cancel / reset): visibility + label.\n * Leaf of the [EXPERIMENTAL] {@link FormViewSchema} `buttons` block (#2998).\n * `.strict()` per ADR-0089 D3a so a typo'd key errors instead of vanishing.\n */\nexport const FormButtonConfigSchema = lazySchema(() => z.object({\n show: z.boolean().optional().describe('Whether the button is rendered (renderer default applies when omitted)'),\n label: I18nLabelSchema.optional().describe('Button label (i18n-capable; renderer default when omitted)'),\n}).strict());\nexport type FormButtonConfig = z.infer<typeof FormButtonConfigSchema>;\n\n/**\n * Form View Schema\n * Defines the layout for creating or editing a single record.\n *\n * @example Simple Sectioned Form\n * {\n * type: \"simple\",\n * sections: [\n * {\n * label: \"General Info\",\n * columns: 2,\n * fields: [\"name\", \"status\"]\n * },\n * {\n * label: \"Details\",\n * fields: [\"description\", { field: \"priority\", widget: \"rating\" }]\n * }\n * ]\n * }\n */\nexport const FormViewSchema = lazySchema(() => z.object({\n type: z.enum([\n 'simple', // Single column or sections\n 'tabbed', // Tabs\n 'wizard', // Step by step\n 'split', // Master-Detail split\n 'drawer', // Side panel\n 'modal' // Dialog\n ]).default('simple'),\n\n // --- Presentation options (per `type` variant). These mirror what the\n // ObjectForm component accepts so the protocol declares them; all optional. ---\n /** Field layout within the form body. */\n layout: z.enum(['vertical', 'horizontal', 'inline', 'grid']).optional().describe('Field layout direction'),\n /** Number of columns for the form body (grid/multi-column layouts). */\n columns: z.number().int().min(1).optional().describe('Number of columns for the form body'),\n /** Optional form title / description (for embedded or standalone forms). */\n title: z.string().optional().describe('Form title'),\n description: z.string().optional().describe('Form description'),\n /** Tabbed (`type: 'tabbed'`). */\n defaultTab: z.string().optional().describe('Initially active tab (tabbed forms)'),\n tabPosition: z.enum(['top', 'bottom', 'left', 'right']).optional().describe('Tab strip position (tabbed forms)'),\n /** Wizard (`type: 'wizard'`). */\n allowSkip: z.boolean().optional().describe('Allow skipping steps (wizard forms)'),\n showStepIndicator: z.boolean().optional().describe('Show the step indicator (wizard forms)'),\n /** Split (`type: 'split'`). */\n splitDirection: z.enum(['horizontal', 'vertical']).optional().describe('Split orientation (split forms)'),\n splitSize: z.number().optional().describe('Primary split panel size, % (split forms)'),\n splitResizable: z.boolean().optional().describe('Whether the split is resizable (split forms)'),\n /** Drawer (`type: 'drawer'`). */\n drawerSide: z.enum(['top', 'bottom', 'left', 'right']).optional().describe('Drawer side (drawer forms)'),\n /** @deprecated [#2578 → `modalSize` / size buckets] A pixel width can't be authored blind (unknown client viewport); the renderer derives width from content + viewport. */\n drawerWidth: z.string().optional().describe('[DEPRECATED → size buckets] Drawer width, e.g. \"480px\". A pixel width cannot be chosen without knowing the client viewport — the renderer derives it.'),\n /** Modal (`type: 'modal'`). */\n modalSize: z.enum(['sm', 'default', 'lg', 'xl', 'full']).optional().describe('Modal size (modal forms)'),\n\n /** Data Source Configuration */\n data: ViewDataSchema.optional().describe('Data source configuration (defaults to \"object\" provider)'),\n \n sections: z.array(FormSectionSchema).optional(), // For simple layout\n groups: z.array(FormSectionSchema).optional(), // Legacy support -> alias to sections\n\n /**\n * Inline child collections (master-detail). When present, the standard\n * create/edit form for this object renders as a master-detail form — the\n * object's own fields on top, an editable grid per child collection below,\n * persisted together in ONE atomic transaction — with no bespoke page. Each\n * entry needs only `childObject`; the relationship FK and grid columns are\n * derived from the child object's metadata (override via\n * `relationshipField` / `columns`).\n */\n subforms: z.array(z.object({\n childObject: z.string().describe('Child object whose records are entered inline'),\n relationshipField: z.string().optional().describe('FK on the child pointing back to the parent (auto-detected when omitted)'),\n columns: z.array(z.any()).optional().describe('Editable grid columns (derived from the child object when omitted)'),\n amountField: z.string().optional().describe('Numeric child column summed for the running total'),\n totalField: z.string().optional().describe('Parent field to receive the rolled-up sum'),\n title: z.string().optional().describe('Section title'),\n addLabel: z.string().optional().describe('Add-row button label'),\n minRows: z.number().optional(),\n maxRows: z.number().optional(),\n })).optional().describe('Inline master-detail child collections'),\n\n /** Default Sort for Related Lists (e.g., sort child records by date) */\n defaultSort: z.array(z.object({\n field: z.string().describe('Field name to sort by'),\n order: z.enum(['asc', 'desc']).default('desc').describe('Sort direction'),\n })).optional().describe('Default sort order for related list views within this form'),\n\n /** Public form sharing configuration */\n sharing: SharingConfigSchema.optional().describe('Public sharing configuration for this form'),\n\n /**\n * What happens after a successful submit.\n *\n * - `thank-you` (default) — show a confirmation panel\n * - `redirect` — send the browser to a URL\n * - `continue` — reset the form so another response can be entered\n * - `next-record` — advance to the next record (internal queues only)\n */\n submitBehavior: z.union([\n z.object({\n kind: z.literal('thank-you'),\n title: z.string().optional(),\n message: z.string().optional(),\n }),\n z.object({\n kind: z.literal('redirect'),\n url: z.string(),\n delayMs: z.number().int().min(0).optional(),\n }),\n z.object({ kind: z.literal('continue') }),\n z.object({ kind: z.literal('next-record') }),\n ]).optional().describe('Post-submit behavior'),\n\n /**\n * ⚠️ EXPERIMENTAL — NOT ENFORCED (#2998, ADR-0078). Structured action-button\n * config: per-button visibility + label for `submit` / `cancel` / `reset`.\n * This is the spec home for the flat renderer-invented keys ObjectUI's\n * `ObjectForm` reads today (`showSubmit`/`submitText`/`showCancel`/`cancelText`/\n * `showReset`, objectui#2545) — those never existed here and are silently\n * stripped by this strip-mode container. Experimental until the ObjectUI\n * renderer reads `buttons.*` (the ADR-0078 escape hatch: the contract ships\n * ahead of its consumer, marked so authoring it is not a false promise).\n */\n buttons: z.object({\n submit: FormButtonConfigSchema.optional().describe('Submit button'),\n cancel: FormButtonConfigSchema.optional().describe('Cancel button'),\n reset: FormButtonConfigSchema.optional().describe('Reset button'),\n }).strict().optional()\n .describe('[EXPERIMENTAL — NOT ENFORCED, #2998] Form action-button visibility & labels. Renderer wiring pending in ObjectUI (objectui#2545).'),\n\n /**\n * ⚠️ EXPERIMENTAL — NOT ENFORCED (#2998, ADR-0078). Initial field values for\n * create-mode forms, keyed by field machine name. Spec home for ObjectUI's\n * renderer-invented `initialValues` (objectui#2545). Experimental until the\n * ObjectUI renderer reads it.\n */\n defaults: z.record(z.string(), z.unknown()).optional()\n .describe('[EXPERIMENTAL — NOT ENFORCED, #2998] Initial field values for create-mode forms (spec home for ObjectUI `initialValues`). Renderer wiring pending (objectui#2545).'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes for the form view'),\n}));\n\n/**\n * Object-scoped user filters (ADR-0047 amendment, framework #2679 / objectui #2338).\n *\n * A {@link UserFiltersSchema} restricted to the styles that make sense on an object\n * list view: `dropdown` (per-field value chips — the Airtable \"quick filter\" pills)\n * and the deprecated `toggle`. The `tabs` element and its `showAllRecords` companion\n * are OMITTED because an object view's saved-view switcher (`ViewTabBar`) already owns\n * the tab-bar role — a `tabs` user-filter would render a second, conflicting tab bar.\n * Need named presets on an object? Use `listViews` (each becomes a segmented tab).\n */\nexport const ObjectUserFiltersSchema = lazySchema(() =>\n UserFiltersSchema.omit({ tabs: true, showAllRecords: true }).extend({\n element: z.enum(['dropdown', 'toggle']).default('dropdown')\n .describe('Filter control style on object views: \"dropdown\" (per-field value chips). \"toggle\" is deprecated. \"tabs\" is page-only — use `listViews` for named presets.'),\n }));\n\n/**\n * ADR-0047 \"views\" mode — an object's default list + named list views.\n *\n * Structurally a {@link ListViewSchema} whose `userFilters` is narrowed to\n * {@link ObjectUserFiltersSchema}: `dropdown` value chips are allowed (ADR-0047\n * amendment, framework #2679), but the page-only `tabs` preset bar is not — that\n * belongs to a page list (`InterfaceListPage`, \"filters\" mode), because an object\n * view's only tab-bar nav is the `ViewTabBar`. The narrowed schema makes a `tabs`\n * user-filter untypable at author time (tsc); the CLI `validate` list-view-mode rule\n * reports it pre-parse. See objectui #2338.\n */\nexport const ObjectListViewSchema = lazySchema(() =>\n ListViewSchema.omit({ userFilters: true }).extend({ userFilters: ObjectUserFiltersSchema.optional() }));\n\n/**\n * Master View Schema\n * Can define multiple named views.\n */\n/**\n * View Container Schema\n * Aggregates all view definitions for a specific object or context.\n * \n * @example\n * {\n * list: { type: \"grid\", columns: [\"name\"] },\n * form: { type: \"simple\", fields: [\"name\"] },\n * listViews: {\n * \"all\": { label: \"All\", filter: [] },\n * \"my\": { label: \"Mine\", filter: [[\"owner\", \"=\", \"{user_id}\"]] }\n * }\n * }\n */\nexport const ViewSchema = lazySchema(() => z.object({\n list: ObjectListViewSchema.optional(), // Default list view (views mode — dropdown userFilters allowed, no tabs; ADR-0047)\n form: FormViewSchema.optional(), // Default form view\n listViews: z.record(z.string(), ObjectListViewSchema).optional().describe('Additional named list views (views mode — dropdown userFilters allowed, no tabs; ADR-0047)'),\n formViews: z.record(z.string(), FormViewSchema).optional().describe('Additional named form views'),\n /**\n * ADR-0010 §3.7 — Package-level protection envelope. Package\n * authors declare lock policy here; the loader translates it\n * into the private `_lock` envelope at registration time and\n * strips this block before persistence. See\n * `shared/protection.zod.ts`.\n */\n protection: ProtectionSchema.optional().describe(\n 'Package author protection block — lock policy for this view.',\n ),\n\n // ADR-0010 — runtime protection envelope (internal — set by loader).\n ...MetadataProtectionFields,\n\n}));\n\n/**\n * Type-safe factory for creating view definitions.\n *\n * Validates the config at creation time using Zod `.parse()`, and rejects a\n * container that defines no views: `ViewSchema` strips unknown top-level keys,\n * so a *flat* list view (`{ name, label, type, columns, ... }`) would parse to\n * an empty container — zero views register and the Console silently renders\n * nothing. Failing here surfaces that authoring mistake at build time.\n *\n * @example\n * ```ts\n * const taskViews = defineView({\n * list: {\n * type: 'grid',\n * data: { provider: 'object', object: 'task' },\n * columns: ['subject', 'status', 'priority', 'due_date'],\n * },\n * form: {\n * type: 'simple',\n * sections: [{ label: 'Details', fields: [{ field: 'subject' }] }],\n * },\n * });\n * ```\n */\nexport function defineView(config: z.input<typeof ViewSchema>): View {\n const parsed = ViewSchema.parse(config);\n const viewCount =\n (parsed.list ? 1 : 0) +\n (parsed.form ? 1 : 0) +\n Object.keys(parsed.listViews ?? {}).length +\n Object.keys(parsed.formViews ?? {}).length;\n if (viewCount === 0) {\n throw new Error(\n 'defineView: the container defines no views — nothing registers and no view appears in the Console. '\n + 'Declare at least one of `list`, `form`, `listViews`, `formViews`. '\n + 'If you passed a flat list view ({ name, label, type, columns, ... }), wrap it: '\n + 'defineView({ list: { type, data, columns, ... } }).'\n );\n }\n return parsed;\n}\n\n// ───────────────────────────────────────────────────────────────────────────\n// Independent View Item model (Object has-many View)\n// ───────────────────────────────────────────────────────────────────────────\n//\n// The {@link ViewSchema} *container* above aggregates every view of an object\n// into one document. That model cannot express runtime-authored views (a user\n// adding \"My high-value leads\" at runtime cannot append to a developer's source\n// file), and it forces multiple distinct views into a single designer.\n//\n// {@link ViewItemSchema} promotes each named view to a first-class, independently\n// addressable entity bound to its object by a foreign key. The object↔view\n// switcher is then a *query* (`getViewsByObject`) rather than embedded storage —\n// mirroring Airtable / Salesforce / Notion, where a table/object has-many views.\n//\n// `defineView` is retained as authoring sugar: the backend loader expands an\n// aggregated document into N ViewItems at registration time, so existing\n// `*.view.ts` files and the published spec keep working unchanged.\n\n/**\n * Qualified view-item identity: `<object>.<viewKey>` — dotted snake_case\n * segments, e.g. `crm_lead.pipeline`. Globally unique, and the object can be\n * recovered from the prefix, so the registry key never collides across objects.\n */\nexport const ViewItemNameSchema = z\n .string()\n .regex(\n /^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$/,\n 'View item name must be a dotted snake_case qualified name, e.g. \"crm_lead.pipeline\".',\n )\n .describe('Globally-unique view id, `<object>.<viewKey>`.');\n\n/**\n * Identity layer for a view item — its visibility scope and ownership.\n *\n * - `package` — shipped from `*.view.ts` source / an installed package.\n * Not deletable (reinstall restores it); customisable via an\n * override layer; hideable from the switcher.\n * - `shared` — authored at runtime, visible org-wide. Creating one is gated\n * by the `view.manageShared` capability.\n * - `personal` — authored at runtime, scoped to `owner`. Any user with read\n * access to the object may create one.\n *\n * Named `scope` (not `provenance`) to avoid colliding with the loader-set\n * `_provenance` envelope field, which tracks a different axis\n * (package | org | env-forced).\n */\nexport const ViewScopeSchema = z\n .enum(['package', 'shared', 'personal'])\n .describe('View identity layer: package | shared | personal.');\n\n/** Discriminator for the kind of view a {@link ViewItemSchema} carries. */\nexport const ViewKindSchema = z\n .enum(['list', 'form'])\n .describe('Whether `config` is a ListView (list family) or a FormView.');\n\n/**\n * Fields shared by every independent view item, regardless of kind. Returned\n * as a raw Zod shape so it composes into each discriminated-union member\n * without forcing eager schema construction.\n */\nfunction viewItemBaseShape() {\n return {\n name: ViewItemNameSchema,\n object: z\n .string()\n .describe('Bound object name — the foreign key used to aggregate views.'),\n label: I18nLabelSchema.optional().describe('Display label (supports i18n).'),\n isDefault: z\n .boolean()\n .optional()\n .describe(\"Whether this is the object's default view in the switcher.\"),\n order: z\n .number()\n .int()\n .optional()\n .describe(\"Sort order within the object's view switcher / left rail.\"),\n scope: ViewScopeSchema.optional().describe(\n 'Identity layer (defaults to `package` for source-loaded views).',\n ),\n owner: z\n .string()\n .optional()\n .describe('Owner user id — set when `scope` is `personal`.'),\n hidden: z\n .boolean()\n .optional()\n .describe('Hidden from the switcher (per-user / per-org declutter).'),\n /**\n * Package author protection block — same envelope as {@link ViewSchema};\n * the loader translates it into the private `_lock` envelope.\n */\n protection: ProtectionSchema.optional().describe(\n 'Package author protection block — lock policy for this view.',\n ),\n // ADR-0010 — runtime protection envelope (internal — set by loader).\n ...MetadataProtectionFields,\n };\n}\n\n/**\n * Independent View Item — a single named view bound to one object.\n *\n * Discriminated on `viewKind`: a `list` item carries a {@link ListViewSchema}\n * config (grid / kanban / calendar / …), a `form` item carries a\n * {@link FormViewSchema} config.\n *\n * @example\n * ```ts\n * const pipeline = defineViewItem({\n * name: 'crm_lead.pipeline',\n * object: 'crm_lead',\n * viewKind: 'list',\n * label: 'Pipeline',\n * config: {\n * type: 'kanban',\n * data: { provider: 'object', object: 'crm_lead' },\n * columns: ['name', 'stage', 'amount'],\n * },\n * });\n * ```\n */\nexport const ViewItemSchema = lazySchema(() =>\n z.discriminatedUnion('viewKind', [\n z.object({\n viewKind: z.literal('list'),\n config: ListViewSchema.describe('List-family view configuration.'),\n ...viewItemBaseShape(),\n }),\n z.object({\n viewKind: z.literal('form'),\n config: FormViewSchema.describe('Form view configuration.'),\n ...viewItemBaseShape(),\n }),\n ]),\n);\n\n/**\n * Type-safe factory for an independent {@link ViewItem}.\n *\n * Validates the config at creation time using Zod `.parse()`.\n *\n * @example\n * ```ts\n * const allLeads = defineViewItem({\n * name: 'crm_lead.all',\n * object: 'crm_lead',\n * viewKind: 'list',\n * isDefault: true,\n * config: { type: 'grid', data: { provider: 'object', object: 'crm_lead' }, columns: ['name'] },\n * });\n * ```\n */\nexport function defineViewItem(config: z.input<typeof ViewItemSchema>): ViewItem {\n return ViewItemSchema.parse(config);\n}\n\n// ───────────────────────────────────────────────────────────────────────────\n// Canonical persisted-`view`-body schema (the runtime metadata-type schema)\n// ───────────────────────────────────────────────────────────────────────────\n//\n// #3095 — the `view` metadata type maps to THIS schema in\n// `metadata-type-schemas.ts` (both the save-time 422 validator and the\n// read-time `computeMetadataDiagnostics` badge consult it). A single\n// container schema ({@link ViewSchema}) is a NO-OP for two of the three shapes\n// a `view` body actually carries at runtime: Zod strips unknown keys, so a\n// standalone {@link ViewItemSchema} record ({ name, object, viewKind, config })\n// and a console personalization overlay (raw view config + inherited identity)\n// both parse to `{}` — silently \"valid\" while their `config` is never checked.\n//\n// The three legitimate runtime shapes, each validated GENUINELY here:\n//\n// 1. `defineView` aggregate **container** — at least one of\n// `list`/`form`/`listViews`/`formViews`. An empty container is rejected\n// (it registers zero views; mirrors the {@link defineView} guard).\n// 2. Standalone **ViewItem record** — `{ viewKind, config, … }`; the nested\n// `config` is validated against ListView/FormView.\n// 3. **Flattened runtime overlay** — a raw ListView/FormView config at the\n// top level plus optional identity fields (`viewKind`/`object`/`label`,\n// inherited from the shadowed registry entry by `normalizeViewMetadata`;\n// see #2555). This is what a personalization PUT (column sort, inline\n// edit, …) sends. Discriminated from a record by the ABSENCE of a nested\n// `config`, and from a container by the ABSENCE of container slots — the\n// structural guards below make those exclusions explicit so a malformed\n// record/container can never be rescued by this lenient branch.\n//\n// Auxiliary Studio round-trip keys (`isPinned`, `sortOrder`, …) ride along on\n// every shape: all four members strip-parse (no `.strict()`), so an unknown\n// top-level key never 422s — matching the \"persist the payload verbatim\"\n// contract in `saveMetaItem` (it validates but stores the original item).\n\n/**\n * Optional identity + structural-guard fields layered onto the two \"flattened\n * runtime overlay\" members. The `config`/`list`/`form`/`listViews`/`formViews`\n * guards pin those keys to `undefined`: a body carrying any of them is a record\n * or a container, not a flattened overlay, so it must be validated by the\n * dedicated member instead of slipping through here with its real payload\n * stripped away.\n */\nfunction flattenedViewOverlayFields() {\n return {\n name: z.string().optional().describe('Save name / qualified view id (stamped by the write path).'),\n object: z.string().optional().describe('Bound object name (inherited from the shadowed entry — #2555).'),\n viewKind: ViewKindSchema.optional().describe('View family (inherited from the shadowed entry — #2555).'),\n label: I18nLabelSchema.optional().describe('Display label (inherited from the shadowed entry — #2555).'),\n isDefault: z.boolean().optional(),\n order: z.number().int().optional(),\n scope: ViewScopeSchema.optional(),\n owner: z.string().optional(),\n hidden: z.boolean().optional(),\n protection: ProtectionSchema.optional(),\n ...MetadataProtectionFields,\n // Structural guards — a flattened overlay is neither a record nor a container.\n config: z.undefined().optional(),\n list: z.undefined().optional(),\n form: z.undefined().optional(),\n listViews: z.undefined().optional(),\n formViews: z.undefined().optional(),\n };\n}\n\n/**\n * True when a `view` container defines at least one view. The bare\n * {@link ViewSchema} accepts `{}` (every slot optional), which would let an\n * empty overlay pass validation and register nothing — the same footgun\n * {@link defineView} rejects at authoring time.\n */\nfunction containerHasAView(v: unknown): boolean {\n if (!v || typeof v !== 'object') return false;\n const c = v as Record<string, unknown>;\n return Boolean(\n c.list ||\n c.form ||\n (c.listViews && typeof c.listViews === 'object' && Object.keys(c.listViews).length > 0) ||\n (c.formViews && typeof c.formViews === 'object' && Object.keys(c.formViews).length > 0),\n );\n}\n\n/**\n * Canonical schema for ANY persisted `view` metadata body — the schema the\n * `view` type registers in `metadata-type-schemas.ts`. A union over the three\n * runtime shapes (see the block comment above), so save-time validation and\n * read-time diagnostics finally see through `ViewItem`/personalization bodies\n * instead of stripping them to `{}` (#3095).\n *\n * `z.toJSONSchema()` emits this as an `anyOf` of the four members, which the\n * `/api/v1/meta/types/view` endpoint serves to Studio's SchemaForm.\n */\nexport const ViewMetadataSchema = lazySchema(() =>\n z.union([\n // 2. Standalone ViewItem record — nested config validated genuinely.\n ViewItemSchema,\n // 1. Non-empty defineView container.\n ViewSchema.refine(containerHasAView, {\n message:\n 'A view container must define at least one of `list`, `form`, `listViews`, or `formViews`.',\n }),\n // 3. Flattened runtime overlay — inline ListView / FormView config + identity.\n // The list member is tried first; a flattened form (no required\n // `columns`, disjoint `type` enum) then matches the form member.\n ListViewSchema.extend(flattenedViewOverlayFields()),\n FormViewSchema.extend(flattenedViewOverlayFields()),\n ]),\n);\n\n// ───────────────────────────────────────────────────────────────────────────\n// defineView container → ViewItem expansion (shared by every loader)\n//\n// `defineView({ list, form, listViews, formViews })` aggregates an object's\n// views into one document. Each registration path that ingests such a\n// container (the ObjectQL engine boot loop AND the metadata HMR plugin) must\n// expand it into N independent ViewItems registered under `<object>.<viewKey>`,\n// so each view is individually addressable and `getViewsByObject()` can rebuild\n// the switcher. The original container is ALSO kept under the bare `<object>`\n// key for backward-compatible reads. This logic lives in `@objectstack/spec`\n// (depended on by both objectql and metadata) so the two loaders cannot drift.\n\n/** A ViewItem materialised from an aggregated container (always `package`). */\nexport interface ExpandedViewItem {\n name: string;\n object: string;\n viewKind: 'list' | 'form';\n label?: unknown;\n config: any;\n isDefault?: boolean;\n order: number;\n scope: 'package';\n /** Non-blocking expansion diagnostics (MetadataValidationResult wire shape).\n * Present only when the item's name had to be rewritten to avoid a\n * collision — loaders surface `warnings` in their boot/HMR logs and\n * Studio can badge the view. */\n _diagnostics?: { valid: boolean; warnings: Array<{ path: string; message: string }> };\n}\n\n/** True when a raw view artifact still uses the aggregated container shape\n * (and is not already an independent ViewItem, which carries `viewKind`). */\nexport function isAggregatedViewContainer(item: any): boolean {\n if (!item || typeof item !== 'object') return false;\n if (item.viewKind) return false; // already an independent ViewItem\n return Boolean(item.list || item.form || item.listViews || item.formViews);\n}\n\n/** Structural signature used to collapse a container's default `list`/`form`\n * with a redundant `listViews`/`formViews` restatement of the same view (the\n * common \"default == listViews.all\" authoring pattern). */\nfunction viewSignature(v: any): string {\n if (!v || typeof v !== 'object') return '';\n try {\n return JSON.stringify({ type: v.type ?? null, label: v.label ?? null, columns: v.columns ?? null });\n } catch {\n return '';\n }\n}\n\n/** Allocate a collision-free `<object>.<key>` name within one expansion. */\nfunction uniqueViewName(base: string, used: Set<string>): string {\n let name = base;\n let i = 2;\n while (used.has(name)) name = `${base}_${i++}`;\n used.add(name);\n return name;\n}\n\n/** Stamp a rename warning on an expanded item whose `<object>.<key>` name was\n * already taken (e.g. `formViews.default` vs the implicit default `list`).\n * The rename itself is kept for backward compatibility — this makes it LOUD:\n * loaders log the warning and Studio can render it, so authors discover that\n * references to the requested name (form action `target`s, navigation\n * `viewName`s) resolve to a DIFFERENT view. */\nfunction stampRenameWarning(item: ExpandedViewItem, requestedName: string): void {\n if (item.name === requestedName) return;\n item._diagnostics = {\n valid: true,\n warnings: [{\n path: 'name',\n message:\n `View key collision: '${requestedName}' is already registered by another view in this `\n + `defineView container (list and form views share one '<object>.<key>' namespace, and the `\n + `default 'list' implicitly claims '<object>.default'). This ${item.viewKind} view was `\n + `renamed to '${item.name}'. References targeting '${requestedName}' — form action `\n + `targets, navigation viewNames — will resolve to the OTHER view. Rename the view key `\n + `to something unique to remove this warning.`,\n }],\n };\n}\n\nfunction cloneViewConfig(v: any): any {\n try {\n return structuredClone(v);\n } catch {\n return JSON.parse(JSON.stringify(v));\n }\n}\n\n/**\n * A view-key collision detected while expanding one `defineView` container.\n *\n * List and form views share a single `<object>.<key>` namespace during\n * expansion (see {@link expandViewContainer}), and the default `list`\n * implicitly claims `<object>.default`. When a later view competes for a name\n * already taken, it is renamed (`<object>.<key>` → `<object>.<key>_2`) to keep\n * the runtime registry key unique. That rename is a silent footgun: references\n * to the requested name (form action `target`s, navigation `viewName`s) resolve\n * to the OTHER view. The build-time view-ref lint turns each collision into a\n * hard error so the author fixes the key instead of shipping a broken reference.\n */\nexport interface ViewKeyCollision {\n /** The `<object>.<key>` name that was already registered by an earlier view. */\n requested: string;\n /** The disambiguated name the colliding view was renamed to (e.g. `…_2`). */\n renamedTo: string;\n /** Which family the renamed (losing) view belongs to. */\n viewKind: 'list' | 'form';\n /** The raw author-supplied key that collided. */\n key: string;\n}\n\n/** Result of {@link expandViewContainerWithDiagnostics}. */\nexport interface ExpandViewResult {\n items: ExpandedViewItem[];\n collisions: ViewKeyCollision[];\n}\n\n/**\n * Expand an aggregated view container into independent ViewItems, ALSO reporting\n * every name collision that forced a rename.\n *\n * List family: `listViews` entries first (keys taken from the author), then the\n * default `list` — deduped by structural signature so a `listViews.all` that\n * merely restates `list` collapses into one item. The view matching the\n * declared default is flagged `isDefault`. Form family: `formViews` entries,\n * then the default `form`.\n *\n * Collisions are captured at the exact points the shared `used` set forces a\n * rename, so the diagnostic can never drift from the expansion it describes.\n */\nexport function expandViewContainerWithDiagnostics(object: string, container: any): ExpandViewResult {\n const out: ExpandedViewItem[] = [];\n const collisions: ViewKeyCollision[] = [];\n const used = new Set<string>();\n let order = 0;\n\n // ---- list family ----\n const listSigToName = new Map<string, string>();\n const listViews =\n container.listViews && typeof container.listViews === 'object' ? container.listViews : {};\n for (const [k, v] of Object.entries<any>(listViews)) {\n if (!v || typeof v !== 'object') continue;\n const requested = `${object}.${k}`;\n const name = uniqueViewName(requested, used);\n if (name !== requested) collisions.push({ requested, renamedTo: name, viewKind: 'list', key: k });\n listSigToName.set(viewSignature(v), name);\n const item: ExpandedViewItem = { name, object, viewKind: 'list', label: v.label, config: cloneViewConfig(v), order: order++, scope: 'package' };\n stampRenameWarning(item, requested);\n out.push(item);\n }\n const defaultList = container.list;\n let defaultListName: string | undefined;\n if (defaultList && typeof defaultList === 'object') {\n const dup = listSigToName.get(viewSignature(defaultList));\n if (dup) {\n defaultListName = dup; // already represented by a named listViews entry\n } else {\n const key = typeof defaultList.name === 'string' && defaultList.name ? defaultList.name : 'default';\n const requested = `${object}.${key}`;\n const name = uniqueViewName(requested, used);\n if (name !== requested) collisions.push({ requested, renamedTo: name, viewKind: 'list', key });\n const item: ExpandedViewItem = { name, object, viewKind: 'list', label: defaultList.label, config: cloneViewConfig(defaultList), order: order++, scope: 'package' };\n stampRenameWarning(item, requested);\n out.push(item);\n defaultListName = name;\n }\n }\n if (!defaultListName && out.length) defaultListName = out[0].name;\n for (const item of out) {\n if (item.viewKind === 'list' && item.name === defaultListName) item.isDefault = true;\n }\n\n // ---- form family ----\n const formStart = out.length;\n const formSigSeen = new Set<string>();\n const formViews =\n container.formViews && typeof container.formViews === 'object' ? container.formViews : {};\n for (const [k, v] of Object.entries<any>(formViews)) {\n if (!v || typeof v !== 'object') continue;\n const requested = `${object}.${k}`;\n const name = uniqueViewName(requested, used);\n if (name !== requested) collisions.push({ requested, renamedTo: name, viewKind: 'form', key: k });\n formSigSeen.add(viewSignature(v));\n const item: ExpandedViewItem = { name, object, viewKind: 'form', label: v.label, config: cloneViewConfig(v), order: order++, scope: 'package' };\n stampRenameWarning(item, requested);\n out.push(item);\n }\n const defaultForm = container.form;\n let defaultFormName: string | undefined;\n if (defaultForm && typeof defaultForm === 'object' && !formSigSeen.has(viewSignature(defaultForm))) {\n const key = typeof defaultForm.name === 'string' && defaultForm.name ? defaultForm.name : 'form';\n const requested = `${object}.${key}`;\n const name = uniqueViewName(requested, used);\n if (name !== requested) collisions.push({ requested, renamedTo: name, viewKind: 'form', key });\n const item: ExpandedViewItem = { name, object, viewKind: 'form', label: defaultForm.label, config: cloneViewConfig(defaultForm), order: order++, scope: 'package' };\n stampRenameWarning(item, requested);\n out.push(item);\n defaultFormName = name;\n }\n if (!defaultFormName && out.length > formStart) defaultFormName = out[formStart].name;\n for (let i = formStart; i < out.length; i++) {\n if (out[i].name === defaultFormName) out[i].isDefault = true;\n }\n\n return { items: out, collisions };\n}\n\n/**\n * Expand an aggregated view container into independent ViewItems.\n *\n * Thin wrapper over {@link expandViewContainerWithDiagnostics} that discards the\n * collision diagnostics — the shape every runtime loader consumes. Behaviour is\n * unchanged: colliding names are still renamed so the registry key stays unique.\n */\nexport function expandViewContainer(object: string, container: any): ExpandedViewItem[] {\n return expandViewContainerWithDiagnostics(object, container).items;\n}\n\n/**\n * Type-safe factory for a standalone {@link FormView} bound to a JSON Schema\n * rather than to an ObjectQL object.\n *\n * Use this for forms that edit **metadata** (e.g. `report.form.ts`,\n * `dashboard.form.ts`), **action inputs**, or **flow screens** — anywhere the\n * data shape is described by a Zod-derived JSON Schema instead of an Object\n * field set.\n *\n * The returned FormView is validated at definition time; the runtime form\n * renderer (`@object-ui/plugin-form`) inspects `data.provider === 'schema'`\n * and pulls field metadata from the resolved JSON Schema instead of from\n * ObjectQL.\n *\n * @example\n * ```ts\n * export const reportForm = defineForm({\n * schemaId: 'report',\n * type: 'tabbed',\n * sections: [\n * { label: 'Basics', columns: 2, fields: [\n * { field: 'name' },\n * { field: 'label' },\n * { field: 'objectName', widget: 'ref:object' },\n * { field: 'type' },\n * ]},\n * { label: 'Columns', fields: [{ field: 'columns', widget: 'master-detail' }] },\n * { label: 'Advanced', collapsible: true, collapsed: true, fields: [\n * { field: 'filter', widget: 'filter-builder' },\n * { field: 'chart', widget: 'chart-config' },\n * ]},\n * ],\n * });\n * ```\n */\nexport function defineForm(\n config: Omit<z.input<typeof FormViewSchema>, 'data'> & { schemaId: string },\n): FormView {\n const { schemaId, ...rest } = config;\n return FormViewSchema.parse({\n ...rest,\n data: { provider: 'schema', schemaId },\n });\n}\n\nexport type View = z.infer<typeof ViewSchema>;\nexport type ViewItem = z.infer<typeof ViewItemSchema>;\n/** Any persisted `view` metadata body: container | ViewItem record | flattened overlay (#3095). */\nexport type ViewMetadata = z.infer<typeof ViewMetadataSchema>;\nexport type ViewScope = z.infer<typeof ViewScopeSchema>;\nexport type ViewKind = z.infer<typeof ViewKindSchema>;\nexport type ListView = z.infer<typeof ListViewSchema>;\nexport type FormView = z.infer<typeof FormViewSchema>;\nexport type FormSection = z.infer<typeof FormSectionSchema>;\nexport type ListColumn = z.infer<typeof ListColumnSchema>;\nexport type FormField = z.infer<typeof FormFieldSchema>;\nexport type SelectionConfig = z.infer<typeof SelectionConfigSchema>;\nexport type NavigationConfig = z.infer<typeof NavigationConfigSchema>;\nexport type PaginationConfig = z.infer<typeof PaginationConfigSchema>;\nexport type ViewData = z.infer<typeof ViewDataSchema>;\nexport type HttpRequest = z.infer<typeof HttpRequestSchema>;\nexport type HttpMethod = z.infer<typeof HttpMethodSchema>;\nexport type ColumnSummary = z.infer<typeof ColumnSummarySchema>;\nexport type RowHeight = z.infer<typeof RowHeightSchema>;\nexport type GroupingConfig = z.infer<typeof GroupingConfigSchema>;\nexport type GalleryConfig = z.infer<typeof GalleryConfigSchema>;\nexport type TimelineConfig = z.infer<typeof TimelineConfigSchema>;\nexport type ListChartConfig = z.infer<typeof ListChartConfigSchema>;\nexport type ViewSharing = z.infer<typeof ViewSharingSchema>;\nexport type RowColorConfig = z.infer<typeof RowColorConfigSchema>;\nexport type VisualizationType = z.infer<typeof VisualizationTypeSchema>;\nexport type UserActionsConfig = z.infer<typeof UserActionsConfigSchema>;\nexport type AppearanceConfig = z.infer<typeof AppearanceConfigSchema>;\nexport type ViewTab = z.infer<typeof ViewTabSchema>;\nexport type UserFilterField = z.infer<typeof UserFilterFieldSchema>;\nexport type UserFilters = z.infer<typeof UserFiltersSchema>;\nexport type AddRecordConfig = z.infer<typeof AddRecordConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { ProtectionSchema } from '../shared/protection.zod';\nimport { MetadataProtectionFields } from '../kernel/metadata-protection.zod';\nimport { FilterConditionSchema } from '../data/filter.zod';\nimport { ChartTypeSchema, ChartConfigSchema } from './chart.zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\nimport { ResponsiveConfigSchema, PerformanceConfigSchema } from './responsive.zod';\n\n/**\n * Color variant for dashboard widgets (e.g., KPI cards).\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const WidgetColorVariantSchema = lazySchema(() => z.enum([\n 'default',\n 'blue',\n 'teal',\n 'orange',\n 'purple',\n 'success',\n 'warning',\n 'danger',\n]).describe('Widget color variant'));\n\n/**\n * Action type for widget action buttons.\n */\nexport const WidgetActionTypeSchema = lazySchema(() => z.enum([\n 'script',\n 'url',\n 'modal',\n 'flow',\n 'api',\n]).describe('Widget action type'));\n\n/**\n * Dashboard Header Action Schema\n * An action button displayed in the dashboard header area.\n */\nexport const DashboardHeaderActionSchema = lazySchema(() => z.object({\n /** Action label */\n label: I18nLabelSchema.describe('Action button label'),\n\n /** Action URL or target */\n actionUrl: z.string().describe('URL or target for the action'),\n\n /** Action type */\n actionType: WidgetActionTypeSchema.optional().describe('Type of action'),\n\n /** Icon identifier */\n icon: z.string().optional().describe('Icon identifier for the action button'),\n}).describe('Dashboard header action'));\n\n/**\n * Dashboard Header Schema\n * Structured header configuration for the dashboard.\n */\nexport const DashboardHeaderSchema = lazySchema(() => z.object({\n /** Whether to show the dashboard title in the header */\n showTitle: z.boolean().default(true).describe('Show dashboard title in header'),\n\n /** Whether to show the dashboard description in the header */\n showDescription: z.boolean().default(true).describe('Show dashboard description in header'),\n\n /** Action buttons displayed in the header */\n actions: z.array(DashboardHeaderActionSchema).optional().describe('Header action buttons'),\n}).describe('Dashboard header configuration'));\n\n/**\n * Legacy / quarantined widget keys that `.strict()` now rejects. Naming them\n * lets the error map hand the author a fixable message instead of a bare\n * \"unrecognized key\". Two families:\n *\n * - **Pre-ADR-0021 inline analytics** (`object`/`categoryField`/`valueField`/\n * `aggregate`/`rowField`/`columnField`/…): removed from the authorable spec at\n * `@objectstack/spec` 9.0.0 (the single-form cutover). Bind a `dataset` and\n * select `dimensions`/`values` instead.\n * - **objectui-internal props** (`component`, inline `data`): renderer-only\n * capabilities that are intentionally not modeled server-side (framework#3251\n * decision tree) — they must not appear on AI-authored dashboard metadata.\n */\nconst LEGACY_WIDGET_ANALYTICS_KEYS = new Set([\n 'object', 'categoryField', 'categoryGranularity', 'valueField', 'aggregate',\n 'aggregation', 'rowField', 'columnField', 'xAxisField', 'yAxisFields', 'measures',\n]);\nconst QUARANTINED_WIDGET_KEYS = new Set(['component', 'data']);\n\n/**\n * Error map for the strict `DashboardWidgetSchema`. Turns an\n * `unrecognized_keys` rejection into a *fixable* message: it always names the\n * offending key(s), and when a key is a removed inline-analytics key or an\n * objectui-internal prop it points the author at the ADR-0021 dataset shape\n * (and `options` for renderer-specific extras). Mirrors `strictVisibilityError`\n * (ADR-0089 D3a); every other issue code defers to zod's default.\n */\nconst strictWidgetAnalyticsError: z.core.$ZodErrorMap = (issue) => {\n if (issue.code !== 'unrecognized_keys') return undefined;\n const keys = (issue as { keys?: readonly string[] }).keys ?? [];\n const list = keys.map((k) => `\\`${k}\\``).join(', ');\n const base =\n `Unrecognized key(s) on this dashboard widget: ${list}. ` +\n `Undeclared top-level keys were dropped silently before strict validation, ` +\n `shipping inert metadata; a stale or mis-layered key is now a loud parse error.`;\n if (keys.some((k) => LEGACY_WIDGET_ANALYTICS_KEYS.has(k))) {\n return (\n base +\n ' The pre-ADR-0021 inline analytics shape (`object` + `categoryField` + ' +\n '`valueField` + `aggregate`, pivot `rowField`/`columnField`) was removed — ' +\n 'bind a `dataset` and select `dimensions` + `values` by name. Renderer-only ' +\n 'settings belong under `options`.'\n );\n }\n if (keys.some((k) => QUARANTINED_WIDGET_KEYS.has(k))) {\n return (\n base +\n ' `component` and inline `data` are objectui-internal renderer capabilities, ' +\n 'not part of the author-facing dashboard spec (framework#3251).'\n );\n }\n return base;\n};\n\n/**\n * Dashboard Widget Schema\n * A single component on the dashboard grid.\n */\nexport const DashboardWidgetSchema = lazySchema(() => z.object({\n /** Unique widget identifier (snake_case, used for targetWidgets references) */\n id: SnakeCaseIdentifierSchema.describe('Unique widget identifier (snake_case)'),\n\n /** Widget Title */\n title: I18nLabelSchema.optional().describe('Widget title'),\n\n /** Widget Description (displayed below the title) */\n description: I18nLabelSchema.optional().describe('Widget description text below the header'),\n \n /** Visualization Type */\n type: ChartTypeSchema.default('metric').describe('Visualization type'),\n \n /** Chart Configuration */\n chartConfig: ChartConfigSchema.optional().describe('Chart visualization configuration'),\n\n /** Color variant for the widget (e.g., KPI card accent color) */\n colorVariant: WidgetColorVariantSchema.optional().describe('Widget color variant for theming'),\n\n /**\n * Runtime capability gate — widget is hidden when the named object is\n * not registered in the runtime's SchemaRegistry. Mirrors\n * `NavigationItem.requiresObject` so cloud-only widgets (e.g. those\n * keyed on `sys_app` / `sys_package_installation`) silently disappear\n * in single-environment runtimes instead of rendering a 404 error.\n * Set explicitly to the dataset's base object when the widget should be\n * gated on that object's availability.\n */\n requiresObject: z.string().optional().describe('Hide the widget unless the named object is registered'),\n\n /**\n * Runtime capability gate — widget is hidden when the named kernel\n * service is not registered. Mirrors `NavigationItem.requiresService`.\n */\n requiresService: z.string().optional().describe('Hide the widget unless the named kernel service is registered'),\n\n /** Action URL for the widget header action button */\n actionUrl: z.string().optional().describe('URL or target for the widget action button'),\n\n /** Action type for the widget header action button */\n actionType: WidgetActionTypeSchema.optional().describe('Type of action for the widget action button'),\n\n /** Icon for the widget header action button */\n actionIcon: z.string().optional().describe('Icon identifier for the widget action button'),\n \n /** Presentation-scope filter (MongoDB-style), ANDed into the dataset query as `runtimeFilter`. */\n filter: FilterConditionSchema.optional().describe('Presentation-scope filter (runtimeFilter)'),\n\n /**\n * Period-over-period comparison primitive.\n *\n * When set, the renderer runs a second query against a shifted time\n * window and surfaces the delta (metric widgets show a secondary\n * value + arrow; chart widgets render a muted/dashed overlay series).\n *\n * - `'previousPeriod'` — auto-detect the comparison window from the\n * widget's `filter` date macros (e.g. `{current_month_start}` →\n * `{last_month_start}`). Falls back to no comparison when the\n * filter contains no resolvable date range.\n * - `'previousYear'` — shift the resolved filter window back by one\n * calendar year.\n * - `{ offset: '7d' | '1M' | '1y' }` — shift by an explicit\n * ISO-8601-like duration. Units: `d` (days), `w` (weeks),\n * `M` (months), `y` (years).\n */\n compareTo: z.union([\n z.literal('previousPeriod'),\n z.literal('previousYear'),\n z.object({\n offset: z.string().regex(/^\\d+[dwMy]$/, 'Offset must match <N>(d|w|M|y), e.g. \"7d\", \"1M\", \"1y\"'),\n }),\n ]).optional().describe('Period-over-period comparison window'),\n\n /**\n * ADR-0021 — the semantic-layer `dataset` this widget binds to. The widget\n * selects the dataset's dimensions/measures BY NAME; the dataset owns the base\n * object, allowed joins, intrinsic filter, dimensions, and measures,\n * so numbers stay consistent across every surface. This is the single\n * author-facing analytics shape (the legacy inline `object` + `categoryField`\n * + `valueField` + `aggregate` query was removed in the single-form cutover).\n */\n dataset: SnakeCaseIdentifierSchema.describe('Dataset name to bind (ADR-0021)'),\n /** Dimension names (from the dataset) for X / group / split. */\n dimensions: z.array(z.string()).optional().describe('Dimension names — X/group/split'),\n /** Measure names (from the dataset) for the value axis. */\n values: z.array(z.string()).min(1).describe('Measure names — Y (at least one)'),\n\n /**\n * Layout Position (React-Grid-Layout style)\n * x: column (0-11)\n * y: row\n * w: width (1-12)\n * h: height\n *\n * OPTIONAL — when omitted, the renderer auto-flows the widget into the grid\n * (DashboardGridLayout falls back to `x: (i % 4) * 3, y: Math.floor(i/4) * 4,\n * w: 3, h: 4`). The Studio dashboard designer adds widgets WITHOUT a layout\n * and relies on this auto-flow; requiring `layout` here made every\n * designer-authored dashboard fail validation (422 on draft save, Publish\n * disabled) even though it rendered correctly. Authors may still pin an\n * explicit grid position; absence means \"auto-place\".\n */\n layout: z.object({\n x: z.number(),\n y: z.number(),\n w: z.number(),\n h: z.number(),\n }).optional().describe('Grid layout position (auto-flowed when omitted)'),\n \n /** Widget specific options (colors, legend, etc.) */\n options: z.unknown().optional().describe('Widget specific configuration'),\n\n /**\n * Per-widget bindings from a dashboard-level filter (referenced by its\n * `name`, or the reserved name `\"dateRange\"` for the built-in date range)\n * to one of THIS widget's fields (framework#2501):\n * - string → apply the filter to that field (e.g. `{ dateRange: 'signed_at' }`)\n * - false → opt this widget out of that filter\n * - absent → default binding: the filter's own `field`\n * (dateRange: `dateRange.field ?? 'created_at'`)\n */\n filterBindings: z.record(z.string(), z.union([z.string(), z.literal(false)])).optional()\n .describe(\"Per-widget dashboard-filter bindings: filter name → this widget's field, or false to opt out\"),\n\n /**\n * Rule ids of build diagnostics intentionally suppressed on this widget\n * (e.g. `'table-count-only'` when a single-row summary table is deliberate).\n * Consumed by `objectstack build` / `objectstack lint`; no runtime effect.\n */\n suppressWarnings: z.array(z.string()).optional().describe('Build diagnostic rule ids suppressed on this widget'),\n\n /** Responsive layout overrides per breakpoint */\n responsive: ResponsiveConfigSchema.optional().describe('Responsive layout configuration'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n // ADR-0021 single-form: every widget binds a `dataset` and selects `values`\n // (both required above) — there is no inline-query shape to disambiguate.\n}, { error: strictWidgetAnalyticsError })\n // ADR-0021 endpoint (framework#3251, protocol 16 `step16`): reject undeclared\n // top-level keys instead of silently stripping them. A hallucinated or legacy\n // key is now a deterministic author-time error (CI) rather than a silent\n // no-op a human reviewer would miss. `options` stays the free-form escape\n // hatch for renderer-specific extras.\n .strict());\n\n/**\n * Dynamic options binding for global filters.\n * Allows dropdown options to be fetched from an object at runtime.\n */\nexport const GlobalFilterOptionsFromSchema = lazySchema(() => z.object({\n /** Source object name to fetch options from */\n object: z.string().describe('Source object name'),\n\n /** Field to use as option value */\n valueField: z.string().describe('Field to use as option value'),\n\n /** Field to use as option label */\n labelField: z.string().describe('Field to use as option label'),\n\n /** Optional filter to apply when fetching options */\n filter: FilterConditionSchema.optional().describe('Filter to apply to source object'),\n}).describe('Dynamic filter options from object'));\n\n/**\n * Global Filter Schema\n * Defines a single global filter control for the dashboard filter bar.\n */\nexport const GlobalFilterSchema = lazySchema(() => z.object({\n /**\n * Stable filter name (framework#2501) — the dashboard-variable key under\n * which the filter's value is published (readable in widget expressions as\n * `page.<name>`) and the key widgets reference in `filterBindings`.\n * Defaults to `field`. The name `\"dateRange\"` is reserved for the built-in\n * dashboard date range.\n */\n name: z.string().optional().describe('Stable filter name (variable key); defaults to field'),\n\n /** Field name to filter on */\n field: z.string().describe('Field name to filter on'),\n\n /** Display label for the filter */\n label: I18nLabelSchema.optional().describe('Display label for the filter'),\n\n /** Filter input type */\n type: z.enum(['text', 'select', 'date', 'number', 'lookup']).optional().describe('Filter input type'),\n\n /** Static options for select/lookup filters */\n options: z.array(z.object({\n value: z.union([z.string(), z.number(), z.boolean()]).describe('Option value'),\n label: I18nLabelSchema,\n })).optional().describe('Static filter options'),\n\n /** Dynamic data binding for filter options */\n optionsFrom: GlobalFilterOptionsFromSchema.optional().describe('Dynamic filter options from object'),\n\n /** Default filter value */\n defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional().describe('Default filter value'),\n\n /** Filter application scope */\n scope: z.enum(['dashboard', 'widget']).default('dashboard').describe('Filter application scope'),\n\n /** Widget IDs to apply this filter to (when scope is widget) */\n targetWidgets: z.array(z.string()).optional().describe('Widget IDs to apply this filter to'),\n}));\n\n/**\n * Dashboard Schema\n * Represents a page containing multiple visualizations.\n * \n * @example Sales Executive Dashboard (ADR-0021: widgets bind a `dataset` and\n * select `dimensions`/`values` BY NAME — each metric/measure is defined once in\n * `defineDataset`, never inline on the widget)\n * {\n * name: \"sales_overview\",\n * label: \"Sales Executive Overview\",\n * widgets: [\n * {\n * title: \"Total Pipe\",\n * type: \"metric\",\n * dataset: \"opportunity_metrics\",\n * values: [\"amount_sum\"],\n * layout: { x: 0, y: 0, w: 3, h: 2 }\n * },\n * {\n * title: \"Revenue by Region\",\n * type: \"bar\",\n * dataset: \"order_metrics\",\n * dimensions: [\"region\"],\n * values: [\"total_sum\"],\n * layout: { x: 3, y: 0, w: 6, h: 4 }\n * }\n * ]\n * }\n */\nexport const DashboardSchema = lazySchema(() => z.object({\n /** Machine name */\n name: SnakeCaseIdentifierSchema.describe('Dashboard unique name'),\n \n /** Display label */\n label: I18nLabelSchema.describe('Dashboard label'),\n \n /** Description */\n description: I18nLabelSchema.optional().describe('Dashboard description'),\n\n /** Structured header configuration */\n header: DashboardHeaderSchema.optional().describe('Dashboard header configuration'),\n \n /** Collection of widgets */\n widgets: z.array(DashboardWidgetSchema).describe('Widgets to display'),\n\n /** Grid column count — defaults to 12 for a standard 12-column grid */\n columns: z.number().int().min(1).max(24).optional().describe('Number of grid columns (default 12)'),\n\n /** Grid gap in Tailwind spacing units (e.g. 4 = 1rem) */\n gap: z.number().int().min(0).optional().describe('Grid gap in Tailwind spacing units'),\n\n /** Auto-refresh */\n refreshInterval: z.number().optional().describe('Auto-refresh interval in seconds'),\n\n /** Dashboard Date Range (Global time filter) */\n dateRange: z.object({\n field: z.string().optional().describe('Default date field name for time-based filtering'),\n defaultRange: z.enum(['today', 'yesterday', 'this_week', 'last_week', 'this_month', 'last_month', 'this_quarter', 'last_quarter', 'this_year', 'last_year', 'last_7_days', 'last_30_days', 'last_90_days', 'custom']).default('this_month').describe('Default date range preset'),\n allowCustomRange: z.boolean().default(true).describe('Allow users to pick a custom date range'),\n }).optional().describe('Global dashboard date range filter configuration'),\n\n /** Global Filters */\n globalFilters: z.array(GlobalFilterSchema).optional().describe('Global filters that apply to all widgets in the dashboard'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n\n /** Performance optimization settings */\n performance: PerformanceConfigSchema.optional().describe('Performance optimization settings'),\n /**\n * ADR-0010 §3.7 — Package-level protection envelope. Package\n * authors declare lock policy here; the loader translates it\n * into the private `_lock` envelope at registration time and\n * strips this block before persistence. See\n * `shared/protection.zod.ts`.\n */\n protection: ProtectionSchema.optional().describe(\n 'Package author protection block — lock policy for this dashboard.',\n ),\n\n // ADR-0010 — runtime protection envelope (internal — set by loader).\n ...MetadataProtectionFields,\n\n}));\n\nexport type Dashboard = z.infer<typeof DashboardSchema>;\nexport type DashboardInput = z.input<typeof DashboardSchema>;\nexport type DashboardWidget = z.infer<typeof DashboardWidgetSchema>;\nexport type DashboardHeader = z.infer<typeof DashboardHeaderSchema>;\nexport type DashboardHeaderAction = z.infer<typeof DashboardHeaderActionSchema>;\nexport type WidgetColorVariant = z.infer<typeof WidgetColorVariantSchema>;\nexport type WidgetActionType = z.infer<typeof WidgetActionTypeSchema>;\nexport type GlobalFilter = z.infer<typeof GlobalFilterSchema>;\nexport type GlobalFilterOptionsFrom = z.infer<typeof GlobalFilterOptionsFromSchema>;\n\n/**\n * Dashboard Factory Helper\n */\nexport const Dashboard = {\n create: (config: z.input<typeof DashboardSchema>): Dashboard => DashboardSchema.parse(config),\n} as const;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { ProtectionSchema } from '../shared/protection.zod';\nimport { MetadataProtectionFields } from '../kernel/metadata-protection.zod';\nimport { FilterConditionSchema } from '../data/filter.zod';\nimport { ChartConfigSchema } from './chart.zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\nimport { ResponsiveConfigSchema, PerformanceConfigSchema } from './responsive.zod';\n\n/**\n * Report Type Enum\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const ReportType = z.enum([\n 'tabular', // Simple list\n 'summary', // Grouped by row\n 'matrix', // Grouped by row and column\n 'joined' // Joined multiple blocks\n]);\n\n/**\n * Report Column Schema\n */\nexport const ReportColumnSchema = lazySchema(() => z.object({\n field: z.string().describe('Field name'),\n label: I18nLabelSchema.optional().describe('Override label'),\n aggregate: z.enum(['sum', 'avg', 'max', 'min', 'count', 'unique']).optional().describe('Aggregation function'),\n /** Responsive visibility/priority per breakpoint */\n responsive: ResponsiveConfigSchema.optional().describe('Responsive visibility for this column'),\n}));\n\n/**\n * Report Grouping Schema\n */\nexport const ReportGroupingSchema = lazySchema(() => z.object({\n field: z.string().describe('Field to group by'),\n sortOrder: z.enum(['asc', 'desc']).default('asc'),\n dateGranularity: z.enum(['day', 'week', 'month', 'quarter', 'year']).optional().describe('For date fields'),\n}));\n\n/**\n * Report Chart Schema\n * Embedded visualization configuration using unified chart taxonomy.\n */\nexport const ReportChartSchema = lazySchema(() => ChartConfigSchema.extend({\n /** Report-specific chart configuration */\n xAxis: z.string().describe('Grouping field for X-Axis'),\n yAxis: z.string().describe('Summary field for Y-Axis'),\n groupBy: z.string().optional().describe('Additional grouping field'),\n}));\n\n/**\n * Joined Report Block Schema\n *\n * Represents a single sub-report inside a `type: 'joined'` report. Each block\n * is a self-contained, independently-queried report stacked vertically (or\n * arranged in a grid) inside the joined container. Blocks are used for\n * comparative dashboards where each panel is a different slice of the same\n * domain — e.g. \"new customers / churned / silent\" in a customer-churn\n * report, or \"new / qualified / closed\" in a lead-funnel report.\n *\n * Blocks may declare their own filter (combined with the container filter\n * via `$and` at render time) and their own grouping / aggregation.\n *\n * Notes for implementers:\n * - `type` defaults to `tabular` — leave a block's type implicit if the\n * sub-report is just a list. Set explicitly to `summary` or `matrix` for\n * aggregated blocks.\n * - The schema is intentionally permissive about the column shape: blocks\n * are not allowed to be themselves `joined` (no recursion).\n */\nexport const JoinedReportBlockSchema: z.ZodTypeAny = lazySchema(() => z.object({\n /** Stable id for the block (used as react key, telemetry, deeplinks). */\n name: SnakeCaseIdentifierSchema,\n /** Human label shown above the block. Falls back to `name`. */\n label: I18nLabelSchema.optional(),\n /** Optional description rendered below the label. */\n description: I18nLabelSchema.optional(),\n /** Block report type — `joined` is intentionally excluded (no recursion). */\n type: z.enum(['tabular', 'summary', 'matrix']).default('tabular'),\n /** Optional inline chart configuration. */\n chart: ReportChartSchema.optional(),\n\n /**\n * ADR-0021 — the dataset this block binds to (single-form). The block selects\n * the dataset's measures by name; the legacy inline `objectName` + `columns` +\n * `groupings` query was removed in the cutover.\n */\n dataset: SnakeCaseIdentifierSchema.optional().describe('Dataset name to bind (ADR-0021)'),\n /** Dimension names (from the dataset) to group rows by. Dataset-bound only. */\n rows: z.array(z.string()).optional().describe('Dimension names down (dataset-bound)'),\n /** Dimension names across — matrix blocks pivot rows × columns (ADR-0021 D2). */\n columns: z.array(z.string()).optional().describe('Dimension names across (matrix, dataset-bound)'),\n /** Measure names (from the dataset) to display. Dataset-bound only. */\n values: z.array(z.string()).optional().describe('Measure names to show (dataset-bound)'),\n /** Render-time scope filter, ANDed at query time. Dataset-bound only. */\n runtimeFilter: FilterConditionSchema.optional().describe('Render-time scope filter (dataset-bound)'),\n}));\n\n/**\n * Report Schema\n * Deep data analysis definition.\n */\nexport const ReportSchema = lazySchema(() => z.object({\n /** Identity */\n name: SnakeCaseIdentifierSchema.describe('Report unique name'),\n label: I18nLabelSchema.describe('Report label'),\n description: I18nLabelSchema.optional(),\n\n /** Report Configuration */\n type: ReportType.default('tabular').describe('Report format type'),\n\n /**\n * ADR-0021 — the semantic-layer `dataset` this report binds to. The report\n * renders the dataset's named measures grouped by the chosen `rows`\n * dimensions — numbers stay consistent with every other surface using the\n * same dataset. This is the single author-facing analytics shape (the legacy\n * inline `objectName` + `columns` + `groupings` query was removed in the\n * single-form cutover). For a `joined` report, the data lives on `blocks`.\n */\n dataset: SnakeCaseIdentifierSchema.optional().describe('Dataset name to bind (ADR-0021)'),\n /** Dimension names (from the dataset) to group rows by (down axis). */\n rows: z.array(z.string()).optional().describe('Dimension names down'),\n /**\n * Dimension names across (ADR-0021 D2) — a `matrix` report pivots\n * `rows` × `columns` with `values` in the cells. Ignored for other types.\n */\n columns: z.array(z.string()).optional().describe('Dimension names across (matrix)'),\n /** Measure names (from the dataset) to display. */\n values: z.array(z.string()).optional().describe('Measure names to show'),\n /** Render-time scope filter, ANDed at query time. */\n runtimeFilter: FilterConditionSchema.optional().describe('Render-time scope filter'),\n /**\n * ADR-0021 D2 — click an aggregated row/cell to open the underlying\n * records (dataset-backed; the host resolves the dataset's object and\n * dimension→field mapping). Default on; set `false` to disable.\n */\n drilldown: z.boolean().default(true).describe('Click-through to underlying records'),\n\n /** Visualization */\n chart: ReportChartSchema.optional().describe('Embedded chart configuration'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n\n /** Performance optimization settings */\n performance: PerformanceConfigSchema.optional().describe('Performance optimization settings'),\n\n /**\n * Joined report blocks — only meaningful when `type: 'joined'`.\n *\n * A joined report renders multiple independent sub-reports stacked\n * vertically in the same view. Each block declares its own object,\n * columns, groupings and filter. The container-level `filter` is ANDed\n * into every block at query time so a top-level scope (e.g. \"this\n * quarter\") flows down without per-block duplication.\n *\n * Renderers must ignore `blocks` when `type !== 'joined'`.\n */\n blocks: z.array(JoinedReportBlockSchema).optional().describe('Sub-reports for type=joined'),\n /**\n * ADR-0010 §3.7 — Package-level protection envelope. Package\n * authors declare lock policy here; the loader translates it\n * into the private `_lock` envelope at registration time and\n * strips this block before persistence. See\n * `shared/protection.zod.ts`.\n */\n protection: ProtectionSchema.optional().describe(\n 'Package author protection block — lock policy for this report.',\n ),\n\n // ADR-0010 — runtime protection envelope (internal — set by loader).\n ...MetadataProtectionFields,\n\n}).superRefine((r, ctx) => {\n // ADR-0021 single-form: a report is dataset-bound. A `joined` report carries\n // its data on `blocks` (each block dataset-bound); every other type needs a\n // top-level `dataset` + `values`.\n if (r.type === 'joined') {\n if (!r.blocks || r.blocks.length === 0) {\n ctx.addIssue({ code: 'custom', message: 'a `joined` report needs `blocks`.', path: ['blocks'] });\n }\n } else if (!r.dataset || !r.values || r.values.length === 0) {\n ctx.addIssue({\n code: 'custom',\n message: 'a report needs `dataset` + `values` (measure names).',\n path: ['dataset'],\n });\n }\n}));\n\nexport type JoinedReportBlock = z.infer<typeof JoinedReportBlockSchema>;\nexport type JoinedReportBlockInput = z.input<typeof JoinedReportBlockSchema>;\n\n/**\n * Report Types\n * \n * Note: For configuration/definition contexts, use the Input types (e.g., ReportInput)\n * which allow optional fields with defaults to be omitted.\n */\nexport type Report = z.infer<typeof ReportSchema>;\nexport type ReportColumn = z.infer<typeof ReportColumnSchema>;\nexport type ReportGrouping = z.infer<typeof ReportGroupingSchema>;\nexport type ReportChart = z.infer<typeof ReportChartSchema>;\n\n/**\n * Input Types for Report Configuration\n * Use these when defining reports in configuration files.\n */\nexport type ReportInput = z.input<typeof ReportSchema>;\nexport type ReportColumnInput = z.input<typeof ReportColumnSchema>;\nexport type ReportGroupingInput = z.input<typeof ReportGroupingSchema>;\nexport type ReportChartInput = z.input<typeof ReportChartSchema>;\n\n/**\n * Report Factory Helper\n */\nexport const Report = {\n create: (config: ReportInput): Report => ReportSchema.parse(config),\n} as const;\n\n/**\n * Type-safe factory for an analytics report. Validates at authoring time via\n * `.parse()` and accepts input-shape config (optional defaults, CEL\n * shorthand) — preferred over a bare `: Report` literal.\n */\nexport function defineReport(config: z.input<typeof ReportSchema>): Report {\n return ReportSchema.parse(config);\n}\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { FilterConditionSchema } from './filter.zod';\n\n/**\n * Sort Node\n * Represents \"Order By\".\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const SortNodeSchema = lazySchema(() => z.object({\n field: z.string(),\n order: z.enum(['asc', 'desc']).default('asc')\n}));\n\n/**\n * Aggregation Function Enum\n * Standard aggregation functions for data analysis.\n * \n * Supported Functions:\n * - **count**: Count rows (SQL: COUNT(*) or COUNT(field))\n * - **sum**: Sum numeric values (SQL: SUM(field))\n * - **avg**: Average numeric values (SQL: AVG(field))\n * - **min**: Minimum value (SQL: MIN(field))\n * - **max**: Maximum value (SQL: MAX(field))\n * - **count_distinct**: Count unique values (SQL: COUNT(DISTINCT field))\n * - **array_agg**: Aggregate values into array (SQL: ARRAY_AGG(field))\n * - **string_agg**: Concatenate values (SQL: STRING_AGG(field, delimiter))\n * \n * Performance Considerations:\n * - COUNT(*) is typically faster than COUNT(field) as it doesn't check for nulls\n * - COUNT DISTINCT may require additional memory for tracking unique values\n * - Window aggregates (with OVER clause) can be more efficient than subqueries\n * - Large GROUP BY operations benefit from proper indexing on grouped fields\n * \n * @example\n * // SQL: SELECT region, SUM(amount) FROM sales GROUP BY region\n * {\n * object: 'sales',\n * fields: ['region'],\n * aggregations: [\n * { function: 'sum', field: 'amount', alias: 'total_sales' }\n * ],\n * groupBy: ['region']\n * }\n * \n * @example\n * // Salesforce SOQL: SELECT COUNT(Id) FROM Account\n * {\n * object: 'account',\n * aggregations: [\n * { function: 'count', alias: 'total_accounts' }\n * ]\n * }\n */\nexport const AggregationFunction = z.enum([\n 'count', 'sum', 'avg', 'min', 'max',\n 'count_distinct', 'array_agg', 'string_agg'\n]);\n\n/**\n * Date Granularity Enum\n * Used to bucket date/timestamp fields into uniform periods during GROUP BY.\n *\n * Backends MAY emit `DATE_TRUNC` (PostgreSQL), `DATE_FORMAT` (MySQL),\n * `$dateTrunc` (MongoDB), or any other equivalent. When a driver does not\n * support server-side truncation the engine falls back to an in-memory bucket\n * using ISO-8601 conventions (weeks start Monday).\n */\nexport const DateGranularity = z.enum(['day', 'week', 'month', 'quarter', 'year']);\n\n/**\n * GroupBy Node\n *\n * A grouping target — either a bare field name (string) for plain grouping,\n * or a structured object that adds `dateGranularity` for time-bucketed\n * grouping. The string form remains the canonical short-hand:\n *\n * ```ts\n * groupBy: ['region', { field: 'closed_at', dateGranularity: 'quarter' }]\n * ```\n *\n * This is backward-compatible: every existing `groupBy: ['region']` payload\n * continues to validate.\n */\nexport const GroupByNodeSchema = lazySchema(() => z.union([\n z.string(),\n z.object({\n field: z.string().describe('Field to group by'),\n dateGranularity: DateGranularity.optional().describe('Bucket date values into uniform periods (day/week/month/quarter/year)'),\n /** Optional alias for the projected group value (defaults to `field`). */\n alias: z.string().optional().describe('Alias for the projected group value'),\n }),\n]));\n\n/**\n * Aggregation Node\n * Represents an aggregated field with function.\n * \n * Aggregations summarize data across groups of rows (GROUP BY).\n * Used with `groupBy` to create analytical queries.\n * \n * @example\n * // SQL: SELECT customer_id, COUNT(*), SUM(amount) FROM orders GROUP BY customer_id\n * {\n * object: 'order',\n * fields: ['customer_id'],\n * aggregations: [\n * { function: 'count', alias: 'order_count' },\n * { function: 'sum', field: 'amount', alias: 'total_amount' }\n * ],\n * groupBy: ['customer_id']\n * }\n * \n * @example\n * // Salesforce SOQL: SELECT LeadSource, COUNT(Id) FROM Lead GROUP BY LeadSource\n * {\n * object: 'lead',\n * fields: ['lead_source'],\n * aggregations: [\n * { function: 'count', alias: 'lead_count' }\n * ],\n * groupBy: ['lead_source']\n * }\n */\nexport const AggregationNodeSchema = lazySchema(() => z.object({\n function: AggregationFunction.describe('Aggregation function'),\n field: z.string().optional().describe('Field to aggregate (optional for COUNT(*))'),\n alias: z.string().describe('Result column alias'),\n distinct: z.boolean().optional().describe('Apply DISTINCT before aggregation'),\n filter: FilterConditionSchema.optional().describe('Filter/Condition to apply to the aggregation (FILTER WHERE clause)'),\n}));\n\n/**\n * Join Type Enum\n * Standard SQL join types for combining tables.\n * \n * Join Types:\n * - **inner**: Returns only matching rows from both tables (SQL: INNER JOIN)\n * - **left**: Returns all rows from left table, matching rows from right (SQL: LEFT JOIN)\n * - **right**: Returns all rows from right table, matching rows from left (SQL: RIGHT JOIN)\n * - **full**: Returns all rows from both tables (SQL: FULL OUTER JOIN)\n * \n * @example\n * // SQL: SELECT * FROM orders INNER JOIN customers ON orders.customer_id = customers.id\n * {\n * object: 'order',\n * joins: [\n * {\n * type: 'inner',\n * object: 'customer',\n * on: ['order.customer_id', '=', 'customer.id']\n * }\n * ]\n * }\n * \n * @example\n * // Salesforce SOQL-style: Find all customers and their orders (if any)\n * {\n * object: 'customer',\n * joins: [\n * {\n * type: 'left',\n * object: 'order',\n * on: ['customer.id', '=', 'order.customer_id']\n * }\n * ]\n * }\n */\nexport const JoinType = z.enum(['inner', 'left', 'right', 'full']);\n\n/**\n * Join Execution Strategy\n * Hints to the query engine on how to execute the join.\n * \n * Strategies:\n * - **auto**: Engine decides best strategy (Default).\n * - **database**: Push down join to the database (Requires same datasource).\n * - **hash**: Load both sets into memory and hash join (Cross-datasource, memory intensive).\n * - **loop**: Nested loop lookup (N+1 safe version). (Good for small right-side lookups).\n */\nexport const JoinStrategy = z.enum(['auto', 'database', 'hash', 'loop']);\n\n/**\n * Join Node\n * Represents table joins for combining data from multiple objects.\n * \n * Joins connect related data across multiple tables using ON conditions.\n * Supports both direct object joins and subquery joins.\n * \n * @example\n * // SQL: SELECT o.*, c.name FROM orders o INNER JOIN customers c ON o.customer_id = c.id\n * {\n * object: 'order',\n * fields: ['id', 'amount'],\n * joins: [\n * {\n * type: 'inner',\n * object: 'customer',\n * alias: 'c',\n * on: ['order.customer_id', '=', 'c.id']\n * }\n * ]\n * }\n * \n * @example\n * // SQL: Multi-table join\n * // SELECT * FROM orders o\n * // INNER JOIN customers c ON o.customer_id = c.id\n * // LEFT JOIN shipments s ON o.id = s.order_id\n * {\n * object: 'order',\n * joins: [\n * {\n * type: 'inner',\n * object: 'customer',\n * alias: 'c',\n * on: ['order.customer_id', '=', 'c.id']\n * },\n * {\n * type: 'left',\n * object: 'shipment',\n * alias: 's',\n * on: ['order.id', '=', 's.order_id']\n * }\n * ]\n * }\n * \n * @example\n * // Salesforce SOQL: SELECT Name, (SELECT LastName FROM Contacts) FROM Account\n * {\n * object: 'account',\n * fields: ['name'],\n * joins: [\n * {\n * type: 'left',\n * object: 'contact',\n * on: ['account.id', '=', 'contact.account_id']\n * }\n * ]\n * }\n * \n * @example\n * // Subquery Join: Join with a filtered/aggregated dataset\n * {\n * object: 'customer',\n * joins: [\n * {\n * type: 'left',\n * object: 'order',\n * alias: 'high_value_orders',\n * on: ['customer.id', '=', 'high_value_orders.customer_id'],\n * subquery: {\n * object: 'order',\n * fields: ['customer_id', 'total'],\n * filters: ['total', '>', 1000]\n * }\n * }\n * ]\n * }\n */\nexport const JoinNodeSchema: z.ZodType<any> = z.lazy(() => \n z.object({\n type: JoinType.describe('Join type'),\n strategy: JoinStrategy.optional().describe('Execution strategy hint'),\n object: z.string().describe('Object/table to join'),\n alias: z.string().optional().describe('Table alias'),\n on: FilterConditionSchema.describe('Join condition'),\n subquery: z.lazy(() => QuerySchema).optional().describe('Subquery instead of object'),\n })\n);\n\n/**\n * Window Function Enum\n * Advanced analytical functions for row-based calculations.\n * \n * Window Functions:\n * - **row_number**: Sequential number within partition (SQL: ROW_NUMBER() OVER (...))\n * - **rank**: Rank with gaps for ties (SQL: RANK() OVER (...))\n * - **dense_rank**: Rank without gaps (SQL: DENSE_RANK() OVER (...))\n * - **percent_rank**: Relative rank as percentage (SQL: PERCENT_RANK() OVER (...))\n * - **lag**: Access previous row value (SQL: LAG(field) OVER (...))\n * - **lead**: Access next row value (SQL: LEAD(field) OVER (...))\n * - **first_value**: First value in window (SQL: FIRST_VALUE(field) OVER (...))\n * - **last_value**: Last value in window (SQL: LAST_VALUE(field) OVER (...))\n * - **sum/avg/count/min/max**: Aggregates over window (SQL: SUM(field) OVER (...))\n * \n * @example\n * // SQL: SELECT *, ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY amount DESC) as rank\n * // FROM orders\n * {\n * object: 'order',\n * fields: ['id', 'customer_id', 'amount'],\n * windowFunctions: [\n * {\n * function: 'row_number',\n * alias: 'rank',\n * over: {\n * partitionBy: ['customer_id'],\n * orderBy: [{ field: 'amount', order: 'desc' }]\n * }\n * }\n * ]\n * }\n * \n * @example\n * // SQL: Running total with SUM() OVER (...)\n * {\n * object: 'transaction',\n * fields: ['date', 'amount'],\n * windowFunctions: [\n * {\n * function: 'sum',\n * field: 'amount',\n * alias: 'running_total',\n * over: {\n * orderBy: [{ field: 'date', order: 'asc' }],\n * frame: {\n * type: 'rows',\n * start: 'UNBOUNDED PRECEDING',\n * end: 'CURRENT ROW'\n * }\n * }\n * }\n * ]\n * }\n */\nexport const WindowFunction = z.enum([\n 'row_number', 'rank', 'dense_rank', 'percent_rank',\n 'lag', 'lead', 'first_value', 'last_value',\n 'sum', 'avg', 'count', 'min', 'max'\n]);\n\n/**\n * Window Specification\n * Defines PARTITION BY and ORDER BY for window functions.\n * \n * Window specifications control how window functions compute values:\n * - **partitionBy**: Divide rows into groups (like GROUP BY but without collapsing rows)\n * - **orderBy**: Define order for ranking and offset functions\n * - **frame**: Specify which rows to include in aggregate calculations\n * \n * @example\n * // Partition by department, order by salary\n * {\n * partitionBy: ['department'],\n * orderBy: [{ field: 'salary', order: 'desc' }]\n * }\n * \n * @example\n * // Moving average with frame specification\n * {\n * orderBy: [{ field: 'date', order: 'asc' }],\n * frame: {\n * type: 'rows',\n * start: '6 PRECEDING',\n * end: 'CURRENT ROW'\n * }\n * }\n */\nexport const WindowSpecSchema = lazySchema(() => z.object({\n partitionBy: z.array(z.string()).optional().describe('PARTITION BY fields'),\n orderBy: z.array(SortNodeSchema).optional().describe('ORDER BY specification'),\n frame: z.object({\n type: z.enum(['rows', 'range']).optional(),\n start: z.string().optional().describe('Frame start (e.g., \"UNBOUNDED PRECEDING\", \"1 PRECEDING\")'),\n end: z.string().optional().describe('Frame end (e.g., \"CURRENT ROW\", \"1 FOLLOWING\")'),\n }).optional().describe('Window frame specification'),\n}));\n\n/**\n * Window Function Node\n * Represents window function with OVER clause.\n * \n * Window functions perform calculations across a set of rows related to the current row,\n * without collapsing the result set (unlike GROUP BY aggregations).\n * \n * @example\n * // SQL: Top 3 products per category\n * // SELECT *, ROW_NUMBER() OVER (PARTITION BY category ORDER BY sales DESC) as rank\n * // FROM products\n * {\n * object: 'product',\n * fields: ['name', 'category', 'sales'],\n * windowFunctions: [\n * {\n * function: 'row_number',\n * alias: 'category_rank',\n * over: {\n * partitionBy: ['category'],\n * orderBy: [{ field: 'sales', order: 'desc' }]\n * }\n * }\n * ]\n * }\n * \n * @example\n * // SQL: Year-over-year comparison with LAG\n * {\n * object: 'monthly_sales',\n * fields: ['month', 'revenue'],\n * windowFunctions: [\n * {\n * function: 'lag',\n * field: 'revenue',\n * alias: 'prev_year_revenue',\n * over: {\n * orderBy: [{ field: 'month', order: 'asc' }]\n * }\n * }\n * ]\n * }\n */\nexport const WindowFunctionNodeSchema = lazySchema(() => z.object({\n function: WindowFunction.describe('Window function name'),\n field: z.string().optional().describe('Field to operate on (for aggregate window functions)'),\n alias: z.string().describe('Result column alias'),\n over: WindowSpecSchema.describe('Window specification (OVER clause)'),\n}));\n\n/**\n * Field Selection Node\n * Represents \"Select\" attributes, including joins.\n */\nexport const FieldNodeSchema: z.ZodType<any> = z.lazy(() => \n z.union([\n z.string(), // Primitive field: \"name\"\n z.object({\n field: z.string(), // Relationship field: \"owner\"\n fields: z.array(FieldNodeSchema).optional(), // Nested select: [\"name\", \"email\"]\n alias: z.string().optional()\n })\n ])\n);\n\n/**\n * Full-Text Search Configuration\n * Defines full-text search parameters for text queries.\n * \n * Supports:\n * - Multi-field search\n * - Relevance scoring\n * - Fuzzy matching\n * - Language-specific analyzers\n * \n * @example\n * {\n * query: \"John Smith\",\n * fields: [\"name\", \"email\", \"description\"],\n * fuzzy: true,\n * boost: { \"name\": 2.0, \"email\": 1.5 }\n * }\n */\nexport const FullTextSearchSchema = lazySchema(() => z.object({\n query: z.string().describe('Search query text'),\n fields: z.array(z.string()).optional().describe('Fields to search in (if not specified, searches all text fields)'),\n fuzzy: z.boolean().optional().default(false).describe('Enable fuzzy matching (tolerates typos)'),\n operator: z.enum(['and', 'or']).optional().default('or').describe('Logical operator between terms'),\n boost: z.record(z.string(), z.number()).optional().describe('Field-specific relevance boosting (field name -> boost factor)'),\n minScore: z.number().optional().describe('Minimum relevance score threshold'),\n language: z.string().optional().describe('Language for text analysis (e.g., \"en\", \"zh\", \"es\")'),\n highlight: z.boolean().optional().default(false).describe('Enable search result highlighting'),\n}));\n\nexport type FullTextSearch = z.infer<typeof FullTextSearchSchema>;\n\n/**\n * Query AST Schema\n * The universal data retrieval contract defined in `ast-structure.mdx`.\n * \n * This schema represents ObjectQL - a universal query language that abstracts\n * SQL, NoSQL, and SaaS APIs into a single unified interface.\n * \n * Updates (v2):\n * - Aligned with modern ORM standards (Prisma/TypeORM)\n * - Added `cursor` based pagination support\n * - Renamed `top`/`skip` to `limit`/`offset`\n * - Unified filtering syntax with `FilterConditionSchema`\n * \n * Updates (v3):\n * - Added `search` parameter for full-text search (P2 requirement)\n * \n * @example\n * // Simple query: SELECT name, email FROM account WHERE status = 'active'\n * {\n * object: 'account',\n * fields: ['name', 'email'],\n * where: { status: 'active' }\n * }\n * \n * @example\n * // Pagination with Limit/Offset\n * {\n * object: 'post',\n * where: { published: true },\n * orderBy: [{ field: 'created_at', order: 'desc' }],\n * limit: 20,\n * offset: 40\n * }\n * \n * @example\n * // Full-text search\n * {\n * object: 'article',\n * search: {\n * query: \"machine learning\",\n * fields: [\"title\", \"content\"],\n * fuzzy: true,\n * boost: { \"title\": 2.0 }\n * },\n * limit: 10\n * }\n */\nconst BaseQuerySchema = z.object({\n /** Target Entity */\n object: z.string().describe('Object name (e.g. account)'),\n \n /** Select Clause */\n fields: z.array(FieldNodeSchema).optional().describe('Fields to retrieve'),\n \n /** Where Clause (Filtering) */\n where: FilterConditionSchema.optional().describe('Filtering criteria (WHERE)'),\n \n /** Full-Text Search */\n search: FullTextSearchSchema.optional().describe('Full-text search configuration ($search parameter)'),\n \n /** Order By Clause (Sorting) */\n orderBy: z.array(SortNodeSchema).optional().describe('Sorting instructions (ORDER BY)'),\n \n /** Pagination */\n limit: z.number().optional().describe('Max records to return (LIMIT)'),\n offset: z.number().optional().describe('Records to skip (OFFSET)'),\n top: z.number().optional().describe('Alias for limit (OData compatibility)'),\n cursor: z.record(z.string(), z.unknown()).optional().describe('Cursor for keyset pagination'),\n \n /** Joins */\n joins: z.array(JoinNodeSchema).optional().describe('Explicit Table Joins'),\n \n /** Aggregations */\n aggregations: z.array(AggregationNodeSchema).optional().describe('Aggregation functions'),\n \n /** Group By Clause */\n groupBy: z.array(GroupByNodeSchema).optional().describe('GROUP BY targets (strings or `{field, dateGranularity?}` objects for date bucketing)'),\n \n /** Having Clause */\n having: FilterConditionSchema.optional().describe('HAVING clause for aggregation filtering'),\n \n /** Window Functions */\n windowFunctions: z.array(WindowFunctionNodeSchema).optional().describe('Window functions with OVER clause'),\n \n /** Subquery flag */\n distinct: z.boolean().optional().describe('SELECT DISTINCT flag'),\n});\n\n/**\n * QueryAST — Abstract Syntax Tree for data queries.\n *\n * The `expand` property enables recursive loading of related records through\n * lookup and master_detail fields. Each key is a relationship field name; the\n * value is a nested QueryAST that can further filter, select, sort, and expand\n * the related records (up to a default max depth of 3).\n *\n * @example\n * ```ts\n * const ast: QueryAST = {\n * object: 'task',\n * fields: ['title', 'assignee'],\n * expand: {\n * assignee: { object: 'user', fields: ['name', 'email'] },\n * project: {\n * object: 'project',\n * expand: { org: { object: 'org' } } // nested expand\n * }\n * }\n * };\n * ```\n */\nexport type QueryAST = z.infer<typeof BaseQuerySchema> & {\n expand?: Record<string, QueryAST>;\n};\n\nexport type QueryInput = z.input<typeof BaseQuerySchema> & {\n expand?: Record<string, QueryInput>;\n};\n\nexport const QuerySchema: z.ZodType<QueryAST> = lazySchema(() => BaseQuerySchema.extend({\n expand: z.lazy(() => z.record(z.string(), QuerySchema)).optional().describe(\n 'Recursive relation loading map. Keys are lookup/master_detail field names; '\n + 'values are nested QueryAST objects that control select (`fields`) and filter '\n + '(`where`, AND-merged with the batch $in), plus further expansion on the related '\n + 'object. The engine resolves expand via batch $in queries (driver-agnostic) with a '\n + 'default max depth of 3; per-parent `limit`/`offset`/`orderBy` are NOT applied on '\n + 'this path.'\n ),\n}));\n\nexport type SortNode = z.infer<typeof SortNodeSchema>;\nexport type AggregationNode = z.infer<typeof AggregationNodeSchema>;\nexport type GroupByNode = z.infer<typeof GroupByNodeSchema>;\nexport type DateGranularityValue = z.infer<typeof DateGranularity>;\nexport type JoinNode = z.infer<typeof JoinNodeSchema>;\nexport type WindowFunctionNode = z.infer<typeof WindowFunctionNodeSchema>;\nexport type WindowSpec = z.infer<typeof WindowSpecSchema>;\n","// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { lazySchema } from '../shared/lazy-schema';\nimport { ProtectionSchema } from '../shared/protection.zod';\nimport { MetadataProtectionFields } from '../kernel/metadata-protection.zod';\nimport { FilterConditionSchema } from '../data/filter.zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { I18nLabelSchema } from './i18n.zod';\nimport { AggregationFunction, DateGranularity } from '../data/query.zod';\n\n/**\n * Analytics Dataset — the one semantic layer (ADR-0021).\n *\n * A `dataset` is a named, reusable analytical definition: a base object, the\n * relationships to include (joins are *derived* from the object graph — the\n * author never writes an `ON` clause), and the declared **dimensions**\n * (groupable axes) and **measures** (aggregatable values). It is deliberately\n * SMALLER than `QuerySchema`: no raw SQL, no hand-authored join predicates,\n * no window/having grammar in the author surface.\n *\n * Presentations (`report` / `dashboard`) bind to a dataset by reference and\n * pick dimensions/measures *by name*. The dataset compiles to the existing\n * Cube analytics runtime (ADR-0021 D-A=(c)); RLS / tenant scoping is enforced\n * by the runtime per joined object (D-C), never declared here.\n *\n * Naming: this module owns the high-prior `dataset` / `dimension` / `measure`\n * vocabulary (LookML / dbt / Cube / PowerBI). The Zod export identifiers are\n * `Dataset`-prefixed (`DatasetDimensionSchema`, `DatasetMeasureSchema`) so they\n * do not clash with the Cube layer's `DimensionSchema` / `MetricSchema` in\n * `data/analytics.zod.ts` while the two layers coexist (Phase 1). The Cube\n * layer is absorbed/retired in a later phase (D-A).\n */\n\n/**\n * Dimension — a groupable axis (e.g. \"region\", \"close_date by quarter\").\n */\nexport const DatasetDimensionSchema = lazySchema(() => z.object({\n /** Referenced by presentations (report rows/columns, widget dimensions). */\n name: SnakeCaseIdentifierSchema.describe('Dimension name — referenced by presentations'),\n label: I18nLabelSchema.optional(),\n /**\n * A field on the base object, OR a relationship path (one or more to-one hops)\n * ending in a field — e.g. `account.region` or `account.owner.region`\n * (ADR-0071 multi-hop). The join chain is DERIVED from the relationship(s)\n * declared in `Dataset.include`; the author never writes a predicate.\n */\n field: z.string().describe('Base field, or `relationship[.relationship].field` path'),\n type: z.enum(['string', 'number', 'date', 'boolean', 'lookup']).optional(),\n /** Default bucketing for date dimensions (day/week/month/quarter/year). */\n dateGranularity: DateGranularity.optional(),\n}));\n\n/**\n * Derived-measure operator (ADR-0021 Q1).\n * A derived measure references OTHER measures BY NAME only — no raw fields,\n * no raw SQL — keeping it enumerable and reviewable.\n */\nexport const DerivedMeasureOp = z.enum(['ratio', 'sum', 'difference', 'product']);\n\n/**\n * Measure — an aggregatable value (e.g. \"revenue = sum(amount)\"). Defined ONCE\n * here; every presentation references it by name.\n */\nexport const DatasetMeasureSchema = lazySchema(() => z.object({\n name: SnakeCaseIdentifierSchema.describe('Measure name — e.g. \"revenue\"; defined once'),\n label: I18nLabelSchema.optional(),\n /** Aggregation function — reuses the canonical query.zod enum. */\n aggregate: AggregationFunction.optional().describe('Aggregation (sum/avg/count/...); omit when `derived` is set'),\n /** Base field, or `relationship[.relationship].field` path. Optional for `count` (count(*)). */\n field: z.string().optional().describe('Aggregated field; optional for count(*)'),\n /** Measure-scoped filter (e.g. only won deals for \"won_amount\"). */\n filter: FilterConditionSchema.optional(),\n /** Display format, e.g. \"$0,0.00\", \"0.0%\". */\n format: z.string().optional(),\n /**\n * Display currency (ISO 4217, e.g. \"USD\", \"CNY\"). Carried onto the result\n * field so presentations render a locale-correct symbol via `Intl` rather\n * than a \"$\" baked into `format`. Declare it on the measure (the semantic\n * layer) when the aggregated field is a fixed-currency amount.\n */\n currency: z.string().length(3).optional().describe('Display currency code (ISO 4217)'),\n /**\n * Derived measure — computed from OTHER measures in this dataset by name\n * only. e.g. `{ op: 'ratio', of: ['won_amount', 'total_amount'] }`.\n * Mutually exclusive with `field`/`aggregate` semantics: when `derived` is\n * set, `aggregate` is ignored at compile time.\n */\n derived: z.object({\n op: DerivedMeasureOp,\n /** Names of other measures in this dataset (2+ for ratio/difference). */\n of: z.array(SnakeCaseIdentifierSchema).min(1),\n }).optional(),\n}));\n\n/**\n * Dataset — the single analytical source of truth (ADR-0021 D1).\n */\nexport const DatasetSchema = lazySchema(() => z.object({\n /** Identity. */\n name: SnakeCaseIdentifierSchema.describe('Dataset unique name'),\n label: I18nLabelSchema.describe('Dataset label'),\n description: I18nLabelSchema.optional(),\n\n /** Base object — the FROM. */\n object: z.string().describe('Base object name'),\n\n /**\n * Relationships to include, by NAME or by PATH — lookup / master_detail field\n * names on the object graph, optionally chained through to-one relationships\n * up to 3 hops (`account`, `account.owner`; ADR-0071 multi-hop). Joins are\n * COMPILED from these — the author writes no ON clause. Declaring `a.b`\n * implicitly includes the intermediate `a`. D-C: only declared paths are\n * joinable; no arbitrary predicates, and to-many traversal is out of scope.\n */\n include: z\n .array(\n z\n .string()\n .refine((p) => p.split('.').length <= 3, {\n message: 'include path exceeds the 3-hop limit (ADR-0071)',\n }),\n )\n .optional()\n .describe('Relationship names/paths to join (derived from object graph; max 3 hops)'),\n\n /** Definition-level filter (the dataset's intrinsic scope, e.g. non-deleted). */\n filter: FilterConditionSchema.optional().describe('Intrinsic dataset scope filter'),\n\n /** The semantic contract presentations bind to. */\n dimensions: z.array(DatasetDimensionSchema).describe('Groupable axes'),\n measures: z.array(DatasetMeasureSchema).describe('Aggregatable values'),\n\n /**\n * ADR-0010 — package-author protection envelope; the loader translates this\n * into the private `_lock` envelope at registration and strips it before\n * persistence.\n */\n protection: ProtectionSchema.optional().describe(\n 'Package author protection block — lock policy for this dataset.',\n ),\n\n // ADR-0010 — runtime protection envelope (internal — set by loader).\n ...MetadataProtectionFields,\n}).superRefine((ds, ctx) => {\n // Measure names must be unique (presentations reference them by name).\n const measureNames = new Set<string>();\n for (const m of ds.measures) {\n if (measureNames.has(m.name)) {\n ctx.addIssue({ code: 'custom', message: `duplicate measure name \"${m.name}\"`, path: ['measures'] });\n }\n measureNames.add(m.name);\n }\n // Dimension names must be unique.\n const dimNames = new Set<string>();\n for (const d of ds.dimensions) {\n if (dimNames.has(d.name)) {\n ctx.addIssue({ code: 'custom', message: `duplicate dimension name \"${d.name}\"`, path: ['dimensions'] });\n }\n dimNames.add(d.name);\n }\n // Derived measures may only reference OTHER measures declared in this dataset.\n for (const m of ds.measures) {\n if (!m.derived) {\n // A non-derived measure must declare an aggregate (a derived measure\n // omits it — it combines other measures by name instead).\n if (!m.aggregate) {\n ctx.addIssue({\n code: 'custom',\n message: `measure \"${m.name}\" requires \\`aggregate\\` (or a \\`derived\\` spec)`,\n path: ['measures'],\n });\n } else if (!m.field && m.aggregate !== 'count') {\n // A non-derived measure needs a field unless it is a plain count.\n ctx.addIssue({\n code: 'custom',\n message: `measure \"${m.name}\" requires \\`field\\` (only \\`count\\` may omit it)`,\n path: ['measures'],\n });\n }\n continue;\n }\n for (const ref of m.derived.of) {\n if (ref === m.name) {\n ctx.addIssue({ code: 'custom', message: `derived measure \"${m.name}\" cannot reference itself`, path: ['measures'] });\n } else if (!measureNames.has(ref)) {\n ctx.addIssue({\n code: 'custom',\n message: `derived measure \"${m.name}\" references unknown measure \"${ref}\"`,\n path: ['measures'],\n });\n }\n }\n }\n}));\n\n/**\n * Authoring helper — identity function that gives editors full type-checking\n * and inference when defining a dataset in a `*.dataset.ts` file.\n *\n * @example\n * ```ts\n * export default defineDataset({\n * name: 'sales',\n * label: 'Sales',\n * object: 'opportunity',\n * include: ['account'],\n * dimensions: [{ name: 'region', field: 'account.region' }],\n * measures: [{ name: 'revenue', aggregate: 'sum', field: 'amount' }],\n * });\n * ```\n */\nexport function defineDataset(dataset: DatasetInput): DatasetInput {\n return dataset;\n}\n\nexport type DatasetDimension = z.infer<typeof DatasetDimensionSchema>;\nexport type DatasetMeasure = z.infer<typeof DatasetMeasureSchema>;\nexport type DerivedMeasureOpValue = z.infer<typeof DerivedMeasureOp>;\nexport type Dataset = z.infer<typeof DatasetSchema>;\n\n/** Input types for authoring (optional fields with defaults may be omitted). */\nexport type DatasetDimensionInput = z.input<typeof DatasetDimensionSchema>;\nexport type DatasetMeasureInput = z.input<typeof DatasetMeasureSchema>;\nexport type DatasetInput = z.input<typeof DatasetSchema>;\n","/**\n * Form layout for the Report metadata editor.\n *\n * Bound to {@link ReportSchema} via `data.provider = 'schema'`. The\n * `@object-ui/plugin-form` renderer resolves field metadata from the\n * Zod-derived JSON Schema served by `/api/v1/meta` and applies the\n * widget/visibility hints declared here.\n *\n * ADR-0021 single-form: a report is dataset-bound — it binds a semantic-layer\n * `dataset` and selects its `values` (measure names) grouped by `rows`\n * (dimension names). The legacy inline `objectName` + `columns` + `groupings`\n * query form was removed from {@link ReportSchema} in the 9.0 cutover, so this\n * form no longer declares those fields.\n */\n\nimport { defineForm } from './view.zod';\n\nexport const reportForm = defineForm({\n schemaId: 'report',\n type: 'simple',\n sections: [\n {\n label: 'Basics',\n description: 'Identity and report type.',\n columns: 2,\n fields: [\n { field: 'name', type: 'text', colSpan: 1, required: true, helpText: 'snake_case unique identifier' },\n { field: 'label', type: 'text', colSpan: 1, required: true },\n { field: 'description', type: 'textarea', colSpan: 2 },\n { field: 'type', colSpan: 2, helpText: 'Report type: tabular/summary/matrix/joined' },\n ],\n },\n {\n label: 'Dataset binding',\n description: 'The semantic-layer dataset this report renders. Values are the dataset’s measures; rows are its dimensions.',\n // A `joined` report carries its data on `blocks` instead.\n visibleWhen: \"data.type != 'joined'\",\n fields: [\n { field: 'dataset', widget: 'ref:dataset', helpText: 'Dataset to bind (measures/dimensions come from its semantic layer)' },\n { field: 'values', widget: 'string-tags', helpText: 'Measure names (from the dataset) to display' },\n { field: 'rows', widget: 'string-tags', helpText: 'Dimension names (from the dataset) to group rows by' },\n // CEL visibility — only Matrix reports pivot across a second dimension.\n { field: 'columns', widget: 'string-tags', visibleWhen: \"data.type == 'matrix'\", helpText: 'Dimension names across (matrix only)' },\n { field: 'drilldown', helpText: 'Click an aggregated row/cell to open the underlying records' },\n ],\n },\n {\n label: 'Joined blocks',\n description: 'Additional dataset-bound blocks stacked into a single report (joined reports only).',\n visibleWhen: \"data.type == 'joined'\",\n fields: [\n { field: 'blocks', type: 'repeater', helpText: 'Dataset-bound sub-reports (joined report only)' },\n ],\n },\n {\n label: 'Filter & chart',\n description: 'Render-time scope filter and chart presentation.',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'runtimeFilter', widget: 'json', helpText: 'Render-time scope filter, ANDed at query time' },\n { field: 'chart', type: 'composite', helpText: 'Chart config (type, legend, colors)' },\n ],\n },\n {\n label: 'Advanced',\n description: 'Accessibility and performance tuning.',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'aria', type: 'composite', helpText: 'Accessibility labels' },\n { field: 'performance', type: 'composite', helpText: 'Caching and optimization' },\n ],\n },\n ],\n});\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\n/**\n * View — canonical FormView layout.\n *\n * Views power most data surfaces (grid / kanban / calendar / gantt /\n * gallery / timeline / chart) and each surface has its own block of\n * options. We group fields by surface so the editor doesn't dump 30+\n * irrelevant knobs on the user.\n *\n * Visibility predicates use the `type` discriminator to reveal only\n * the surface-specific block.\n */\n\nimport { defineForm } from './view.zod';\n\nexport const viewForm = defineForm({\n schemaId: 'view',\n type: 'simple',\n sections: [\n {\n name: 'basics',\n label: 'Basics',\n description: 'Identity and primary surface.',\n columns: 2,\n fields: [\n { field: 'name', type: 'text', required: true, colSpan: 1, helpText: 'snake_case, unique per environment' },\n { field: 'label', type: 'text', required: true, colSpan: 1 },\n { field: 'description', type: 'textarea', colSpan: 2 },\n { field: 'type', required: true, colSpan: 1, helpText: 'Primary view surface' },\n { field: 'data', widget: 'json', colSpan: 2, helpText: 'Data source — e.g. {\"provider\":\"object\",\"object\":\"task\"}' },\n ],\n },\n {\n name: 'columns_filters',\n label: 'Columns & filters',\n description: 'What rows show and how users filter them.',\n fields: [\n { field: 'columns', type: 'repeater', required: true, helpText: 'Columns to display (field names from selected object)' },\n { field: 'filter', widget: 'filter-builder', dependsOn: 'data.object', helpText: 'Filter conditions — same visual builder as the list toolbar, with field-type-aware operators and value inputs' },\n { field: 'sort', type: 'repeater', helpText: 'Default sort order' },\n { field: 'searchableFields', widget: 'string-tags', helpText: 'Field names available for quick search' },\n { field: 'filterableFields', widget: 'string-tags', helpText: 'Field names available for filtering' },\n ],\n },\n {\n name: 'table_options',\n label: 'Table options',\n description: 'Grid-only display options.',\n visibleWhen: \"data.type == 'grid' || data.type == null\",\n collapsible: true,\n collapsed: true,\n columns: 2,\n fields: [\n { field: 'resizable', colSpan: 1 },\n { field: 'striped', colSpan: 1 },\n { field: 'bordered', colSpan: 1 },\n { field: 'compactToolbar', colSpan: 1 },\n { field: 'rowHeight', colSpan: 1 },\n { field: 'selection', type: 'composite', colSpan: 2 },\n { field: 'pagination', type: 'composite', colSpan: 2 },\n ],\n },\n {\n name: 'kanban',\n label: 'Kanban',\n description: 'Kanban-specific board configuration.',\n visibleWhen: \"data.type == 'kanban'\",\n fields: [{ field: 'kanban', type: 'composite' }],\n },\n {\n name: 'calendar',\n label: 'Calendar',\n description: 'Calendar-specific configuration.',\n visibleWhen: \"data.type == 'calendar'\",\n fields: [{ field: 'calendar', type: 'composite' }],\n },\n {\n name: 'gantt',\n label: 'Gantt',\n description: 'Gantt-specific configuration.',\n visibleWhen: \"data.type == 'gantt'\",\n fields: [{ field: 'gantt', type: 'composite' }],\n },\n {\n name: 'gallery',\n label: 'Gallery',\n description: 'Gallery-specific configuration.',\n visibleWhen: \"data.type == 'gallery'\",\n fields: [{ field: 'gallery', type: 'composite' }],\n },\n {\n name: 'timeline',\n label: 'Timeline',\n description: 'Timeline-specific configuration.',\n visibleWhen: \"data.type == 'timeline'\",\n fields: [{ field: 'timeline', type: 'composite' }],\n },\n {\n name: 'chart',\n label: 'Chart',\n description: 'Chart-specific configuration.',\n visibleWhen: \"data.type == 'chart'\",\n fields: [{ field: 'chart', type: 'composite' }],\n },\n {\n name: 'end_user_controls',\n label: 'End-user controls',\n description: 'What end users can do on this view — quick filters, filter tabs, visualization switching (ADR-0047, Airtable Interface parity).',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'userFilters', type: 'composite', helpText: 'Quick-filter bar: element style (dropdown / tabs / toggle) + exposed fields or tab presets' },\n { field: 'tabs', type: 'repeater', helpText: 'In-view filter tabs — each tab applies its own filter rules' },\n { field: 'appearance', type: 'composite', helpText: 'allowedVisualizations: which renderers users may switch between' },\n { field: 'userActions', type: 'composite', helpText: 'Toolbar toggles: sort / search / filter / row height' },\n { field: 'addRecord', type: 'composite' },\n { field: 'showRecordCount' },\n ],\n },\n {\n name: 'navigation_sharing',\n label: 'Navigation & sharing',\n description: 'Where this view appears and who can see it.',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'navigation', type: 'composite' },\n { field: 'sharing', type: 'composite' },\n ],\n },\n ],\n});\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { defineForm } from './view.zod';\n\nexport const appForm = defineForm({\n schemaId: 'app',\n type: 'simple',\n sections: [\n {\n label: 'Basics',\n description: 'App identity and activation.',\n columns: 2,\n fields: [\n { field: 'name', type: 'text', required: true, colSpan: 1, helpText: 'snake_case, unique' },\n { field: 'label', type: 'text', required: true, colSpan: 1 },\n { field: 'description', type: 'textarea', colSpan: 2 },\n { field: 'version', type: 'text', colSpan: 1 },\n { field: 'icon', type: 'text', colSpan: 1, helpText: 'Lucide icon name (e.g. \"users\", \"briefcase\")' },\n { field: 'active', type: 'boolean', colSpan: 1 },\n { field: 'isDefault', type: 'boolean', colSpan: 1, helpText: 'Make this the default app for new users' },\n ],\n },\n {\n label: 'Navigation',\n description: 'Sidebar items and area grouping.',\n fields: [\n { field: 'navigation', type: 'composite', helpText: 'Nav tree — recursive structure' },\n { field: 'areas', type: 'repeater', helpText: 'Group items into collapsible areas' },\n { field: 'homePageId', type: 'text', helpText: 'Landing page when app opens' },\n { field: 'mobileNavigation', type: 'composite', helpText: 'Bottom tab bar config for mobile' },\n ],\n },\n {\n label: 'Content',\n description: 'Objects and APIs this app uses.',\n fields: [\n { field: 'objects', widget: 'object-selector', multiple: true, helpText: 'Object names this app exposes' },\n { field: 'apis', type: 'composite', helpText: 'API endpoint definitions' },\n { field: 'defaultAgent', type: 'text', helpText: 'AI agent for the ambient assistant button' },\n ],\n },\n {\n label: 'Branding',\n description: 'Theme colors and logo.',\n collapsible: true,\n collapsed: true,\n fields: [{ field: 'branding', type: 'composite', helpText: 'Primary/secondary colors, logo, theme' }],\n },\n {\n label: 'Access & sharing',\n description: 'Who can access this app and how it can be embedded.',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'requiredPermissions', widget: 'string-tags', helpText: 'Permissions needed to access this app' },\n { field: 'sharing', type: 'composite', helpText: 'Public/internal/restricted access control' },\n { field: 'embed', type: 'composite', helpText: 'iFrame embed configuration' },\n { field: 'aria', type: 'composite', helpText: 'Accessibility labels' },\n ],\n },\n ],\n});\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { defineForm } from './view.zod';\n\nexport const dashboardForm = defineForm({\n schemaId: 'dashboard',\n type: 'simple',\n sections: [\n {\n label: 'Basics',\n description: 'Dashboard identity and description.',\n columns: 2,\n fields: [\n { field: 'name', type: 'text', required: true, colSpan: 1, helpText: 'snake_case unique identifier' },\n { field: 'label', type: 'text', required: true, colSpan: 1, helpText: 'Display name' },\n { field: 'description', type: 'textarea', colSpan: 2 },\n ],\n },\n {\n label: 'Layout',\n description: 'Grid sizing and refresh cadence.',\n columns: 3,\n fields: [\n { field: 'columns', type: 'number', colSpan: 1, helpText: 'Grid columns (default 12)' },\n { field: 'gap', type: 'number', colSpan: 1, helpText: 'Grid gap (Tailwind units)' },\n { field: 'refreshInterval', type: 'number', colSpan: 1, helpText: 'Auto-refresh (seconds)' },\n { field: 'header', type: 'composite', colSpan: 3, helpText: 'Dashboard header config (title, subtitle, actions)' },\n ],\n },\n {\n label: 'Widgets',\n description: 'Cards and charts placed on the grid.',\n fields: [\n { field: 'widgets', type: 'repeater', required: true, helpText: 'Dashboard widgets with position and sizing' },\n ],\n },\n {\n label: 'Filters',\n description: 'Default and global filters applied across widgets.',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'dateRange', type: 'composite', helpText: 'Default date range selector' },\n { field: 'globalFilters', type: 'repeater', helpText: 'Filters applied to all widgets' },\n ],\n },\n {\n label: 'Advanced',\n description: 'Accessibility and performance tuning.',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'aria', type: 'composite', helpText: 'Accessibility labels' },\n { field: 'performance', type: 'composite', helpText: 'Caching and optimization config' },\n ],\n },\n ],\n});\n","// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { defineForm } from './view.zod';\n\n/**\n * Form layout for the Dataset metadata editor (ADR-0021 analytics semantic layer).\n *\n * Bound to {@link DatasetSchema}. Until this entry existed, `dataset` was the\n * only UI-authorable metadata type WITHOUT a registered {@link FormView}, so the\n * metadata-admin create surface fell back to the auto-generated single-section\n * layout. That fallback (a) silently DROPPED the optional `include` (joins) and\n * `filter` (intrinsic scope) fields — making joined / scoped datasets\n * un-authorable online — and (b) rendered the base `object` and dimension/\n * measure `field`s as bare free-text inputs with no object context.\n *\n * This layout restores `include` + `filter`, groups the surface into sections\n * with guidance, and uses pickers (`ref:object`, `filter-builder` scoped to the\n * base object) so a business user can author a dataset without memorising\n * machine names. Mirrors {@link reportForm} — the sibling analytics editor.\n */\nexport const datasetForm = defineForm({\n schemaId: 'dataset',\n type: 'simple',\n sections: [\n {\n name: 'basics',\n label: 'Basics',\n description: 'Dataset identity.',\n columns: 2,\n fields: [\n { field: 'name', type: 'text', colSpan: 1, required: true, immutable: true, helpText: 'snake_case unique identifier' },\n { field: 'label', type: 'text', colSpan: 1, required: true, helpText: 'Display name' },\n { field: 'description', type: 'textarea', colSpan: 2, helpText: 'What this dataset measures' },\n ],\n },\n {\n name: 'source',\n label: 'Source',\n description: 'The base object, the relationships to join, and the dataset’s intrinsic scope. Joins are derived from the object graph — pick relationship (lookup / master_detail) names, never write an ON clause.',\n fields: [\n { field: 'object', widget: 'ref:object', required: true, helpText: 'Base object — the FROM' },\n { field: 'include', widget: 'string-tags', helpText: 'Relationship (lookup / master_detail) field names to join — enables `relationship.field` dimensions/measures (e.g. include \"account\" → group by account.region)' },\n { field: 'filter', widget: 'filter-builder', dependsOn: 'object', helpText: 'Intrinsic scope filter (e.g. exclude soft-deleted records), ANDed into every query' },\n ],\n },\n {\n name: 'dimensions',\n label: 'Dimensions',\n description: 'Groupable axes. Use a base field, or `relationship.field` (e.g. account.region) for a relationship included above.',\n fields: [\n { field: 'dimensions', type: 'repeater', required: true, helpText: 'Each: name (referenced by presentations), field, type, and — for dates — a default bucketing granularity' },\n ],\n },\n {\n name: 'measures',\n label: 'Measures',\n description: 'Aggregatable values defined once and referenced by name. A measure is sum/avg/count/… of a field; a derived measure combines other measures (ratio/sum/difference/product). Measure-scoped filters and derived ops are edited per-row in the dataset designer.',\n fields: [\n { field: 'measures', type: 'repeater', required: true, helpText: 'Each: name, aggregate, field (optional for count), and display format/currency' },\n ],\n },\n ],\n});\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { defineForm } from './view.zod';\n\n/**\n * Action Metadata Form\n * \n * Form layout for creating/editing action metadata definitions.\n */\nexport const actionForm = defineForm({\n schemaId: 'action',\n type: 'simple',\n sections: [\n {\n label: 'Basics',\n description: 'Action identity and presentation.',\n columns: 2,\n fields: [\n { field: 'name', required: true, colSpan: 1, helpText: 'Unique identifier (snake_case)' },\n { field: 'label', required: true, colSpan: 1, helpText: 'Button text shown to users' },\n { field: 'objectName', widget: 'ref:object', colSpan: 1, helpText: 'Object this action belongs to (optional)' },\n { field: 'icon', colSpan: 1, helpText: 'Lucide icon name (e.g., \"check\", \"x-circle\")' },\n { field: 'type', required: true, colSpan: 1, helpText: 'What happens when clicked' },\n { field: 'variant', colSpan: 1, helpText: 'Button style (primary=blue, danger=red, ghost=transparent)' },\n ],\n },\n {\n label: 'Behavior',\n description: 'Configure what happens when the action is triggered.',\n fields: [\n { field: 'target', visibleWhen: \"data.type != 'script'\", helpText: 'URL, flow name, or API endpoint to call' },\n { field: 'method', visibleWhen: \"data.type == 'api'\", helpText: 'HTTP method (GET, POST, PUT, DELETE)' },\n {\n field: 'body',\n type: 'composite',\n visibleWhen: \"data.type == 'script'\",\n helpText: 'Either an L1 expression or an L2 sandboxed JS body',\n // Mirrors hook.form.ts: `body` is a discriminated union\n // (HookBodySchema) on `language`, not a bare string. A flat\n // `widget: 'code'` fed the whole object to the editor and rendered\n // \"[object Object]\". Render the union as language + source (+ the\n // L2-only capability/timeout knobs).\n fields: [\n { field: 'language', type: 'select', required: true, helpText: 'expression = pure formula; js = sandboxed JavaScript', options: [\n { label: 'Expression (L1)', value: 'expression' },\n { label: 'JavaScript (L2 sandboxed)', value: 'js' },\n ] },\n { field: 'source', type: 'code', language: 'javascript', required: true, helpText: 'Function body source — no top-level imports' },\n { field: 'capabilities', type: 'tags', helpText: 'Allowed ctx APIs (api.read, api.write, crypto.uuid, log, …)' },\n { field: 'timeoutMs', type: 'number', helpText: 'Per-invocation timeout (ms)' },\n ],\n },\n { field: 'params', type: 'repeater', helpText: 'User input parameters (show form before executing)' },\n { field: 'confirmText', helpText: 'Confirmation message (e.g., \"Are you sure?\")' },\n { field: 'successMessage', helpText: 'Success message after completion' },\n { field: 'refreshAfter', helpText: 'Refresh the list/page after action completes' },\n ],\n },\n {\n label: 'Placement',\n description: 'Where and when the action button appears.',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'locations', type: 'repeater', helpText: 'Where to show this action (toolbar, row menu, etc.)' },\n { field: 'component', helpText: 'How to render (button, icon, menu item)' },\n { field: 'visible', widget: 'textarea', helpText: 'CEL expression: show only when condition is true' },\n { field: 'disabled', widget: 'textarea', helpText: 'CEL expression: disable when condition is true' },\n { field: 'shortcut', helpText: 'Keyboard shortcut (e.g., \"Ctrl+S\", \"Cmd+Enter\")' },\n ],\n },\n {\n label: 'Advanced',\n description: 'Bulk operations, AI exposure, and API request shape.',\n collapsible: true,\n collapsed: true,\n columns: 2,\n fields: [\n { field: 'bulkEnabled', colSpan: 1, helpText: 'Allow applying to multiple selected records' },\n { field: 'ai', colSpan: 2, helpText: 'AI exposure (opt-in): set ai.exposed=true and write ai.description (≥40 chars) to make this callable by agents.' },\n { field: 'recordIdParam', visibleWhen: \"data.type == 'api'\", colSpan: 1, helpText: 'Body parameter name for record ID' },\n { field: 'recordIdField', visibleWhen: \"data.type == 'api' && data.recordIdParam\", colSpan: 1, helpText: 'Field to use as record ID (default: \"id\")' },\n { field: 'bodyShape', visibleWhen: \"data.type == 'api'\", colSpan: 2, helpText: 'Request body structure (flat or nested)' },\n ],\n },\n ],\n});\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { defineForm } from './view.zod';\n\n/**\n * Page Metadata Form\n * \n * Form layout for creating/editing page metadata definitions.\n */\nexport const pageForm = defineForm({\n schemaId: 'page',\n type: 'simple',\n sections: [\n {\n label: 'Basics',\n description: 'Page identity and template.',\n columns: 2,\n fields: [\n { field: 'name', required: true, colSpan: 1, helpText: 'Unique identifier (snake_case)' },\n { field: 'label', required: true, colSpan: 1, helpText: 'Page title shown to users' },\n { field: 'icon', widget: 'icon', colSpan: 1, helpText: 'Icon for navigation menu' },\n {\n field: 'type',\n colSpan: 1,\n // The page KIND, not a visualization. Kanban/Calendar/Gallery/Timeline\n // are visualizations OF a List page (set under Interface →\n // Appearance → Allowed visualizations), not page types — so they are\n // deliberately absent here. Only kinds with a dedicated renderer are\n // offered; roadmap kinds (dashboard/form/record_detail/…) are valid in\n // the schema but hidden until they render distinctly.\n options: [\n { label: 'List / Interface page', value: 'list' },\n { label: 'Record page', value: 'record' },\n { label: 'Home page', value: 'home' },\n { label: 'App page', value: 'app' },\n { label: 'Utility panel', value: 'utility' },\n ],\n helpText: 'Page kind. \"List / Interface\" binds a source view into a curated surface — how it looks (grid / kanban / calendar / …) is a visualization set under Interface, not a page type.',\n },\n // A list/interface page renders via InterfaceListPage and ignores the\n // region template, so hide it there (same rationale as Data Context / Layout).\n { field: 'template', colSpan: 2, visibleWhen: \"data.type != 'list'\", helpText: 'Layout template (e.g., \"header-sidebar-main\")' },\n { field: 'description', widget: 'textarea', colSpan: 2, helpText: 'Page description for navigation' },\n ],\n },\n {\n label: 'Data Context',\n description: 'Record binding and page-local state.',\n // Interface/list pages bind their data via the Interface section\n // (source/sourceView), not a page-level object — hide this to keep\n // the panel lean (the region/record machinery doesn't apply).\n visibleWhen: \"data.type != 'list'\",\n fields: [\n { field: 'object', widget: 'ref:object', helpText: 'Bound object (for Record pages)' },\n {\n field: 'variables',\n type: 'repeater',\n helpText: 'Local page state variables',\n // Explicit sub-fields so `source` can use the `ref:component` picker —\n // a variable's `source` names the component (by `id`) that writes it,\n // so it's chosen from the page's real canvas components, not typed by\n // hand. Keep in sync with PageVariableSchema.\n fields: [\n { field: 'name', required: true, helpText: 'Variable name — exposed to expressions as `page.<name>`' },\n { field: 'type', helpText: 'Value type' },\n { field: 'defaultValue', helpText: 'Initial value (defaults to a type-appropriate empty value)' },\n { field: 'source', widget: 'ref:component', helpText: 'Component (by id) that writes this variable — e.g. an element:record_picker' },\n ],\n },\n ],\n },\n {\n label: 'Layout',\n description: 'Page regions and components placed within them.',\n // List pages render a curated list surface, not free-form regions —\n // the region designer is irrelevant here, so hide it for list pages.\n visibleWhen: \"data.type != 'list'\",\n fields: [\n // Not required: an empty full page falls back to the synthesized default\n // layout, slotted pages compose via `slots`, and list pages ignore regions\n // entirely. Marking it required made the form unsatisfiable when no region\n // editor was rendered (the metadata form can't yet edit a region tree).\n { field: 'regions', type: 'repeater', helpText: 'Layout regions (header, main, sidebar, footer) with components' },\n ],\n },\n {\n name: 'interface',\n label: 'Interface (list pages)',\n description: 'Interface mode (Airtable parity): the page defines its own data surface directly — columns, filters, visualizations and toolbar — no inheriting from a separate view.',\n collapsible: true,\n // Primary content for a list page — open by default (still collapsible).\n collapsed: false,\n visibleWhen: \"data.type == 'list'\",\n fields: [\n {\n field: 'interfaceConfig',\n type: 'composite',\n helpText:\n 'The page IS the view: source picks the object, columns/filterBy are defined directly here; appearance.allowedVisualizations whitelists renderers (one entry = locked); userActions toggles the toolbar.',\n // Order: common authoring controls first, rarely-used ones last.\n // Explicit sub-fields so `userFilters` can use the dedicated\n // filter-mode selector (None / Tabs / Dropdown, ADR-0047 §3.4a).\n // None maps to ABSENCE of userFilters — the protocol stores\n // \"no filter bar\" as omission, not a literal element: 'none'.\n // (`element: 'toggle'` stays valid but deprecated — not offered.)\n // Keep this list in sync with InterfacePageConfigSchema.\n fields: [\n // ── Data ── the page defines its own data surface directly.\n { field: 'source', widget: 'ref:object', helpText: 'Object this page reads from' },\n // Columns are defined ON the page (no view inheritance). `dependsOn:\n // 'source'` tells the picker which object's fields to offer.\n { field: 'columns', widget: 'field-multi', dependsOn: 'source', helpText: 'Columns to show — defined directly on the page (blank = all object fields)' },\n { field: 'filterBy', widget: 'filter-builder', dependsOn: 'source', helpText: 'Always-on base filter for the page — same visual builder as the list toolbar.' },\n { field: 'levels', helpText: 'Hierarchy levels to display (tree-like sources)' },\n // ── Appearance ──\n { field: 'appearance', type: 'composite', disclosure: 'popover', helpText: 'Allowed visualizations (Grid / Kanban / Calendar / …) and description visibility' },\n // ── User filters ──\n {\n field: 'userFilters',\n widget: 'filter-mode',\n helpText: 'End-user filter bar: None (no bar) / Tabs (named presets) / Dropdown (per-field). None removes the config.',\n },\n // ── User actions ──\n { field: 'userActions', type: 'composite', disclosure: 'popover', helpText: 'Toolbar toggles (search, sort, filter, row height)' },\n { field: 'addRecord', type: 'composite', disclosure: 'popover', helpText: 'Add-record entry point' },\n // Buttons ARE object actions — pick from the source object's actions.\n { field: 'buttons', widget: 'action-multi', dependsOn: 'source', helpText: \"Toolbar buttons — pick from this object's actions\" },\n {\n field: 'recordAction',\n options: [\n { label: 'Drawer (right-side peek)', value: 'drawer' },\n { label: 'Full page', value: 'page' },\n { label: 'Modal', value: 'modal' },\n { label: 'Not clickable', value: 'none' },\n ],\n helpText: 'How clicking a record opens its detail',\n },\n { field: 'showRecordCount', helpText: 'Show the record count bar' },\n { field: 'allowPrinting', helpText: 'Allow users to print this page' },\n ],\n },\n ],\n },\n {\n label: 'Advanced',\n description: 'Activation, audience, and accessibility.',\n collapsible: true,\n collapsed: true,\n fields: [\n { field: 'isDefault', helpText: 'Set as default page for this page type' },\n { field: 'kind', helpText: 'Page override mode: full or slotted (for record pages)' },\n { field: 'assignedProfiles', widget: 'string-tags', helpText: 'Profiles that can access this page' },\n { field: 'aria', type: 'composite', helpText: 'Accessibility attributes (ARIA labels, roles)' },\n ],\n },\n ],\n});\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * Capability tokens a script body may request.\n *\n * The runtime sandbox enforces these — if a body uses a `ctx` API that requires\n * a capability it did not declare, the call throws at invocation time.\n *\n * - `api.read` — `ctx.api.object(...).find / findOne / count / aggregate`\n * - `api.write` — `ctx.api.object(...).insert / update / delete`\n * - `api.transaction` — `ctx.api.transaction(async () => { … })` — runs the\n * callback's `ctx.api` writes/reads inside one driver transaction, committed\n * on return and rolled back if the callback throws. Requires `api.write`\n * alongside it to be useful (the transaction body still needs write access).\n * - `crypto.uuid` — `ctx.crypto.randomUUID()`\n * - `crypto.hash` — `ctx.crypto.hash(algo, data)`\n * - `log` — `ctx.log.info / warn / error`\n *\n * `http.fetch` is intentionally absent — outbound calls go through Connector\n * recipes (separate spec) so they remain auditable and replayable.\n */\nexport const HookBodyCapability = z.enum([\n 'api.read',\n 'api.write',\n 'api.transaction',\n 'crypto.uuid',\n 'crypto.hash',\n 'log',\n]);\nexport type HookBodyCapability = z.infer<typeof HookBodyCapability>;\n\n/**\n * L1 — Pure expression body.\n *\n * Evaluated by the formula engine. No IO, no mutation. Used for predicates\n * (`condition`-style) and simple computed values.\n *\n * @example\n * ```json\n * { \"language\": \"expression\", \"source\": \"input.amount > 1000 && input.status == 'open'\" }\n * ```\n */\nexport const ExpressionBodySchema = z.object({\n language: z.literal('expression'),\n /** Formula-engine expression. Pure, side-effect-free. */\n source: z.string().min(1).describe('Formula expression source'),\n}).describe('L1 expression body — pure formula, no IO');\nexport type ExpressionBody = z.infer<typeof ExpressionBodySchema>;\n\n/**\n * L2 — Sandboxed JavaScript source.\n *\n * The `source` is the **function body only** (not a full module). The runtime\n * wraps it in `new AsyncFunction('ctx', source)` for hooks, or\n * `new AsyncFunction('input', 'ctx', source)` for actions, then executes\n * inside an isolated VM.\n *\n * Forbidden inside `source` (CLI build will reject):\n * - `import` / `require` / dynamic `import()`\n * - `process`, `globalThis`, `eval`, `new Function`\n * - any identifier resolved from a value-only top-level import\n *\n * @example\n * ```json\n * {\n * \"language\": \"js\",\n * \"source\": \"if (ctx.input.email) ctx.input.email = ctx.input.email.toLowerCase();\",\n * \"capabilities\": [],\n * \"timeoutMs\": 250\n * }\n * ```\n */\nexport const ScriptBodySchema = z.object({\n language: z.literal('js'),\n /** Function body source (NOT a full module — no top-level imports). */\n source: z.string().min(1).describe('Function body source'),\n /**\n * Capability tokens the body is allowed to use. Default: `[]`.\n * The sandbox throws if the body calls a `ctx` API not covered by these.\n */\n capabilities: z.array(HookBodyCapability).default([]).describe('Granted capability tokens'),\n /**\n * Per-invocation hard timeout in milliseconds.\n * Sandbox kills the script if it exceeds this; smaller of this and the\n * enclosing hook/action `timeout` wins.\n */\n timeoutMs: z.number().int().positive().max(30_000).optional().describe('Per-invocation timeout (ms)'),\n /**\n * Per-invocation memory cap in MB.\n * Subject to engine support (isolated-vm enforces, quickjs approximates).\n */\n memoryMb: z.number().int().positive().max(256).optional().describe('Per-invocation memory cap (MB)'),\n}).describe('L2 sandboxed JS body — runs inside an isolated VM with declared capabilities');\nexport type ScriptBody = z.infer<typeof ScriptBodySchema>;\n\n/**\n * Hook / Action body — discriminated by `language`.\n *\n * Two and only two forms are accepted:\n * - `expression` — L1, pure formula evaluated by the formula engine.\n * - `js` — L2, sandboxed JavaScript source string.\n *\n * The compiled-module path (`.mjs` envelope) is intentionally **not** part of\n * this union. All bodies are pure metadata and travel inside the project\n * artifact JSON — no separate runtime module is required.\n *\n * @see content/docs/concepts/north-star.mdx — \"Metadata-only runtime\"\n */\nexport const HookBodySchema = z.discriminatedUnion('language', [\n ExpressionBodySchema,\n ScriptBodySchema,\n]).describe('Hook/Action body — expression (L1) or sandboxed JS (L2)');\nexport type HookBody = z.infer<typeof HookBodySchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { z } from 'zod';\n\n/**\n * # Public auth feature-flag registry (#2874)\n *\n * Classification registry for the **public `/api/v1/auth/config` `features`\n * contract** produced by plugin-auth's `getPublicConfig()`. Every boolean flag\n * served there MUST be classified here — a drift guard in plugin-auth\n * (`public-feature-registry.test.ts`) asserts the served key set ≡ this\n * registry's key set, so a new flag that ships unclassified turns CI red.\n *\n * Why: the create-user `phoneNumber` bug (#2871 / objectui#2406) was one\n * instance of a broader class — *the UI advertises a capability the runtime\n * doesn't have because the plugin behind it is off*. Manual per-site gating\n * discipline inevitably leaves silent gaps; this registry is the single place\n * where each flag's consumption surface, default semantics, and gated spec\n * inputs (or exemption rationale) are recorded and CI-enforced.\n *\n * NOT to be confused with `kernel/feature.zod.ts` (`FeatureFlagSchema`) —\n * that schema models tenant-scoped runtime rollout toggles (strategies,\n * expiry, conditions). This registry classifies the fixed, deployment-level\n * capability flags that plugin-auth advertises to anonymous clients.\n *\n * Consumers:\n * - `ui/action.zod.ts` — `requiresFeature` sugar on actions/params is lowered\n * at parse time (see {@link lowerRequiresFeature}) into the canonical\n * `visible` CEL predicate using {@link featureGatePredicate}.\n * - plugin-auth drift guard (key-set equivalence with `getPublicConfig()`).\n * - platform-objects completeness guard (`feature-gate-guard.test.ts`) —\n * every path in `gatedInputs` must carry the matching predicate, and every\n * `features.*` reference in a `visible` predicate must be booked here.\n *\n * This module is deliberately **import-free** (type-only zod import aside) so\n * schema modules can depend on it file-directly without cycle risk, and it\n * contains constants plus pure lowering helpers only (Prime Directive #2).\n */\n\n/**\n * Where a flag is consumed:\n * - `crud` — admin/CRUD surface: action/param `visible` predicates rendered\n * through objectui's `filterVisibleParams` chain. The surface this registry\n * actively guards.\n * - `login` — objectui login/auth UI reads the flag straight off\n * `/auth/config` (no spec metadata in between).\n * - `status` — operational status indicator, not a capability gate.\n */\nexport type PublicAuthFeatureSurface = 'crud' | 'login' | 'status';\n\n/**\n * Default semantics of the flag, which decide the lowered predicate:\n * - `opt-in` — default `false`; gate with `features.X == true`.\n * - `default-on` — default `true`; gate with `features.X != false` so a\n * missing/undefined flag (e.g. config not yet fetched) keeps the input\n * visible.\n */\nexport type PublicAuthFeatureSemantics = 'opt-in' | 'default-on';\n\nexport type PublicAuthFeatureEntry = {\n surface: PublicAuthFeatureSurface;\n semantics: PublicAuthFeatureSemantics;\n /**\n * Spec inputs gated on this flag. Path grammar:\n * `<object>.actions.<action>` or `<object>.actions.<action>.params.<name|field>`.\n * The platform-objects completeness guard resolves each path and asserts the\n * target's `visible` predicate matches {@link featureGatePredicate}.\n * Mutually exclusive with `exempt`.\n */\n gatedInputs?: readonly string[];\n /** Required when `gatedInputs` is absent — why no spec input needs gating. */\n exempt?: { reason: string };\n /** Audit notes: login-surface consumption sites, known gaps, follow-ups. */\n notes?: string;\n};\n\n/**\n * The registry. Keys mirror the boolean flags assembled in plugin-auth's\n * `getPublicConfig()` (auth-manager.ts, `features` literal) — see the drift\n * guard. Login-surface consumption sites below were audited against objectui\n * on 2026-07-15 (#2874 P2②).\n */\nexport const PUBLIC_AUTH_FEATURES = {\n twoFactor: {\n surface: 'crud',\n semantics: 'opt-in',\n gatedInputs: [\n 'sys_user.actions.enable_two_factor',\n 'sys_user.actions.disable_two_factor',\n 'sys_user.actions.generate_backup_codes',\n 'sys_two_factor.actions.enable_two_factor',\n 'sys_two_factor.actions.disable_two_factor',\n 'sys_two_factor.actions.regenerate_backup_codes',\n ],\n notes:\n 'Login-surface 2FA challenge is server-driven remediation (ADR-0069), ' +\n 'so the flag is intentionally unread by objectui LoginForm.',\n },\n passkeys: {\n surface: 'login',\n semantics: 'opt-in',\n exempt: {\n reason:\n 'No spec input to gate. Typed in objectui (auth/src/types.ts) but no ' +\n 'passkey UI exists yet — advertised-but-unconsumed gap tracked in ' +\n 'objectui#2514 (#2874 P2②).',\n },\n },\n magicLink: {\n surface: 'login',\n semantics: 'opt-in',\n exempt: {\n reason:\n 'No spec input to gate. Typed in objectui (auth/src/types.ts) but no ' +\n 'magic-link UI exists yet — advertised-but-unconsumed gap tracked in ' +\n 'objectui#2514 (#2874 P2②).',\n },\n },\n organization: {\n surface: 'crud',\n semantics: 'default-on',\n gatedInputs: [\n 'sys_user.actions.invite_user',\n 'sys_member.actions.add_member',\n 'sys_member.actions.update_member_role',\n 'sys_member.actions.remove_member',\n 'sys_member.actions.transfer_ownership',\n 'sys_invitation.actions.invite_user',\n 'sys_invitation.actions.cancel_invitation',\n 'sys_invitation.actions.resend_invitation',\n 'sys_team.actions.create_team',\n 'sys_team.actions.update_team',\n 'sys_team.actions.remove_team',\n 'sys_team_member.actions.add_team_member',\n 'sys_team_member.actions.remove_team_member',\n ],\n notes: 'Org CAPABILITY gate, not multi-org (ADR-0081 D1).',\n },\n multiOrgEnabled: {\n surface: 'crud',\n semantics: 'default-on',\n gatedInputs: [\n 'sys_organization.actions.create_organization',\n 'sys_organization.actions.update_organization',\n 'sys_organization.actions.delete_organization',\n 'sys_organization.actions.set_active_organization',\n 'sys_organization.actions.leave_organization',\n 'sys_organization.actions.change_slug',\n ],\n notes:\n 'Reflects ACTUAL multi-tenancy capability (tenancy.mode === \"multi\", ' +\n 'ADR-0093 D4), not just the requested mode.',\n },\n degradedTenancy: {\n surface: 'status',\n semantics: 'opt-in',\n exempt: {\n reason:\n 'Operator status banner (ADR-0093 D5) — signals degraded tenant ' +\n 'isolation, not an input capability gate.',\n },\n },\n oidcProvider: {\n surface: 'crud',\n semantics: 'default-on',\n gatedInputs: [\n 'sys_oauth_application.actions.create_oauth_application',\n 'sys_oauth_application.actions.delete_oauth_application',\n 'sys_oauth_application.actions.disable_oauth_application',\n 'sys_oauth_application.actions.enable_oauth_application',\n 'sys_oauth_application.actions.rotate_client_secret',\n ],\n notes:\n 'Default-ON: the embedded OIDC authorization server follows the ' +\n 'default-on MCP surface (resolveOidcProviderEnabled). Login surface ' +\n 'consumes the socialProviders[] array (per-provider enabled), not this ' +\n 'flag.',\n },\n sso: {\n surface: 'login',\n semantics: 'opt-in',\n exempt: {\n reason:\n 'Deliberately ungated on the CRUD surface: the served value is ' +\n 'refined to \"usable\" (≥1 provider configured) via isSsoUsable() at ' +\n '/auth/config, so gating sys_sso_provider registration actions on it ' +\n 'would deadlock first-provider setup. Login consumption verified: ' +\n 'objectui LoginForm gates the \"Sign in with SSO\" button.',\n },\n },\n ssoEnforced: {\n surface: 'login',\n semantics: 'opt-in',\n exempt: {\n reason:\n 'Login-surface only: objectui LoginForm hides the password form and ' +\n 'self-registration (break-glass link remains). No spec input to gate.',\n },\n },\n deviceAuthorization: {\n surface: 'login',\n semantics: 'opt-in',\n exempt: {\n reason:\n 'No spec input (sys_device_code declares no actions). Known gap: ' +\n 'objectui DeviceAuthPage hits the device-auth endpoints without ' +\n 'checking this flag (absent from its client type) — tracked in ' +\n 'objectui#2513 (#2874 P2②).',\n },\n },\n admin: {\n surface: 'crud',\n semantics: 'opt-in',\n gatedInputs: [\n 'sys_user.actions.create_user',\n 'sys_user.actions.ban_user',\n 'sys_user.actions.unban_user',\n 'sys_user.actions.unlock_user',\n 'sys_user.actions.set_user_password',\n 'sys_user.actions.set_user_role',\n 'sys_user.actions.impersonate_user',\n ],\n notes: 'SCIM forces the admin plugin (and this flag) on — ADR-0071.',\n },\n phoneNumber: {\n surface: 'crud',\n semantics: 'opt-in',\n gatedInputs: ['sys_user.actions.create_user.params.phoneNumber'],\n notes:\n 'The original #2871 fix. Also read by objectui LoginForm for the ' +\n 'phone+password sign-in mode.',\n },\n phoneNumberOtp: {\n surface: 'login',\n semantics: 'opt-in',\n exempt: {\n reason:\n 'Login-surface only: gates the \"sign in with verification code\" link ' +\n '(LoginForm) and the phone branch of forgot-password. Only advertised ' +\n 'when SMS is actually deliverable (#2780).',\n },\n },\n} as const satisfies Record<string, PublicAuthFeatureEntry>;\n\nexport type PublicAuthFeatureName = keyof typeof PUBLIC_AUTH_FEATURES;\n\n/** Tuple of registry keys — feeds `z.enum(...)` for the `requiresFeature` sugar. */\nexport const PUBLIC_AUTH_FEATURE_NAMES = Object.keys(PUBLIC_AUTH_FEATURES) as [\n PublicAuthFeatureName,\n ...PublicAuthFeatureName[],\n];\n\n/**\n * Non-boolean keys `getPublicConfig()` may conditionally spread into\n * `features` (legal-link URLs). Exempt from flag classification; the drift\n * guard asserts no OTHER non-boolean key sneaks in.\n */\nexport const PUBLIC_AUTH_CONFIG_NON_FLAG_KEYS = ['termsUrl', 'privacyUrl'] as const;\n\n/**\n * The canonical CEL gate for a flag, per its default semantics:\n * `opt-in` → `features.X == true`; `default-on` → `features.X != false`\n * (so an absent flag — e.g. config not yet fetched — fails open).\n */\nexport function featureGatePredicate(name: PublicAuthFeatureName): string {\n const op = PUBLIC_AUTH_FEATURES[name].semantics === 'opt-in' ? '== true' : '!= false';\n return `features.${name} ${op}`;\n}\n\n/** Object shape the lowering transform operates on (post field-level parse). */\ntype WithRequiresFeature = {\n requiresFeature?: PublicAuthFeatureName;\n /** Already normalized by ExpressionInputSchema to the `{dialect, source}` envelope. */\n visible?: { dialect?: unknown; source?: unknown } & Record<string, unknown>;\n};\n\n/**\n * Lower the declarative `requiresFeature: '<flag>'` sugar into the canonical\n * `visible` CEL predicate and strip the sugar key from the output — mirroring\n * `normalizeVisibleWhen` (ADR-0089): persisted artifacts, lint, runtime, and\n * objectui only ever see the canonical envelope.\n *\n * - No existing `visible` → `{ dialect: 'cel', source: <gate> }`, string-equal\n * to the hand-written gates it replaces.\n * - Existing CEL `visible` with a `source` → composed as\n * `(<existing>) && <gate>` (existing predicate first, gate last — the\n * hand-written convention).\n * - Existing `visible` that is non-CEL or AST-only → loud parse error\n * (ADR-0078 no-silently-inert); write the combined predicate by hand.\n *\n * Designed as a zod `.transform((v, ctx) => lowerRequiresFeature(v, ctx))`\n * appended after the schema's refinements.\n */\nexport function lowerRequiresFeature<T extends WithRequiresFeature>(\n input: T,\n ctx: z.core.$RefinementCtx,\n): Omit<T, 'requiresFeature'> {\n const { requiresFeature, ...rest } = input;\n if (requiresFeature === undefined) return rest as Omit<T, 'requiresFeature'>;\n\n const gate = featureGatePredicate(requiresFeature);\n const existing = rest.visible;\n if (existing === undefined) {\n return { ...rest, visible: { dialect: 'cel', source: gate } } as Omit<T, 'requiresFeature'>;\n }\n if (existing.dialect !== 'cel' || typeof existing.source !== 'string') {\n ctx.addIssue({\n code: 'custom',\n path: ['requiresFeature'],\n message:\n '`requiresFeature` composes only with a CEL `visible` carrying a `source` string; ' +\n 'this expression is AST-only or non-CEL — write the combined predicate by hand.',\n });\n return rest as Omit<T, 'requiresFeature'>;\n }\n return {\n ...rest,\n visible: { ...existing, source: `(${existing.source}) && ${gate}` },\n } as Omit<T, 'requiresFeature'>;\n}\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { FieldType } from '../data/field.zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { ExpressionInputSchema } from '../shared/expression.zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\nimport { HookBodySchema } from '../data/hook-body.zod';\n// Imported file-directly (not via the kernel barrel): the module is\n// deliberately import-free, so this cannot introduce a cycle.\nimport { PUBLIC_AUTH_FEATURE_NAMES, lowerRequiresFeature } from '../kernel/public-auth-features';\n\n/**\n * Action Parameter Schema\n *\n * Defines inputs required before executing an action.\n *\n * Two declaration modes:\n *\n * 1. **Field-backed** (preferred) — reference an existing object field; the\n * runtime resolves the field's label (i18n), type, validation rules,\n * options, placeholder, help text, and widget mapping from object\n * metadata. Cross-object references use `objectOverride`.\n *\n * ```ts\n * params: [\n * { field: 'email' }, // same object\n * { field: 'role', objectOverride: 'sys_member' }, // different object\n * ]\n * ```\n *\n * 2. **Inline** (legacy / bespoke) — declare `name`, `label`, `type` etc.\n * inline when no matching object field exists. Inline values may also be\n * used alongside `field` to override individual properties.\n *\n * `name` is required unless `field` is provided (in which case it defaults\n * to the field name and is used as the request-body key).\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const ActionParamSchema = lazySchema(() => z.object({\n /** Request-body key. Defaults to `field` when `field` is set. */\n name: z.string().optional(),\n /** Reference an existing object field for label/type/validation/options. */\n field: SnakeCaseIdentifierSchema.optional(),\n /** Object that owns the referenced field (defaults to the action's parent object). */\n objectOverride: SnakeCaseIdentifierSchema.optional(),\n /** Overrides the resolved field label (or sets it for inline params). */\n label: I18nLabelSchema.optional(),\n /** Overrides the resolved field type (or sets it for inline params). */\n type: FieldType.optional(),\n /**\n * Required override; when omitted defaults to `false`. Consumers that wish\n * to inherit the underlying field's `required` flag should leave this\n * undefined in the source schema and resolve at runtime (the dialog\n * renderers check truthiness, so `false === undefined` for UI purposes).\n */\n required: z.boolean().optional().default(false),\n /** Select/picklist options override. */\n options: z.array(z.object({ label: I18nLabelSchema, value: z.string() })).optional(),\n /** Placeholder override. */\n placeholder: z.string().optional(),\n /** Help/description override. */\n helpText: z.string().optional(),\n /** Default value for the dialog input. */\n defaultValue: z.unknown().optional(),\n /**\n * Widget config for inline params (field-backed params inherit these from\n * the referenced field at runtime; inline values override). The param\n * dialog renders every param through the same field-widget renderer the\n * object form uses (objectui ADR-0059), so these mirror the corresponding\n * `FieldSchema` knobs.\n */\n /** Allow multiple values (file/image/lookup/user params → array value). */\n multiple: z.boolean().optional().describe('Allow multiple values (array value shape); mirrors FieldSchema.multiple.'),\n /** Accepted upload types (MIME types / extensions) for `file`/`image` params. */\n accept: z.array(z.string()).optional().describe('Accepted upload types (MIME types / extensions) for file/image params.'),\n /** Max upload size in bytes for `file`/`image` params. */\n maxSize: z.number().int().positive().optional().describe('Max upload size in bytes for file/image params.'),\n /**\n * When true, the param's default value is pulled from the current row record\n * (key = the resolved field name) when the action runs from a list_item\n * context. Useful for edit dialogs that pre-fill from the selected row.\n */\n defaultFromRow: z.boolean().optional(),\n /**\n * Visibility predicate (CEL) — same scope as the action-level `visible`\n * (`current_user` / `app` / `data` / `features`). When it evaluates false the\n * dialog omits this param entirely. Use it to hide a param that the backend\n * only accepts under an opt-in capability, e.g. the create-user `phoneNumber`\n * param gated on `features.phoneNumber` so the form never offers a field the\n * default backend rejects. Absent = always visible.\n */\n visible: ExpressionInputSchema.optional().describe('Param visibility predicate (CEL); omits the param when false.'),\n /**\n * Declarative capability gate (#2874): name a public auth feature flag\n * (see `PUBLIC_AUTH_FEATURES` in `@objectstack/spec/kernel`) and the schema\n * lowers it at parse time into the canonical `visible` predicate —\n * `features.X == true` (opt-in flag) or `features.X != false` (default-on),\n * AND-composed with any explicit `visible`. The sugar key is stripped from\n * the parsed output, so renderers/lint only ever see `visible`. Prefer this\n * over a hand-written `features.*` predicate: the flag name is\n * enum-checked and the gate/registry stay in lockstep.\n */\n requiresFeature: z.enum(PUBLIC_AUTH_FEATURE_NAMES).optional().describe('Public auth feature flag gating this param; lowered into `visible` at parse time.'),\n}).refine(\n (p) => Boolean(p.name) || Boolean(p.field),\n { message: 'ActionParam requires either \"name\" or \"field\"' },\n).transform((p, ctx) => lowerRequiresFeature(p, ctx)));\n\n/**\n * Action type enum values.\n */\nexport const ActionType = z.enum(['script', 'url', 'modal', 'flow', 'api', 'form']);\n\n/**\n * Action types that require a `target` field.\n * Derived from ActionType, excluding 'script' which allows inline handlers.\n * These types reference an external resource (URL, flow, modal, or API endpoint)\n * and cannot function without a target binding.\n */\nconst TARGET_REQUIRED_TYPES: ReadonlySet<string> = new Set(\n ActionType.options.filter((t) => t !== 'script'),\n);\n\n/**\n * Action Schema\n * \n * **NAMING CONVENTION:**\n * Action names are machine identifiers used in code and must be lowercase snake_case.\n * \n * **TARGET BINDING:**\n * The `target` field is the canonical way to bind an action to its handler.\n * - `type: 'script'` — `target` is recommended (references a script/function name).\n * - `type: 'url'` — `target` is **required** (the URL to navigate to).\n * - `type: 'flow'` — `target` is **required** (the flow name to invoke).\n * - `type: 'modal'` — `target` is **required** (the modal/page name to open).\n * - `type: 'api'` — `target` is **required** (the API endpoint to call).\n * - `type: 'form'` — `target` is **required** (the FormView name to open, routed to `/console/forms/:name`).\n * \n * The `execute` field is **deprecated** and will be removed in a future version.\n * If `execute` is provided without `target`, it is automatically migrated to `target`.\n * \n * @example Good action names\n * - 'on_close_deal'\n * - 'send_welcome_email'\n * - 'approve_contract'\n * - 'export_report'\n * \n * @example Bad action names (will be rejected)\n * - 'OnCloseDeal' (PascalCase)\n * - 'sendEmail' (camelCase)\n * - 'Send Email' (spaces)\n * \n * Note: The action name is the configuration ID. JavaScript function names can use camelCase,\n * but the metadata ID must be lowercase snake_case.\n */\n/**\n * Action Location — where an action is allowed to surface in the UI.\n *\n * Canonical list (single source of truth for the whole platform). Renderers,\n * the ActionEngine, the Studio designer dropdowns, and `objectui` consumers\n * MUST import from this constant rather than re-declaring their own enum —\n * adding a new location should require touching this one file only.\n *\n * Semantics:\n * - `list_toolbar` — header/toolbar of a list view (bulk actions, \"New\", export).\n * - `list_item` — per-row action on a list/grid row (Salesforce row-level menu).\n * - `record_header` — primary actions in the record-detail title bar.\n * - `record_more` — overflow menu under the \"More\" / ⋯ button on a record.\n * - `record_related` — actions on a related list section inside a record.\n * - `record_section` — actions surfaced inside a body section/tab of a record\n * (e.g. a Security tab grouping change-password, 2FA, etc.).\n * - `global_nav` — global navigation/command-palette level actions.\n */\nexport const ACTION_LOCATIONS = [\n 'list_toolbar',\n 'list_item',\n 'record_header',\n 'record_more',\n 'record_related',\n 'record_section',\n 'global_nav',\n] as const;\n\nexport const ActionLocationSchema = z.enum(ACTION_LOCATIONS);\nexport type ActionLocation = z.infer<typeof ActionLocationSchema>;\n\n/**\n * Tool category values for {@link ActionAiSchema.category}.\n *\n * Mirrors `ToolCategorySchema` in `../ai/tool.zod`. Kept **inline** rather\n * than imported to avoid a `ui → ai` import cycle (`ai/*.form.ts` already\n * imports `defineForm` from `ui/view.zod`). If you change the canonical\n * tool categories, update both sides.\n */\nconst ActionAiCategorySchema = z.enum([\n 'data',\n 'action',\n 'flow',\n 'integration',\n 'vector_search',\n 'analytics',\n 'utility',\n]);\n\n/**\n * AI exposure block (ADR-0011 \"Actions as AI Tools\").\n *\n * **Opt-in, default off.** An action becomes an AI-callable tool only when\n * `exposed: true`. This is a deliberate governance gate: in an AI-authoring\n * world the platform's value is that a human can govern exactly which\n * capabilities the agent fleet is allowed to invoke — a half-finished or\n * unreviewed action must never be silently armed.\n *\n * When exposed, `description` is **required** — it is the LLM-facing contract\n * (when/why to call), authored explicitly rather than derived from the\n * UI `label`. The bridge in `@objectstack/service-ai` translates this block\n * into an `AIToolDefinition`.\n */\nexport const ActionAiSchema = z.object({\n /**\n * Expose this action to AI agents as a callable tool. Default `false`.\n * Setting `true` REQUIRES `description`.\n */\n exposed: z.boolean().default(false).describe('Expose this action to AI agents. Requires `description` when true.'),\n\n /**\n * LLM-facing description: tells the model when and why to call this action.\n * Distinct from the UI `label`. Plain English, ≥ 40 chars for useful tool\n * selection. Required whenever `exposed` is true.\n */\n description: z.string().min(40).optional().describe('LLM-facing description (≥40 chars). Required when exposed.'),\n\n /**\n * Override the derived tool category. Defaults to `action` (side-effect).\n * Use `data` for read-only actions, `analytics` for aggregations, etc.\n */\n category: ActionAiCategorySchema.optional().describe('Tool category override (defaults to \"action\").'),\n\n /**\n * Per-parameter AI hints, keyed by param name (or the injected `recordId`).\n * Tightens the JSON Schema the LLM sees (e.g. add `enum`, override\n * `description`, supply `examples`) WITHOUT changing the UI-facing field\n * metadata. Keys must match a declared `params[].name` (or `recordId`).\n */\n paramHints: z.record(z.string(), z.object({\n description: z.string().optional(),\n enum: z.array(z.union([z.string(), z.number()])).optional(),\n examples: z.array(z.unknown()).optional(),\n })).optional().describe('Per-parameter AI hints keyed by param name.'),\n\n /**\n * Output JSON Schema for the action's return value. Enables structured\n * downstream tool chaining (one action's output feeds another's input) and\n * is summarised into the tool description so the model knows what it gets\n * back. Optional — when omitted the return value is treated as freeform.\n */\n outputSchema: z.record(z.string(), z.unknown()).optional().describe('JSON Schema for the action return value.'),\n\n /**\n * Override confirmation for AI calls. When unset, the bridge defaults to\n * `true` for actions that look destructive (`confirmText` set, `mode:'delete'`,\n * or `variant:'danger'`). Set explicitly to `false` to assert a destructive-\n * looking action is safe to run without human approval, or `true` to force a\n * human-in-the-loop gate on an otherwise-safe action.\n */\n requiresConfirmation: z.boolean().optional().describe('Override HITL confirmation for AI invocations.'),\n});\n\nexport type ActionAi = z.infer<typeof ActionAiSchema>;\n\nexport const ActionSchema = lazySchema(() => z.object({\n /** Machine name of the action */\n name: SnakeCaseIdentifierSchema.describe('Machine name (lowercase snake_case)'),\n \n /** Display label */\n label: I18nLabelSchema.describe('Display label'),\n\n /** Target object this action belongs to (optional, snake_case) */\n objectName: z.string().regex(/^[a-z_][a-z0-9_]*$/).optional().describe('Target object this action belongs to. When set, the action is auto-merged into the object\\'s actions array by defineStack().'),\n \n /** Icon name (Lucide) */\n icon: z.string().optional().describe('Icon name'),\n\n /** Where does this action appear? */\n locations: z.array(ActionLocationSchema).optional().describe('Locations where this action is visible'),\n\n /** \n * Visual Component Type\n * Defaults to 'button' or 'menu_item' based on location,\n * but can be overridden.\n */\n component: z.enum([\n 'action:button', // Standard Button\n 'action:icon', // Icon only\n 'action:menu', // Dropdown menu\n 'action:group' // Button Group\n ]).optional().describe('Visual component override'),\n \n /** What type of interaction? */\n type: ActionType.default('script').describe('Action functionality type'),\n \n /** \n * Payload / Target — the canonical binding for the action handler.\n * Required for url, flow, modal, and api types.\n * For `script` type: prefer `body` over `target`. `target` is kept only for\n * legacy bundle.functions[name] references.\n *\n * **Interpolation** (renderer responsibility, all action types):\n * `target` MAY contain `${param.X}` and `${ctx.X}` tokens. Renderers\n * resolve them just before invocation:\n * - `${param.X}` — value collected from the action's params dialog.\n * - `${ctx.X}` — values from the action context: `ctx.origin`\n * (window.origin), `ctx.recordId`, `ctx.user.id`, `ctx.org.id`, etc.\n * Used by redirect-style actions like `link_social`, where the target is\n * e.g. `/api/v1/auth/sign-in/social?provider=${param.provider}&callbackURL=${ctx.origin}/_console/apps/account/sys_account`.\n * Renderers MUST `encodeURIComponent` interpolated values before\n * substituting them into URL query positions.\n */\n target: z.string().optional().describe('URL, Script Name, Flow ID, or API Endpoint. Supports ${param.X} and ${ctx.X} interpolation.'),\n\n /**\n * For `type:'url'` — where to open `target`. A simple, declarative new-tab\n * control for STATIC urls (no handler, no synchronous pre-open). objectui's\n * ActionRunner.executeUrl reads `openIn` with priority over the legacy\n * `params.newTab`/external-URL heuristic.\n *\n * - `'new-tab'` — opens `target` in a new browser tab.\n * - `'self'` — navigates in place.\n * - omitted — external/absolute URLs open in a new tab; relative URLs\n * navigate in place.\n *\n * Distinct from `opensInNewTab`/`newTabUrl`, which pre-open an about:blank\n * tab synchronously for ASYNC SSO-redirect handlers — do NOT use `openIn`\n * for those. This is a STATIC execution option: keep it OUT of `params`\n * (which is user-input-collection only).\n */\n openIn: z.enum(['self', 'new-tab']).optional().describe(\"For type:'url' — where to open `target`. 'new-tab' opens a new browser tab; 'self' navigates in place. When omitted, external/absolute URLs open in a new tab and relative URLs navigate in place. Static execution option — keep it OUT of `params` (which is user-input-collection only).\"),\n\n /**\n * Action Body (L1 expression or L2 sandboxed JS).\n *\n * Only meaningful when `type === 'script'`. When set, the runtime invokes\n * the body inside the sandbox as `(input, ctx) => Promise<output>` and\n * ignores `target`.\n *\n * - `{ language: 'expression', source: '...' }` — pure formula (L1).\n * - `{ language: 'js', source: '...', capabilities: [...] }` — sandboxed JS (L2).\n *\n * Compiled-module bodies are not supported. Outbound IO (HTTP, etc.) goes\n * through Connector recipes (separate spec).\n */\n body: HookBodySchema.optional().describe('Action body — expression (L1) or sandboxed JS (L2). Only used when type is `script`.'),\n\n /** \n * @deprecated Use `target` instead. This field is auto-migrated to `target` during parsing.\n */\n execute: z.string().optional().describe('@deprecated — Use target instead. Auto-migrated to target during parsing.'),\n \n /** User Input Requirements */\n params: z.array(ActionParamSchema).optional().describe('Input parameters required from user'),\n \n /** Visual Style */\n variant: z.enum(['primary', 'secondary', 'danger', 'ghost', 'link']).optional().describe('Button visual variant for styling (primary = highlighted, danger = destructive, ghost = transparent)'),\n\n /**\n * Explicit sort order WITHIN a UI location group (lower = higher / more\n * prominent). Controls where the action lands in each `locations` group\n * instead of relying on cross-file `defineStack({ actions })` registration\n * order — which is fragile and couples unrelated features.\n *\n * In `record_header` the first visible action becomes the primary button, so\n * a low (or negative) `order` promotes an action into the primary slot and a\n * high `order` demotes it toward the `⋯` overflow menu. This is the\n * declarative lever a plugin (e.g. plugin-approvals) or app author uses to\n * make a decision like Approve/Reject stably outrank app actions, rather than\n * hiding the other actions to \"make room\".\n *\n * Honoured by a STABLE sort in `mergeActionsIntoObjects()` (see stack.zod):\n * actions that leave `order` unset are treated as `0` and keep their original\n * registration order, so setting `order` on nobody is a no-op — fully\n * backward compatible. Renderers MAY additionally prefer a `variant:'primary'`\n * action when two actions tie on `order` (see objectui record-header renderer).\n */\n order: z.number().optional().describe('Sort order within a location group (lower = higher). Promotes/demotes an action toward the record_header primary button; stable, so actions without `order` keep their registration order.'),\n\n /** UX Behavior */\n confirmText: I18nLabelSchema.optional().describe('Confirmation message before execution'),\n successMessage: I18nLabelSchema.optional().describe('Success message to show after execution'),\n // Runtime (ActionRunner) already honours this — declared here so authors can\n // set a friendly failure toast instead of surfacing the raw error string.\n errorMessage: I18nLabelSchema.optional().describe('Error message to show when the action fails (overrides the raw error).'),\n refreshAfter: z.boolean().default(false).describe('Refresh view after execution'),\n // Single-record update actions only. When true, the runtime captures the\n // record's prior field values and offers an \"Undo\" affordance on the success\n // toast (backed by the client UndoManager) to restore them.\n undoable: z.boolean().optional().describe('Offer an Undo affordance after this single-record update action succeeds.'),\n\n /**\n * Result Dialog — describe how to render the API response on success.\n *\n * When set and the action returns successfully, the renderer SHOULD open a\n * dialog showing the selected fields from `result.data` instead of the\n * `successMessage` toast. The dialog has an acknowledge button only — the\n * user must explicitly close it. Used for **one-shot reveals** of values\n * the user must copy now because they cannot be retrieved later:\n *\n * - TOTP enrollment URI + secret (`enable_two_factor`)\n * - Backup recovery codes (`regenerate_backup_codes`)\n * - Freshly minted OAuth `client_secret` (`rotate_client_secret`,\n * `create_oauth_application`)\n *\n * `fields` selects what to render and how. Each entry's `path` is a dot\n * path into `result.data` (e.g. `'totpURI'`, `'backupCodes'`,\n * `'client.client_secret'`). When `fields` is omitted, the renderer falls\n * back to JSON-printing the whole response under a single block.\n *\n * `format` (dialog-level) is a default for fields that don't carry their\n * own `format`; the per-field `format` always wins.\n *\n * Renderer contract (objectui):\n * - `qrcode` — render the value as a QR code; also render the raw string\n * underneath with a copy button (so the user can paste into apps that\n * don't scan).\n * - `code-list` — value must be an array of strings; render each in a\n * monospace row with per-row copy and a \"Copy all\" affordance.\n * - `secret` — render a single string masked by default with a reveal\n * toggle and copy button.\n * - `text` — plain text with copy.\n * - `json` — pretty-printed JSON in a monospace block.\n *\n * The dialog SHOULD set `refreshAfter` to true on close (separate from\n * the existing `refreshAfter` flag, which fires immediately on success).\n */\n resultDialog: z.object({\n title: I18nLabelSchema.optional(),\n description: I18nLabelSchema.optional(),\n acknowledge: I18nLabelSchema.optional().describe('Acknowledge button label, e.g. \"I have saved this\"'),\n format: z.enum(['qrcode', 'code-list', 'secret', 'text', 'json']).optional().describe('Default format for fields without their own format. Defaults to json when omitted.'),\n fields: z.array(z.object({\n path: z.string().describe('Dot path into result.data (e.g. \"totpURI\", \"client.client_secret\").'),\n label: I18nLabelSchema.optional(),\n format: z.enum(['qrcode', 'code-list', 'secret', 'text', 'json']).optional().describe('Per-field format override.'),\n })).optional().describe('Which fields from result.data to render. Omit to dump full JSON.'),\n }).optional().describe('Render API response in a one-shot reveal dialog (suppresses successMessage when set).'),\n \n /** Access */\n visible: ExpressionInputSchema.optional().describe('Visibility predicate (CEL).'),\n /**\n * Declarative capability gate (#2874) — action-level twin of the param\n * `requiresFeature`. Lowered at parse time into `visible` (`== true` for\n * opt-in flags, `!= false` for default-on; AND-composed with an explicit\n * `visible`) and stripped from the output. See `PUBLIC_AUTH_FEATURES` in\n * `@objectstack/spec/kernel`.\n */\n requiresFeature: z.enum(PUBLIC_AUTH_FEATURE_NAMES).optional().describe('Public auth feature flag gating this action; lowered into `visible` at parse time.'),\n disabled: z.union([z.boolean(), ExpressionInputSchema]).optional().describe('Boolean or predicate (CEL) — action is disabled when TRUE.'),\n\n /**\n * [ADR-0066 D4] System capabilities required to INVOKE this action — a\n * dual-surface gate from ONE declaration: the server (action route) rejects\n * the call with 403 when the caller's systemPermissions don't cover these (the\n * source of truth), and the objectui ActionRunner hides/disables the button\n * using the same requirement. Independent of `visible` (CEL): this is the RBAC\n * capability contract, mirroring `App.requiredPermissions`.\n */\n requiredPermissions: z.array(z.string()).optional().describe('[ADR-0066 D4] Capabilities required to invoke this action (server-enforced 403 + UI hide/disable).'),\n\n /** Keyboard Shortcut */\n shortcut: z.string().optional().describe('Keyboard shortcut to trigger this action (e.g., \"Ctrl+S\")'),\n\n /** Bulk Operations */\n bulkEnabled: z.boolean().optional().describe('Whether this action can be applied to multiple selected records'),\n\n /**\n * AI exposure block (ADR-0011). Opt-in, default off: an action is exposed\n * to AI agents only when `ai.exposed === true`, in which case `ai.description`\n * is required. See {@link ActionAiSchema}.\n */\n ai: ActionAiSchema.optional().describe('AI exposure (opt-in). Set ai.exposed=true + ai.description to make this callable by agents.'),\n\n /**\n * Row-context: when the action runs from a list_item location, this body key\n * receives the row's id (or the field named by `recordIdField`). Defaults to\n * `id` when omitted but `recordIdField` is set; otherwise no injection.\n */\n recordIdParam: z.string().optional().describe('Body key to inject the row id into when running from a list_item context.'),\n /**\n * Row field whose value seeds `recordIdParam`. Defaults to `'id'` when\n * `recordIdParam` is set. Use this when the body key expects a non-id value\n * (e.g. `token` for `revoke-session`).\n */\n recordIdField: z.string().optional().describe('Row field whose value seeds recordIdParam. Defaults to \"id\".'),\n /**\n * Request-body shape. `'flat'` (default) sends collected params at the top\n * level. `{ wrap: 'data' }` nests the user-collected params under that key\n * (used by better-auth `organization/update`), while `recordIdParam` and\n * other top-level keys stay flat.\n */\n bodyShape: z.union([\n z.literal('flat'),\n z.object({ wrap: z.string() }),\n ]).optional().describe('Body wrapping: flat (default) or { wrap: key } to nest user-collected params under a key.'),\n /**\n * HTTP method to use when `type: 'api'`. Defaults to `POST`. Use `PATCH` to\n * call data-API update endpoints (e.g. `/api/v1/sys_api_key/{id}` with\n * `bodyExtra: { revoked: true }`).\n */\n method: z.enum(['POST', 'PATCH', 'PUT', 'DELETE']).optional().describe('HTTP method for type:\"api\" actions. Defaults to POST.'),\n /**\n * Static body fragment merged into the outgoing request body for `type:'api'`\n * actions. Useful for constants the user shouldn't (or can't) edit, e.g.\n * `bodyExtra: { resend: true }` on a resend-invitation action that reuses\n * better-auth's `invite-member` endpoint. Applied after user-collected\n * params and `recordIdParam` so constants always win.\n */\n bodyExtra: z.record(z.string(), z.unknown()).optional().describe('Constant body fields merged into the API request (applied last; overrides user params).'),\n /**\n * Semantic mode hint — UI / runtime can use this to pick confirm copy,\n * default variants, success messaging. Pure metadata; no runtime branching.\n */\n mode: z.enum(['create', 'edit', 'delete', 'custom']).optional().describe('Semantic mode of the action.'),\n\n /**\n * Open the action's result in a NEW TAB. The renderer pre-opens the tab\n * synchronously on click (preserving the user gesture so popup blockers\n * don't fire), paints a progress page, then drives the tab to the\n * handler's returned `redirectUrl` — or, when `newTabUrl` is set, straight\n * to that URL with no server round trip.\n */\n opensInNewTab: z.boolean().optional().describe('Open the action result in a new tab. The renderer pre-opens the tab synchronously on click (popup-blocker-safe) and navigates it to the handler\\'s redirectUrl.'),\n\n /**\n * Zero-roundtrip new-tab target. A path template the renderer navigates\n * the pre-opened tab to IMMEDIATELY on click, skipping the action POST\n * entirely. Only valid together with `opensInNewTab`. The target endpoint\n * MUST perform all auth/authz itself (e.g. the cloud `/sso-open` endpoint,\n * which re-runs every check the POST half would have done). Supports the\n * `{recordId}` placeholder, URL-encoded on substitution.\n */\n newTabUrl: z.string().optional().describe('Direct new-tab URL template ({recordId} placeholder). When set with opensInNewTab, the renderer navigates the pre-opened tab here immediately — no action POST. The endpoint must enforce auth itself.'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}).transform((data) => {\n // Auto-migrate deprecated `execute` → `target` for backward compatibility\n if (data.execute && !data.target) {\n return { ...data, target: data.execute };\n }\n return data;\n}).refine((data) => {\n // Require `target` for types that reference an external resource\n if (TARGET_REQUIRED_TYPES.has(data.type) && !data.target) {\n return false;\n }\n return true;\n}, {\n message: \"Action 'target' is required when type is 'url', 'flow', 'modal', 'api', or 'form'.\",\n path: ['target'],\n}).refine((data) => {\n // A `script` action must be *executable*: it needs either an inline `body`\n // (the runtime invokes it in the sandbox) or a `target` naming a registered\n // bundle function. With neither, AppPlugin registers no engine handler and\n // the action fails at runtime with `Action '<name>' on object '*' not found`\n // (the #2169 Mark Done bug) — a soft failure invisible to build & shape\n // tests. Reject it at author/compile time instead.\n if (data.type === 'script' && !data.body && !data.target) {\n return false;\n }\n return true;\n}, {\n message:\n \"A 'script' action requires either an inline `body` (sandboxed L1/L2 handler) or a `target` (a registered bundle function name).\",\n path: ['body'],\n}).refine((data) => {\n // ADR-0011: an exposed action must carry an LLM-facing description.\n if (data.ai?.exposed === true && !data.ai.description) {\n return false;\n }\n return true;\n}, {\n message: 'ai.description is required (≥40 chars) when ai.exposed is true.',\n path: ['ai', 'description'],\n}).refine((data) => {\n // ADR-0011: paramHints keys must reference a declared param (or the\n // auto-injected `recordId`), so a typo can't silently no-op.\n const hints = data.ai?.paramHints;\n if (!hints) return true;\n const known = new Set<string>(['recordId']);\n for (const p of data.params ?? []) {\n const key = p.name ?? p.field;\n if (key) known.add(key);\n }\n return Object.keys(hints).every((k) => known.has(k));\n}, {\n message: 'ai.paramHints keys must match a declared param name (or \"recordId\").',\n path: ['ai', 'paramHints'],\n}).transform((data, ctx) => lowerRequiresFeature(data, ctx)));\n\nexport type Action = z.infer<typeof ActionSchema>;\nexport type ActionParam = z.infer<typeof ActionParamSchema>;\nexport type ActionInput = z.input<typeof ActionSchema>;\n\n/**\n * Action Factory Helper\n */\nexport const Action = {\n create: (config: z.input<typeof ActionSchema>): Action => ActionSchema.parse(config),\n} as const;\n\n/**\n * Type-safe factory for a global or object action. Validates at authoring time via\n * `.parse()` and accepts input-shape config (optional defaults, CEL\n * shorthand) — preferred over a bare `: Action` literal.\n */\nexport function defineAction(config: z.input<typeof ActionSchema>): Action {\n return ActionSchema.parse(config);\n}\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n// ============================================================================\n// Shared Enumerations\n// ============================================================================\n\n/** Aggregation functions used across query, data-engine, analytics, field */\nimport { lazySchema } from './lazy-schema';\nexport const AggregationFunctionEnum = z.enum([\n 'count', 'sum', 'avg', 'min', 'max',\n 'count_distinct', 'percentile', 'median', 'stddev', 'variance',\n]).describe('Standard aggregation functions');\nexport type AggregationFunction = z.infer<typeof AggregationFunctionEnum>;\n\n/** Sort direction used across query, data-engine, analytics */\nexport const SortDirectionEnum = z.enum(['asc', 'desc'])\n .describe('Sort order direction');\nexport type SortDirection = z.infer<typeof SortDirectionEnum>;\n\n/** Reusable sort item — field + direction pair used across views, data sources, filters */\nexport const SortItemSchema = lazySchema(() => z.object({\n field: z.string().describe('Field name to sort by'),\n order: SortDirectionEnum.describe('Sort direction'),\n}).describe('Sort field and direction pair'));\nexport type SortItem = z.infer<typeof SortItemSchema>;\n\n/** CRUD mutation events used across hook, validation, object CDC */\nexport const MutationEventEnum = z.enum([\n 'insert', 'update', 'delete', 'upsert',\n]).describe('Data mutation event types');\nexport type MutationEvent = z.infer<typeof MutationEventEnum>;\n\n/** Database isolation levels — unified format */\nexport const IsolationLevelEnum = z.enum([\n 'read_uncommitted', 'read_committed', 'repeatable_read', 'serializable', 'snapshot',\n]).describe('Transaction isolation levels (snake_case standard)');\nexport type IsolationLevel = z.infer<typeof IsolationLevelEnum>;\n\n/** Cache eviction strategies */\nexport const CacheStrategyEnum = z.enum(['lru', 'lfu', 'ttl', 'fifo'])\n .describe('Cache eviction strategy');\nexport type CacheStrategy = z.infer<typeof CacheStrategyEnum>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { ExpressionInputSchema } from '../shared/expression.zod';\nimport { normalizeVisibleWhen, strictVisibilityError } from '../shared/visibility';\nimport { SortItemSchema } from '../shared/enums.zod';\nimport { FilterConditionSchema } from '../data/filter.zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\nimport { ResponsiveConfigSchema, ResponsiveStylesSchema } from './responsive.zod';\nimport {\n UserActionsConfigSchema,\n AppearanceConfigSchema,\n UserFiltersSchema,\n ViewFilterRuleSchema,\n AddRecordConfigSchema,\n ListColumnSchema,\n} from './view.zod';\n\n/**\n * Page Region Schema\n * A named region in the template where components are dropped.\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const PageRegionSchema = lazySchema(() => z.object({\n name: z.string().describe('Region name (e.g. \"sidebar\", \"main\", \"header\")'),\n width: z.enum(['small', 'medium', 'large', 'full']).optional(),\n components: z.array(z.lazy(() => PageComponentSchema)).describe('Components in this region')\n}));\n\n/**\n * Standard Page Component Types\n */\nexport const PageComponentType = z.enum([\n // Structure\n 'page:header', 'page:footer', 'page:sidebar', 'page:tabs', 'page:accordion', 'page:card', 'page:section',\n // Record Context\n 'record:details', 'record:highlights', 'record:related_list', 'record:activity', 'record:chatter', 'record:path', 'record:alert', 'record:quick_actions', 'record:reference_rail', 'record:history',\n // Navigation\n 'app:launcher', 'nav:menu', 'nav:breadcrumb',\n // Utility\n 'global:search', 'global:notifications', 'user:profile',\n // AI\n 'ai:chat_window', 'ai:suggestion',\n // Content Elements (Airtable Interface parity)\n 'element:text', 'element:number', 'element:image', 'element:divider',\n // Interactive Elements (Phase B — Element Library)\n 'element:button', 'element:filter', 'element:form', 'element:record_picker', 'element:text_input'\n]);\n\n/**\n * Element Data Source Schema\n * Per-element data binding for multi-object pages.\n * Overrides page-level object context so each element can query a different object.\n */\nexport const ElementDataSourceSchema = lazySchema(() => z.object({\n object: z.string().describe('Object to query'),\n view: z.string().optional().describe('Named view to apply'),\n filter: FilterConditionSchema.optional().describe('Additional filter criteria'),\n sort: z.array(SortItemSchema).optional().describe('Sort order'),\n limit: z.number().int().positive().optional().describe('Max records to display'),\n}));\n\n/**\n * Page Component Schema\n * A configured instance of a UI component.\n */\nexport const PageComponentSchema = lazySchema(() => z.object({\n /** Definition */\n type: z.union([\n PageComponentType,\n z.string()\n ]).describe('Component Type (Standard enum or custom string)'),\n id: z.string().optional().describe('Unique instance ID'),\n \n /** Configuration */\n label: I18nLabelSchema.optional(),\n // Optional with an empty-object default. Many components carry no props\n // (record:activity, element:divider, …), and the platform's own default-page\n // synthesizer (buildDefaultPageSchema) emits nodes with props at the top\n // level rather than under `properties`. Requiring `properties` forced\n // `properties: {}` boilerplate and — worse — made every Studio attempt to\n // seed a record page from its object's synthesized default layout fail\n // validation (\"regions.N.components.M.properties: expected record\"), which\n // was the real reason record/home/app pages couldn't be created in Studio.\n properties: z.record(z.string(), z.unknown()).optional().default({}).describe('Component props passed to the widget. See component.zod.ts for schemas.'),\n \n /** \n * Event Handlers \n * Map event names to Action expressions.\n * \"onClick\": \"set_variable('userId', $event.id)\"\n * \"onRowSelect\": \"navigate_to('page_detail', { id: $event.id })\"\n */\n events: z.record(z.string(), z.string()).optional().describe('Event handlers map'),\n\n /** Appearance */\n style: z.record(z.string(), z.string()).optional().describe('Inline styles or utility classes'),\n className: z.string().optional().describe('CSS class names'),\n\n /**\n * SDUI scoped responsive styles (ADR-0065). Per-breakpoint CSS-property maps\n * compiled to id-scoped CSS at render. The preferred styling channel for\n * metadata-authored pages — build-independent and collision-free, unlike raw\n * `className`. Prefer design-token values (`var(--space-6)`, `var(--surface)`).\n */\n responsiveStyles: ResponsiveStylesSchema.optional()\n .describe('Per-breakpoint scoped style maps (ADR-0065)'),\n\n /**\n * Conditional-visibility predicate (CEL) — the component is rendered only when\n * TRUE (ADR-0089, canonical `*When` name). Page predicates bind the live page\n * surface: `record` + `current_user` plus page state as `page.<var>`.\n */\n visibleWhen: ExpressionInputSchema.optional().describe(\"Visibility predicate (CEL) — component rendered only when TRUE. Binds `record`, `current_user`, `page.<var>`. e.g. \\\"page.selectedProjectId != ''\\\"\"),\n /** @deprecated ADR-0089 — use `visibleWhen`. Accepted and normalized to `visibleWhen` at parse. */\n visibility: ExpressionInputSchema.optional().describe('[DEPRECATED → `visibleWhen`] Visibility predicate (CEL). Normalized to `visibleWhen` at parse.'),\n\n /** Per-element data binding, overrides page-level object context */\n dataSource: ElementDataSourceSchema.optional().describe('Per-element data binding for multi-object pages'),\n\n /** Responsive layout overrides per breakpoint */\n responsive: ResponsiveConfigSchema.optional().describe('Responsive layout configuration'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}, { error: strictVisibilityError }).strict().transform(normalizeVisibleWhen));\n\n/**\n * Page Variable Schema\n * Local, in-memory page state. Runtime-live (ADR-0049): the renderer mounts the\n * declared variables, exposes them to expressions as `page.<name>`, and lets an\n * interactive element write one via `source`. A write re-evaluates dependent\n * `visibility` / binding predicates immediately — the master/detail and\n * filtered-dashboard pattern with no custom code.\n *\n * Binding direction: a variable names the **writer** component, not the other\n * way round. `{ name: 'selectedProjectId', source: 'project_picker' }` means the\n * component whose `id` is `project_picker` (e.g. an `element:record_picker`)\n * writes the user's selection into `selectedProjectId`; predicates then read it\n * as `page.selectedProjectId`.\n */\nexport const PageVariableSchema = lazySchema(() => z.object({\n name: z.string().describe('Variable name. Exposed to expressions as `page.<name>`.'),\n type: z.enum(['string', 'number', 'boolean', 'object', 'array', 'record_id']).default('string'),\n defaultValue: z.unknown().optional()\n .describe('Initial value. Defaults to a type-appropriate empty value when omitted.'),\n /** Source element binding — the component id that writes this variable. */\n source: z.string().optional()\n .describe('Component id that writes this variable (e.g. an element:record_picker whose `id` matches).'),\n}));\n\n// BlankPageLayoutItemSchema / BlankPageLayoutSchema removed — the `blank` page\n// type has no renderer and was dropped from PageTypeSchema (framework#2265,\n// enforce-or-remove); objectui dropped all references in objectui#1949.\n\n/**\n * Page Type Schema\n * Unified page type enum covering both platform pages (Salesforce FlexiPage style)\n * and Airtable-inspired interface page types.\n *\n * **Page type is the page KIND, NOT a visualization.** How an interface (`list`)\n * page displays its records — grid / kanban / calendar / gallery / timeline — is a\n * *visualization*, configured via `interfaceConfig.appearance.allowedVisualizations`\n * and switched at runtime. Those are deliberately NOT page types: a kanban is a `list`\n * page shown as a board, not a distinct page kind. (Historically grid/kanban/calendar/\n * gallery/timeline appeared here; the runtime never branched on them — it always read\n * the visualization from `interfaceConfig` — so they were removed to stop misleading authors.)\n *\n * **Disambiguation of similar types:**\n * - `record` vs `record_detail`: `record` is a component-based layout page (FlexiPage style with regions),\n * `record_detail` is a field-display page showing all fields of a single record (Airtable style).\n * Use `record` for custom record pages with regions/components, `record_detail` for auto-generated detail views.\n * - `home` vs `overview`: `home` is the platform-level landing page (tab landing),\n * `overview` is an interface-level navigation hub with links/instructions.\n * Use `home` for app-level landing, `overview` for in-interface navigation hubs.\n * - `app` vs `utility` vs `blank`: `app` is an app-level page with navigation context,\n * `utility` is a floating utility panel (e.g. notes, phone), `blank` is a free-form canvas\n * for custom composition. They serve distinct layout purposes.\n *\n * **Liveness (ADR-0049 enforce-or-remove):** only types with a dedicated\n * renderer are authorizable. `record`, `home`, `app`, `utility`, and `list` are\n * live. Types once declared for \"roadmap parity\" but never given a renderer\n * (`dashboard`, `form`, `record_detail`, `record_review`, `overview`, `blank`)\n * have been REMOVED from this enum — a schema-valid-but-unrendered page type is\n * a false affordance: it passes validation, then breaks at runtime (\"Unknown\n * component type\"), which is especially dangerous when templates are AI-authored.\n * They are tracked in {@link PAGE_TYPE_ROADMAP} and re-enter the enum only when a\n * renderer ships. The `page-type-liveness` gate test asserts the enum never\n * re-grows a roadmap type.\n */\nexport const PageTypeSchema = lazySchema(() => z.enum([\n // Platform page types (Salesforce FlexiPage style) — region/component composition\n 'record', // Component-based record layout page with regions\n 'home', // Platform-level home/landing page\n 'app', // App-level page with navigation context\n 'utility', // Floating utility panel (e.g. notes, phone dialer)\n // Interface page type (Airtable parity). NOTE: grid/kanban/calendar/gallery/\n // timeline are NOT page types — they are visualizations of a `list` page\n // (interfaceConfig.appearance.allowedVisualizations).\n 'list', // Record list/grid surface with switchable visualizations + quick actions\n]).describe('Page type — the page KIND. Only types with a dedicated renderer are authorizable; visualizations of a list page live in interfaceConfig, not here.'));\n\n/**\n * Page types declared in the past for \"roadmap parity\" but removed from\n * {@link PageTypeSchema} because they never shipped a renderer (authoring one\n * produced a broken page at runtime). Kept here so the intent isn't lost: when a\n * renderer lands, move the type back into the enum (and, for high-risk surfaces,\n * add a liveness proof). ADR-0049 enforce-or-remove / spec liveness gate.\n */\nexport const PAGE_TYPE_ROADMAP = [\n 'dashboard', // KPI summary with charts/metrics\n 'form', // Data entry form\n 'record_detail', // Auto-generated single record field display\n 'record_review', // Sequential record review/approval (config: RecordReviewConfigSchema)\n 'overview', // Interface-level navigation/landing hub\n 'blank', // Free-form canvas (config: BlankPageLayoutSchema)\n] as const;\n\n// RecordReviewConfigSchema removed — the `record_review` page type has no\n// renderer and was dropped from PageTypeSchema (framework#2265, enforce-or-remove);\n// objectui dropped all references in objectui#1949.\n\n/**\n * Interface Page Configuration Schema (Airtable Interface parity)\n * Page-level declarative configuration for Airtable-style interface pages.\n * Covers title/data binding, levels, filter by, appearance, user actions,\n * tabs, record count, add record, and advanced options (printing).\n *\n * @see Airtable Interface → right panel (Page / Data / Appearance / User filters / User actions / Advanced)\n */\nexport const InterfacePageConfigSchema = lazySchema(() => z.object({\n /** Data binding (ADR-0047: pages REFERENCE views, never restate them) */\n source: z.string().optional().describe('Source object name for the page'),\n\n // ADR-0047 (revised): the page carries its OWN view metadata — columns, sort\n // and base filter are defined directly here (Airtable parity: there is no\n // \"inherit from a named view\" concept). The page IS the view definition.\n columns: z.union([z.array(z.string()), z.array(ListColumnSchema)]).optional()\n .describe('Columns shown by the page. Blank = all object fields. Defined directly on the page (no view inheritance).'),\n sort: z.array(SortItemSchema).optional()\n .describe('Default sort order for the page, defined directly on the page.'),\n filterBy: z.array(ViewFilterRuleSchema).optional().describe('Always-on page filter (base filter).'),\n levels: z.number().int().min(1).optional().describe('Number of hierarchy levels to display'),\n\n /** @deprecated Back-compat only. Pre-revision pages inherited columns/filter/sort\n * from a named object view; new pages define `columns`/`sort`/`filterBy` directly.\n * Still honored at runtime as a fallback when the page has no own `columns`. */\n sourceView: z.string().optional()\n .describe('@deprecated Legacy named-view inheritance. Define columns/sort/filterBy on the page instead.'),\n\n /** Appearance — `appearance.allowedVisualizations` is the runtime visualization whitelist */\n appearance: AppearanceConfigSchema.optional().describe('Appearance and visualization configuration'),\n\n /** User filters (ADR-0047) */\n userFilters: UserFiltersSchema.optional()\n .describe('End-user quick-filter bar for this page (overrides the source view\\'s userFilters)'),\n\n /** User actions */\n userActions: UserActionsConfigSchema.optional().describe('User action toggles'),\n\n /** Add record */\n addRecord: AddRecordConfigSchema.optional().describe('Add record entry point configuration'),\n\n /** Toolbar buttons — references to the source object's actions (ActionSchema).\n * Buttons ARE object actions (not free text): correct-by-construction. */\n buttons: z.array(z.string()).optional().describe(\"Toolbar buttons — names of the source object's actions to surface in the page toolbar\"),\n\n /** How clicking a record opens its detail: 'drawer' (right-side peek panel,\n * default), 'page' (full-page navigate to the record route), 'modal', or\n * 'none' (rows not clickable). */\n recordAction: z.enum(['drawer', 'page', 'modal', 'none']).optional()\n .describe(\"How clicking a record opens its detail (drawer | page | modal | none). Default: drawer\"),\n\n /** Record count */\n showRecordCount: z.boolean().optional().describe('Show record count at page bottom'),\n\n /** Advanced */\n allowPrinting: z.boolean().optional().describe('Allow users to print the page'),\n}).describe('Interface-level page configuration (Airtable parity)'));\n\n/**\n * Page Schema\n * Defines a composition of components for a specific context.\n * Supports both platform pages (Salesforce FlexiPage style: record, home, app, utility)\n * and interface pages (Airtable Interface style: dashboard, grid, kanban, record_review, etc.).\n * \n * **NAMING CONVENTION:**\n * Page names are used in routing and must be lowercase snake_case.\n * Prefix with 'page_' is recommended for clarity.\n * \n * @example Good page names\n * - 'page_dashboard'\n * - 'page_settings'\n * - 'home_page'\n * - 'record_detail'\n * \n * @example Bad page names (will be rejected)\n * - 'PageDashboard' (PascalCase)\n * - 'Settings Page' (spaces)\n */\nexport const PageSchema = lazySchema(() => z.object({\n name: SnakeCaseIdentifierSchema.describe('Page unique name (lowercase snake_case)'),\n label: I18nLabelSchema,\n description: I18nLabelSchema.optional(),\n\n /** Icon (used in interface navigation) */\n icon: z.string().optional().describe('Page icon name'),\n \n /** Page Type */\n type: PageTypeSchema.default('record').describe('Page type'),\n \n /**\n * Page-local state variables (ADR-0049). Runtime-live: the renderer mounts the\n * declared variables, exposes each to expressions as `page.<name>`, and lets an\n * interactive element write one via its `source` binding (e.g.\n * `element:record_picker` → `source`). A write re-evaluates dependent\n * `visibility` / binding predicates immediately — the master/detail and\n * filtered-dashboard pattern, with no custom code. See {@link PageVariableSchema}.\n */\n variables: z.array(PageVariableSchema).optional()\n .describe('Local page state, exposed to expressions as `page.<name>` and writable by interactive elements via `source` (master/detail, filtered dashboards).'),\n\n /** Context */\n object: z.string().optional().describe('Bound object (for Record pages)'),\n\n // recordReview / blankLayout fields removed — the record_review/blank page\n // types have no renderer and were dropped from PageTypeSchema (framework#2265);\n // objectui dropped all references in objectui#1949.\n\n /** Layout Template */\n template: z.string().default('default').describe('Layout template name (e.g. \"header-sidebar-main\")'),\n \n /** Regions & Content */\n // Optional with an empty-array default. Not every page authors regions:\n // • list/interface pages render via `interfaceConfig` (regions unused);\n // • `kind: 'slotted'` record pages render via `slots`;\n // • a `kind: 'full'` record/home/app page with no regions falls back to\n // the synthesized default layout (same surface a slotted page starts from).\n // Requiring it forced `regions: []` boilerplate on every list page and made\n // the Studio \"New Page\" form a dead-end for record/home/app pages (the form\n // has no region editor, so the required field could never be satisfied).\n regions: z.array(PageRegionSchema).optional().default([])\n .describe('Layout regions (header, main, sidebar, footer) with their components. Optional — list pages use interfaceConfig, slotted pages use slots, and an empty full page falls back to the synthesized default layout.'),\n \n /** Activation */\n isDefault: z.boolean().default(false),\n assignedProfiles: z.array(z.string()).optional(),\n\n /** Interface Page Configuration (Airtable Interface parity) */\n interfaceConfig: InterfacePageConfigSchema.optional()\n .describe('Interface-level page configuration (for Airtable-style interface pages)'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n\n /**\n * Override semantics for record pages.\n *\n * - `\"full\"` (default): the schema fully describes the page.\n * - `\"slotted\"`: the schema only provides overrides for one or more\n * named slots (see `slots`). The default-page synthesizer fills\n * in every slot the author did NOT override. Useful when you want\n * to customize just the header / actions / one tab without\n * re-authoring the rest of the page.\n *\n * Only meaningful when `type === 'record'`. Ignored otherwise.\n */\n kind: z.enum(['full', 'slotted', 'html', 'react', 'jsx']).default('full')\n .describe(\n \"Page override mode. full | slotted = structured authoring; \" +\n \"html = author-written constrained JSX/HTML+Tailwind compiled (parsed, never \" +\n \"executed) to the tree (ADR-0080; the legacy value 'jsx' is a deprecated alias); \" +\n \"react = real-React source executed at render by the runtime (ADR-0081); it \" +\n \"runs author JS, so it is gated by a host capability that defaults ON and is \" +\n \"disabled server-side via the OS_PAGE_REACT=off env toggle.\",\n ),\n\n /**\n * Slot override map for slotted record pages.\n *\n * Each slot accepts a single PageComponent or an array. Slots not\n * provided fall through to the synthesized default.\n *\n * Slot menu (v1): header | actions | alerts | highlights | details |\n * tabs | discussion. Each slot is a full replacement at the slot\n * boundary — no deep merge, no patch operations. To compose default +\n * custom, call the corresponding `buildDefault*` sub-builder from the\n * renderer runtime (e.g. @object-ui/plugin-detail).\n *\n * Only honored when `kind === 'slotted'`.\n */\n slots: z.object({\n header: z.union([PageComponentSchema, z.array(PageComponentSchema)]).optional(),\n actions: z.union([PageComponentSchema, z.array(PageComponentSchema)]).optional(),\n alerts: z.union([PageComponentSchema, z.array(PageComponentSchema)]).optional(),\n highlights: z.union([PageComponentSchema, z.array(PageComponentSchema)]).optional(),\n details: z.union([PageComponentSchema, z.array(PageComponentSchema)]).optional(),\n tabs: z.union([PageComponentSchema, z.array(PageComponentSchema)]).optional(),\n discussion: z.union([PageComponentSchema, z.array(PageComponentSchema)]).optional(),\n }).optional().describe('Slot override map for slotted pages'),\n\n /**\n * JSX-source authoring (ADR-0080). When `kind === 'jsx'`, `source` is the\n * source-of-truth: a constrained JSX/HTML+Tailwind text compiled by\n * `@objectstack/sdui-parser` into the SchemaNode tree at SAVE time — parse,\n * never execute. `regions` then hold the DERIVED tree (a cache; the source\n * wins on any mismatch). For `full`/`slotted` pages `source` is unused.\n */\n source: z.string().optional()\n .describe(\"Page source text. For kind==='html' (alias 'jsx') it is constrained JSX/HTML+Tailwind compiled to the tree by @objectstack/sdui-parser at save time (parse, never execute). For kind==='react' it is real React/JSX executed at render by @object-ui/react-runtime (trusted tier). Authoritative over `regions` in both.\"),\n /** Plugin namespaces the JSX source references — inferred at compile, checked at save AND load (ADR-0048 provenance). */\n requires: z.array(z.string()).optional()\n .describe('Plugin namespaces the JSX source references (validated at save and load)'),\n}).superRefine((page, ctx) => {\n // ADR-0080/0081 + ADR-0078 (completeness): an html/react/jsx page with no\n // `source` is silently inert — fail loudly at author time, never render empty.\n const sourceKinds = ['html', 'react', 'jsx'];\n if (sourceKinds.includes(page.kind) && !(typeof page.source === 'string' && page.source.trim().length > 0)) {\n ctx.addIssue({\n code: 'custom',\n path: ['source'],\n message: `A ${page.kind} page requires a non-empty \\`source\\` (the source is the source-of-truth).`,\n });\n }\n}));\n// PageSchema's only cross-field rule is the ADR-0080 jsx-source completeness\n// check above. It once also required `recordReview`/`blankLayout` and `slots`\n// (all removed — unrendered roadmap / \"required-but-unauthorable\" Studio traps).\n\nexport type Page = z.infer<typeof PageSchema>;\n/** Authoring input for {@link Page} — defaulted fields are optional. */\nexport type PageInput = z.input<typeof PageSchema>;\n\n/**\n * Type-safe factory for a custom page. Validates at authoring time via\n * `.parse()` and accepts input-shape config (optional defaults, CEL\n * shorthand) — preferred over a bare `: Page` literal.\n */\nexport function definePage(config: z.input<typeof PageSchema>): Page {\n return PageSchema.parse(config);\n}\nexport type PageType = z.infer<typeof PageTypeSchema>;\nexport type PageComponent = z.infer<typeof PageComponentSchema>;\nexport type PageRegion = z.infer<typeof PageRegionSchema>;\nexport type PageVariable = z.infer<typeof PageVariableSchema>;\nexport type ElementDataSource = z.infer<typeof ElementDataSourceSchema>;\nexport type InterfacePageConfig = z.infer<typeof InterfacePageConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { FieldSchema } from '../data/field.zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\nimport { PerformanceConfigSchema } from './responsive.zod';\n\n/**\n * Widget Lifecycle Hooks Schema\n * \n * Defines lifecycle callbacks for custom widgets inspired by Web Components and React.\n * These hooks allow widgets to perform initialization, cleanup, and respond to changes.\n * \n * @see https://developer.mozilla.org/en-US/docs/Web/API/Web_components\n * @see https://react.dev/reference/react/Component#component-lifecycle\n * \n * @example\n * ```typescript\n * const widget = {\n * lifecycle: {\n * onMount: \"console.log('Widget mounted')\",\n * onUpdate: \"if (prevProps.value !== props.value) { updateUI() }\",\n * onUnmount: \"cleanup()\",\n * onValidate: \"return value.length > 0 ? null : 'Required field'\"\n * }\n * }\n * ```\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const WidgetLifecycleSchema = lazySchema(() => z.object({\n /**\n * Called when widget is mounted/rendered for the first time\n * Use for initialization, setting up event listeners, loading data, etc.\n * \n * @example \"initializeDatePicker(); loadOptions();\"\n */\n onMount: z.string().optional().describe('Initialization code when widget mounts'),\n\n /**\n * Called when widget props change\n * Receives previous props for comparison\n * \n * @example \"if (prevProps.value !== props.value) { updateDisplay() }\"\n */\n onUpdate: z.string().optional().describe('Code to run when props change'),\n\n /**\n * Called when widget is about to be removed from DOM\n * Use for cleanup, removing event listeners, canceling timers, etc.\n * \n * @example \"destroyDatePicker(); cancelPendingRequests();\"\n */\n onUnmount: z.string().optional().describe('Cleanup code when widget unmounts'),\n\n /**\n * Custom validation logic for this widget\n * Should return error message string if invalid, null/undefined if valid\n * \n * @example \"return value && value.length >= 10 ? null : 'Minimum 10 characters'\"\n */\n onValidate: z.string().optional().describe('Custom validation logic'),\n\n /**\n * Called when widget receives focus\n * \n * @example \"highlightField(); logFocusEvent();\"\n */\n onFocus: z.string().optional().describe('Code to run on focus'),\n\n /**\n * Called when widget loses focus\n * \n * @example \"validateField(); saveFieldState();\"\n */\n onBlur: z.string().optional().describe('Code to run on blur'),\n\n /**\n * Called on any error in the widget\n * \n * @example \"logError(error); showErrorNotification();\"\n */\n onError: z.string().optional().describe('Error handling code'),\n}));\n\nexport type WidgetLifecycle = z.infer<typeof WidgetLifecycleSchema>;\n\n/**\n * Widget Event Schema\n * \n * Defines custom events that widgets can emit, inspired by DOM Events and Lightning Web Components.\n * \n * @see https://developer.mozilla.org/en-US/docs/Web/Events/Creating_and_triggering_events\n * @see https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.events\n * \n * @example\n * ```typescript\n * const searchEvent = {\n * name: 'search',\n * bubbles: true,\n * cancelable: false,\n * payload: {\n * query: 'string',\n * filters: 'object'\n * }\n * }\n * ```\n */\nexport const WidgetEventSchema = lazySchema(() => z.object({\n /**\n * Event name\n * Should be lowercase, dash-separated for consistency\n * \n * @example \"value-change\", \"item-selected\", \"search-complete\"\n */\n name: z.string().describe('Event name'),\n\n /**\n * Event label for documentation\n */\n label: I18nLabelSchema.optional().describe('Human-readable event label'),\n\n /**\n * Event description\n */\n description: I18nLabelSchema.optional().describe('Event description and usage'),\n\n /**\n * Whether event bubbles up through the DOM hierarchy\n * \n * @default false\n */\n bubbles: z.boolean().default(false).describe('Whether event bubbles'),\n\n /**\n * Whether event can be cancelled\n * \n * @default false\n */\n cancelable: z.boolean().default(false).describe('Whether event is cancelable'),\n\n /**\n * Event payload schema\n * Defines the data structure sent with the event\n * \n * @example { userId: 'string', timestamp: 'number' }\n */\n payload: z.record(z.string(), z.unknown()).optional().describe('Event payload schema'),\n}));\n\nexport type WidgetEvent = z.infer<typeof WidgetEventSchema>;\n\n/**\n * Widget Property Definition Schema\n * \n * Defines the contract for widget configuration properties.\n * Inspired by React PropTypes and Web Component attributes.\n * \n * @see https://react.dev/reference/react/Component#static-proptypes\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements\n * \n * @example\n * ```typescript\n * const widgetProps = {\n * maxLength: {\n * type: 'number',\n * required: false,\n * default: 100,\n * description: 'Maximum input length'\n * }\n * }\n * ```\n */\nexport const WidgetPropertySchema = lazySchema(() => z.object({\n /**\n * Property name\n * Should be camelCase following ObjectStack conventions\n */\n name: z.string().describe('Property name (camelCase)'),\n\n /**\n * Property label for UI\n */\n label: I18nLabelSchema.optional().describe('Human-readable label'),\n\n /**\n * Property data type\n * \n * @example \"string\", \"number\", \"boolean\", \"array\", \"object\", \"function\"\n */\n type: z.enum(['string', 'number', 'boolean', 'array', 'object', 'function', 'any'])\n .describe('TypeScript type'),\n\n /**\n * Whether property is required\n * \n * @default false\n */\n required: z.boolean().default(false).describe('Whether property is required'),\n\n /**\n * Default value for the property\n */\n default: z.unknown().optional().describe('Default value'),\n\n /**\n * Property description\n */\n description: I18nLabelSchema.optional().describe('Property description'),\n\n /**\n * Property validation schema\n * Can include min/max, regex, enum values, etc.\n */\n validation: z.record(z.string(), z.unknown()).optional().describe('Validation rules'),\n\n /**\n * Property category for grouping in UI\n */\n category: z.string().optional().describe('Property category'),\n}));\n\nexport type WidgetProperty = z.infer<typeof WidgetPropertySchema>;\n\n/**\n * Widget Manifest Schema\n * \n * Complete definition for a custom widget including metadata, lifecycle, events, and props.\n * This is used for widget registration and discovery.\n * \n * @example\n * ```typescript\n * const customWidget = {\n * name: 'custom_date_picker',\n * label: 'Custom Date Picker',\n * version: '1.0.0',\n * author: 'Company Name',\n * fieldTypes: ['date', 'datetime'],\n * lifecycle: { ... },\n * events: [ ... ],\n * properties: [ ... ]\n * }\n * ```\n */\n/**\n * Widget Source Schema\n * Defines how the widget code is loaded.\n */\nexport const WidgetSourceSchema = lazySchema(() => z.discriminatedUnion('type', [\n // NPM Registry (standard)\n z.object({\n type: z.literal('npm'),\n packageName: z.string().describe('NPM package name'),\n version: z.string().default('latest'),\n exportName: z.string().optional().describe('Named export (default: default)'),\n }),\n // Module Federation (Remote)\n z.object({\n type: z.literal('remote'),\n url: z.string().url().describe('Remote entry URL (.js)'),\n moduleName: z.string().describe('Exposed module name'),\n scope: z.string().describe('Remote scope name'),\n }),\n // Inline Code (Simple scripts)\n z.object({\n type: z.literal('inline'),\n code: z.string().describe('JavaScript code body'),\n }),\n]));\n\nexport type WidgetSource = z.infer<typeof WidgetSourceSchema>;\n\nexport const WidgetManifestSchema = lazySchema(() => z.object({\n /**\n * Widget identifier (snake_case)\n */\n name: SnakeCaseIdentifierSchema\n .describe('Widget identifier (snake_case)'),\n\n /**\n * Human-readable widget name\n */\n label: I18nLabelSchema.describe('Widget display name'),\n\n /**\n * Widget description\n */\n description: I18nLabelSchema.optional().describe('Widget description'),\n\n /**\n * Widget version (semver)\n */\n version: z.string().optional().describe('Widget version (semver)'),\n\n /**\n * Widget author/organization\n */\n author: z.string().optional().describe('Widget author'),\n\n /**\n * Icon name or URL\n */\n icon: z.string().optional().describe('Widget icon'),\n\n /**\n * Field types this widget supports\n * \n * @example [\"text\", \"email\", \"url\"]\n */\n fieldTypes: z.array(z.string()).optional().describe('Supported field types'),\n\n /**\n * Widget category for organization\n */\n category: z.enum(['input', 'display', 'picker', 'editor', 'custom'])\n .default('custom')\n .describe('Widget category'),\n\n /**\n * Widget lifecycle hooks\n */\n lifecycle: WidgetLifecycleSchema.optional().describe('Lifecycle hooks'),\n\n /**\n * Custom events this widget emits\n */\n events: z.array(WidgetEventSchema).optional().describe('Custom events'),\n\n /**\n * Widget configuration properties\n */\n properties: z.array(WidgetPropertySchema).optional().describe('Configuration properties'),\n\n /**\n * Widget implementation\n * Defines how to load the widget code\n */\n implementation: WidgetSourceSchema.optional().describe('Widget implementation source'),\n\n /**\n * Widget dependencies\n * External libraries or scripts needed\n */\n dependencies: z.array(z.object({\n name: z.string(),\n version: z.string().optional(),\n url: z.string().url().optional(),\n })).optional().describe('Widget dependencies'),\n\n /**\n * Widget screenshots for showcase\n */\n screenshots: z.array(z.string().url()).optional().describe('Screenshot URLs'),\n\n /**\n * Widget documentation URL\n */\n documentation: z.string().url().optional().describe('Documentation URL'),\n\n /**\n * License information\n */\n license: z.string().optional().describe('License (SPDX identifier)'),\n\n /**\n * Tags for discovery\n */\n tags: z.array(z.string()).optional().describe('Tags for categorization'),\n\n /** ARIA accessibility attributes */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n\n /** Performance optimization settings */\n performance: PerformanceConfigSchema.optional().describe('Performance optimization settings'),\n}));\n\nexport type WidgetManifest = z.infer<typeof WidgetManifestSchema>;\n\n/**\n * Field Widget Props Schema\n * \n * This defines the contract for custom field components and plugin UI extensions.\n * Third-party developers use this interface to build custom field widgets that integrate\n * seamlessly with the ObjectStack UI system.\n * \n * @example\n * // Custom widget implementation\n * function CustomDatePicker(props: FieldWidgetProps) {\n * const { value, onChange, readonly, required, error, field, record, options } = props;\n * // Widget implementation...\n * }\n */\nexport const FieldWidgetPropsSchema = lazySchema(() => z.object({\n /**\n * Current field value.\n * Type depends on the field type (string, number, boolean, array, object, etc.)\n */\n value: z.unknown().describe('Current field value'),\n\n /**\n * Callback function to update the field value.\n * Should be called when user interaction changes the value.\n * \n * @param newValue - The new value to set\n */\n onChange: z.function()\n .input(z.tuple([z.unknown()]))\n .output(z.void())\n .describe('Callback to update field value'),\n\n /**\n * Whether the field is in read-only mode.\n * When true, the widget should display the value but not allow editing.\n */\n readonly: z.boolean().default(false).describe('Read-only mode flag'),\n\n /**\n * Whether the field is required.\n * Widget should indicate required state visually and validate accordingly.\n */\n required: z.boolean().default(false).describe('Required field flag'),\n\n /**\n * Validation error message to display.\n * When present, widget should display the error in its UI.\n */\n error: z.string().optional().describe('Validation error message'),\n\n /**\n * Complete field definition from the schema.\n * Contains metadata like type, constraints, options, etc.\n */\n field: FieldSchema.describe('Field schema definition'),\n\n /**\n * The complete record/document being edited.\n * Useful for conditional logic and cross-field dependencies.\n */\n record: z.record(z.string(), z.unknown()).optional().describe('Complete record data'),\n\n /**\n * Custom options passed to the widget.\n * Can contain widget-specific configuration like themes, behaviors, etc.\n */\n options: z.record(z.string(), z.unknown()).optional().describe('Custom widget options'),\n}));\n\n/**\n * TypeScript type for Field Widget Props\n */\nexport type FieldWidgetProps = z.infer<typeof FieldWidgetPropsSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\n\n/**\n * Activity-timeline UI config enums.\n *\n * The `service-feed` backend was retired (ADR-0052 §5 / #1955); `sys_comment` /\n * `sys_activity` are the canonical record-collaboration/timeline backend. Only these\n * two enums remain here — they are pure UI configuration for the record activity\n * component (`RecordActivityProps` in `../ui/component.zod.ts`), with no backend\n * dependency. (A later `feed` → `activity` rename is tracked separately.)\n */\n\n/**\n * Feed Item Type\n * Unified activity types for the record timeline.\n * Covers comments, field changes, tasks, events, and system activities.\n */\nexport const FeedItemType = z.enum([\n 'comment',\n 'field_change',\n 'task',\n 'event',\n 'email',\n 'call',\n 'note',\n 'file',\n 'record_create',\n 'record_delete',\n 'approval',\n 'sharing',\n 'system',\n]);\nexport type FeedItemType = z.infer<typeof FeedItemType>;\n\n/**\n * Feed Filter Mode\n * Controls which feed item types to display in the timeline.\n */\nexport const FeedFilterMode = z.enum([\n 'all',\n 'comments_only',\n 'changes_only',\n 'tasks_only',\n]);\nexport type FeedFilterMode = z.infer<typeof FeedFilterMode>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { FilterConditionSchema } from '../data/filter.zod';\nimport { ViewFilterRuleSchema } from './view.zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\nimport { FeedItemType, FeedFilterMode } from '../data/feed.zod';\n\n/**\n * Empty Properties Schema\n */\nimport { lazySchema } from '../shared/lazy-schema';\nimport { ExpressionInputSchema } from '../shared/expression.zod';\nconst EmptyProps = z.object({});\n\n/**\n * ----------------------------------------------------------------------\n * 1. Structure Components\n * ----------------------------------------------------------------------\n */\n\nexport const PageHeaderProps = z.object({\n title: I18nLabelSchema.describe('Page title'),\n subtitle: I18nLabelSchema.optional().describe('Page subtitle'),\n icon: z.string().optional().describe('Icon name'),\n breadcrumb: z.boolean().default(true).describe('Show breadcrumb'),\n actions: z.array(z.string()).optional().describe('Action IDs to show in header'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const PageTabsProps = z.object({\n type: z.enum(['line', 'card', 'pill']).default('line'),\n position: z.enum(['top', 'left']).default('top'),\n items: z.array(z.object({\n label: I18nLabelSchema,\n icon: z.string().optional(),\n /**\n * Conditional tab (CEL, #2606): when the predicate evaluates FALSE the\n * whole tab — header *and* panel — is omitted from the strip. This is the\n * item-level complement to a child component's own `visibleWhen`, which\n * hides only the panel content and would leave an empty tab header behind.\n * Binds the same environment as page-component `visibleWhen`: `record` +\n * `current_user`, plus page state as `page.<var>` (re-evaluated live).\n * Canonical `*When` name per ADR-0089 — this key is new, so the deprecated\n * `visibility` / `visibleOn` aliases are NOT accepted on tab items.\n */\n visibleWhen: ExpressionInputSchema.optional().describe(\n 'Visibility predicate (CEL) — the whole tab (header + panel) is omitted when FALSE; the renderer falls back to the first visible tab when the active one is hidden. Binds `record`, `current_user`, `page.<var>`. ADR-0089 canonical name (`visibility`/`visibleOn` aliases are not accepted here).',\n ),\n children: z.array(z.unknown()).describe('Child components')\n })),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const PageCardProps = z.object({\n title: I18nLabelSchema.optional(),\n bordered: z.boolean().default(true),\n actions: z.array(z.string()).optional(),\n /** Slot for nested content in the Card body */\n body: z.array(z.unknown()).optional().describe('Card content components (slot)'),\n /** Slot for footer content */\n footer: z.array(z.unknown()).optional().describe('Card footer components (slot)'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\n/**\n * ----------------------------------------------------------------------\n * 2. Record Context Components\n * ----------------------------------------------------------------------\n */\n\nexport const RecordDetailsProps = z.object({\n columns: z.enum(['1', '2', '3', '4']).default('2').describe('Number of columns for field layout (1-4)'),\n layout: z.enum(['auto', 'custom']).default('auto').describe('Layout mode: auto uses object highlightFields, custom uses explicit sections'),\n sections: z.array(z.string()).optional().describe('Section IDs to show (required when layout is \"custom\")'),\n fields: z.array(z.string()).optional().describe('Explicit field list to display (optional, overrides highlightFields)'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const RecordRelatedListProps = z.object({\n objectName: z.string().describe('Related object name (e.g., \"task\", \"opportunity\")'),\n relationshipField: z.string().describe('Field on related object that points to this record (e.g., \"account_id\")'),\n /**\n * Which field of THIS (parent) record `relationshipField` stores. Default\n * `id` (ordinary FK). Set to another unique field for junctions that key on\n * a machine name — e.g. `sys_user_position.position` stores\n * `sys_position.name`, so the Holders list on a position declares\n * `relationshipValueField: 'name'`. Used both to FILTER the list\n * (`{[relationshipField]: parent[relationshipValueField]}`) and as the\n * parent-side value written by the Add picker.\n */\n relationshipValueField: z.string().default('id').describe(\"Parent-record field whose value relationshipField stores (default 'id'; e.g. 'name' for name-keyed junctions).\"),\n columns: z.array(z.string()).optional().describe('Fields to display in the related list. Optional: when omitted, columns derive from the related object\\'s highlightFields / default list columns (a related list is just another surface that lists that object). Override chain: child highlightFields → field-level relatedListColumns → this inline list.'),\n sort: z.union([\n z.string(),\n z.array(z.object({\n field: z.string(),\n order: z.enum(['asc', 'desc'])\n }))\n ]).optional().describe('Sort order for related records'),\n limit: z.number().int().positive().default(5).describe('Number of records to display initially'),\n filter: z.array(ViewFilterRuleSchema).optional().describe('Additional filter criteria for related records'),\n title: I18nLabelSchema.optional().describe('Custom title for the related list'),\n showViewAll: z.boolean().default(true).describe('Show \"View All\" link to see all related records'),\n actions: z.array(z.string()).optional().describe('Action IDs available for related records'),\n /**\n * Enable an \"Add\" affordance that links EXISTING records via a picker, rather\n * than only \"+ New\" (create-and-navigate). Generic over m2m / junction\n * relationships: pick records from `add.picker.object` (the far side) and\n * create a link row in `objectName` with `{[relationshipField]: <parentId>,\n * [add.linkField]: <pickedId>}`. Omit `linkField` for a plain 1:m re-parent\n * (the picked child's `relationshipField` is set to the parent id instead).\n * Server-side rules still apply on insert (e.g. the AI-seat cap), and their\n * errors surface in the dialog. The canonical use is \"Assigned Users\" on a\n * permission set (objectName=`sys_user_permission_set`,\n * relationshipField=`permission_set_id`, picker.object=`sys_user`,\n * linkField=`user_id`).\n */\n add: z.object({\n picker: z.object({\n object: z.string().describe('Object to pick records from (the far side of an m2m, or the child object for a 1:m re-parent).'),\n valueField: z.string().default('id').describe('Field on the picked record used as the link value (default `id`).'),\n labelField: z.string().optional().describe('Field shown in the picker rows (defaults to the object title field).'),\n filter: z.array(ViewFilterRuleSchema).optional().describe('Restrict which records the picker offers.'),\n }).describe('Where the Add affordance sources records from.'),\n linkField: z.string().optional().describe('Field on `objectName` that stores the picked record id (junction case). Omit for a 1:m re-parent.'),\n label: I18nLabelSchema.optional().describe('Label for the Add button (default \"Add\").'),\n }).optional().describe('Add-existing-via-picker config (generic m2m/junction assignment).'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const RecordHighlightsField = z.union([\n z.string(),\n z.object({\n name: z.string().describe('Field name on the record'),\n label: z.string().optional().describe('Display label (overrides schema label)'),\n icon: z.string().optional().describe('Icon name (lucide icon key)'),\n type: z.string().optional().describe('Override cell renderer type (rare)'),\n }),\n]).describe('Highlight field: bare name, or {name,label?,icon?,type?}');\n\nexport const RecordHighlightsProps = z.object({\n fields: z.array(RecordHighlightsField).min(1).max(7).describe('Key fields to highlight (1-7 fields max, typically displayed as prominent cards). Each item may be a bare field name or {name, label?, icon?, type?} for inline overrides.'),\n layout: z.enum(['horizontal', 'vertical']).default('horizontal').describe('Layout orientation for highlight fields'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const RecordActivityProps = z.object({\n /** Activity types to display (unified enum including comment, field_change, etc.) */\n types: z.array(FeedItemType).optional().describe('Feed item types to show (default: all)'),\n /** Default filter mode (Airtable-style dropdown) */\n filterMode: FeedFilterMode.default('all').describe('Default activity filter'),\n /** Allow user to switch filter modes */\n showFilterToggle: z.boolean().default(true).describe('Show filter dropdown in panel header'),\n /** Pagination */\n limit: z.number().int().positive().default(20).describe('Number of items to load per page'),\n /** Show completed activities */\n showCompleted: z.boolean().default(false).describe('Include completed activities'),\n /** Merge field_change + comment in a unified timeline */\n unifiedTimeline: z.boolean().default(true).describe('Mix field changes and comments in one timeline (Airtable style)'),\n /** Show the comment input box at the bottom */\n showCommentInput: z.boolean().default(true).describe('Show \"Leave a comment\" input at the bottom'),\n /** Enable @mentions in comments */\n enableMentions: z.boolean().default(true).describe('Enable @mentions in comments'),\n /** Enable emoji reactions */\n enableReactions: z.boolean().default(false).describe('Enable emoji reactions on feed items'),\n /** Enable threaded replies */\n enableThreading: z.boolean().default(false).describe('Enable threaded replies on comments'),\n /** Show notification subscription toggle (bell icon) */\n showSubscriptionToggle: z.boolean().default(true).describe('Show bell icon for record-level notification subscription'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const RecordChatterProps = z.object({\n /** Panel position */\n position: z.enum(['sidebar', 'inline', 'drawer']).default('sidebar').describe('Where to render the chatter panel'),\n /** Panel width (for sidebar/drawer) */\n width: z.union([z.string(), z.number()]).optional().describe('Panel width (e.g., \"350px\", \"30%\")'),\n /** Collapsible */\n collapsible: z.boolean().default(true).describe('Whether the panel can be collapsed'),\n /** Default collapsed state */\n defaultCollapsed: z.boolean().default(false).describe('Whether the panel starts collapsed'),\n /** Feed configuration (delegates to RecordActivityProps) */\n feed: RecordActivityProps.optional().describe('Embedded activity feed configuration'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const RecordPathProps = z.object({\n statusField: z.string().describe('Field name representing the current status/stage'),\n stages: z.array(z.object({\n value: z.string(),\n label: I18nLabelSchema,\n })).optional().describe('Explicit stage definitions (if not using field metadata)'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const PageAccordionProps = z.object({\n items: z.array(z.object({\n label: I18nLabelSchema,\n icon: z.string().optional(),\n collapsed: z.boolean().default(false),\n children: z.array(z.unknown()).describe('Child components'),\n })),\n allowMultiple: z.boolean().default(false).describe('Allow multiple panels to be expanded simultaneously'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\nexport const AIChatWindowProps = z.object({\n mode: z.enum(['float', 'sidebar', 'inline']).default('float').describe('Display mode for the chat window'),\n agentId: z.string().optional().describe('Specific AI agent to use'),\n context: z.record(z.string(), z.unknown()).optional().describe('Contextual data to pass to the AI'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n});\n\n/**\n * ----------------------------------------------------------------------\n * 3. Content Element Components (Airtable Interface Parity)\n * ----------------------------------------------------------------------\n */\n\nexport const ElementTextPropsSchema = lazySchema(() => z.object({\n content: z.string().describe('Text or Markdown content'),\n variant: z.enum(['heading', 'subheading', 'body', 'caption'])\n .optional().default('body').describe('Text style variant'),\n align: z.enum(['left', 'center', 'right'])\n .optional().default('left').describe('Text alignment'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\nexport const ElementNumberPropsSchema = lazySchema(() => z.object({\n object: z.string().describe('Source object'),\n field: z.string().optional().describe('Field to aggregate'),\n aggregate: z.enum(['count', 'sum', 'avg', 'min', 'max'])\n .describe('Aggregation function'),\n filter: FilterConditionSchema.optional().describe('Filter criteria'),\n format: z.enum(['number', 'currency', 'percent']).optional().describe('Number display format'),\n prefix: z.string().optional().describe('Prefix text (e.g. \"$\")'),\n suffix: z.string().optional().describe('Suffix text (e.g. \"%\")'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\nexport const ElementImagePropsSchema = lazySchema(() => z.object({\n src: z.string().describe('Image URL or attachment field'),\n alt: z.string().optional().describe('Alt text for accessibility'),\n fit: z.enum(['cover', 'contain', 'fill'])\n .optional().default('cover').describe('Image object-fit mode'),\n height: z.number().optional().describe('Fixed height in pixels'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\n/**\n * Read-only, synthesized view of a metadata item, embedded inline in content\n * (ADR-0051). This is the *inline form* of ADR-0046 §3.5 (\"derived content is\n * rendered, never written\") and the component a ` ```metadata ` doc fence\n * compiles to. Because it renders the platform's *own* metadata via the\n * platform's *own* viewer, it carries no expressions or actions — it stays on\n * the data side of the §3.4 trust boundary and is safe to embed in inert docs\n * (`embeddableInDoc`). The view is resolved live at read time, then projected\n * to the reader's permissions automatically (see `detail` for the distinct,\n * author-controlled altitude projection). `object` embeds are deferred\n * (ADR-0051 §5).\n */\nexport const ElementMetadataViewerPropsSchema = lazySchema(() => z.object({\n type: z.enum(['state_machine', 'flow', 'permission'])\n .describe('Metadata view kind (ADR-0051): state_machine | flow | permission'),\n name: z.string()\n .describe('Target metadata item name; resolved package-scoped (ADR-0048), then dependencies (ADR-0046 §3.3)'),\n object: z.string().optional()\n .describe('Owning object — required for object-scoped kinds: state_machine is a rule ON an object (ADR-0020), permission renders a matrix FOR one; omit for top-level flow'),\n mode: z.enum(['diagram', 'matrix', 'summary']).optional()\n .describe('Render form; defaults per type (diagram for flow/state_machine, matrix for permission)'),\n detail: z.enum(['business', 'technical']).optional().default('business')\n .describe('Authoring altitude (ADR-0051 §3.4): business collapses technical flow nodes to business steps + approvals. NOT access (cf. book.audience); permission projection is automatic and render-time, never set here'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\n/**\n * ----------------------------------------------------------------------\n * 4. Interactive Element Components (Phase B — Element Library)\n * ----------------------------------------------------------------------\n */\n\nexport const ElementButtonPropsSchema = lazySchema(() => z.object({\n label: I18nLabelSchema.describe('Button display label'),\n variant: z.enum(['primary', 'secondary', 'danger', 'ghost', 'link'])\n .optional().default('primary').describe('Button visual variant'),\n size: z.enum(['small', 'medium', 'large'])\n .optional().default('medium').describe('Button size'),\n icon: z.string().optional().describe('Icon name (Lucide icon)'),\n iconPosition: z.enum(['left', 'right'])\n .optional().default('left').describe('Icon position relative to label'),\n disabled: z.boolean().optional().default(false).describe('Disable the button'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\nexport const ElementFilterPropsSchema = lazySchema(() => z.object({\n object: z.string().describe('Object to filter'),\n fields: z.array(z.string()).describe('Filterable field names'),\n targetVariable: z.string().optional().describe('Page variable to store filter state'),\n layout: z.enum(['inline', 'dropdown', 'sidebar'])\n .optional().default('inline').describe('Filter display layout'),\n showSearch: z.boolean().optional().default(true).describe('Show search input'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\nexport const ElementFormPropsSchema = lazySchema(() => z.object({\n object: z.string().describe('Object for the form'),\n fields: z.array(z.string()).optional().describe('Fields to display (defaults to all editable fields)'),\n mode: z.enum(['create', 'edit']).optional().default('create').describe('Form mode'),\n submitLabel: I18nLabelSchema.optional().describe('Submit button label'),\n onSubmit: ExpressionInputSchema.optional().describe('Action expression on form submit (CEL)'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\nexport const ElementRecordPickerPropsSchema = lazySchema(() => z.object({\n object: z.string().describe('Object to pick records from'),\n displayField: z.string().describe('Field to display as the record label'),\n searchFields: z.array(z.string()).optional().describe('Fields to search against'),\n filter: FilterConditionSchema.optional().describe('Filter criteria for available records'),\n multiple: z.boolean().optional().default(false).describe('Allow multiple record selection'),\n targetVariable: z.string().optional().describe('Page variable to bind selected record ID(s)'),\n placeholder: I18nLabelSchema.optional().describe('Placeholder text'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\n/**\n * A single-line free-text input — the data-entry half of an SDUI page (Airtable\n * \"text\"/\"number\" field parity). The console renderer binds the typed value into\n * a page variable via the {@link PageVariableSchema} `source` convention (the\n * variable whose `source` equals this component's `id`), exposing it to\n * expressions as `page.<var>` and to submit actions as a `{{page.<var>}}` token.\n * A whole free-text family lives under one element: `inputType` selects the\n * native modality (text/email/number/…), keeping genuinely-distinct inputs\n * (textarea, select, checkbox) free to arrive as their own elements later.\n */\nexport const ElementTextInputPropsSchema = lazySchema(() => z.object({\n inputType: z.enum(['text', 'email', 'number', 'tel', 'url', 'password'])\n .optional().default('text')\n .describe('Native input type — drives keyboard/validation affordance and how the bound value is coerced (number → numeric).'),\n label: I18nLabelSchema.optional().describe('Field label shown above the input'),\n placeholder: I18nLabelSchema.optional().describe('Placeholder text shown when empty'),\n defaultValue: z.union([z.string(), z.number()]).optional()\n .describe('Initial value; seeds the bound page variable on mount'),\n required: z.boolean().optional().default(false).describe('Mark the field as required'),\n disabled: z.boolean().optional().default(false).describe('Disable the input'),\n description: I18nLabelSchema.optional().describe('Helper text shown below the input'),\n targetVariable: z.string().optional()\n .describe('Page variable this input writes to. Declarative hint; the live binding resolves via the variable whose `source` equals this component id (see PageVariableSchema).'),\n /** ARIA accessibility */\n aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),\n}));\n\n/**\n * ----------------------------------------------------------------------\n * Component Props Map\n * Maps Component Type to its Property Schema\n * ----------------------------------------------------------------------\n */\nexport const ComponentPropsMap = {\n // Structure\n 'page:header': PageHeaderProps,\n 'page:tabs': PageTabsProps,\n 'page:card': PageCardProps,\n 'page:footer': EmptyProps,\n 'page:sidebar': EmptyProps,\n 'page:accordion': PageAccordionProps,\n 'page:section': EmptyProps,\n\n // Record\n 'record:details': RecordDetailsProps,\n 'record:related_list': RecordRelatedListProps,\n 'record:highlights': RecordHighlightsProps,\n 'record:activity': RecordActivityProps,\n 'record:chatter': RecordChatterProps,\n 'record:path': RecordPathProps,\n\n // Navigation\n 'app:launcher': EmptyProps,\n 'nav:menu': EmptyProps,\n 'nav:breadcrumb': EmptyProps,\n\n // Utility\n 'global:search': EmptyProps,\n 'global:notifications': EmptyProps,\n 'user:profile': EmptyProps,\n \n // AI\n 'ai:chat_window': AIChatWindowProps,\n 'ai:suggestion': z.object({ context: z.string().optional() }),\n\n // Content Elements\n 'element:text': ElementTextPropsSchema,\n 'element:number': ElementNumberPropsSchema,\n 'element:image': ElementImagePropsSchema,\n 'element:metadata_viewer': ElementMetadataViewerPropsSchema, // ADR-0051: inline read-only metadata view (embeddableInDoc)\n 'element:divider': EmptyProps,\n\n // Interactive Elements\n 'element:button': ElementButtonPropsSchema,\n 'element:filter': ElementFilterPropsSchema,\n 'element:form': ElementFormPropsSchema,\n 'element:record_picker': ElementRecordPickerPropsSchema,\n 'element:text_input': ElementTextInputPropsSchema,\n} as const;\n\n/**\n * Type Helper to extract props from map\n */\nexport type ComponentProps<T extends keyof typeof ComponentPropsMap> = z.infer<typeof ComponentPropsMap[T]>;\nexport type ComponentPropsInput<T extends keyof typeof ComponentPropsMap> = z.input<typeof ComponentPropsMap[T]>;\n","// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.\n//\n// React-tier component index (ADR-0081). Maps each curated public block that is\n// injected into `kind:'react'` page source to (a) the SPEC zod schema that\n// already defines its declarative/config props — the authoritative source, do\n// not re-author — and (b) a thin hand-authored React-interaction overlay: the\n// binding/controlled/callback props that are inherently React (objectName,\n// recordId, mode, onSuccess, onRowClick, …) and so are absent from the\n// declarative metadata schema.\n//\n// The contract the AI authors against (skills/objectstack-ui/references/\n// react-blocks.md + .contract.json) is GENERATED from this index by\n// `scripts/build-react-blocks-contract.ts` — never hand-edited.\n\nimport type { ZodTypeAny } from 'zod';\nimport { ListViewSchema, FormViewSchema } from './view.zod';\nimport {\n RecordDetailsProps,\n RecordRelatedListProps,\n RecordHighlightsProps,\n RecordPathProps,\n} from './component.zod';\nimport { ChartConfigSchema } from './chart.zod';\n\nexport type ReactPropKind = 'data' | 'binding' | 'controlled' | 'callback';\n\nexport interface ReactInteractionProp {\n name: string;\n type: string;\n kind: 'binding' | 'controlled' | 'callback';\n required?: boolean;\n description: string;\n}\n\nexport interface ReactBlockDef {\n /** PascalCase name the author writes in JSX, e.g. `<ObjectForm>`. */\n tag: string;\n /** The registry/render type, e.g. `object-form`. */\n schemaType: string;\n summary: string;\n /**\n * Spec zod schema that defines this block's declarative (config) props. The\n * generator extracts these as `data` props — authoritative, with descriptions.\n * Omit for blocks with no spec schema (then only the overlay is published).\n */\n schema?: ZodTypeAny;\n /**\n * Curate which spec-schema props to surface (high-signal subset; ADR-0080\n * \"capability ≠ contract\"). Definitions still come from the schema — this only\n * selects + orders. Omit to surface all of the schema's props.\n */\n dataProps?: string[];\n /** React-only props absent from the declarative schema (hand-authored). */\n interactions: ReactInteractionProp[];\n}\n\n// Shared overlays ----------------------------------------------------------\nconst OBJECT_NAME: ReactInteractionProp = {\n name: 'objectName',\n type: 'string',\n kind: 'binding',\n required: true,\n description: 'The object this block binds to (server-connected).',\n};\n\nexport const REACT_BLOCKS: ReactBlockDef[] = [\n {\n tag: 'ObjectForm',\n schemaType: 'object-form',\n summary: \"Server-connected create/edit/view form for one object. Config props come from the spec FormView schema; bind + wire it with the React props below.\",\n schema: FormViewSchema,\n dataProps: ['layout', 'columns', 'tabPosition', 'drawerSide', 'drawerWidth', 'modalSize', 'splitDirection', 'sections', 'subforms', 'submitBehavior'],\n interactions: [\n OBJECT_NAME,\n { name: 'mode', type: \"'create' | 'edit' | 'view'\", kind: 'controlled', description: 'Create a new record, or edit/view an existing one — drive from React state.' },\n { name: 'formType', type: \"'simple' | 'tabbed' | 'wizard' | 'split' | 'drawer' | 'modal'\", kind: 'binding', description: 'Form presentation; drawer/modal render the form in a built-in overlay (use drawerSide/drawerWidth/modalSize).' },\n { name: 'recordId', type: 'string | number', kind: 'controlled', description: 'Which record to load (edit/view). The hook for master/detail.' },\n { name: 'fields', type: 'string[]', kind: 'binding', description: 'Limit/order the fields shown (defaults to the object form fields).' },\n { name: 'initialValues', type: 'Record<string, any>', kind: 'binding', description: 'Prefill values in create mode.' },\n { name: 'onSuccess', type: '(record) => void', kind: 'callback', description: 'Called after a successful save with the saved record (e.g. close a panel + reload).' },\n { name: 'onError', type: '(error: Error) => void', kind: 'callback', description: 'Called when the save fails.' },\n { name: 'onCancel', type: '() => void', kind: 'callback', description: 'Called when the user cancels.' },\n { name: 'submitHandler', type: '(values) => any | Promise<any>', kind: 'callback', description: 'Custom persistence instead of the default create/update.' },\n ],\n },\n {\n tag: 'ListView',\n schemaType: 'list-view',\n summary: \"Server-connected object table with toolbar and switchable visualizations (grid/kanban/calendar/gantt/…). Config props come from the spec ListView schema.\",\n schema: ListViewSchema,\n dataProps: ['columns', 'sort', 'searchableFields', 'userFilters', 'pagination', 'grouping', 'rowHeight', 'selection', 'rowActions', 'inlineEdit'],\n interactions: [\n OBJECT_NAME,\n { name: 'viewType', type: \"'grid' | 'kanban' | 'gallery' | 'calendar' | 'timeline' | 'gantt' | 'map'\", kind: 'binding', description: 'Which visualization to render (default grid). How you get a kanban/calendar/gantt of the object.' },\n { name: 'filters', type: \"FilterArray e.g. ['status','=','active']\", kind: 'controlled', description: 'ObjectQL base filter; drive from React state for tabbed/searched lists. ([field, op, value]; ops =, !=, >, <, contains, in; compound: [\\\"and\\\", […], […]]).' },\n { name: 'navigation', type: \"{ mode: 'page' | 'drawer' | 'modal' | 'split' | 'none' }\", kind: 'binding', description: 'What a row click does. Use { mode: \\\"none\\\" } when you handle clicks via onRowClick.' },\n { name: 'onRowClick', type: '(record) => void', kind: 'callback', description: \"Called with the clicked row's record — the hook for master/detail.\" },\n { name: 'onNavigate', type: \"(recordId, action: 'view' | 'edit') => void\", kind: 'callback', description: 'Called for page-level navigation.' },\n { name: 'fields', type: 'string[]', kind: 'binding', description: 'Limit/order the columns shown (defaults to the object list fields).' },\n { name: 'options', type: 'Record<string, any>', kind: 'binding', description: 'View-type-specific options bag (kanban/calendar/gantt extras); prefer the typed spec props where they exist.' },\n ],\n },\n {\n tag: 'ObjectChart',\n schemaType: 'object-chart',\n summary: 'Chart over an object’s aggregated data. Config props come from the spec Chart config schema.',\n schema: ChartConfigSchema,\n dataProps: ['title', 'series', 'xAxis', 'yAxis', 'colors', 'showLegend'],\n interactions: [\n OBJECT_NAME,\n { name: 'filter', type: 'FilterArray', kind: 'controlled', description: 'ObjectQL filter scoping the data; drive from React state.' },\n { name: 'aggregate', type: '{ field, function, groupBy }', kind: 'binding', description: 'Aggregation: function (sum/avg/count) over field, grouped by groupBy.' },\n { name: 'data', type: 'any[]', kind: 'binding', description: 'Static/precomputed data to chart directly instead of binding via objectName + aggregate.' },\n ],\n },\n {\n tag: 'RecordDetails',\n schemaType: 'record:details',\n summary: 'Field-detail panel for the bound record. Config props from the spec RecordDetails schema.',\n schema: RecordDetailsProps,\n interactions: [\n { name: 'recordId', type: 'string | number', kind: 'controlled', description: 'The record to show.' },\n { name: 'objectName', type: 'string', kind: 'binding', description: 'The record’s object.' },\n ],\n },\n {\n tag: 'RecordHighlights',\n schemaType: 'record:highlights',\n summary: 'Highlights panel — a strip of key fields. Config props from the spec RecordHighlights schema.',\n schema: RecordHighlightsProps,\n interactions: [\n { name: 'recordId', type: 'string | number', kind: 'controlled', description: 'The record to summarize.' },\n { name: 'objectName', type: 'string', kind: 'binding', description: 'The record’s object.' },\n ],\n },\n {\n tag: 'RecordRelatedList',\n schemaType: 'record:related_list',\n summary: 'Related child records via a lookup. Config props from the spec RecordRelatedList schema.',\n schema: RecordRelatedListProps,\n interactions: [\n { name: 'recordId', type: 'string | number', kind: 'controlled', description: 'The parent record.' },\n { name: 'objectName', type: 'string', kind: 'binding', description: 'The parent object.' },\n ],\n },\n {\n tag: 'RecordPath',\n schemaType: 'record:path',\n summary: 'Stage/progress bar driven by a status field. Config props from the spec RecordPath schema.',\n schema: RecordPathProps,\n interactions: [\n { name: 'recordId', type: 'string | number', kind: 'controlled', description: 'The record whose stage to show.' },\n { name: 'objectName', type: 'string', kind: 'binding', description: 'The record’s object.' },\n ],\n },\n {\n tag: 'Block',\n schemaType: '(any)',\n summary: 'Escape hatch — render any registered component by type. <Block type=\"object-kanban\" objectName=\"task\" /> etc.',\n interactions: [\n { name: 'type', type: 'string', kind: 'binding', required: true, description: 'The registered component type to render.' },\n ],\n },\n];\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\n\n/**\n * Touch Target Configuration Schema\n * Ensures touch targets meet WCAG 2.5.5 minimum size requirements (44x44px).\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const TouchTargetConfigSchema = lazySchema(() => z.object({\n minWidth: z.number().default(44).describe('Minimum touch target width in pixels (WCAG 2.5.5: 44px)'),\n minHeight: z.number().default(44).describe('Minimum touch target height in pixels (WCAG 2.5.5: 44px)'),\n padding: z.number().optional().describe('Additional padding around touch target in pixels'),\n hitSlop: z.object({\n top: z.number().optional().describe('Extra hit area above the element'),\n right: z.number().optional().describe('Extra hit area to the right of the element'),\n bottom: z.number().optional().describe('Extra hit area below the element'),\n left: z.number().optional().describe('Extra hit area to the left of the element'),\n }).optional().describe('Invisible hit area extension beyond the visible bounds'),\n}).describe('Touch target sizing configuration (WCAG accessible)'));\n\nexport type TouchTargetConfig = z.infer<typeof TouchTargetConfigSchema>;\n\n/**\n * Gesture Type Enum\n * Supported touch gesture types.\n */\nexport const GestureTypeSchema = lazySchema(() => z.enum([\n 'swipe',\n 'pinch',\n 'long_press',\n 'double_tap',\n 'drag',\n 'rotate',\n 'pan',\n]).describe('Touch gesture type'));\n\nexport type GestureType = z.infer<typeof GestureTypeSchema>;\n\n/**\n * Swipe Direction Enum\n */\nexport const SwipeDirectionSchema = lazySchema(() => z.enum(['up', 'down', 'left', 'right']));\n\nexport type SwipeDirection = z.infer<typeof SwipeDirectionSchema>;\n\n/**\n * Swipe Gesture Configuration Schema\n */\nexport const SwipeGestureConfigSchema = lazySchema(() => z.object({\n direction: z.array(SwipeDirectionSchema).describe('Allowed swipe directions'),\n threshold: z.number().optional().describe('Minimum distance in pixels to recognize swipe'),\n velocity: z.number().optional().describe('Minimum velocity (px/ms) to trigger swipe'),\n}).describe('Swipe gesture recognition settings'));\n\nexport type SwipeGestureConfig = z.infer<typeof SwipeGestureConfigSchema>;\n\n/**\n * Pinch Gesture Configuration Schema\n */\nexport const PinchGestureConfigSchema = lazySchema(() => z.object({\n minScale: z.number().optional().describe('Minimum scale factor (e.g., 0.5 for 50%)'),\n maxScale: z.number().optional().describe('Maximum scale factor (e.g., 3.0 for 300%)'),\n}).describe('Pinch/zoom gesture recognition settings'));\n\nexport type PinchGestureConfig = z.infer<typeof PinchGestureConfigSchema>;\n\n/**\n * Long Press Gesture Configuration Schema\n */\nexport const LongPressGestureConfigSchema = lazySchema(() => z.object({\n duration: z.number().default(500).describe('Hold duration in milliseconds to trigger long press'),\n moveTolerance: z.number().optional().describe('Max movement in pixels allowed during press'),\n}).describe('Long press gesture recognition settings'));\n\nexport type LongPressGestureConfig = z.infer<typeof LongPressGestureConfigSchema>;\n\n/**\n * Gesture Configuration Schema\n * Unified configuration for all supported gesture types.\n */\nexport const GestureConfigSchema = lazySchema(() => z.object({\n type: GestureTypeSchema.describe('Gesture type to configure'),\n label: I18nLabelSchema.optional().describe('Descriptive label for the gesture action'),\n enabled: z.boolean().default(true).describe('Whether this gesture is active'),\n swipe: SwipeGestureConfigSchema.optional().describe('Swipe gesture settings (when type is swipe)'),\n pinch: PinchGestureConfigSchema.optional().describe('Pinch gesture settings (when type is pinch)'),\n longPress: LongPressGestureConfigSchema.optional().describe('Long press settings (when type is long_press)'),\n}).describe('Per-gesture configuration'));\n\nexport type GestureConfig = z.infer<typeof GestureConfigSchema>;\n\n/**\n * Touch Interaction Schema\n * Top-level touch and gesture interaction configuration for a component.\n */\nexport const TouchInteractionSchema = lazySchema(() => z.object({\n gestures: z.array(GestureConfigSchema).optional().describe('Configured gesture recognizers'),\n touchTarget: TouchTargetConfigSchema.optional().describe('Touch target sizing and hit area'),\n hapticFeedback: z.boolean().optional().describe('Enable haptic feedback on touch interactions'),\n}).merge(AriaPropsSchema.partial()).describe('Touch and gesture interaction configuration'));\n\nexport type TouchInteraction = z.infer<typeof TouchInteractionSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\n\n/**\n * Focus Trap Configuration Schema\n * Constrains keyboard focus within a specific container (e.g., modals, dialogs).\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const FocusTrapConfigSchema = lazySchema(() => z.object({\n enabled: z.boolean().default(false).describe('Enable focus trapping within this container'),\n initialFocus: z.string().optional().describe('CSS selector for the element to focus on activation'),\n returnFocus: z.boolean().default(true).describe('Return focus to trigger element on deactivation'),\n escapeDeactivates: z.boolean().default(true).describe('Allow Escape key to deactivate the focus trap'),\n}).describe('Focus trap configuration for modal-like containers'));\n\nexport type FocusTrapConfig = z.infer<typeof FocusTrapConfigSchema>;\n\n/**\n * Keyboard Shortcut Schema\n * Defines a single keyboard shortcut binding.\n */\nexport const KeyboardShortcutSchema = lazySchema(() => z.object({\n key: z.string().describe('Key combination (e.g., \"Ctrl+S\", \"Alt+N\", \"Escape\")'),\n action: z.string().describe('Action identifier to invoke when shortcut is triggered'),\n description: I18nLabelSchema.optional().describe('Human-readable description of what the shortcut does'),\n scope: z.enum(['global', 'view', 'form', 'modal', 'list']).default('global')\n .describe('Scope in which this shortcut is active'),\n}).describe('Keyboard shortcut binding'));\n\nexport type KeyboardShortcut = z.infer<typeof KeyboardShortcutSchema>;\n\n/**\n * Focus Management Schema\n * Controls tab order, focus visibility, and navigation behavior.\n */\nexport const FocusManagementSchema = lazySchema(() => z.object({\n tabOrder: z.enum(['auto', 'manual']).default('auto')\n .describe('Tab order strategy: auto (DOM order) or manual (explicit tabIndex)'),\n skipLinks: z.boolean().default(false).describe('Provide skip-to-content navigation links'),\n focusVisible: z.boolean().default(true).describe('Show visible focus indicators for keyboard users'),\n focusTrap: FocusTrapConfigSchema.optional().describe('Focus trap settings'),\n arrowNavigation: z.boolean().default(false)\n .describe('Enable arrow key navigation between focusable items'),\n}).describe('Focus and tab navigation management'));\n\nexport type FocusManagement = z.infer<typeof FocusManagementSchema>;\n\n/**\n * Keyboard Navigation Configuration Schema\n * Top-level keyboard navigation and shortcut configuration.\n */\nexport const KeyboardNavigationConfigSchema = lazySchema(() => z.object({\n shortcuts: z.array(KeyboardShortcutSchema).optional().describe('Registered keyboard shortcuts'),\n focusManagement: FocusManagementSchema.optional().describe('Focus and tab order management'),\n rovingTabindex: z.boolean().default(false)\n .describe('Enable roving tabindex pattern for composite widgets'),\n}).merge(AriaPropsSchema.partial()).describe('Keyboard navigation and shortcut configuration'));\n\nexport type KeyboardNavigationConfig = z.infer<typeof KeyboardNavigationConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { TouchTargetConfigSchema } from './touch.zod';\nimport { FocusManagementSchema } from './keyboard.zod';\n\n/**\n * Color Palette Schema\n * Defines brand colors and their variants.\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const ColorPaletteSchema = lazySchema(() => z.object({\n primary: z.string().describe('Primary brand color (hex, rgb, or hsl)'),\n secondary: z.string().optional().describe('Secondary brand color'),\n accent: z.string().optional().describe('Accent color for highlights'),\n success: z.string().optional().describe('Success state color (default: green)'),\n warning: z.string().optional().describe('Warning state color (default: yellow)'),\n error: z.string().optional().describe('Error state color (default: red)'),\n info: z.string().optional().describe('Info state color (default: blue)'),\n \n // Neutral colors\n background: z.string().optional().describe('Background color'),\n surface: z.string().optional().describe('Surface/card background color'),\n text: z.string().optional().describe('Primary text color'),\n textSecondary: z.string().optional().describe('Secondary text color'),\n border: z.string().optional().describe('Border color'),\n disabled: z.string().optional().describe('Disabled state color'),\n \n // Color variants (shades)\n primaryLight: z.string().optional().describe('Lighter shade of primary'),\n primaryDark: z.string().optional().describe('Darker shade of primary'),\n secondaryLight: z.string().optional().describe('Lighter shade of secondary'),\n secondaryDark: z.string().optional().describe('Darker shade of secondary'),\n}));\n\n/**\n * Typography Settings Schema\n * Font families, sizes, weights, and line heights.\n */\nexport const TypographySchema = lazySchema(() => z.object({\n fontFamily: z.object({\n base: z.string().optional().describe('Base font family (default: system fonts)'),\n heading: z.string().optional().describe('Heading font family'),\n mono: z.string().optional().describe('Monospace font family for code'),\n }).optional(),\n \n fontSize: z.object({\n xs: z.string().optional().describe('Extra small font size (e.g., 0.75rem)'),\n sm: z.string().optional().describe('Small font size (e.g., 0.875rem)'),\n base: z.string().optional().describe('Base font size (e.g., 1rem)'),\n lg: z.string().optional().describe('Large font size (e.g., 1.125rem)'),\n xl: z.string().optional().describe('Extra large font size (e.g., 1.25rem)'),\n '2xl': z.string().optional().describe('2X large font size (e.g., 1.5rem)'),\n '3xl': z.string().optional().describe('3X large font size (e.g., 1.875rem)'),\n '4xl': z.string().optional().describe('4X large font size (e.g., 2.25rem)'),\n }).optional(),\n \n fontWeight: z.object({\n light: z.number().optional().describe('Light weight (default: 300)'),\n normal: z.number().optional().describe('Normal weight (default: 400)'),\n medium: z.number().optional().describe('Medium weight (default: 500)'),\n semibold: z.number().optional().describe('Semibold weight (default: 600)'),\n bold: z.number().optional().describe('Bold weight (default: 700)'),\n }).optional(),\n \n lineHeight: z.object({\n tight: z.string().optional().describe('Tight line height (e.g., 1.25)'),\n normal: z.string().optional().describe('Normal line height (e.g., 1.5)'),\n relaxed: z.string().optional().describe('Relaxed line height (e.g., 1.75)'),\n loose: z.string().optional().describe('Loose line height (e.g., 2)'),\n }).optional(),\n \n letterSpacing: z.object({\n tighter: z.string().optional().describe('Tighter letter spacing (e.g., -0.05em)'),\n tight: z.string().optional().describe('Tight letter spacing (e.g., -0.025em)'),\n normal: z.string().optional().describe('Normal letter spacing (e.g., 0)'),\n wide: z.string().optional().describe('Wide letter spacing (e.g., 0.025em)'),\n wider: z.string().optional().describe('Wider letter spacing (e.g., 0.05em)'),\n }).optional(),\n}));\n\n/**\n * Spacing Units Schema\n * Defines spacing scale for margins, padding, gaps.\n */\nexport const SpacingSchema = lazySchema(() => z.object({\n '0': z.string().optional().describe('0 spacing (0)'),\n '1': z.string().optional().describe('Spacing unit 1 (e.g., 0.25rem)'),\n '2': z.string().optional().describe('Spacing unit 2 (e.g., 0.5rem)'),\n '3': z.string().optional().describe('Spacing unit 3 (e.g., 0.75rem)'),\n '4': z.string().optional().describe('Spacing unit 4 (e.g., 1rem)'),\n '5': z.string().optional().describe('Spacing unit 5 (e.g., 1.25rem)'),\n '6': z.string().optional().describe('Spacing unit 6 (e.g., 1.5rem)'),\n '8': z.string().optional().describe('Spacing unit 8 (e.g., 2rem)'),\n '10': z.string().optional().describe('Spacing unit 10 (e.g., 2.5rem)'),\n '12': z.string().optional().describe('Spacing unit 12 (e.g., 3rem)'),\n '16': z.string().optional().describe('Spacing unit 16 (e.g., 4rem)'),\n '20': z.string().optional().describe('Spacing unit 20 (e.g., 5rem)'),\n '24': z.string().optional().describe('Spacing unit 24 (e.g., 6rem)'),\n}));\n\n/**\n * Border Radius Schema\n * Rounded corners configuration.\n */\nexport const BorderRadiusSchema = lazySchema(() => z.object({\n none: z.string().optional().describe('No border radius (0)'),\n sm: z.string().optional().describe('Small border radius (e.g., 0.125rem)'),\n base: z.string().optional().describe('Base border radius (e.g., 0.25rem)'),\n md: z.string().optional().describe('Medium border radius (e.g., 0.375rem)'),\n lg: z.string().optional().describe('Large border radius (e.g., 0.5rem)'),\n xl: z.string().optional().describe('Extra large border radius (e.g., 0.75rem)'),\n '2xl': z.string().optional().describe('2X large border radius (e.g., 1rem)'),\n full: z.string().optional().describe('Full border radius (50%)'),\n}));\n\n/**\n * Shadow Schema\n * Box shadow effects.\n */\nexport const ShadowSchema = lazySchema(() => z.object({\n none: z.string().optional().describe('No shadow'),\n sm: z.string().optional().describe('Small shadow'),\n base: z.string().optional().describe('Base shadow'),\n md: z.string().optional().describe('Medium shadow'),\n lg: z.string().optional().describe('Large shadow'),\n xl: z.string().optional().describe('Extra large shadow'),\n '2xl': z.string().optional().describe('2X large shadow'),\n inner: z.string().optional().describe('Inner shadow (inset)'),\n}));\n\n/**\n * Breakpoints Schema\n * Responsive design breakpoints.\n */\nexport const BreakpointsSchema = lazySchema(() => z.object({\n xs: z.string().optional().describe('Extra small breakpoint (e.g., 480px)'),\n sm: z.string().optional().describe('Small breakpoint (e.g., 640px)'),\n md: z.string().optional().describe('Medium breakpoint (e.g., 768px)'),\n lg: z.string().optional().describe('Large breakpoint (e.g., 1024px)'),\n xl: z.string().optional().describe('Extra large breakpoint (e.g., 1280px)'),\n '2xl': z.string().optional().describe('2X large breakpoint (e.g., 1536px)'),\n}));\n\n/**\n * Animation Schema\n * Animation timing and duration settings.\n */\nexport const AnimationSchema = lazySchema(() => z.object({\n duration: z.object({\n fast: z.string().optional().describe('Fast animation (e.g., 150ms)'),\n base: z.string().optional().describe('Base animation (e.g., 300ms)'),\n slow: z.string().optional().describe('Slow animation (e.g., 500ms)'),\n }).optional(),\n \n timing: z.object({\n linear: z.string().optional().describe('Linear timing function'),\n ease: z.string().optional().describe('Ease timing function'),\n ease_in: z.string().optional().describe('Ease-in timing function'),\n ease_out: z.string().optional().describe('Ease-out timing function'),\n ease_in_out: z.string().optional().describe('Ease-in-out timing function'),\n }).optional(),\n}));\n\n/**\n * Z-Index Scale Schema\n * Layering and stacking order.\n */\nexport const ZIndexSchema = lazySchema(() => z.object({\n base: z.number().optional().describe('Base z-index (e.g., 0)'),\n dropdown: z.number().optional().describe('Dropdown z-index (e.g., 1000)'),\n sticky: z.number().optional().describe('Sticky z-index (e.g., 1020)'),\n fixed: z.number().optional().describe('Fixed z-index (e.g., 1030)'),\n modalBackdrop: z.number().optional().describe('Modal backdrop z-index (e.g., 1040)'),\n modal: z.number().optional().describe('Modal z-index (e.g., 1050)'),\n popover: z.number().optional().describe('Popover z-index (e.g., 1060)'),\n tooltip: z.number().optional().describe('Tooltip z-index (e.g., 1070)'),\n}));\n\n/**\n * Theme Mode Schema\n */\nexport const ThemeModeSchema = lazySchema(() => z.enum(['light', 'dark', 'auto']));\n\n/** @deprecated Use ThemeModeSchema instead */\nexport const ThemeMode = ThemeModeSchema;\n\n/**\n * Density Mode Schema\n * Controls spacing and sizing for different use cases.\n */\nexport const DensityModeSchema = lazySchema(() => z.enum(['compact', 'regular', 'spacious']));\n\n/** @deprecated Use DensityModeSchema instead */\nexport const DensityMode = DensityModeSchema;\n\n/**\n * WCAG Contrast Level Schema\n * Web Content Accessibility Guidelines color contrast requirements.\n */\nexport const WcagContrastLevelSchema = lazySchema(() => z.enum(['AA', 'AAA']));\n\n/** @deprecated Use WcagContrastLevelSchema instead */\nexport const WcagContrastLevel = WcagContrastLevelSchema;\n\n/**\n * Theme Configuration Schema\n * Complete theme definition for brand customization.\n */\nexport const ThemeSchema = lazySchema(() => z.object({\n name: SnakeCaseIdentifierSchema.describe('Unique theme identifier (snake_case)'),\n label: z.string().describe('Human-readable theme name'),\n description: z.string().optional().describe('Theme description'),\n \n /** Theme mode */\n mode: ThemeModeSchema.default('light').describe('Theme mode (light, dark, or auto)'),\n \n /** Color system */\n colors: ColorPaletteSchema.describe('Color palette configuration'),\n \n /** Typography */\n typography: TypographySchema.optional().describe('Typography settings'),\n \n /** Spacing */\n spacing: SpacingSchema.optional().describe('Spacing scale. [EXPERIMENTAL — not enforced] generateThemeVars does not emit spacing tokens yet (liveness audit #1878/#1893).'),\n \n /** Border radius */\n borderRadius: BorderRadiusSchema.optional().describe('Border radius scale'),\n \n /** Shadows */\n shadows: ShadowSchema.optional().describe('Box shadow effects'),\n \n /** Breakpoints */\n breakpoints: BreakpointsSchema.optional().describe('Responsive breakpoints. [EXPERIMENTAL — not enforced] generateThemeVars does not emit breakpoint tokens yet (liveness audit #1878/#1893).'),\n \n /** Animation */\n animation: AnimationSchema.optional().describe('Animation settings'),\n \n /** Z-Index */\n zIndex: ZIndexSchema.optional().describe('Z-index scale for layering'),\n \n /** Custom CSS variables */\n customVars: z.record(z.string(), z.string()).optional().describe('Custom CSS variables (key-value pairs)'),\n \n /** Logo */\n logo: z.object({\n light: z.string().optional().describe('Logo URL for light mode'),\n dark: z.string().optional().describe('Logo URL for dark mode'),\n favicon: z.string().optional().describe('Favicon URL'),\n }).optional().describe('Logo assets'),\n \n /** Extends another theme */\n extends: z.string().optional().describe('Base theme to extend from'),\n\n /** Display density mode */\n density: DensityModeSchema.optional().describe('Display density: compact, regular, or spacious. [EXPERIMENTAL — not enforced] The theme engine does not consume theme-level density yet; view-level densityMode is a separate live setting (liveness audit #1878/#1893).'),\n\n /** WCAG contrast level requirement */\n wcagContrast: WcagContrastLevelSchema.optional().describe('WCAG color contrast level (AA or AAA)'),\n\n /** Right-to-left language support */\n rtl: z.boolean().optional().describe('Enable right-to-left layout direction. [EXPERIMENTAL — not enforced] No renderer reads theme.rtl yet (liveness audit #1878/#1893).'),\n\n /** Touch target accessibility configuration */\n touchTarget: TouchTargetConfigSchema.optional().describe('Touch target sizing defaults. [EXPERIMENTAL — not enforced] No renderer consumes touchTarget yet (liveness audit #1878/#1893).'),\n\n /** Keyboard navigation and focus management */\n keyboardNavigation: FocusManagementSchema.optional().describe('Keyboard focus management settings'),\n}));\n\nexport type Theme = z.infer<typeof ThemeSchema>;\n/** Authoring input for {@link Theme} — defaulted fields are optional. */\nexport type ThemeInput = z.input<typeof ThemeSchema>;\n\n/**\n * Type-safe factory for a UI theme. Validates at authoring time via\n * `.parse()` and accepts input-shape config (optional defaults, CEL\n * shorthand) — preferred over a bare `: Theme` literal.\n */\nexport function defineTheme(config: z.input<typeof ThemeSchema>): Theme {\n return ThemeSchema.parse(config);\n}\nexport type ColorPalette = z.infer<typeof ColorPaletteSchema>;\nexport type Typography = z.infer<typeof TypographySchema>;\nexport type Spacing = z.infer<typeof SpacingSchema>;\nexport type BorderRadius = z.infer<typeof BorderRadiusSchema>;\nexport type Shadow = z.infer<typeof ShadowSchema>;\nexport type Breakpoints = z.infer<typeof BreakpointsSchema>;\nexport type Animation = z.infer<typeof AnimationSchema>;\nexport type ZIndex = z.infer<typeof ZIndexSchema>;\nexport type ThemeMode = z.infer<typeof ThemeModeSchema>;\nexport type DensityMode = z.infer<typeof DensityModeSchema>;\nexport type WcagContrastLevel = z.infer<typeof WcagContrastLevelSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { I18nLabelSchema } from './i18n.zod';\n\n/**\n * Offline Strategy Schema\n * Determines how data is fetched when connectivity is limited.\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const OfflineStrategySchema = lazySchema(() => z.enum([\n 'cache_first',\n 'network_first',\n 'stale_while_revalidate',\n 'network_only',\n 'cache_only',\n]).describe('Data fetching strategy for offline/online transitions'));\n\nexport type OfflineStrategy = z.infer<typeof OfflineStrategySchema>;\n\n/**\n * Conflict Resolution Strategy Enum\n */\nexport const ConflictResolutionSchema = lazySchema(() => z.enum([\n 'client_wins',\n 'server_wins',\n 'manual',\n 'last_write_wins',\n]).describe('How to resolve conflicts when syncing offline changes'));\n\nexport type ConflictResolution = z.infer<typeof ConflictResolutionSchema>;\n\n/**\n * Sync Configuration Schema\n * Controls how offline mutations are synchronized with the server.\n */\nexport const SyncConfigSchema = lazySchema(() => z.object({\n strategy: OfflineStrategySchema.default('network_first').describe('Sync fetch strategy'),\n conflictResolution: ConflictResolutionSchema.default('last_write_wins').describe('Conflict resolution policy'),\n retryInterval: z.number().optional().describe('Retry interval in milliseconds between sync attempts'),\n maxRetries: z.number().optional().describe('Maximum number of sync retry attempts'),\n batchSize: z.number().optional().describe('Number of mutations to sync per batch'),\n}).describe('Offline-to-online synchronization configuration'));\n\nexport type SyncConfig = z.infer<typeof SyncConfigSchema>;\n\n/**\n * Persist Storage Backend Enum\n */\nexport const PersistStorageSchema = lazySchema(() => z.enum([\n 'indexeddb',\n 'localstorage',\n 'sqlite',\n]).describe('Client-side storage backend for offline cache'));\n\nexport type PersistStorage = z.infer<typeof PersistStorageSchema>;\n\n/**\n * Eviction Policy Enum\n */\nexport const EvictionPolicySchema = lazySchema(() => z.enum([\n 'lru',\n 'lfu',\n 'fifo',\n]).describe('Cache eviction policy'));\n\nexport type EvictionPolicy = z.infer<typeof EvictionPolicySchema>;\n\n/**\n * Offline Cache Configuration Schema\n * Controls how data is persisted on the client for offline access.\n */\nexport const OfflineCacheConfigSchema = lazySchema(() => z.object({\n maxSize: z.number().optional().describe('Maximum cache size in bytes'),\n ttl: z.number().optional().describe('Time-to-live for cached entries in milliseconds'),\n persistStorage: PersistStorageSchema.default('indexeddb').describe('Storage backend'),\n evictionPolicy: EvictionPolicySchema.default('lru').describe('Cache eviction policy when full'),\n}).describe('Client-side offline cache configuration'));\n\nexport type OfflineCacheConfig = z.infer<typeof OfflineCacheConfigSchema>;\n\n/**\n * Offline Configuration Schema\n * Top-level offline support configuration for an application or component.\n */\nexport const OfflineConfigSchema = lazySchema(() => z.object({\n enabled: z.boolean().default(false).describe('Enable offline support'),\n strategy: OfflineStrategySchema.default('network_first').describe('Default offline fetch strategy'),\n cache: OfflineCacheConfigSchema.optional().describe('Cache settings for offline data'),\n sync: SyncConfigSchema.optional().describe('Sync settings for offline mutations'),\n offlineIndicator: z.boolean().default(true).describe('Show a visual indicator when offline'),\n offlineMessage: I18nLabelSchema.optional().describe('Customizable offline status message shown to users'),\n queueMaxSize: z.number().optional().describe('Maximum number of queued offline mutations'),\n}).describe('Offline support configuration'));\n\nexport type OfflineConfig = z.infer<typeof OfflineConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\n\n/**\n * Transition Preset Schema\n * Common animation transition presets.\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const TransitionPresetSchema = lazySchema(() => z.enum([\n 'fade',\n 'slide_up',\n 'slide_down',\n 'slide_left',\n 'slide_right',\n 'scale',\n 'rotate',\n 'flip',\n 'none',\n]).describe('Transition preset type'));\n\nexport type TransitionPreset = z.infer<typeof TransitionPresetSchema>;\n\n/**\n * Easing Function Schema\n * Supported animation easing/timing functions.\n */\nexport const EasingFunctionSchema = lazySchema(() => z.enum([\n 'linear',\n 'ease',\n 'ease_in',\n 'ease_out',\n 'ease_in_out',\n 'spring',\n]).describe('Animation easing function'));\n\nexport type EasingFunction = z.infer<typeof EasingFunctionSchema>;\n\n/**\n * Transition Configuration Schema\n * Defines a single animation transition with timing and easing options.\n */\nexport const TransitionConfigSchema = lazySchema(() => z.object({\n preset: TransitionPresetSchema.optional().describe('Transition preset to apply'),\n duration: z.number().optional().describe('Transition duration in milliseconds'),\n easing: EasingFunctionSchema.optional().describe('Easing function for the transition'),\n delay: z.number().optional().describe('Delay before transition starts in milliseconds'),\n customKeyframes: z.string().optional().describe('CSS @keyframes name for custom animations'),\n themeToken: z.string().optional().describe('Reference to a theme animation token (e.g. \"animation.duration.fast\")'),\n}).describe('Animation transition configuration'));\n\nexport type TransitionConfig = z.infer<typeof TransitionConfigSchema>;\n\n/**\n * Animation Trigger Schema\n * Events that can trigger an animation.\n */\nexport const AnimationTriggerSchema = lazySchema(() => z.enum([\n 'on_mount',\n 'on_unmount',\n 'on_hover',\n 'on_focus',\n 'on_click',\n 'on_scroll',\n 'on_visible',\n]).describe('Event that triggers the animation'));\n\nexport type AnimationTrigger = z.infer<typeof AnimationTriggerSchema>;\n\n/**\n * Component Animation Schema\n * Animation configuration for an individual UI component.\n */\nexport const ComponentAnimationSchema = lazySchema(() => z.object({\n label: I18nLabelSchema.optional().describe('Descriptive label for this animation configuration'),\n enter: TransitionConfigSchema.optional().describe('Enter/mount animation'),\n exit: TransitionConfigSchema.optional().describe('Exit/unmount animation'),\n hover: TransitionConfigSchema.optional().describe('Hover state animation'),\n trigger: AnimationTriggerSchema.optional().describe('When to trigger the animation'),\n reducedMotion: z.enum(['respect', 'disable', 'alternative']).default('respect')\n .describe('Accessibility: how to handle prefers-reduced-motion'),\n}).merge(AriaPropsSchema.partial()).describe('Component-level animation configuration'));\n\nexport type ComponentAnimation = z.infer<typeof ComponentAnimationSchema>;\n\n/**\n * Page Transition Schema\n * Defines the animation used when navigating between pages.\n */\nexport const PageTransitionSchema = lazySchema(() => z.object({\n type: TransitionPresetSchema.default('fade').describe('Page transition type'),\n duration: z.number().default(300).describe('Transition duration in milliseconds'),\n easing: EasingFunctionSchema.default('ease_in_out').describe('Easing function for the transition'),\n crossFade: z.boolean().default(false).describe('Whether to cross-fade between pages'),\n}).describe('Page-level transition configuration'));\n\nexport type PageTransition = z.infer<typeof PageTransitionSchema>;\n\n/**\n * Motion Configuration Schema\n * Top-level animation and motion design configuration.\n */\nexport const MotionConfigSchema = lazySchema(() => z.object({\n label: I18nLabelSchema.optional().describe('Descriptive label for the motion configuration'),\n defaultTransition: TransitionConfigSchema.optional().describe('Default transition applied to all animations'),\n pageTransitions: PageTransitionSchema.optional().describe('Page navigation transition settings'),\n componentAnimations: z.record(z.string(), ComponentAnimationSchema).optional()\n .describe('Component name to animation configuration mapping'),\n reducedMotion: z.boolean().default(false).describe('When true, respect prefers-reduced-motion and suppress animations globally'),\n enabled: z.boolean().default(true).describe('Enable or disable all animations globally'),\n}).describe('Top-level motion and animation design configuration'));\n\nexport type MotionConfig = z.infer<typeof MotionConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\n\n/**\n * Notification Type Schema\n * Defines the visual presentation style of the notification.\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const NotificationTypeSchema = lazySchema(() => z.enum([\n 'toast',\n 'snackbar',\n 'banner',\n 'alert',\n 'inline',\n]).describe('Notification presentation style'));\n\nexport type NotificationType = z.infer<typeof NotificationTypeSchema>;\n\n/**\n * Notification Severity Schema\n * Indicates the urgency and visual treatment of the notification.\n */\nexport const NotificationSeveritySchema = lazySchema(() => z.enum([\n 'info',\n 'success',\n 'warning',\n 'error',\n]).describe('Notification severity level'));\n\nexport type NotificationSeverity = z.infer<typeof NotificationSeveritySchema>;\n\n/**\n * Notification Position Schema\n * Screen position for rendering notifications.\n */\nexport const NotificationPositionSchema = lazySchema(() => z.enum([\n 'top_left',\n 'top_center',\n 'top_right',\n 'bottom_left',\n 'bottom_center',\n 'bottom_right',\n]).describe('Screen position for notification placement'));\n\nexport type NotificationPosition = z.infer<typeof NotificationPositionSchema>;\n\n/**\n * Notification Action Schema\n * Defines an interactive action button within a notification.\n */\nexport const NotificationActionSchema = lazySchema(() => z.object({\n label: I18nLabelSchema.describe('Action button label'),\n action: z.string().describe('Action identifier to execute'),\n variant: z.enum(['primary', 'secondary', 'link']).default('primary')\n .describe('Button variant style'),\n}).describe('Notification action button'));\n\nexport type NotificationAction = z.infer<typeof NotificationActionSchema>;\n\n/**\n * Notification Schema\n * Defines a single notification instance with content, behavior, and positioning.\n */\nexport const NotificationSchema = lazySchema(() => z.object({\n type: NotificationTypeSchema.default('toast').describe('Notification presentation style'),\n severity: NotificationSeveritySchema.default('info').describe('Notification severity level'),\n title: I18nLabelSchema.optional().describe('Notification title'),\n message: I18nLabelSchema.describe('Notification message body'),\n icon: z.string().optional().describe('Icon name override'),\n duration: z.number().optional().describe('Auto-dismiss duration in ms, omit for persistent'),\n dismissible: z.boolean().default(true).describe('Allow user to dismiss the notification'),\n actions: z.array(NotificationActionSchema).optional().describe('Action buttons'),\n position: NotificationPositionSchema.optional().describe('Override default position'),\n}).merge(AriaPropsSchema.partial()).describe('Notification instance definition'));\n\nexport type Notification = z.infer<typeof NotificationSchema>;\n\n/**\n * Notification Config Schema\n * Top-level notification system configuration.\n */\nexport const NotificationConfigSchema = lazySchema(() => z.object({\n defaultPosition: NotificationPositionSchema.default('top_right')\n .describe('Default screen position for notifications'),\n defaultDuration: z.number().default(5000)\n .describe('Default auto-dismiss duration in ms'),\n maxVisible: z.number().default(5)\n .describe('Maximum number of notifications visible at once'),\n stackDirection: z.enum(['up', 'down']).default('down')\n .describe('Stack direction for multiple notifications'),\n pauseOnHover: z.boolean().default(true)\n .describe('Pause auto-dismiss timer on hover'),\n}).describe('Global notification system configuration'));\n\nexport type NotificationConfig = z.infer<typeof NotificationConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport { z } from 'zod';\nimport { I18nLabelSchema, AriaPropsSchema } from './i18n.zod';\n\n/**\n * Drag Handle Schema\n * Defines how a drag interaction is initiated on an element.\n */\nimport { lazySchema } from '../shared/lazy-schema';\nexport const DragHandleSchema = lazySchema(() => z.enum([\n 'element',\n 'handle',\n 'grip_icon',\n]).describe('Drag initiation method'));\n\nexport type DragHandle = z.infer<typeof DragHandleSchema>;\n\n/**\n * Drop Effect Schema\n * Visual feedback indicating the result of a drop operation.\n */\nexport const DropEffectSchema = lazySchema(() => z.enum([\n 'move',\n 'copy',\n 'link',\n 'none',\n]).describe('Drop operation effect'));\n\nexport type DropEffect = z.infer<typeof DropEffectSchema>;\n\n/**\n * Drag Constraint Schema\n * Constrains drag movement along axes, within bounds, or to a grid.\n */\nexport const DragConstraintSchema = lazySchema(() => z.object({\n axis: z.enum(['x', 'y', 'both']).default('both').describe('Constrain drag axis'),\n bounds: z.enum(['parent', 'viewport', 'none']).default('none').describe('Constrain within bounds'),\n grid: z.tuple([z.number(), z.number()]).optional().describe('Snap to grid [x, y] in pixels'),\n}).describe('Drag movement constraints'));\n\nexport type DragConstraint = z.infer<typeof DragConstraintSchema>;\n\n/**\n * Drop Zone Schema\n * Configures a container that accepts dragged items.\n */\nexport const DropZoneSchema = lazySchema(() => z.object({\n label: I18nLabelSchema.optional().describe('Accessible label for the drop zone'),\n accept: z.array(z.string()).describe('Accepted drag item types'),\n maxItems: z.number().optional().describe('Maximum items allowed in drop zone'),\n highlightOnDragOver: z.boolean().default(true).describe('Highlight drop zone when dragging over'),\n dropEffect: DropEffectSchema.default('move').describe('Visual effect on drop'),\n}).merge(AriaPropsSchema.partial()).describe('Drop zone configuration'));\n\nexport type DropZone = z.infer<typeof DropZoneSchema>;\n\n/**\n * Drag Item Schema\n * Configures a draggable element including handle, constraints, and preview.\n */\nexport const DragItemSchema = lazySchema(() => z.object({\n type: z.string().describe('Drag item type identifier for matching with drop zones'),\n label: I18nLabelSchema.optional().describe('Accessible label describing the draggable item'),\n handle: DragHandleSchema.default('element').describe('How to initiate drag'),\n constraint: DragConstraintSchema.optional().describe('Drag movement constraints'),\n preview: z.enum(['element', 'custom', 'none']).default('element').describe('Drag preview type'),\n disabled: z.boolean().default(false).describe('Disable dragging'),\n}).merge(AriaPropsSchema.partial()).describe('Draggable item configuration'));\n\nexport type DragItem = z.infer<typeof DragItemSchema>;\n\n/**\n * Drag and Drop Configuration Schema\n * Top-level drag-and-drop interaction configuration for a component.\n */\nexport const DndConfigSchema = lazySchema(() => z.object({\n enabled: z.boolean().default(false).describe('Enable drag and drop'),\n dragItem: DragItemSchema.optional().describe('Configuration for draggable item'),\n dropZone: DropZoneSchema.optional().describe('Configuration for drop target'),\n sortable: z.boolean().default(false).describe('Enable sortable list behavior'),\n autoScroll: z.boolean().default(true).describe('Auto-scroll during drag near edges'),\n touchDelay: z.number().default(200).describe('Delay in ms before drag starts on touch devices'),\n}).describe('Drag and drop interaction configuration'));\n\nexport type DndConfig = z.infer<typeof DndConfigSchema>;\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\n/**\n * @module ui/portal\n *\n * Portal Protocol — Metadata-driven external-user UI projection.\n *\n * A Portal is **not** a new application or permission model. It is a\n * declarative projection of the existing app / view / action surface,\n * scoped to a route prefix, a set of admitted positions, and an optional\n * anonymous entry surface.\n *\n * Five invariants this schema preserves:\n * 1. Zero business code — layout is an enum + plugin id; theme is tokens;\n * navigation is references to existing metadata.\n * 2. Data plane is untouched — portal cannot declare objects, fields,\n * flows, or permissions. Data API (`/api/v1/data/...`) is unaware of\n * portals.\n * 3. Portal ≠ permission boundary. The permission model is (permission\n * sets distributed via positions, ADR-0090). Portals only narrow the\n * UI projection; hiding a view in `navigation` is UX, not security.\n * 4. Stackable — the same user/position can be admitted by multiple\n * portals. Routing or a picker decides which one is rendered.\n * 5. Template-first — a template author ships `customer.portal.ts` and\n * the platform guarantees the rendering shell.\n *\n * Architectural reach (consumer guidance, not part of the schema):\n * - Dispatcher / HonoServer: at boot, enumerate portals and register\n * `/<routePrefix>/*` route families with a per-portal auth scope.\n * - Auth middleware: admit the request if one of the caller's positions\n * ∈ `portal.positions`, or it matches `anonymousEntry.routes[*]`.\n * - objectui LayoutDispatcher: select shell from `layout`.\n * - objectui NavigationBuilder: render `navigation` (not the all-apps\n * grid).\n * - objectui ThemeProvider: inject `theme` as CSS variables.\n *\n * See framework issue\n * https://github.com/objectstack-ai/objectstack/issues/1294\n * for the design rationale.\n */\n\nimport { z } from 'zod';\nimport { lazySchema } from '../shared/lazy-schema';\nimport { SnakeCaseIdentifierSchema } from '../shared/identifiers.zod';\nimport { I18nLabelSchema } from './i18n.zod';\n\n// ---------------------------------------------------------------------------\n// Theme tokens (portal-local; intentionally narrower than AppBranding to keep\n// portal metadata declarative and platform-renderable without custom CSS)\n// ---------------------------------------------------------------------------\n\nexport const PortalThemeSchema = lazySchema(() => z.object({\n primaryColor: z.string().optional()\n .describe('Primary brand color (hex, rgb, hsl). Mapped to --portal-primary.'),\n accentColor: z.string().optional()\n .describe('Accent color used for highlights and CTAs.'),\n backgroundColor: z.string().optional()\n .describe('Page background color.'),\n surfaceColor: z.string().optional()\n .describe('Card / surface background color.'),\n textColor: z.string().optional()\n .describe('Primary text color.'),\n logoUrl: z.string().optional()\n .describe('Absolute or relative URL to the portal header logo (SVG or PNG).'),\n faviconUrl: z.string().optional()\n .describe('Absolute or relative URL to the portal favicon.'),\n fontFamily: z.string().optional()\n .describe('CSS font-family stack for the portal.'),\n customCss: z.string().optional()\n .describe('OPTIONAL escape hatch: raw CSS appended last. Discouraged; prefer tokens.'),\n}));\n\n// ---------------------------------------------------------------------------\n// Navigation — references to existing metadata. Discriminated union mirrors\n// app.zod.ts shape but is intentionally a much smaller surface: portals\n// expose a flat list of entry points, not a deep group tree.\n// ---------------------------------------------------------------------------\n\nconst BasePortalNavItemSchema = z.object({\n id: SnakeCaseIdentifierSchema\n .describe('Unique identifier for this portal nav item (lowercase snake_case).'),\n label: I18nLabelSchema.describe('Display label.'),\n icon: z.string().optional().describe('Icon name (Lucide).'),\n order: z.number().optional().describe('Sort order; lower appears first.'),\n badge: z.union([z.string(), z.number()]).optional()\n .describe('Optional badge (e.g. unread count).'),\n});\n\nexport const PortalViewNavItemSchema = BasePortalNavItemSchema.extend({\n type: z.literal('view'),\n /** Fully-qualified view reference: `<object_name>.<view_id>` */\n viewRef: z.string().describe('Reference to an existing view, e.g. \"helpdesk_ticket.list.my_tickets\".'),\n});\n\nexport const PortalActionNavItemSchema = BasePortalNavItemSchema.extend({\n type: z.literal('action'),\n /** Fully-qualified action reference: `<object_name>.<action_id>` */\n actionRef: z.string().describe('Reference to an existing action, e.g. \"helpdesk_ticket.create\".'),\n});\n\nexport const PortalDashboardNavItemSchema = BasePortalNavItemSchema.extend({\n type: z.literal('dashboard'),\n dashboardName: SnakeCaseIdentifierSchema.describe('Existing dashboard id.'),\n});\n\nexport const PortalUrlNavItemSchema = BasePortalNavItemSchema.extend({\n type: z.literal('url'),\n url: z.string().describe('Absolute or root-relative URL.'),\n target: z.enum(['_self', '_blank']).optional().default('_self'),\n});\n\nexport const PortalNavItemSchema = z.discriminatedUnion('type', [\n PortalViewNavItemSchema,\n PortalActionNavItemSchema,\n PortalDashboardNavItemSchema,\n PortalUrlNavItemSchema,\n]);\n\n// ---------------------------------------------------------------------------\n// Anonymous entry — declarative, with mandatory rate-limit + captcha hooks\n// for any unauthenticated mutation. Read-only views (e.g. public KB) only\n// need a rate-limit budget.\n// ---------------------------------------------------------------------------\n\nexport const PortalRateLimitSchema = lazySchema(() => z.object({\n /** Token-bucket rule string, e.g. \"5/hour/ip\" or \"100/day/tenant\". */\n rule: z.string().describe('Rate-limit rule string, e.g. \"5/hour/ip\", \"100/day/tenant\".'),\n /** Scope key controlled by the runtime. */\n scope: z.enum(['ip', 'tenant', 'route']).default('ip')\n .describe('Counter scope. \"ip\" buckets per requester; \"tenant\" per portal owner; \"route\" global per route.'),\n}));\n\nexport const PortalAnonymousRouteSchema = lazySchema(() => z.object({\n /** Portal-relative path, must begin with `/`. */\n path: z.string().describe('Path within the portal, e.g. \"/submit\" or \"/kb\".'),\n /** Exactly one of these must be set. */\n viewRef: z.string().optional()\n .describe('Reference to a public view (read-only).'),\n actionRef: z.string().optional()\n .describe('Reference to an action to perform anonymously (mutation).'),\n rateLimit: PortalRateLimitSchema.optional()\n .describe('Rate-limit for anonymous traffic on this route.'),\n captcha: z.boolean().optional().default(false)\n .describe('Require CAPTCHA / proof-of-work challenge before invoking.'),\n /**\n * For action routes that need a deferred identity bind (e.g. anonymous\n * ticket submission → magic-link verification of the supplied email).\n * The runtime captures the input field, sends a magic link, and on\n * verification re-attributes the created record to the new user.\n */\n bindIdentityFromField: z.string().optional()\n .describe('Field name on the action input to use for magic-link identity binding (e.g. \"customer_email\").'),\n}));\n\nexport const PortalAnonymousEntrySchema = lazySchema(() => z.object({\n routes: z.array(PortalAnonymousRouteSchema)\n .describe('List of anonymous-accessible routes.'),\n /** Default rate-limit applied when a route does not specify one. */\n defaultRateLimit: PortalRateLimitSchema.optional(),\n}));\n\n// ---------------------------------------------------------------------------\n// SEO + locale + auth modes\n// ---------------------------------------------------------------------------\n\nexport const PortalSeoSchema = lazySchema(() => z.object({\n title: z.string().optional().describe('Default <title>.'),\n description: z.string().optional().describe('Default <meta name=\"description\">.'),\n openGraphImage: z.string().optional().describe('Default og:image URL.'),\n robots: z.enum(['index', 'noindex']).optional().default('index'),\n}));\n\nexport const PortalAuthModeSchema = lazySchema(() => z.union([\n z.literal('authenticated'),\n z.literal('magic-link'),\n z.literal('anonymous'),\n // SSO provider, e.g. \"sso:google\", \"sso:azure-ad\", \"sso:saml:<idp-id>\".\n z.string().regex(/^sso:[a-z][a-z0-9_-]*(?::[a-z0-9_-]+)?$/i,\n 'SSO mode must be \"sso:<provider>\" or \"sso:<protocol>:<idp-id>\"'),\n]));\n\nexport const PortalLayoutSchema = lazySchema(() => z.union([\n z.literal('console'),\n z.literal('minimal'),\n z.literal('embedded'),\n // Plugin shell: \"custom:<plugin-id>\" or \"custom:<plugin-id>/<layout-id>\".\n z.string().regex(/^custom:[a-z][a-z0-9_-]*(?:\\/[a-z0-9_-]+)?$/i,\n 'Custom layout must be \"custom:<plugin-id>\" or \"custom:<plugin-id>/<layout-id>\"'),\n]));\n\n// ---------------------------------------------------------------------------\n// Portal — top-level metadata kind\n// ---------------------------------------------------------------------------\n\nexport const PortalSchema = lazySchema(() => z.object({\n /** Discriminator for the metadata registry. */\n kind: z.literal('portal').describe('Metadata kind discriminator.'),\n\n /** Machine name (id). Unique per tenant. */\n id: SnakeCaseIdentifierSchema\n .describe('Portal unique machine name (lowercase snake_case).'),\n\n /** Display label, i18n. */\n label: I18nLabelSchema.describe('Portal display label.'),\n\n /** Optional description (i18n). */\n description: I18nLabelSchema.optional(),\n\n // ---------------- Routing ----------------\n\n /**\n * Root path the portal is mounted at. MUST be absolute and start with `/`.\n * Multiple portals cannot share the same `routePrefix` within a tenant.\n * Example: \"/portal/helpdesk\".\n */\n routePrefix: z.string()\n .regex(/^\\/[a-z0-9/_-]*$/i, 'routePrefix must start with \"/\" and be url-safe')\n .describe('Root URL path for the portal (must start with \"/\").'),\n\n /**\n * Optional vanity domain. When set, the platform serves the portal on\n * this hostname in addition to (or instead of) `routePrefix` on the\n * default domain. Subject to TLS provisioning and DNS verification.\n */\n domain: z.string().optional()\n .describe('Optional vanity domain (e.g. \"support.acme.com\").'),\n\n // ---------------- Shell ----------------\n\n layout: PortalLayoutSchema.default('minimal')\n .describe('Shell layout for the portal.'),\n\n theme: PortalThemeSchema.optional().describe('Theme tokens.'),\n\n /**\n * Locale resolution. \"auto\" → use Accept-Language; otherwise force a\n * specific locale (e.g. \"en\", \"zh-CN\").\n */\n locale: z.union([z.literal('auto'), z.string()]).optional().default('auto')\n .describe('Locale resolution strategy.'),\n\n /** SEO metadata defaults for unauthenticated pages. */\n seo: PortalSeoSchema.optional(),\n\n // ---------------- Auth ----------------\n\n authMode: PortalAuthModeSchema.default('authenticated')\n .describe('Authentication mode for the portal.'),\n\n /**\n * Positions admitted to the portal (ADR-0090 — formerly `profiles`; the\n * Profile concept was removed by D2). A user is allowed in iff they hold\n * at least one of the listed positions. Use the built-in `guest` position\n * for anonymous-only portals (D9). **This is a UI gate, not the source of\n * truth — the data layer still enforces permission sets + sharing on\n * every API call.**\n */\n positions: z.array(SnakeCaseIdentifierSchema)\n .min(1, \"A portal must admit at least one position (use the built-in 'guest' position for anonymous-only portals).\")\n .describe('Positions admitted to the portal.'),\n\n /**\n * Tombstone for the removed `profiles` key (ADR-0090 D2): reject loudly\n * with the FROM → TO prescription instead of silently stripping — a\n * silently-dropped admission gate is exactly the class of authoring error\n * the vocabulary freeze exists to prevent.\n */\n profiles: z\n .unknown()\n .optional()\n .superRefine((v, ctx) => {\n if (v !== undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n \"'profiles' was removed (ADR-0090 D2 — the Profile concept no longer exists). \" +\n \"Declare `positions` instead: the flat distribution groups admitted to this portal \" +\n \"(use the built-in 'guest' position for anonymous-only portals).\",\n });\n }\n }),\n\n /**\n * Anonymous entry surface — declarative routes that can be hit without\n * a session. The runtime impersonates a tenant-local `system.anonymous`\n * principal, applies the route's rate-limit + captcha, then runs the\n * referenced view/action.\n */\n anonymousEntry: PortalAnonymousEntrySchema.optional(),\n\n // ---------------- Navigation ----------------\n\n navigation: z.array(PortalNavItemSchema)\n .describe('Flat list of portal entry points (references to existing metadata).'),\n\n /**\n * Optional default route. If omitted, the runtime picks the first\n * `navigation` entry.\n */\n defaultRoute: z.object({\n viewRef: z.string().optional(),\n actionRef: z.string().optional(),\n dashboardName: SnakeCaseIdentifierSchema.optional(),\n }).optional().describe('Landing surface when the user hits the portal root.'),\n\n // ---------------- Embedding ----------------\n\n /**\n * Whether the portal may be rendered inside an `<iframe>`. Controls\n * `X-Frame-Options` / `frame-ancestors` CSP headers.\n */\n embeddable: z.boolean().optional().default(false),\n\n /**\n * Allowed embed origins (CSP `frame-ancestors`). Ignored when\n * `embeddable: false`.\n */\n allowedEmbedOrigins: z.array(z.string()).optional(),\n\n /** Whether the portal is active. */\n active: z.boolean().optional().default(true),\n}).describe('Portal projection. [EXPERIMENTAL — not enforced] PortalSchema is not registered as an authorable metadata type; no dispatcher route family, auth scope, LayoutDispatcher, NavigationBuilder or ThemeProvider consumes it yet. The entire schema is a forward-looking design (framework #1294); authoring a portal today is a no-op (liveness audit #1878/#1893).'));\n\n// ---------------------------------------------------------------------------\n// Factory + types\n// ---------------------------------------------------------------------------\n\nexport const Portal = {\n create: (config: z.input<typeof PortalSchema>): Portal => PortalSchema.parse(config),\n} as const;\n\nexport function definePortal(config: z.input<typeof PortalSchema>): Portal {\n return PortalSchema.parse(config);\n}\n\nexport type Portal = z.infer<typeof PortalSchema>;\nexport type PortalInput = z.input<typeof PortalSchema>;\nexport type PortalTheme = z.infer<typeof PortalThemeSchema>;\nexport type PortalNavItem = z.infer<typeof PortalNavItemSchema>;\nexport type PortalViewNavItem = z.infer<typeof PortalViewNavItemSchema>;\nexport type PortalActionNavItem = z.infer<typeof PortalActionNavItemSchema>;\nexport type PortalDashboardNavItem = z.infer<typeof PortalDashboardNavItemSchema>;\nexport type PortalUrlNavItem = z.infer<typeof PortalUrlNavItemSchema>;\nexport type PortalAnonymousEntry = z.infer<typeof PortalAnonymousEntrySchema>;\nexport type PortalAnonymousRoute = z.infer<typeof PortalAnonymousRouteSchema>;\nexport type PortalRateLimit = z.infer<typeof PortalRateLimitSchema>;\nexport type PortalSeo = z.infer<typeof PortalSeoSchema>;\nexport type PortalAuthMode = z.infer<typeof PortalAuthModeSchema>;\nexport type PortalLayout = z.infer<typeof PortalLayoutSchema>;\n"]}
|