@contractspec/bundle.library 3.4.3 → 3.5.2
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/.turbo/turbo-build.log +494 -488
- package/CHANGELOG.md +91 -0
- package/dist/application/index.js +8 -8
- package/dist/application/mcp/cliMcp.js +8 -8
- package/dist/application/mcp/contractsMcp.js +8 -8
- package/dist/application/mcp/docsMcp.js +8 -8
- package/dist/application/mcp/index.js +8 -8
- package/dist/application/mcp/internalMcp.js +8 -8
- package/dist/application/mcp/providerRankingMcp.js +8 -8
- package/dist/bundles/LibraryBundle.d.ts +126 -0
- package/dist/bundles/LibraryBundle.js +139 -0
- package/dist/bundles/index.d.ts +1 -0
- package/dist/bundles/index.js +139 -0
- package/dist/components/docs/DocsIndexPage.js +91 -91
- package/dist/components/docs/advanced/AdvancedMCPPage.js +125 -125
- package/dist/components/docs/advanced/AdvancedOverlayEditorPage.js +49 -49
- package/dist/components/docs/advanced/AdvancedRenderersPage.js +51 -51
- package/dist/components/docs/advanced/AdvancedSpecExperimentsPage.js +35 -35
- package/dist/components/docs/advanced/AdvancedTelemetryPage.js +177 -177
- package/dist/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +45 -45
- package/dist/components/docs/advanced/index.js +482 -482
- package/dist/components/docs/architecture/ArchitectureAppConfigPage.js +107 -107
- package/dist/components/docs/architecture/ArchitectureControlPlanePage.js +73 -73
- package/dist/components/docs/architecture/ArchitectureIntegrationBindingPage.js +117 -117
- package/dist/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +175 -175
- package/dist/components/docs/architecture/ArchitectureMultiTenancyPage.js +71 -71
- package/dist/components/docs/architecture/ArchitectureOverviewPage.js +205 -205
- package/dist/components/docs/architecture/index.js +748 -748
- package/dist/components/docs/comparison/ComparisonAutomationPlatformsPage.js +117 -117
- package/dist/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +111 -111
- package/dist/components/docs/comparison/ComparisonInternalToolBuildersPage.js +117 -117
- package/dist/components/docs/comparison/ComparisonOverviewPage.js +97 -97
- package/dist/components/docs/comparison/ComparisonWindmillPage.js +125 -125
- package/dist/components/docs/comparison/ComparisonWorkflowEnginesPage.js +171 -171
- package/dist/components/docs/comparison/index.js +738 -738
- package/dist/components/docs/ecosystem/IntegrationsPage.js +45 -45
- package/dist/components/docs/ecosystem/PluginsPage.js +73 -73
- package/dist/components/docs/ecosystem/RegistryPage.js +37 -37
- package/dist/components/docs/ecosystem/TemplatesPage.js +56 -56
- package/dist/components/docs/ecosystem/index.js +211 -211
- package/dist/components/docs/examples/DocsExamplesPage.js +21 -21
- package/dist/components/docs/examples/index.js +21 -21
- package/dist/components/docs/generated/docs-index.generated.d.ts +6 -6
- package/dist/components/docs/getting-started/CLIPage.js +95 -95
- package/dist/components/docs/getting-started/CompatibilityPage.js +81 -81
- package/dist/components/docs/getting-started/DataViewTutorialPage.js +57 -57
- package/dist/components/docs/getting-started/DeveloperToolsPage.js +61 -61
- package/dist/components/docs/getting-started/HelloWorldPage.js +77 -77
- package/dist/components/docs/getting-started/InstallationPage.js +65 -65
- package/dist/components/docs/getting-started/StartHerePage.js +51 -51
- package/dist/components/docs/getting-started/TroubleshootingPage.js +73 -73
- package/dist/components/docs/getting-started/VSCodeExtensionPage.js +171 -171
- package/dist/components/docs/getting-started/index.js +731 -731
- package/dist/components/docs/guides/GuideCIDiffGatingPage.js +80 -80
- package/dist/components/docs/guides/GuideContractTypesPage.js +232 -232
- package/dist/components/docs/guides/GuideDocsPipelinePage.js +82 -82
- package/dist/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +84 -84
- package/dist/components/docs/guides/GuideImportExistingCodebasesPage.js +324 -324
- package/dist/components/docs/guides/GuideNextjsOneEndpointPage.js +107 -107
- package/dist/components/docs/guides/GuideSpecValidationTypingPage.js +78 -78
- package/dist/components/docs/guides/GuidesIndexPage.js +43 -43
- package/dist/components/docs/guides/index.js +976 -976
- package/dist/components/docs/index.js +10792 -10792
- package/dist/components/docs/integrations/IntegrationsCircuitBreakersPage.js +17 -17
- package/dist/components/docs/integrations/IntegrationsElevenLabsPage.js +47 -47
- package/dist/components/docs/integrations/IntegrationsGithubPage.js +61 -61
- package/dist/components/docs/integrations/IntegrationsGmailPage.js +49 -49
- package/dist/components/docs/integrations/IntegrationsGoogleCalendarPage.js +33 -33
- package/dist/components/docs/integrations/IntegrationsHealthRoutingPage.js +65 -65
- package/dist/components/docs/integrations/IntegrationsMistralPage.js +69 -69
- package/dist/components/docs/integrations/IntegrationsOpenAIPage.js +65 -65
- package/dist/components/docs/integrations/IntegrationsOverviewPage.js +313 -313
- package/dist/components/docs/integrations/IntegrationsPostmarkPage.js +101 -101
- package/dist/components/docs/integrations/IntegrationsPowensPage.js +121 -121
- package/dist/components/docs/integrations/IntegrationsQdrantPage.js +49 -49
- package/dist/components/docs/integrations/IntegrationsResendPage.js +45 -45
- package/dist/components/docs/integrations/IntegrationsS3Page.js +57 -57
- package/dist/components/docs/integrations/IntegrationsSlackPage.js +63 -63
- package/dist/components/docs/integrations/IntegrationsSpecModelPage.js +139 -139
- package/dist/components/docs/integrations/IntegrationsStripePage.js +159 -159
- package/dist/components/docs/integrations/IntegrationsTwilioPage.js +61 -61
- package/dist/components/docs/integrations/IntegrationsWhatsappMetaPage.js +63 -63
- package/dist/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +65 -65
- package/dist/components/docs/integrations/index.js +1642 -1642
- package/dist/components/docs/intent/ContractFirstApiPage.js +51 -51
- package/dist/components/docs/intent/DeterministicCodegenPage.js +59 -59
- package/dist/components/docs/intent/GenerateClientFromSchemaPage.js +85 -85
- package/dist/components/docs/intent/OpenapiAlternativePage.js +91 -91
- package/dist/components/docs/intent/SchemaValidationTypescriptPage.js +59 -59
- package/dist/components/docs/intent/SpecDrivenDevelopmentPage.js +51 -51
- package/dist/components/docs/intent/index.js +396 -396
- package/dist/components/docs/knowledge/KnowledgeCategoriesPage.js +371 -371
- package/dist/components/docs/knowledge/KnowledgeExamplesPage.js +79 -79
- package/dist/components/docs/knowledge/KnowledgeOverviewPage.js +185 -185
- package/dist/components/docs/knowledge/KnowledgeSourcesPage.js +187 -187
- package/dist/components/docs/knowledge/KnowledgeSpacesPage.js +141 -141
- package/dist/components/docs/knowledge/index.js +963 -963
- package/dist/components/docs/libraries/LibrariesAccessibilityPage.js +85 -85
- package/dist/components/docs/libraries/LibrariesAiAgentPage.js +63 -63
- package/dist/components/docs/libraries/LibrariesAnalyticsPage.js +33 -33
- package/dist/components/docs/libraries/LibrariesContentGenPage.js +43 -43
- package/dist/components/docs/libraries/LibrariesContractsPage.js +125 -125
- package/dist/components/docs/libraries/LibrariesCostTrackingPage.js +45 -45
- package/dist/components/docs/libraries/LibrariesDataBackendPage.js +69 -69
- package/dist/components/docs/libraries/LibrariesDataViewsPage.js +79 -79
- package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +129 -129
- package/dist/components/docs/libraries/LibrariesEvolutionPage.js +49 -49
- package/dist/components/docs/libraries/LibrariesGraphQLPage.js +73 -73
- package/dist/components/docs/libraries/LibrariesGrowthPage.js +35 -35
- package/dist/components/docs/libraries/LibrariesMultiTenancyPage.js +43 -43
- package/dist/components/docs/libraries/LibrariesObservabilityPage.js +53 -53
- package/dist/components/docs/libraries/LibrariesOverlayEnginePage.js +45 -45
- package/dist/components/docs/libraries/LibrariesOverviewPage.js +191 -191
- package/dist/components/docs/libraries/LibrariesPersonalizationPage.js +47 -47
- package/dist/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +53 -53
- package/dist/components/docs/libraries/LibrariesResiliencePage.js +49 -49
- package/dist/components/docs/libraries/LibrariesRuntimePage.js +87 -87
- package/dist/components/docs/libraries/LibrariesSLOPage.js +47 -47
- package/dist/components/docs/libraries/LibrariesSchemaPage.js +139 -139
- package/dist/components/docs/libraries/LibrariesSupportBotPage.js +57 -57
- package/dist/components/docs/libraries/LibrariesTestingPage.js +49 -49
- package/dist/components/docs/libraries/LibrariesUIKitPage.js +107 -107
- package/dist/components/docs/libraries/LibrariesWorkflowComposerPage.js +35 -35
- package/dist/components/docs/libraries/LibrariesWorkflowsPage.js +89 -89
- package/dist/components/docs/libraries/index.js +1919 -1919
- package/dist/components/docs/manifesto/ManifestoPage.js +79 -79
- package/dist/components/docs/ops/AutoEvolutionOpsPage.js +59 -59
- package/dist/components/docs/ops/DistributedTracingOpsPage.js +33 -33
- package/dist/components/docs/ops/index.js +92 -92
- package/dist/components/docs/reference/DocsMarkdownContent.js +27 -27
- package/dist/components/docs/reference/DocsReferenceContent.js +34 -34
- package/dist/components/docs/reference/DocsReferenceIndexClient.js +23 -23
- package/dist/components/docs/reference/DocsReferenceIndexPage.js +26 -26
- package/dist/components/docs/reference/DocsReferencePage.js +37 -37
- package/dist/components/docs/reference/index.js +63 -63
- package/dist/components/docs/safety/SafetyAuditingPage.js +161 -161
- package/dist/components/docs/safety/SafetyMigrationsPage.js +169 -169
- package/dist/components/docs/safety/SafetyOverviewPage.js +99 -99
- package/dist/components/docs/safety/SafetyPDPPage.js +137 -137
- package/dist/components/docs/safety/SafetySecurityTrustPage.js +95 -95
- package/dist/components/docs/safety/SafetySigningPage.js +39 -39
- package/dist/components/docs/safety/SafetyTenantIsolationPage.js +33 -33
- package/dist/components/docs/safety/index.js +733 -733
- package/dist/components/docs/shared/StudioPrompt.js +9 -9
- package/dist/components/docs/specs/SpecsCapabilitiesPage.js +61 -61
- package/dist/components/docs/specs/SpecsDataViewsPage.js +119 -119
- package/dist/components/docs/specs/SpecsOverlaysPage.js +171 -171
- package/dist/components/docs/specs/SpecsOverviewPage.js +167 -167
- package/dist/components/docs/specs/SpecsPolicyPage.js +179 -179
- package/dist/components/docs/specs/SpecsWorkflowsPage.js +141 -141
- package/dist/components/docs/specs/index.js +838 -838
- package/dist/components/docs/studio/StudioBYOKPage.js +9 -9
- package/dist/components/docs/studio/StudioDeploymentsPage.js +9 -9
- package/dist/components/docs/studio/StudioGettingStartedPage.js +9 -9
- package/dist/components/docs/studio/StudioIntegrationsPage.js +9 -9
- package/dist/components/docs/studio/StudioOverviewPage.js +33 -33
- package/dist/components/docs/studio/StudioVisualBuilderPage.js +9 -9
- package/dist/components/docs/studio/index.js +78 -78
- package/dist/components/integrations/index.js +209 -209
- package/dist/components/integrations/molecules/IntegrationCard.js +33 -33
- package/dist/components/integrations/organisms/IntegrationMarketplace.js +71 -71
- package/dist/components/integrations/organisms/IntegrationSettings.js +98 -98
- package/dist/components/integrations/organisms/KnowledgeSourceList.js +40 -40
- package/dist/components/legal/PrivacyTemplate.js +477 -477
- package/dist/components/legal/TermsTemplate.js +421 -421
- package/dist/components/legal/index.js +898 -898
- package/dist/components/shared/FeatureGateNotice.js +13 -13
- package/dist/components/shared/index.js +13 -13
- package/dist/components/shell/WorkspaceHeader.js +37 -37
- package/dist/components/shell/WorkspaceProjectShellLayout.js +77 -77
- package/dist/components/shell/WorkspaceShellRenderer.d.ts +17 -0
- package/dist/components/shell/WorkspaceShellRenderer.js +229 -0
- package/dist/components/shell/WorkspaceSidebar.js +27 -27
- package/dist/components/shell/index.d.ts +1 -0
- package/dist/components/shell/index.js +140 -77
- package/dist/components/templates/index.js +272 -272
- package/dist/components/templates/messaging/ConversationList.js +27 -27
- package/dist/components/templates/messaging/MessageComposer.js +27 -27
- package/dist/components/templates/messaging/MessageThread.js +18 -18
- package/dist/components/templates/messaging/MessagingWorkspace.js +65 -65
- package/dist/components/templates/messaging/index.js +65 -65
- package/dist/components/templates/recipes/LanguageSwitcher.js +5 -5
- package/dist/components/templates/recipes/RecipeCard.js +26 -26
- package/dist/components/templates/recipes/RecipeDetail.js +33 -33
- package/dist/components/templates/recipes/RecipeList.js +80 -80
- package/dist/components/templates/recipes/index.js +80 -80
- package/dist/components/templates/todos/FilterBar.js +39 -39
- package/dist/components/templates/todos/TaskForm.js +43 -43
- package/dist/components/templates/todos/TaskItem.js +30 -30
- package/dist/components/templates/todos/TaskList.js +127 -127
- package/dist/components/templates/todos/index.js +127 -127
- package/dist/index.js +12324 -12261
- package/dist/infrastructure/elysia/index.js +8 -8
- package/dist/infrastructure/elysia/logger.js +8 -8
- package/dist/infrastructure/index.js +8 -8
- package/dist/libs/posthog/client.js +2 -2
- package/dist/node/application/index.js +8 -8
- package/dist/node/application/mcp/cliMcp.js +8 -8
- package/dist/node/application/mcp/contractsMcp.js +8 -8
- package/dist/node/application/mcp/docsMcp.js +8 -8
- package/dist/node/application/mcp/index.js +8 -8
- package/dist/node/application/mcp/internalMcp.js +8 -8
- package/dist/node/application/mcp/providerRankingMcp.js +8 -8
- package/dist/node/bundles/LibraryBundle.js +138 -0
- package/dist/node/bundles/index.js +138 -0
- package/dist/node/components/docs/DocsIndexPage.js +91 -91
- package/dist/node/components/docs/advanced/AdvancedMCPPage.js +125 -125
- package/dist/node/components/docs/advanced/AdvancedOverlayEditorPage.js +49 -49
- package/dist/node/components/docs/advanced/AdvancedRenderersPage.js +51 -51
- package/dist/node/components/docs/advanced/AdvancedSpecExperimentsPage.js +35 -35
- package/dist/node/components/docs/advanced/AdvancedTelemetryPage.js +177 -177
- package/dist/node/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +45 -45
- package/dist/node/components/docs/advanced/index.js +482 -482
- package/dist/node/components/docs/architecture/ArchitectureAppConfigPage.js +107 -107
- package/dist/node/components/docs/architecture/ArchitectureControlPlanePage.js +73 -73
- package/dist/node/components/docs/architecture/ArchitectureIntegrationBindingPage.js +117 -117
- package/dist/node/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +175 -175
- package/dist/node/components/docs/architecture/ArchitectureMultiTenancyPage.js +71 -71
- package/dist/node/components/docs/architecture/ArchitectureOverviewPage.js +205 -205
- package/dist/node/components/docs/architecture/index.js +748 -748
- package/dist/node/components/docs/comparison/ComparisonAutomationPlatformsPage.js +117 -117
- package/dist/node/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +111 -111
- package/dist/node/components/docs/comparison/ComparisonInternalToolBuildersPage.js +117 -117
- package/dist/node/components/docs/comparison/ComparisonOverviewPage.js +97 -97
- package/dist/node/components/docs/comparison/ComparisonWindmillPage.js +125 -125
- package/dist/node/components/docs/comparison/ComparisonWorkflowEnginesPage.js +171 -171
- package/dist/node/components/docs/comparison/index.js +738 -738
- package/dist/node/components/docs/ecosystem/IntegrationsPage.js +45 -45
- package/dist/node/components/docs/ecosystem/PluginsPage.js +73 -73
- package/dist/node/components/docs/ecosystem/RegistryPage.js +37 -37
- package/dist/node/components/docs/ecosystem/TemplatesPage.js +56 -56
- package/dist/node/components/docs/ecosystem/index.js +211 -211
- package/dist/node/components/docs/examples/DocsExamplesPage.js +21 -21
- package/dist/node/components/docs/examples/index.js +21 -21
- package/dist/node/components/docs/getting-started/CLIPage.js +95 -95
- package/dist/node/components/docs/getting-started/CompatibilityPage.js +81 -81
- package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +57 -57
- package/dist/node/components/docs/getting-started/DeveloperToolsPage.js +61 -61
- package/dist/node/components/docs/getting-started/HelloWorldPage.js +77 -77
- package/dist/node/components/docs/getting-started/InstallationPage.js +65 -65
- package/dist/node/components/docs/getting-started/StartHerePage.js +51 -51
- package/dist/node/components/docs/getting-started/TroubleshootingPage.js +73 -73
- package/dist/node/components/docs/getting-started/VSCodeExtensionPage.js +171 -171
- package/dist/node/components/docs/getting-started/index.js +731 -731
- package/dist/node/components/docs/guides/GuideCIDiffGatingPage.js +80 -80
- package/dist/node/components/docs/guides/GuideContractTypesPage.js +232 -232
- package/dist/node/components/docs/guides/GuideDocsPipelinePage.js +82 -82
- package/dist/node/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +84 -84
- package/dist/node/components/docs/guides/GuideImportExistingCodebasesPage.js +324 -324
- package/dist/node/components/docs/guides/GuideNextjsOneEndpointPage.js +107 -107
- package/dist/node/components/docs/guides/GuideSpecValidationTypingPage.js +78 -78
- package/dist/node/components/docs/guides/GuidesIndexPage.js +43 -43
- package/dist/node/components/docs/guides/index.js +976 -976
- package/dist/node/components/docs/index.js +10792 -10792
- package/dist/node/components/docs/integrations/IntegrationsCircuitBreakersPage.js +17 -17
- package/dist/node/components/docs/integrations/IntegrationsElevenLabsPage.js +47 -47
- package/dist/node/components/docs/integrations/IntegrationsGithubPage.js +61 -61
- package/dist/node/components/docs/integrations/IntegrationsGmailPage.js +49 -49
- package/dist/node/components/docs/integrations/IntegrationsGoogleCalendarPage.js +33 -33
- package/dist/node/components/docs/integrations/IntegrationsHealthRoutingPage.js +65 -65
- package/dist/node/components/docs/integrations/IntegrationsMistralPage.js +69 -69
- package/dist/node/components/docs/integrations/IntegrationsOpenAIPage.js +65 -65
- package/dist/node/components/docs/integrations/IntegrationsOverviewPage.js +313 -313
- package/dist/node/components/docs/integrations/IntegrationsPostmarkPage.js +101 -101
- package/dist/node/components/docs/integrations/IntegrationsPowensPage.js +121 -121
- package/dist/node/components/docs/integrations/IntegrationsQdrantPage.js +49 -49
- package/dist/node/components/docs/integrations/IntegrationsResendPage.js +45 -45
- package/dist/node/components/docs/integrations/IntegrationsS3Page.js +57 -57
- package/dist/node/components/docs/integrations/IntegrationsSlackPage.js +63 -63
- package/dist/node/components/docs/integrations/IntegrationsSpecModelPage.js +139 -139
- package/dist/node/components/docs/integrations/IntegrationsStripePage.js +159 -159
- package/dist/node/components/docs/integrations/IntegrationsTwilioPage.js +61 -61
- package/dist/node/components/docs/integrations/IntegrationsWhatsappMetaPage.js +63 -63
- package/dist/node/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +65 -65
- package/dist/node/components/docs/integrations/index.js +1642 -1642
- package/dist/node/components/docs/intent/ContractFirstApiPage.js +51 -51
- package/dist/node/components/docs/intent/DeterministicCodegenPage.js +59 -59
- package/dist/node/components/docs/intent/GenerateClientFromSchemaPage.js +85 -85
- package/dist/node/components/docs/intent/OpenapiAlternativePage.js +91 -91
- package/dist/node/components/docs/intent/SchemaValidationTypescriptPage.js +59 -59
- package/dist/node/components/docs/intent/SpecDrivenDevelopmentPage.js +51 -51
- package/dist/node/components/docs/intent/index.js +396 -396
- package/dist/node/components/docs/knowledge/KnowledgeCategoriesPage.js +371 -371
- package/dist/node/components/docs/knowledge/KnowledgeExamplesPage.js +79 -79
- package/dist/node/components/docs/knowledge/KnowledgeOverviewPage.js +185 -185
- package/dist/node/components/docs/knowledge/KnowledgeSourcesPage.js +187 -187
- package/dist/node/components/docs/knowledge/KnowledgeSpacesPage.js +141 -141
- package/dist/node/components/docs/knowledge/index.js +963 -963
- package/dist/node/components/docs/libraries/LibrariesAccessibilityPage.js +85 -85
- package/dist/node/components/docs/libraries/LibrariesAiAgentPage.js +63 -63
- package/dist/node/components/docs/libraries/LibrariesAnalyticsPage.js +33 -33
- package/dist/node/components/docs/libraries/LibrariesContentGenPage.js +43 -43
- package/dist/node/components/docs/libraries/LibrariesContractsPage.js +125 -125
- package/dist/node/components/docs/libraries/LibrariesCostTrackingPage.js +45 -45
- package/dist/node/components/docs/libraries/LibrariesDataBackendPage.js +69 -69
- package/dist/node/components/docs/libraries/LibrariesDataViewsPage.js +79 -79
- package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +129 -129
- package/dist/node/components/docs/libraries/LibrariesEvolutionPage.js +49 -49
- package/dist/node/components/docs/libraries/LibrariesGraphQLPage.js +73 -73
- package/dist/node/components/docs/libraries/LibrariesGrowthPage.js +35 -35
- package/dist/node/components/docs/libraries/LibrariesMultiTenancyPage.js +43 -43
- package/dist/node/components/docs/libraries/LibrariesObservabilityPage.js +53 -53
- package/dist/node/components/docs/libraries/LibrariesOverlayEnginePage.js +45 -45
- package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +191 -191
- package/dist/node/components/docs/libraries/LibrariesPersonalizationPage.js +47 -47
- package/dist/node/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +53 -53
- package/dist/node/components/docs/libraries/LibrariesResiliencePage.js +49 -49
- package/dist/node/components/docs/libraries/LibrariesRuntimePage.js +87 -87
- package/dist/node/components/docs/libraries/LibrariesSLOPage.js +47 -47
- package/dist/node/components/docs/libraries/LibrariesSchemaPage.js +139 -139
- package/dist/node/components/docs/libraries/LibrariesSupportBotPage.js +57 -57
- package/dist/node/components/docs/libraries/LibrariesTestingPage.js +49 -49
- package/dist/node/components/docs/libraries/LibrariesUIKitPage.js +107 -107
- package/dist/node/components/docs/libraries/LibrariesWorkflowComposerPage.js +35 -35
- package/dist/node/components/docs/libraries/LibrariesWorkflowsPage.js +89 -89
- package/dist/node/components/docs/libraries/index.js +1919 -1919
- package/dist/node/components/docs/manifesto/ManifestoPage.js +79 -79
- package/dist/node/components/docs/ops/AutoEvolutionOpsPage.js +59 -59
- package/dist/node/components/docs/ops/DistributedTracingOpsPage.js +33 -33
- package/dist/node/components/docs/ops/index.js +92 -92
- package/dist/node/components/docs/reference/DocsMarkdownContent.js +27 -27
- package/dist/node/components/docs/reference/DocsReferenceContent.js +34 -34
- package/dist/node/components/docs/reference/DocsReferenceIndexClient.js +23 -23
- package/dist/node/components/docs/reference/DocsReferenceIndexPage.js +26 -26
- package/dist/node/components/docs/reference/DocsReferencePage.js +37 -37
- package/dist/node/components/docs/reference/index.js +63 -63
- package/dist/node/components/docs/safety/SafetyAuditingPage.js +161 -161
- package/dist/node/components/docs/safety/SafetyMigrationsPage.js +169 -169
- package/dist/node/components/docs/safety/SafetyOverviewPage.js +99 -99
- package/dist/node/components/docs/safety/SafetyPDPPage.js +137 -137
- package/dist/node/components/docs/safety/SafetySecurityTrustPage.js +95 -95
- package/dist/node/components/docs/safety/SafetySigningPage.js +39 -39
- package/dist/node/components/docs/safety/SafetyTenantIsolationPage.js +33 -33
- package/dist/node/components/docs/safety/index.js +733 -733
- package/dist/node/components/docs/shared/StudioPrompt.js +9 -9
- package/dist/node/components/docs/specs/SpecsCapabilitiesPage.js +61 -61
- package/dist/node/components/docs/specs/SpecsDataViewsPage.js +119 -119
- package/dist/node/components/docs/specs/SpecsOverlaysPage.js +171 -171
- package/dist/node/components/docs/specs/SpecsOverviewPage.js +167 -167
- package/dist/node/components/docs/specs/SpecsPolicyPage.js +179 -179
- package/dist/node/components/docs/specs/SpecsWorkflowsPage.js +141 -141
- package/dist/node/components/docs/specs/index.js +838 -838
- package/dist/node/components/docs/studio/StudioBYOKPage.js +9 -9
- package/dist/node/components/docs/studio/StudioDeploymentsPage.js +9 -9
- package/dist/node/components/docs/studio/StudioGettingStartedPage.js +9 -9
- package/dist/node/components/docs/studio/StudioIntegrationsPage.js +9 -9
- package/dist/node/components/docs/studio/StudioOverviewPage.js +33 -33
- package/dist/node/components/docs/studio/StudioVisualBuilderPage.js +9 -9
- package/dist/node/components/docs/studio/index.js +78 -78
- package/dist/node/components/integrations/index.js +209 -209
- package/dist/node/components/integrations/molecules/IntegrationCard.js +33 -33
- package/dist/node/components/integrations/organisms/IntegrationMarketplace.js +71 -71
- package/dist/node/components/integrations/organisms/IntegrationSettings.js +98 -98
- package/dist/node/components/integrations/organisms/KnowledgeSourceList.js +40 -40
- package/dist/node/components/legal/PrivacyTemplate.js +477 -477
- package/dist/node/components/legal/TermsTemplate.js +421 -421
- package/dist/node/components/legal/index.js +898 -898
- package/dist/node/components/shared/FeatureGateNotice.js +13 -13
- package/dist/node/components/shared/index.js +13 -13
- package/dist/node/components/shell/WorkspaceHeader.js +37 -37
- package/dist/node/components/shell/WorkspaceProjectShellLayout.js +77 -77
- package/dist/node/components/shell/WorkspaceShellRenderer.js +228 -0
- package/dist/node/components/shell/WorkspaceSidebar.js +27 -27
- package/dist/node/components/shell/index.js +140 -77
- package/dist/node/components/templates/index.js +272 -272
- package/dist/node/components/templates/messaging/ConversationList.js +27 -27
- package/dist/node/components/templates/messaging/MessageComposer.js +27 -27
- package/dist/node/components/templates/messaging/MessageThread.js +18 -18
- package/dist/node/components/templates/messaging/MessagingWorkspace.js +65 -65
- package/dist/node/components/templates/messaging/index.js +65 -65
- package/dist/node/components/templates/recipes/LanguageSwitcher.js +5 -5
- package/dist/node/components/templates/recipes/RecipeCard.js +26 -26
- package/dist/node/components/templates/recipes/RecipeDetail.js +33 -33
- package/dist/node/components/templates/recipes/RecipeList.js +80 -80
- package/dist/node/components/templates/recipes/index.js +80 -80
- package/dist/node/components/templates/todos/FilterBar.js +39 -39
- package/dist/node/components/templates/todos/TaskForm.js +43 -43
- package/dist/node/components/templates/todos/TaskItem.js +30 -30
- package/dist/node/components/templates/todos/TaskList.js +127 -127
- package/dist/node/components/templates/todos/index.js +127 -127
- package/dist/node/index.js +12324 -12261
- package/dist/node/infrastructure/elysia/index.js +8 -8
- package/dist/node/infrastructure/elysia/logger.js +8 -8
- package/dist/node/infrastructure/index.js +8 -8
- package/dist/node/libs/posthog/client.js +2 -2
- package/dist/node/presentation/features/atoms/FeatureIcon/FeatureIcon.js +3 -3
- package/dist/node/presentation/features/atoms/FeatureIcon/index.js +3 -3
- package/dist/node/presentation/features/atoms/index.js +3 -3
- package/dist/node/presentation/features/index.js +915 -915
- package/dist/node/presentation/features/molecules/FeatureCard/FeatureCard.js +101 -101
- package/dist/node/presentation/features/molecules/FeatureCard/index.js +101 -101
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +15 -15
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/index.js +15 -15
- package/dist/node/presentation/features/molecules/FeatureFilters/FeatureFilters.js +23 -23
- package/dist/node/presentation/features/molecules/FeatureFilters/index.js +23 -23
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +67 -67
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/index.js +67 -67
- package/dist/node/presentation/features/molecules/index.js +139 -139
- package/dist/node/presentation/features/organisms/FeatureDataViewsList.js +7 -7
- package/dist/node/presentation/features/organisms/FeatureDetail/FeatureDetail.js +57 -57
- package/dist/node/presentation/features/organisms/FeatureDetail/index.js +57 -57
- package/dist/node/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +183 -183
- package/dist/node/presentation/features/organisms/FeatureDiscovery/index.js +183 -183
- package/dist/node/presentation/features/organisms/FeatureEventsList.js +7 -7
- package/dist/node/presentation/features/organisms/FeatureFormsList.js +7 -7
- package/dist/node/presentation/features/organisms/FeatureOperationsList.js +7 -7
- package/dist/node/presentation/features/organisms/FeaturePresentationsList.js +7 -7
- package/dist/node/presentation/features/organisms/index.js +275 -275
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +126 -126
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +126 -126
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +16 -16
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/index.js +16 -16
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +112 -112
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/index.js +112 -112
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +16 -16
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/index.js +16 -16
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +126 -126
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/index.js +126 -126
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +16 -16
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/index.js +16 -16
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +110 -110
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/index.js +110 -110
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +16 -16
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/index.js +16 -16
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +66 -66
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/index.js +66 -66
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +112 -112
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +112 -112
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +16 -16
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/index.js +16 -16
- package/dist/presentation/features/atoms/FeatureIcon/FeatureIcon.js +3 -3
- package/dist/presentation/features/atoms/FeatureIcon/index.js +3 -3
- package/dist/presentation/features/atoms/index.js +3 -3
- package/dist/presentation/features/index.js +915 -915
- package/dist/presentation/features/molecules/FeatureCard/FeatureCard.js +101 -101
- package/dist/presentation/features/molecules/FeatureCard/index.js +101 -101
- package/dist/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +15 -15
- package/dist/presentation/features/molecules/FeatureCategoryHeader/index.js +15 -15
- package/dist/presentation/features/molecules/FeatureFilters/FeatureFilters.js +23 -23
- package/dist/presentation/features/molecules/FeatureFilters/index.js +23 -23
- package/dist/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +67 -67
- package/dist/presentation/features/molecules/FeatureHoverPreview/index.js +67 -67
- package/dist/presentation/features/molecules/index.js +139 -139
- package/dist/presentation/features/organisms/FeatureDataViewsList.js +7 -7
- package/dist/presentation/features/organisms/FeatureDetail/FeatureDetail.js +57 -57
- package/dist/presentation/features/organisms/FeatureDetail/index.js +57 -57
- package/dist/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +183 -183
- package/dist/presentation/features/organisms/FeatureDiscovery/index.js +183 -183
- package/dist/presentation/features/organisms/FeatureEventsList.js +7 -7
- package/dist/presentation/features/organisms/FeatureFormsList.js +7 -7
- package/dist/presentation/features/organisms/FeatureOperationsList.js +7 -7
- package/dist/presentation/features/organisms/FeaturePresentationsList.js +7 -7
- package/dist/presentation/features/organisms/index.js +275 -275
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +126 -126
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +126 -126
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +16 -16
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/index.js +16 -16
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +112 -112
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/index.js +112 -112
- package/dist/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +16 -16
- package/dist/presentation/features/templates/FeatureEventsTemplate/index.js +16 -16
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +126 -126
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/index.js +126 -126
- package/dist/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +16 -16
- package/dist/presentation/features/templates/FeatureFormsTemplate/index.js +16 -16
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +110 -110
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/index.js +110 -110
- package/dist/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +16 -16
- package/dist/presentation/features/templates/FeatureOperationsTemplate/index.js +16 -16
- package/dist/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +66 -66
- package/dist/presentation/features/templates/FeatureOverviewTemplate/index.js +66 -66
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +112 -112
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +112 -112
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +16 -16
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/index.js +16 -16
- package/package.json +71 -22
- package/src/bundles/LibraryBundle.ts +152 -0
- package/src/bundles/index.ts +1 -0
- package/src/components/docs/generated/docs-index._common.json +441 -90
- package/src/components/docs/generated/docs-index.agent-console.json +1 -1
- package/src/components/docs/generated/docs-index.ai-chat.json +1 -1
- package/src/components/docs/generated/docs-index.ai-support-bot.json +1 -1
- package/src/components/docs/generated/docs-index.analytics-dashboard.json +1 -1
- package/src/components/docs/generated/docs-index.app-config.json +1 -1
- package/src/components/docs/generated/docs-index.audit-trail.json +1 -1
- package/src/components/docs/generated/docs-index.calendar-google.json +1 -1
- package/src/components/docs/generated/docs-index.content-generation.json +1 -1
- package/src/components/docs/generated/docs-index.crm-pipeline.json +1 -1
- package/src/components/docs/generated/docs-index.email-gmail.json +1 -1
- package/src/components/docs/generated/docs-index.feature-flags.json +1 -1
- package/src/components/docs/generated/docs-index.files.json +1 -1
- package/src/components/docs/generated/docs-index.generated.ts +7 -7
- package/src/components/docs/generated/docs-index.health.json +1 -1
- package/src/components/docs/generated/docs-index.identity-rbac.json +1 -1
- package/src/components/docs/generated/docs-index.in-app-docs.json +1 -1
- package/src/components/docs/generated/docs-index.integration-hub.json +1 -1
- package/src/components/docs/generated/docs-index.integration-posthog.json +1 -1
- package/src/components/docs/generated/docs-index.integration-stripe.json +1 -1
- package/src/components/docs/generated/docs-index.integration-supabase.json +1 -1
- package/src/components/docs/generated/docs-index.jobs.json +1 -1
- package/src/components/docs/generated/docs-index.kb-update-pipeline.json +1 -1
- package/src/components/docs/generated/docs-index.knowledge-canon.json +1 -1
- package/src/components/docs/generated/docs-index.learning-journey-ambient-coach.json +1 -1
- package/src/components/docs/generated/docs-index.learning-journey-crm-onboarding.json +1 -1
- package/src/components/docs/generated/docs-index.learning-journey-duo-drills.json +1 -1
- package/src/components/docs/generated/docs-index.learning-journey-platform-tour.json +1 -1
- package/src/components/docs/generated/docs-index.learning-journey-quest-challenges.json +1 -1
- package/src/components/docs/generated/docs-index.learning-journey-registry.json +1 -1
- package/src/components/docs/generated/docs-index.learning-journey-studio-onboarding.json +1 -1
- package/src/components/docs/generated/docs-index.learning-journey-ui-coaching.json +1 -1
- package/src/components/docs/generated/docs-index.learning-journey-ui-gamified.json +1 -1
- package/src/components/docs/generated/docs-index.learning-journey-ui-onboarding.json +1 -1
- package/src/components/docs/generated/docs-index.learning-journey-ui-shared.json +1 -1
- package/src/components/docs/generated/docs-index.learning-journey.json +1 -1
- package/src/components/docs/generated/docs-index.learning-patterns.json +1 -1
- package/src/components/docs/generated/docs-index.lifecycle-cli.json +1 -1
- package/src/components/docs/generated/docs-index.lifecycle-dashboard.json +1 -1
- package/src/components/docs/generated/docs-index.locale-jurisdiction-gate.json +1 -1
- package/src/components/docs/generated/docs-index.manifest.json +2 -2
- package/src/components/docs/generated/docs-index.marketplace.json +1 -1
- package/src/components/docs/generated/docs-index.meeting-recorder-providers.json +1 -1
- package/src/components/docs/generated/docs-index.meeting-recorder.json +1 -1
- package/src/components/docs/generated/docs-index.metrics.json +1 -1
- package/src/components/docs/generated/docs-index.minimal.json +1 -1
- package/src/components/docs/generated/docs-index.notifications.json +1 -1
- package/src/components/docs/generated/docs-index.openbanking-powens.json +1 -1
- package/src/components/docs/generated/docs-index.openbanking.json +1 -1
- package/src/components/docs/generated/docs-index.opencode-cli.json +1 -1
- package/src/components/docs/generated/docs-index.personalization.json +1 -1
- package/src/components/docs/generated/docs-index.platform-acp.json +1 -1
- package/src/components/docs/generated/docs-index.platform-agent.json +1 -1
- package/src/components/docs/generated/docs-index.platform-context.json +1 -1
- package/src/components/docs/generated/docs-index.platform-database.json +1 -1
- package/src/components/docs/generated/docs-index.platform-docs.json +1 -1
- package/src/components/docs/generated/docs-index.platform-integrations.json +1 -1
- package/src/components/docs/generated/docs-index.platform-knowledge.json +1 -1
- package/src/components/docs/generated/docs-index.platform-provider-ranking.json +1 -1
- package/src/components/docs/generated/docs-index.pocket-family-office.json +1 -1
- package/src/components/docs/generated/docs-index.policy-safe-knowledge-assistant.json +1 -1
- package/src/components/docs/generated/docs-index.product-intent.json +1 -1
- package/src/components/docs/generated/docs-index.project-management-sync.json +1 -1
- package/src/components/docs/generated/docs-index.saas-boilerplate.json +1 -1
- package/src/components/docs/generated/docs-index.service-business-os.json +1 -1
- package/src/components/docs/generated/docs-index.team-hub.json +1 -1
- package/src/components/docs/generated/docs-index.unknown.json +1 -1
- package/src/components/docs/generated/docs-index.versioned-knowledge-base.json +1 -1
- package/src/components/docs/generated/docs-index.video-api-showcase.json +1 -1
- package/src/components/docs/generated/docs-index.video-docs-terminal.json +1 -1
- package/src/components/docs/generated/docs-index.video-marketing-clip.json +1 -1
- package/src/components/docs/generated/docs-index.voice-providers.json +1 -1
- package/src/components/docs/generated/docs-index.wealth-snapshot.json +1 -1
- package/src/components/docs/generated/docs-index.workflow-system.json +1 -1
- package/src/components/docs/generated/docs-index.workspace-cli.json +1 -1
- package/src/components/docs/guides/GuideNextjsOneEndpointPage.tsx +1 -1
- package/src/components/shell/WorkspaceShellRenderer.tsx +90 -0
- package/src/components/shell/index.ts +1 -0
|
@@ -2,396 +2,396 @@
|
|
|
2
2
|
// src/components/docs/specs/SpecsOverviewPage.tsx
|
|
3
3
|
import Link from "@contractspec/lib.ui-link";
|
|
4
4
|
import { ChevronRight } from "lucide-react";
|
|
5
|
-
import {
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
function SpecsOverviewPage() {
|
|
7
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
8
8
|
className: "space-y-8",
|
|
9
9
|
children: [
|
|
10
|
-
/* @__PURE__ */
|
|
10
|
+
/* @__PURE__ */ jsxs("div", {
|
|
11
11
|
className: "space-y-4",
|
|
12
12
|
children: [
|
|
13
|
-
/* @__PURE__ */
|
|
13
|
+
/* @__PURE__ */ jsx("h1", {
|
|
14
14
|
className: "text-4xl font-bold",
|
|
15
15
|
children: "Specifications Overview"
|
|
16
|
-
}
|
|
17
|
-
/* @__PURE__ */
|
|
16
|
+
}),
|
|
17
|
+
/* @__PURE__ */ jsxs("p", {
|
|
18
18
|
className: "text-muted-foreground",
|
|
19
19
|
children: [
|
|
20
20
|
"ContractSpec is built on a ",
|
|
21
|
-
/* @__PURE__ */
|
|
21
|
+
/* @__PURE__ */ jsx("strong", {
|
|
22
22
|
children: "spec-first"
|
|
23
|
-
}
|
|
23
|
+
}),
|
|
24
24
|
" philosophy. You define declarative TypeScript specifications that describe what your application can do. Runtime adapters automatically serve these specs as type-safe API endpoints (REST, GraphQL, MCP), enforce policies, and validate inputs/outputs\u2014no code generation required."
|
|
25
25
|
]
|
|
26
|
-
}
|
|
26
|
+
})
|
|
27
27
|
]
|
|
28
|
-
}
|
|
29
|
-
/* @__PURE__ */
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ jsxs("div", {
|
|
30
30
|
className: "space-y-4",
|
|
31
31
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ jsx("h2", {
|
|
33
33
|
className: "text-2xl font-bold",
|
|
34
34
|
children: "Why spec-first matters"
|
|
35
|
-
}
|
|
36
|
-
/* @__PURE__ */
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ jsx("p", {
|
|
37
37
|
className: "text-muted-foreground",
|
|
38
38
|
children: "Traditional development requires writing and maintaining separate code for APIs, databases, UI components, validation logic, and access control. This approach leads to:"
|
|
39
|
-
}
|
|
40
|
-
/* @__PURE__ */
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ jsxs("ul", {
|
|
41
41
|
className: "text-muted-foreground list-inside list-disc space-y-2",
|
|
42
42
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ jsx("li", {
|
|
44
44
|
children: "Duplication across front-end and back-end"
|
|
45
|
-
}
|
|
46
|
-
/* @__PURE__ */
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ jsx("li", {
|
|
47
47
|
children: "Type mismatches and runtime errors"
|
|
48
|
-
}
|
|
49
|
-
/* @__PURE__ */
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ jsx("li", {
|
|
50
50
|
children: "Security vulnerabilities from inconsistent policy enforcement"
|
|
51
|
-
}
|
|
52
|
-
/* @__PURE__ */
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ jsx("li", {
|
|
53
53
|
children: "High maintenance burden when requirements change"
|
|
54
|
-
}
|
|
54
|
+
})
|
|
55
55
|
]
|
|
56
|
-
}
|
|
57
|
-
/* @__PURE__ */
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ jsxs("p", {
|
|
58
58
|
className: "text-muted-foreground",
|
|
59
59
|
children: [
|
|
60
60
|
"With ContractSpec, you define your application's operations (Commands/Queries), workflows, and policies in pure TypeScript. Runtime adapters ensure consistency, type safety, and policy enforcement across your entire stack\u2014the spec ",
|
|
61
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ jsx("em", {
|
|
62
62
|
children: "is"
|
|
63
|
-
}
|
|
63
|
+
}),
|
|
64
64
|
" the implementation."
|
|
65
65
|
]
|
|
66
|
-
}
|
|
66
|
+
})
|
|
67
67
|
]
|
|
68
|
-
}
|
|
69
|
-
/* @__PURE__ */
|
|
68
|
+
}),
|
|
69
|
+
/* @__PURE__ */ jsxs("div", {
|
|
70
70
|
className: "space-y-4",
|
|
71
71
|
children: [
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ jsx("h2", {
|
|
73
73
|
className: "text-2xl font-bold",
|
|
74
74
|
children: "Specification types"
|
|
75
|
-
}
|
|
76
|
-
/* @__PURE__ */
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ jsx("div", {
|
|
77
77
|
className: "border-border/50 overflow-x-auto rounded-lg border",
|
|
78
|
-
children: /* @__PURE__ */
|
|
78
|
+
children: /* @__PURE__ */ jsxs("table", {
|
|
79
79
|
className: "w-full text-left text-sm",
|
|
80
80
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ jsx("thead", {
|
|
82
82
|
className: "bg-card/50",
|
|
83
|
-
children: /* @__PURE__ */
|
|
83
|
+
children: /* @__PURE__ */ jsxs("tr", {
|
|
84
84
|
className: "border-border/50 border-b",
|
|
85
85
|
children: [
|
|
86
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ jsx("th", {
|
|
87
87
|
className: "px-4 py-3 font-semibold",
|
|
88
88
|
children: "Spec Type"
|
|
89
|
-
}
|
|
90
|
-
/* @__PURE__ */
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ jsx("th", {
|
|
91
91
|
className: "px-4 py-3 font-semibold",
|
|
92
92
|
children: "Purpose"
|
|
93
|
-
}
|
|
94
|
-
/* @__PURE__ */
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ jsx("th", {
|
|
95
95
|
className: "px-4 py-3 font-semibold",
|
|
96
96
|
children: "Generates"
|
|
97
|
-
}
|
|
97
|
+
})
|
|
98
98
|
]
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
/* @__PURE__ */
|
|
99
|
+
})
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ jsxs("tbody", {
|
|
102
102
|
className: "divide-border/50 divide-y",
|
|
103
103
|
children: [
|
|
104
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ jsxs("tr", {
|
|
105
105
|
children: [
|
|
106
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ jsx("td", {
|
|
107
107
|
className: "px-4 py-3 align-top",
|
|
108
|
-
children: /* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ jsx(Link, {
|
|
109
109
|
href: "/docs/specs/capabilities",
|
|
110
110
|
className: "text-violet-400 hover:text-violet-300",
|
|
111
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ jsx("strong", {
|
|
112
112
|
children: "CapabilitySpec"
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
/* @__PURE__ */
|
|
113
|
+
})
|
|
114
|
+
})
|
|
115
|
+
}),
|
|
116
|
+
/* @__PURE__ */ jsx("td", {
|
|
117
117
|
className: "px-4 py-3 align-top",
|
|
118
118
|
children: "Defines what your application can do: operations (Commands/Queries), their inputs, outputs, policies, and side effects."
|
|
119
|
-
}
|
|
120
|
-
/* @__PURE__ */
|
|
119
|
+
}),
|
|
120
|
+
/* @__PURE__ */ jsx("td", {
|
|
121
121
|
className: "px-4 py-3 align-top",
|
|
122
122
|
children: "Runtime-served REST/GraphQL/MCP endpoints, Zod validation, policy enforcement"
|
|
123
|
-
}
|
|
123
|
+
})
|
|
124
124
|
]
|
|
125
|
-
}
|
|
126
|
-
/* @__PURE__ */
|
|
125
|
+
}),
|
|
126
|
+
/* @__PURE__ */ jsxs("tr", {
|
|
127
127
|
children: [
|
|
128
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ jsx("td", {
|
|
129
129
|
className: "px-4 py-3 align-top",
|
|
130
|
-
children: /* @__PURE__ */
|
|
130
|
+
children: /* @__PURE__ */ jsx("strong", {
|
|
131
131
|
children: "DataViewSpec"
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
/* @__PURE__ */
|
|
132
|
+
})
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ jsx("td", {
|
|
135
135
|
className: "px-4 py-3 align-top",
|
|
136
136
|
children: "Describes how data should be queried, filtered, sorted, and presented to users."
|
|
137
|
-
}
|
|
138
|
-
/* @__PURE__ */
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ jsx("td", {
|
|
139
139
|
className: "px-4 py-3 align-top",
|
|
140
140
|
children: "Database queries, list/detail views, search interfaces"
|
|
141
|
-
}
|
|
141
|
+
})
|
|
142
142
|
]
|
|
143
|
-
}
|
|
144
|
-
/* @__PURE__ */
|
|
143
|
+
}),
|
|
144
|
+
/* @__PURE__ */ jsxs("tr", {
|
|
145
145
|
children: [
|
|
146
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ jsx("td", {
|
|
147
147
|
className: "px-4 py-3 align-top",
|
|
148
|
-
children: /* @__PURE__ */
|
|
148
|
+
children: /* @__PURE__ */ jsx(Link, {
|
|
149
149
|
href: "/docs/specs/workflows",
|
|
150
150
|
className: "text-violet-400 hover:text-violet-300",
|
|
151
|
-
children: /* @__PURE__ */
|
|
151
|
+
children: /* @__PURE__ */ jsx("strong", {
|
|
152
152
|
children: "WorkflowSpec"
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
/* @__PURE__ */
|
|
153
|
+
})
|
|
154
|
+
})
|
|
155
|
+
}),
|
|
156
|
+
/* @__PURE__ */ jsx("td", {
|
|
157
157
|
className: "px-4 py-3 align-top",
|
|
158
158
|
children: "Orchestrates multi-step processes with retries, compensation, and monitoring."
|
|
159
|
-
}
|
|
160
|
-
/* @__PURE__ */
|
|
159
|
+
}),
|
|
160
|
+
/* @__PURE__ */ jsx("td", {
|
|
161
161
|
className: "px-4 py-3 align-top",
|
|
162
162
|
children: "Workflow engine, state machines, retry logic, observability hooks"
|
|
163
|
-
}
|
|
163
|
+
})
|
|
164
164
|
]
|
|
165
|
-
}
|
|
166
|
-
/* @__PURE__ */
|
|
165
|
+
}),
|
|
166
|
+
/* @__PURE__ */ jsxs("tr", {
|
|
167
167
|
children: [
|
|
168
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ jsx("td", {
|
|
169
169
|
className: "px-4 py-3 align-top",
|
|
170
|
-
children: /* @__PURE__ */
|
|
170
|
+
children: /* @__PURE__ */ jsx("strong", {
|
|
171
171
|
children: "PolicySpec"
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
/* @__PURE__ */
|
|
172
|
+
})
|
|
173
|
+
}),
|
|
174
|
+
/* @__PURE__ */ jsx("td", {
|
|
175
175
|
className: "px-4 py-3 align-top",
|
|
176
176
|
children: "Defines who can do what, when, and under what conditions. Supports ABAC and PII rules."
|
|
177
|
-
}
|
|
178
|
-
/* @__PURE__ */
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ jsx("td", {
|
|
179
179
|
className: "px-4 py-3 align-top",
|
|
180
180
|
children: "Policy decision points, access control middleware, audit logs"
|
|
181
|
-
}
|
|
181
|
+
})
|
|
182
182
|
]
|
|
183
|
-
}
|
|
184
|
-
/* @__PURE__ */
|
|
183
|
+
}),
|
|
184
|
+
/* @__PURE__ */ jsxs("tr", {
|
|
185
185
|
children: [
|
|
186
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ jsx("td", {
|
|
187
187
|
className: "px-4 py-3 align-top",
|
|
188
|
-
children: /* @__PURE__ */
|
|
188
|
+
children: /* @__PURE__ */ jsx("strong", {
|
|
189
189
|
children: "OverlaySpec"
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
/* @__PURE__ */
|
|
190
|
+
})
|
|
191
|
+
}),
|
|
192
|
+
/* @__PURE__ */ jsx("td", {
|
|
193
193
|
className: "px-4 py-3 align-top",
|
|
194
194
|
children: "Allows safe, signed customization of UI layouts and field visibility by tenants or users."
|
|
195
|
-
}
|
|
196
|
-
/* @__PURE__ */
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ jsx("td", {
|
|
197
197
|
className: "px-4 py-3 align-top",
|
|
198
198
|
children: "Personalized UI components, layout variations, conditional rendering"
|
|
199
|
-
}
|
|
199
|
+
})
|
|
200
200
|
]
|
|
201
|
-
}
|
|
202
|
-
/* @__PURE__ */
|
|
201
|
+
}),
|
|
202
|
+
/* @__PURE__ */ jsxs("tr", {
|
|
203
203
|
children: [
|
|
204
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ jsx("td", {
|
|
205
205
|
className: "px-4 py-3 align-top",
|
|
206
|
-
children: /* @__PURE__ */
|
|
206
|
+
children: /* @__PURE__ */ jsx("strong", {
|
|
207
207
|
children: "TelemetrySpec"
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
/* @__PURE__ */
|
|
208
|
+
})
|
|
209
|
+
}),
|
|
210
|
+
/* @__PURE__ */ jsx("td", {
|
|
211
211
|
className: "px-4 py-3 align-top",
|
|
212
212
|
children: "Specifies what metrics, logs, and traces to collect for observability."
|
|
213
|
-
}
|
|
214
|
-
/* @__PURE__ */
|
|
213
|
+
}),
|
|
214
|
+
/* @__PURE__ */ jsx("td", {
|
|
215
215
|
className: "px-4 py-3 align-top",
|
|
216
216
|
children: "Instrumentation code, dashboards, alerting rules"
|
|
217
|
-
}
|
|
217
|
+
})
|
|
218
218
|
]
|
|
219
|
-
}
|
|
220
|
-
/* @__PURE__ */
|
|
219
|
+
}),
|
|
220
|
+
/* @__PURE__ */ jsxs("tr", {
|
|
221
221
|
children: [
|
|
222
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ jsx("td", {
|
|
223
223
|
className: "px-4 py-3 align-top",
|
|
224
|
-
children: /* @__PURE__ */
|
|
224
|
+
children: /* @__PURE__ */ jsx(Link, {
|
|
225
225
|
href: "/docs/safety/migrations",
|
|
226
226
|
className: "text-violet-400 hover:text-violet-300",
|
|
227
|
-
children: /* @__PURE__ */
|
|
227
|
+
children: /* @__PURE__ */ jsx("strong", {
|
|
228
228
|
children: "MigrationSpec"
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
/* @__PURE__ */
|
|
229
|
+
})
|
|
230
|
+
})
|
|
231
|
+
}),
|
|
232
|
+
/* @__PURE__ */ jsx("td", {
|
|
233
233
|
className: "px-4 py-3 align-top",
|
|
234
234
|
children: "Manages incremental, reversible schema and data migrations."
|
|
235
|
-
}
|
|
236
|
-
/* @__PURE__ */
|
|
235
|
+
}),
|
|
236
|
+
/* @__PURE__ */ jsx("td", {
|
|
237
237
|
className: "px-4 py-3 align-top",
|
|
238
238
|
children: "Migration scripts, rollback procedures, version tracking"
|
|
239
|
-
}
|
|
239
|
+
})
|
|
240
240
|
]
|
|
241
|
-
}
|
|
241
|
+
})
|
|
242
242
|
]
|
|
243
|
-
}
|
|
243
|
+
})
|
|
244
244
|
]
|
|
245
|
-
}
|
|
246
|
-
}
|
|
245
|
+
})
|
|
246
|
+
})
|
|
247
247
|
]
|
|
248
|
-
}
|
|
249
|
-
/* @__PURE__ */
|
|
248
|
+
}),
|
|
249
|
+
/* @__PURE__ */ jsxs("div", {
|
|
250
250
|
className: "space-y-4",
|
|
251
251
|
children: [
|
|
252
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ jsx("h2", {
|
|
253
253
|
className: "text-2xl font-bold",
|
|
254
254
|
children: "How specs work together"
|
|
255
|
-
}
|
|
256
|
-
/* @__PURE__ */
|
|
255
|
+
}),
|
|
256
|
+
/* @__PURE__ */ jsxs("p", {
|
|
257
257
|
className: "text-muted-foreground",
|
|
258
258
|
children: [
|
|
259
259
|
"Specs compose naturally. A ",
|
|
260
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ jsx("strong", {
|
|
261
261
|
children: "WorkflowSpec"
|
|
262
|
-
}
|
|
262
|
+
}),
|
|
263
263
|
" can invoke multiple ",
|
|
264
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ jsx("strong", {
|
|
265
265
|
children: "CapabilitySpecs"
|
|
266
|
-
}
|
|
266
|
+
}),
|
|
267
267
|
". A",
|
|
268
268
|
" ",
|
|
269
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ jsx("strong", {
|
|
270
270
|
children: "DataViewSpec"
|
|
271
|
-
}
|
|
271
|
+
}),
|
|
272
272
|
" respects ",
|
|
273
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ jsx("strong", {
|
|
274
274
|
children: "PolicySpecs"
|
|
275
|
-
}
|
|
275
|
+
}),
|
|
276
276
|
" to filter sensitive fields. An ",
|
|
277
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ jsx("strong", {
|
|
278
278
|
children: "OverlaySpec"
|
|
279
|
-
}
|
|
279
|
+
}),
|
|
280
280
|
" can hide or rearrange UI elements generated from a ",
|
|
281
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ jsx("strong", {
|
|
282
282
|
children: "CapabilitySpec"
|
|
283
|
-
}
|
|
283
|
+
}),
|
|
284
284
|
", but only within the bounds allowed by the underlying policy."
|
|
285
285
|
]
|
|
286
|
-
}
|
|
287
|
-
/* @__PURE__ */
|
|
286
|
+
}),
|
|
287
|
+
/* @__PURE__ */ jsx("p", {
|
|
288
288
|
className: "text-muted-foreground",
|
|
289
289
|
children: "This composability means you can build complex applications from simple, reusable building blocks\u2014all while maintaining type safety and policy enforcement."
|
|
290
|
-
}
|
|
290
|
+
})
|
|
291
291
|
]
|
|
292
|
-
}
|
|
293
|
-
/* @__PURE__ */
|
|
292
|
+
}),
|
|
293
|
+
/* @__PURE__ */ jsxs("div", {
|
|
294
294
|
className: "space-y-4",
|
|
295
295
|
children: [
|
|
296
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ jsx("h2", {
|
|
297
297
|
className: "text-2xl font-bold",
|
|
298
298
|
children: "Next steps"
|
|
299
|
-
}
|
|
300
|
-
/* @__PURE__ */
|
|
299
|
+
}),
|
|
300
|
+
/* @__PURE__ */ jsx("p", {
|
|
301
301
|
className: "text-muted-foreground",
|
|
302
302
|
children: "Explore each specification type in detail using the links in the table above, or continue with the core concepts:"
|
|
303
|
-
}
|
|
304
|
-
/* @__PURE__ */
|
|
303
|
+
}),
|
|
304
|
+
/* @__PURE__ */ jsxs("div", {
|
|
305
305
|
className: "flex flex-wrap gap-4 pt-4",
|
|
306
306
|
children: [
|
|
307
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ jsxs(Link, {
|
|
308
308
|
href: "/docs/specs/capabilities",
|
|
309
309
|
className: "btn-primary",
|
|
310
310
|
children: [
|
|
311
311
|
"Capabilities ",
|
|
312
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ jsx(ChevronRight, {
|
|
313
313
|
size: 16,
|
|
314
314
|
className: "inline"
|
|
315
|
-
}
|
|
315
|
+
})
|
|
316
316
|
]
|
|
317
|
-
}
|
|
318
|
-
/* @__PURE__ */
|
|
317
|
+
}),
|
|
318
|
+
/* @__PURE__ */ jsxs(Link, {
|
|
319
319
|
href: "/docs/specs/workflows",
|
|
320
320
|
className: "btn-ghost",
|
|
321
321
|
children: [
|
|
322
322
|
"Workflows ",
|
|
323
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ jsx(ChevronRight, {
|
|
324
324
|
size: 16,
|
|
325
325
|
className: "inline"
|
|
326
|
-
}
|
|
326
|
+
})
|
|
327
327
|
]
|
|
328
|
-
}
|
|
329
|
-
/* @__PURE__ */
|
|
328
|
+
}),
|
|
329
|
+
/* @__PURE__ */ jsxs(Link, {
|
|
330
330
|
href: "/docs/safety",
|
|
331
331
|
className: "btn-ghost",
|
|
332
332
|
children: [
|
|
333
333
|
"Safety Features ",
|
|
334
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ jsx(ChevronRight, {
|
|
335
335
|
size: 16,
|
|
336
336
|
className: "inline"
|
|
337
|
-
}
|
|
337
|
+
})
|
|
338
338
|
]
|
|
339
|
-
}
|
|
339
|
+
})
|
|
340
340
|
]
|
|
341
|
-
}
|
|
341
|
+
})
|
|
342
342
|
]
|
|
343
|
-
}
|
|
343
|
+
})
|
|
344
344
|
]
|
|
345
|
-
}
|
|
345
|
+
});
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
// src/components/docs/specs/SpecsCapabilitiesPage.tsx
|
|
349
349
|
import Link2 from "@contractspec/lib.ui-link";
|
|
350
350
|
import { ChevronRight as ChevronRight2 } from "lucide-react";
|
|
351
|
-
import {
|
|
351
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
352
352
|
function SpecsCapabilitiesPage() {
|
|
353
|
-
return /* @__PURE__ */
|
|
353
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
354
354
|
className: "space-y-8",
|
|
355
355
|
children: [
|
|
356
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
357
357
|
className: "space-y-2",
|
|
358
358
|
children: [
|
|
359
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ jsx2("h1", {
|
|
360
360
|
className: "text-4xl font-bold",
|
|
361
361
|
children: "Capabilities"
|
|
362
|
-
}
|
|
363
|
-
/* @__PURE__ */
|
|
362
|
+
}),
|
|
363
|
+
/* @__PURE__ */ jsx2("p", {
|
|
364
364
|
className: "text-muted-foreground text-lg",
|
|
365
365
|
children: "Capabilities are the core building block of ContractSpec. They define what your app can do."
|
|
366
|
-
}
|
|
366
|
+
})
|
|
367
367
|
]
|
|
368
|
-
}
|
|
369
|
-
/* @__PURE__ */
|
|
368
|
+
}),
|
|
369
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
370
370
|
className: "space-y-6",
|
|
371
371
|
children: [
|
|
372
|
-
/* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
373
373
|
className: "space-y-3",
|
|
374
374
|
children: [
|
|
375
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
376
376
|
className: "text-2xl font-bold",
|
|
377
377
|
children: "Overview"
|
|
378
|
-
}
|
|
379
|
-
/* @__PURE__ */
|
|
378
|
+
}),
|
|
379
|
+
/* @__PURE__ */ jsx2("p", {
|
|
380
380
|
className: "text-muted-foreground",
|
|
381
381
|
children: "A ContractSpec (or Capability) is a typed, declarative description of an operation. It defines the operation's name, version, inputs, outputs, policies, and side effects. Runtime adapters automatically serve these as REST/GraphQL/MCP endpoints with full validation and policy enforcement."
|
|
382
|
-
}
|
|
382
|
+
})
|
|
383
383
|
]
|
|
384
|
-
}
|
|
385
|
-
/* @__PURE__ */
|
|
384
|
+
}),
|
|
385
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
386
386
|
className: "space-y-3",
|
|
387
387
|
children: [
|
|
388
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
389
389
|
className: "text-2xl font-bold",
|
|
390
390
|
children: "Defining a Command (Write)"
|
|
391
|
-
}
|
|
392
|
-
/* @__PURE__ */
|
|
391
|
+
}),
|
|
392
|
+
/* @__PURE__ */ jsx2("div", {
|
|
393
393
|
className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
|
|
394
|
-
children: /* @__PURE__ */
|
|
394
|
+
children: /* @__PURE__ */ jsx2("pre", {
|
|
395
395
|
children: `import { defineCommand } from '@contractspec/lib.contracts-spec';
|
|
396
396
|
import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
397
397
|
|
|
@@ -431,228 +431,228 @@ export const TransferFunds = defineCommand({
|
|
|
431
431
|
flags: ['payments_enabled'],
|
|
432
432
|
},
|
|
433
433
|
});`
|
|
434
|
-
}
|
|
435
|
-
}
|
|
434
|
+
})
|
|
435
|
+
})
|
|
436
436
|
]
|
|
437
|
-
}
|
|
438
|
-
/* @__PURE__ */
|
|
437
|
+
}),
|
|
438
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
439
439
|
className: "space-y-3",
|
|
440
440
|
children: [
|
|
441
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
442
442
|
className: "text-2xl font-bold",
|
|
443
443
|
children: "Schema Types"
|
|
444
|
-
}
|
|
445
|
-
/* @__PURE__ */
|
|
444
|
+
}),
|
|
445
|
+
/* @__PURE__ */ jsxs2("p", {
|
|
446
446
|
className: "text-muted-foreground",
|
|
447
447
|
children: [
|
|
448
448
|
"ContractSpec uses ",
|
|
449
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ jsx2("code", {
|
|
450
450
|
children: "@contractspec/lib.schema"
|
|
451
|
-
}
|
|
451
|
+
}),
|
|
452
452
|
" for I/O definitions. This provides Zod validation, GraphQL types, and JSON Schema from a single source."
|
|
453
453
|
]
|
|
454
|
-
}
|
|
455
|
-
/* @__PURE__ */
|
|
454
|
+
}),
|
|
455
|
+
/* @__PURE__ */ jsxs2("ul", {
|
|
456
456
|
className: "text-muted-foreground space-y-2",
|
|
457
457
|
children: [
|
|
458
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ jsxs2("li", {
|
|
459
459
|
children: [
|
|
460
460
|
"\u2022",
|
|
461
461
|
" ",
|
|
462
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ jsx2("code", {
|
|
463
463
|
className: "bg-background/50 rounded px-2 py-1",
|
|
464
464
|
children: "ScalarTypeEnum.NonEmptyString()"
|
|
465
|
-
}
|
|
465
|
+
}),
|
|
466
466
|
" ",
|
|
467
467
|
"- Non-empty text"
|
|
468
468
|
]
|
|
469
|
-
}
|
|
470
|
-
/* @__PURE__ */
|
|
469
|
+
}),
|
|
470
|
+
/* @__PURE__ */ jsxs2("li", {
|
|
471
471
|
children: [
|
|
472
472
|
"\u2022",
|
|
473
473
|
" ",
|
|
474
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ jsx2("code", {
|
|
475
475
|
className: "bg-background/50 rounded px-2 py-1",
|
|
476
476
|
children: "ScalarTypeEnum.PositiveNumber()"
|
|
477
|
-
}
|
|
477
|
+
}),
|
|
478
478
|
" ",
|
|
479
479
|
"- Positive numbers"
|
|
480
480
|
]
|
|
481
|
-
}
|
|
482
|
-
/* @__PURE__ */
|
|
481
|
+
}),
|
|
482
|
+
/* @__PURE__ */ jsxs2("li", {
|
|
483
483
|
children: [
|
|
484
484
|
"\u2022",
|
|
485
485
|
" ",
|
|
486
|
-
/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ jsx2("code", {
|
|
487
487
|
className: "bg-background/50 rounded px-2 py-1",
|
|
488
488
|
children: "ScalarTypeEnum.DateTime()"
|
|
489
|
-
}
|
|
489
|
+
}),
|
|
490
490
|
" ",
|
|
491
491
|
"- ISO 8601 timestamps"
|
|
492
492
|
]
|
|
493
|
-
}
|
|
494
|
-
/* @__PURE__ */
|
|
493
|
+
}),
|
|
494
|
+
/* @__PURE__ */ jsxs2("li", {
|
|
495
495
|
children: [
|
|
496
496
|
"\u2022",
|
|
497
497
|
" ",
|
|
498
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ jsx2("code", {
|
|
499
499
|
className: "bg-background/50 rounded px-2 py-1",
|
|
500
500
|
children: "ScalarTypeEnum.Email()"
|
|
501
|
-
}
|
|
501
|
+
}),
|
|
502
502
|
" ",
|
|
503
503
|
"- Valid email addresses"
|
|
504
504
|
]
|
|
505
|
-
}
|
|
506
|
-
/* @__PURE__ */
|
|
505
|
+
}),
|
|
506
|
+
/* @__PURE__ */ jsxs2("li", {
|
|
507
507
|
children: [
|
|
508
508
|
"\u2022",
|
|
509
509
|
" ",
|
|
510
|
-
/* @__PURE__ */
|
|
510
|
+
/* @__PURE__ */ jsx2("code", {
|
|
511
511
|
className: "bg-background/50 rounded px-2 py-1",
|
|
512
512
|
children: "defineEnum(...)"
|
|
513
|
-
}
|
|
513
|
+
}),
|
|
514
514
|
" ",
|
|
515
515
|
"- Type-safe enums"
|
|
516
516
|
]
|
|
517
|
-
}
|
|
517
|
+
})
|
|
518
518
|
]
|
|
519
|
-
}
|
|
519
|
+
})
|
|
520
520
|
]
|
|
521
|
-
}
|
|
522
|
-
/* @__PURE__ */
|
|
521
|
+
}),
|
|
522
|
+
/* @__PURE__ */ jsx2("div", {
|
|
523
523
|
className: "flex items-center gap-4 pt-4",
|
|
524
|
-
children: /* @__PURE__ */
|
|
524
|
+
children: /* @__PURE__ */ jsxs2(Link2, {
|
|
525
525
|
href: "/docs/specs/dataviews",
|
|
526
526
|
className: "btn-primary",
|
|
527
527
|
children: [
|
|
528
528
|
"Next: DataViews ",
|
|
529
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ jsx2(ChevronRight2, {
|
|
530
530
|
size: 16
|
|
531
|
-
}
|
|
531
|
+
})
|
|
532
532
|
]
|
|
533
|
-
}
|
|
534
|
-
}
|
|
533
|
+
})
|
|
534
|
+
})
|
|
535
535
|
]
|
|
536
|
-
}
|
|
536
|
+
})
|
|
537
537
|
]
|
|
538
|
-
}
|
|
538
|
+
});
|
|
539
539
|
}
|
|
540
540
|
|
|
541
541
|
// src/components/docs/specs/SpecsDataViewsPage.tsx
|
|
542
542
|
import Link3 from "@contractspec/lib.ui-link";
|
|
543
543
|
import { ChevronRight as ChevronRight3 } from "lucide-react";
|
|
544
|
-
import {
|
|
544
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
545
545
|
function SpecsDataViewsPage() {
|
|
546
|
-
return /* @__PURE__ */
|
|
546
|
+
return /* @__PURE__ */ jsxs3("div", {
|
|
547
547
|
className: "space-y-8",
|
|
548
548
|
children: [
|
|
549
|
-
/* @__PURE__ */
|
|
549
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
550
550
|
className: "space-y-4",
|
|
551
551
|
children: [
|
|
552
|
-
/* @__PURE__ */
|
|
552
|
+
/* @__PURE__ */ jsx3("h1", {
|
|
553
553
|
className: "text-4xl font-bold",
|
|
554
554
|
children: "DataViews"
|
|
555
|
-
}
|
|
556
|
-
/* @__PURE__ */
|
|
555
|
+
}),
|
|
556
|
+
/* @__PURE__ */ jsxs3("p", {
|
|
557
557
|
className: "text-muted-foreground",
|
|
558
558
|
children: [
|
|
559
559
|
"A ",
|
|
560
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ jsx3("strong", {
|
|
561
561
|
children: "DataViewSpec"
|
|
562
|
-
}
|
|
562
|
+
}),
|
|
563
563
|
" describes how data should be queried, filtered, sorted, and presented to users. Runtime adapters execute optimized database queries and serve list views, detail views, and search interfaces while respecting policy constraints."
|
|
564
564
|
]
|
|
565
|
-
}
|
|
565
|
+
})
|
|
566
566
|
]
|
|
567
|
-
}
|
|
568
|
-
/* @__PURE__ */
|
|
567
|
+
}),
|
|
568
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
569
569
|
className: "space-y-4",
|
|
570
570
|
children: [
|
|
571
|
-
/* @__PURE__ */
|
|
571
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
572
572
|
className: "text-2xl font-bold",
|
|
573
573
|
children: "Core concepts"
|
|
574
|
-
}
|
|
575
|
-
/* @__PURE__ */
|
|
574
|
+
}),
|
|
575
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
576
576
|
className: "space-y-3",
|
|
577
577
|
children: [
|
|
578
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
579
579
|
children: [
|
|
580
|
-
/* @__PURE__ */
|
|
580
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
581
581
|
className: "text-lg font-semibold",
|
|
582
582
|
children: "Data sources"
|
|
583
|
-
}
|
|
584
|
-
/* @__PURE__ */
|
|
583
|
+
}),
|
|
584
|
+
/* @__PURE__ */ jsx3("p", {
|
|
585
585
|
className: "text-muted-foreground",
|
|
586
586
|
children: "A DataView connects to one or more data sources\u2014databases, APIs, or other capabilities. You specify the source and the fields you want to expose."
|
|
587
|
-
}
|
|
587
|
+
})
|
|
588
588
|
]
|
|
589
|
-
}
|
|
590
|
-
/* @__PURE__ */
|
|
589
|
+
}),
|
|
590
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
591
591
|
children: [
|
|
592
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
593
593
|
className: "text-lg font-semibold",
|
|
594
594
|
children: "Filtering"
|
|
595
|
-
}
|
|
596
|
-
/* @__PURE__ */
|
|
595
|
+
}),
|
|
596
|
+
/* @__PURE__ */ jsx3("p", {
|
|
597
597
|
className: "text-muted-foreground",
|
|
598
598
|
children: `Define filters that users can apply to narrow down results. Filters can be simple (e.g., "status equals 'active'") or complex (e.g., "created within the last 30 days AND assigned to current user").`
|
|
599
|
-
}
|
|
599
|
+
})
|
|
600
600
|
]
|
|
601
|
-
}
|
|
602
|
-
/* @__PURE__ */
|
|
601
|
+
}),
|
|
602
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
603
603
|
children: [
|
|
604
|
-
/* @__PURE__ */
|
|
604
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
605
605
|
className: "text-lg font-semibold",
|
|
606
606
|
children: "Sorting"
|
|
607
|
-
}
|
|
608
|
-
/* @__PURE__ */
|
|
607
|
+
}),
|
|
608
|
+
/* @__PURE__ */ jsx3("p", {
|
|
609
609
|
className: "text-muted-foreground",
|
|
610
610
|
children: "Specify which fields can be sorted and the default sort order. ContractSpec generates efficient database queries with proper indexes."
|
|
611
|
-
}
|
|
611
|
+
})
|
|
612
612
|
]
|
|
613
|
-
}
|
|
614
|
-
/* @__PURE__ */
|
|
613
|
+
}),
|
|
614
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
615
615
|
children: [
|
|
616
|
-
/* @__PURE__ */
|
|
616
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
617
617
|
className: "text-lg font-semibold",
|
|
618
618
|
children: "Pagination"
|
|
619
|
-
}
|
|
620
|
-
/* @__PURE__ */
|
|
619
|
+
}),
|
|
620
|
+
/* @__PURE__ */ jsx3("p", {
|
|
621
621
|
className: "text-muted-foreground",
|
|
622
622
|
children: "DataViews automatically support pagination to handle large datasets. You can configure page size limits and cursor-based or offset-based pagination."
|
|
623
|
-
}
|
|
623
|
+
})
|
|
624
624
|
]
|
|
625
|
-
}
|
|
626
|
-
/* @__PURE__ */
|
|
625
|
+
}),
|
|
626
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
627
627
|
children: [
|
|
628
|
-
/* @__PURE__ */
|
|
628
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
629
629
|
className: "text-lg font-semibold",
|
|
630
630
|
children: "Aggregations"
|
|
631
|
-
}
|
|
632
|
-
/* @__PURE__ */
|
|
631
|
+
}),
|
|
632
|
+
/* @__PURE__ */ jsx3("p", {
|
|
633
633
|
className: "text-muted-foreground",
|
|
634
634
|
children: "Compute aggregates like counts, sums, averages, and group-by operations. These are useful for dashboards and summary views."
|
|
635
|
-
}
|
|
635
|
+
})
|
|
636
636
|
]
|
|
637
|
-
}
|
|
637
|
+
})
|
|
638
638
|
]
|
|
639
|
-
}
|
|
639
|
+
})
|
|
640
640
|
]
|
|
641
|
-
}
|
|
642
|
-
/* @__PURE__ */
|
|
641
|
+
}),
|
|
642
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
643
643
|
className: "space-y-4",
|
|
644
644
|
children: [
|
|
645
|
-
/* @__PURE__ */
|
|
645
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
646
646
|
className: "text-2xl font-bold",
|
|
647
647
|
children: "Example DataViewSpec"
|
|
648
|
-
}
|
|
649
|
-
/* @__PURE__ */
|
|
648
|
+
}),
|
|
649
|
+
/* @__PURE__ */ jsx3("p", {
|
|
650
650
|
className: "text-muted-foreground",
|
|
651
651
|
children: "Here's a DataView for listing orders in TypeScript:"
|
|
652
|
-
}
|
|
653
|
-
/* @__PURE__ */
|
|
652
|
+
}),
|
|
653
|
+
/* @__PURE__ */ jsx3("div", {
|
|
654
654
|
className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
|
|
655
|
-
children: /* @__PURE__ */
|
|
655
|
+
children: /* @__PURE__ */ jsx3("pre", {
|
|
656
656
|
children: `import { defineDataView } from '@contractspec/lib.contracts-spec';
|
|
657
657
|
import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
658
658
|
|
|
@@ -694,314 +694,314 @@ export const OrderList = defineDataView({
|
|
|
694
694
|
maxPageSize: 200,
|
|
695
695
|
},
|
|
696
696
|
});`
|
|
697
|
-
}
|
|
698
|
-
}
|
|
697
|
+
})
|
|
698
|
+
})
|
|
699
699
|
]
|
|
700
|
-
}
|
|
701
|
-
/* @__PURE__ */
|
|
700
|
+
}),
|
|
701
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
702
702
|
className: "space-y-4",
|
|
703
703
|
children: [
|
|
704
|
-
/* @__PURE__ */
|
|
704
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
705
705
|
className: "text-2xl font-bold",
|
|
706
706
|
children: "Policy integration"
|
|
707
|
-
}
|
|
708
|
-
/* @__PURE__ */
|
|
707
|
+
}),
|
|
708
|
+
/* @__PURE__ */ jsxs3("p", {
|
|
709
709
|
className: "text-muted-foreground",
|
|
710
710
|
children: [
|
|
711
711
|
"DataViews automatically enforce",
|
|
712
712
|
" ",
|
|
713
|
-
/* @__PURE__ */
|
|
713
|
+
/* @__PURE__ */ jsx3(Link3, {
|
|
714
714
|
href: "/docs/specs/policy",
|
|
715
715
|
className: "text-violet-400 hover:text-violet-300",
|
|
716
716
|
children: "PolicySpecs"
|
|
717
|
-
}
|
|
717
|
+
}),
|
|
718
718
|
". If a user doesn't have permission to see certain fields, those fields are automatically filtered out or redacted. If a user can only see their own data, the query is automatically scoped."
|
|
719
719
|
]
|
|
720
|
-
}
|
|
721
|
-
/* @__PURE__ */
|
|
720
|
+
}),
|
|
721
|
+
/* @__PURE__ */ jsx3("p", {
|
|
722
722
|
className: "text-muted-foreground",
|
|
723
723
|
children: "This means you define the data view once, and it works correctly for all users based on their permissions\u2014no need to write separate queries for different roles."
|
|
724
|
-
}
|
|
724
|
+
})
|
|
725
725
|
]
|
|
726
|
-
}
|
|
727
|
-
/* @__PURE__ */
|
|
726
|
+
}),
|
|
727
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
728
728
|
className: "space-y-4",
|
|
729
729
|
children: [
|
|
730
|
-
/* @__PURE__ */
|
|
730
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
731
731
|
className: "text-2xl font-bold",
|
|
732
732
|
children: "Served outputs"
|
|
733
|
-
}
|
|
734
|
-
/* @__PURE__ */
|
|
733
|
+
}),
|
|
734
|
+
/* @__PURE__ */ jsx3("p", {
|
|
735
735
|
className: "text-muted-foreground",
|
|
736
736
|
children: "From a DataViewSpec, ContractSpec serves:"
|
|
737
|
-
}
|
|
738
|
-
/* @__PURE__ */
|
|
737
|
+
}),
|
|
738
|
+
/* @__PURE__ */ jsxs3("ul", {
|
|
739
739
|
className: "text-muted-foreground list-inside list-disc space-y-2",
|
|
740
740
|
children: [
|
|
741
|
-
/* @__PURE__ */
|
|
741
|
+
/* @__PURE__ */ jsxs3("li", {
|
|
742
742
|
children: [
|
|
743
|
-
/* @__PURE__ */
|
|
743
|
+
/* @__PURE__ */ jsx3("strong", {
|
|
744
744
|
children: "Database queries"
|
|
745
|
-
}
|
|
745
|
+
}),
|
|
746
746
|
" \u2013 Optimized SQL or NoSQL queries executed at runtime"
|
|
747
747
|
]
|
|
748
|
-
}
|
|
749
|
-
/* @__PURE__ */
|
|
748
|
+
}),
|
|
749
|
+
/* @__PURE__ */ jsxs3("li", {
|
|
750
750
|
children: [
|
|
751
|
-
/* @__PURE__ */
|
|
751
|
+
/* @__PURE__ */ jsx3("strong", {
|
|
752
752
|
children: "API endpoints"
|
|
753
|
-
}
|
|
753
|
+
}),
|
|
754
754
|
" \u2013 RESTful or GraphQL endpoints for fetching data"
|
|
755
755
|
]
|
|
756
|
-
}
|
|
757
|
-
/* @__PURE__ */
|
|
756
|
+
}),
|
|
757
|
+
/* @__PURE__ */ jsxs3("li", {
|
|
758
758
|
children: [
|
|
759
|
-
/* @__PURE__ */
|
|
759
|
+
/* @__PURE__ */ jsx3("strong", {
|
|
760
760
|
children: "UI components"
|
|
761
|
-
}
|
|
761
|
+
}),
|
|
762
762
|
" \u2013 List views, tables, cards, and detail views"
|
|
763
763
|
]
|
|
764
|
-
}
|
|
765
|
-
/* @__PURE__ */
|
|
764
|
+
}),
|
|
765
|
+
/* @__PURE__ */ jsxs3("li", {
|
|
766
766
|
children: [
|
|
767
|
-
/* @__PURE__ */
|
|
767
|
+
/* @__PURE__ */ jsx3("strong", {
|
|
768
768
|
children: "Search interfaces"
|
|
769
|
-
}
|
|
769
|
+
}),
|
|
770
770
|
" \u2013 Full-text search with autocomplete"
|
|
771
771
|
]
|
|
772
|
-
}
|
|
773
|
-
/* @__PURE__ */
|
|
772
|
+
}),
|
|
773
|
+
/* @__PURE__ */ jsxs3("li", {
|
|
774
774
|
children: [
|
|
775
|
-
/* @__PURE__ */
|
|
775
|
+
/* @__PURE__ */ jsx3("strong", {
|
|
776
776
|
children: "Export functions"
|
|
777
|
-
}
|
|
777
|
+
}),
|
|
778
778
|
" \u2013 CSV, JSON, or Excel exports"
|
|
779
779
|
]
|
|
780
|
-
}
|
|
780
|
+
})
|
|
781
781
|
]
|
|
782
|
-
}
|
|
782
|
+
})
|
|
783
783
|
]
|
|
784
|
-
}
|
|
785
|
-
/* @__PURE__ */
|
|
784
|
+
}),
|
|
785
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
786
786
|
className: "space-y-4",
|
|
787
787
|
children: [
|
|
788
|
-
/* @__PURE__ */
|
|
788
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
789
789
|
className: "text-2xl font-bold",
|
|
790
790
|
children: "Best practices"
|
|
791
|
-
}
|
|
792
|
-
/* @__PURE__ */
|
|
791
|
+
}),
|
|
792
|
+
/* @__PURE__ */ jsxs3("ul", {
|
|
793
793
|
className: "text-muted-foreground list-inside list-disc space-y-2",
|
|
794
794
|
children: [
|
|
795
|
-
/* @__PURE__ */
|
|
795
|
+
/* @__PURE__ */ jsx3("li", {
|
|
796
796
|
children: "Only expose fields that users actually need\u2014this improves performance and security."
|
|
797
|
-
}
|
|
798
|
-
/* @__PURE__ */
|
|
797
|
+
}),
|
|
798
|
+
/* @__PURE__ */ jsx3("li", {
|
|
799
799
|
children: "Use appropriate indexes for sortable and filterable fields."
|
|
800
|
-
}
|
|
801
|
-
/* @__PURE__ */
|
|
800
|
+
}),
|
|
801
|
+
/* @__PURE__ */ jsx3("li", {
|
|
802
802
|
children: "Set reasonable pagination limits to prevent performance issues."
|
|
803
|
-
}
|
|
804
|
-
/* @__PURE__ */
|
|
803
|
+
}),
|
|
804
|
+
/* @__PURE__ */ jsx3("li", {
|
|
805
805
|
children: "Use aggregations sparingly\u2014they can be expensive on large datasets."
|
|
806
|
-
}
|
|
807
|
-
/* @__PURE__ */
|
|
806
|
+
}),
|
|
807
|
+
/* @__PURE__ */ jsx3("li", {
|
|
808
808
|
children: "Test DataViews with realistic data volumes to ensure they perform well."
|
|
809
|
-
}
|
|
809
|
+
})
|
|
810
810
|
]
|
|
811
|
-
}
|
|
811
|
+
})
|
|
812
812
|
]
|
|
813
|
-
}
|
|
814
|
-
/* @__PURE__ */
|
|
813
|
+
}),
|
|
814
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
815
815
|
className: "flex items-center gap-4 pt-4",
|
|
816
816
|
children: [
|
|
817
|
-
/* @__PURE__ */
|
|
817
|
+
/* @__PURE__ */ jsx3(Link3, {
|
|
818
818
|
href: "/docs/specs/capabilities",
|
|
819
819
|
className: "btn-ghost",
|
|
820
820
|
children: "Previous: Capabilities"
|
|
821
|
-
}
|
|
822
|
-
/* @__PURE__ */
|
|
821
|
+
}),
|
|
822
|
+
/* @__PURE__ */ jsxs3(Link3, {
|
|
823
823
|
href: "/docs/specs/workflows",
|
|
824
824
|
className: "btn-primary",
|
|
825
825
|
children: [
|
|
826
826
|
"Next: Workflows ",
|
|
827
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ jsx3(ChevronRight3, {
|
|
828
828
|
size: 16
|
|
829
|
-
}
|
|
829
|
+
})
|
|
830
830
|
]
|
|
831
|
-
}
|
|
831
|
+
})
|
|
832
832
|
]
|
|
833
|
-
}
|
|
833
|
+
})
|
|
834
834
|
]
|
|
835
|
-
}
|
|
835
|
+
});
|
|
836
836
|
}
|
|
837
837
|
|
|
838
838
|
// src/components/docs/specs/SpecsWorkflowsPage.tsx
|
|
839
839
|
import Link4 from "@contractspec/lib.ui-link";
|
|
840
840
|
import { ChevronRight as ChevronRight4 } from "lucide-react";
|
|
841
|
-
import {
|
|
841
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
842
842
|
function SpecsWorkflowsPage() {
|
|
843
|
-
return /* @__PURE__ */
|
|
843
|
+
return /* @__PURE__ */ jsxs4("div", {
|
|
844
844
|
className: "space-y-8",
|
|
845
845
|
children: [
|
|
846
|
-
/* @__PURE__ */
|
|
846
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
847
847
|
className: "space-y-4",
|
|
848
848
|
children: [
|
|
849
|
-
/* @__PURE__ */
|
|
849
|
+
/* @__PURE__ */ jsx4("h1", {
|
|
850
850
|
className: "text-4xl font-bold",
|
|
851
851
|
children: "Workflows"
|
|
852
|
-
}
|
|
853
|
-
/* @__PURE__ */
|
|
852
|
+
}),
|
|
853
|
+
/* @__PURE__ */ jsxs4("p", {
|
|
854
854
|
className: "text-muted-foreground",
|
|
855
855
|
children: [
|
|
856
856
|
"A ",
|
|
857
|
-
/* @__PURE__ */
|
|
857
|
+
/* @__PURE__ */ jsx4("strong", {
|
|
858
858
|
children: "WorkflowSpec"
|
|
859
|
-
}
|
|
859
|
+
}),
|
|
860
860
|
" orchestrates multi-step processes. It defines the sequence of operations, handles failures with retries and compensation, and provides observability into long-running tasks."
|
|
861
861
|
]
|
|
862
|
-
}
|
|
862
|
+
})
|
|
863
863
|
]
|
|
864
|
-
}
|
|
865
|
-
/* @__PURE__ */
|
|
864
|
+
}),
|
|
865
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
866
866
|
className: "space-y-4",
|
|
867
867
|
children: [
|
|
868
|
-
/* @__PURE__ */
|
|
868
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
869
869
|
className: "text-2xl font-bold",
|
|
870
870
|
children: "Core concepts"
|
|
871
|
-
}
|
|
872
|
-
/* @__PURE__ */
|
|
871
|
+
}),
|
|
872
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
873
873
|
className: "space-y-3",
|
|
874
874
|
children: [
|
|
875
|
-
/* @__PURE__ */
|
|
875
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
876
876
|
children: [
|
|
877
|
-
/* @__PURE__ */
|
|
877
|
+
/* @__PURE__ */ jsx4("h3", {
|
|
878
878
|
className: "text-lg font-semibold",
|
|
879
879
|
children: "Identifiers"
|
|
880
|
-
}
|
|
881
|
-
/* @__PURE__ */
|
|
880
|
+
}),
|
|
881
|
+
/* @__PURE__ */ jsxs4("p", {
|
|
882
882
|
className: "text-muted-foreground",
|
|
883
883
|
children: [
|
|
884
884
|
"Each workflow has a unique",
|
|
885
885
|
" ",
|
|
886
|
-
/* @__PURE__ */
|
|
886
|
+
/* @__PURE__ */ jsx4("code", {
|
|
887
887
|
className: "bg-background/50 rounded px-2 py-1",
|
|
888
888
|
children: "workflowId"
|
|
889
|
-
}
|
|
889
|
+
}),
|
|
890
890
|
" ",
|
|
891
891
|
"and a",
|
|
892
892
|
" ",
|
|
893
|
-
/* @__PURE__ */
|
|
893
|
+
/* @__PURE__ */ jsx4("code", {
|
|
894
894
|
className: "bg-background/50 rounded px-2 py-1",
|
|
895
895
|
children: "version"
|
|
896
|
-
}
|
|
896
|
+
}),
|
|
897
897
|
". This allows you to run multiple versions of the same workflow simultaneously during migrations or A/B tests."
|
|
898
898
|
]
|
|
899
|
-
}
|
|
899
|
+
})
|
|
900
900
|
]
|
|
901
|
-
}
|
|
902
|
-
/* @__PURE__ */
|
|
901
|
+
}),
|
|
902
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
903
903
|
children: [
|
|
904
|
-
/* @__PURE__ */
|
|
904
|
+
/* @__PURE__ */ jsx4("h3", {
|
|
905
905
|
className: "text-lg font-semibold",
|
|
906
906
|
children: "Steps"
|
|
907
|
-
}
|
|
908
|
-
/* @__PURE__ */
|
|
907
|
+
}),
|
|
908
|
+
/* @__PURE__ */ jsxs4("p", {
|
|
909
909
|
className: "text-muted-foreground",
|
|
910
910
|
children: [
|
|
911
911
|
"A workflow is composed of ",
|
|
912
|
-
/* @__PURE__ */
|
|
912
|
+
/* @__PURE__ */ jsx4("strong", {
|
|
913
913
|
children: "steps"
|
|
914
|
-
}
|
|
914
|
+
}),
|
|
915
915
|
". Each step invokes a",
|
|
916
916
|
" ",
|
|
917
|
-
/* @__PURE__ */
|
|
917
|
+
/* @__PURE__ */ jsx4(Link4, {
|
|
918
918
|
href: "/docs/specs/capabilities",
|
|
919
919
|
className: "text-violet-400 hover:text-violet-300",
|
|
920
920
|
children: "CapabilitySpec"
|
|
921
|
-
}
|
|
921
|
+
}),
|
|
922
922
|
", passes inputs, and receives outputs. Steps can run sequentially or in parallel."
|
|
923
923
|
]
|
|
924
|
-
}
|
|
924
|
+
})
|
|
925
925
|
]
|
|
926
|
-
}
|
|
927
|
-
/* @__PURE__ */
|
|
926
|
+
}),
|
|
927
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
928
928
|
children: [
|
|
929
|
-
/* @__PURE__ */
|
|
929
|
+
/* @__PURE__ */ jsx4("h3", {
|
|
930
930
|
className: "text-lg font-semibold",
|
|
931
931
|
children: "Transitions"
|
|
932
|
-
}
|
|
933
|
-
/* @__PURE__ */
|
|
932
|
+
}),
|
|
933
|
+
/* @__PURE__ */ jsxs4("p", {
|
|
934
934
|
className: "text-muted-foreground",
|
|
935
935
|
children: [
|
|
936
|
-
/* @__PURE__ */
|
|
936
|
+
/* @__PURE__ */ jsx4("strong", {
|
|
937
937
|
children: "Transitions"
|
|
938
|
-
}
|
|
938
|
+
}),
|
|
939
939
|
' define the flow between steps. They can be conditional (e.g., "if payment succeeds, go to step 3; otherwise, go to step 5") or unconditional.'
|
|
940
940
|
]
|
|
941
|
-
}
|
|
941
|
+
})
|
|
942
942
|
]
|
|
943
|
-
}
|
|
944
|
-
/* @__PURE__ */
|
|
943
|
+
}),
|
|
944
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
945
945
|
children: [
|
|
946
|
-
/* @__PURE__ */
|
|
946
|
+
/* @__PURE__ */ jsx4("h3", {
|
|
947
947
|
className: "text-lg font-semibold",
|
|
948
948
|
children: "Retries"
|
|
949
|
-
}
|
|
950
|
-
/* @__PURE__ */
|
|
949
|
+
}),
|
|
950
|
+
/* @__PURE__ */ jsx4("p", {
|
|
951
951
|
className: "text-muted-foreground",
|
|
952
952
|
children: "If a step fails, the workflow can retry it with exponential backoff. You specify the maximum number of retries and the backoff strategy in the spec."
|
|
953
|
-
}
|
|
953
|
+
})
|
|
954
954
|
]
|
|
955
|
-
}
|
|
956
|
-
/* @__PURE__ */
|
|
955
|
+
}),
|
|
956
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
957
957
|
children: [
|
|
958
|
-
/* @__PURE__ */
|
|
958
|
+
/* @__PURE__ */ jsx4("h3", {
|
|
959
959
|
className: "text-lg font-semibold",
|
|
960
960
|
children: "Compensation"
|
|
961
|
-
}
|
|
962
|
-
/* @__PURE__ */
|
|
961
|
+
}),
|
|
962
|
+
/* @__PURE__ */ jsxs4("p", {
|
|
963
963
|
className: "text-muted-foreground",
|
|
964
964
|
children: [
|
|
965
965
|
"When a workflow fails partway through,",
|
|
966
966
|
" ",
|
|
967
|
-
/* @__PURE__ */
|
|
967
|
+
/* @__PURE__ */ jsx4("strong", {
|
|
968
968
|
children: "compensation"
|
|
969
|
-
}
|
|
969
|
+
}),
|
|
970
970
|
" steps undo the effects of completed steps (e.g., refunding a payment, releasing a reservation). This ensures consistency even in failure scenarios."
|
|
971
971
|
]
|
|
972
|
-
}
|
|
972
|
+
})
|
|
973
973
|
]
|
|
974
|
-
}
|
|
975
|
-
/* @__PURE__ */
|
|
974
|
+
}),
|
|
975
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
976
976
|
children: [
|
|
977
|
-
/* @__PURE__ */
|
|
977
|
+
/* @__PURE__ */ jsx4("h3", {
|
|
978
978
|
className: "text-lg font-semibold",
|
|
979
979
|
children: "SLAs"
|
|
980
|
-
}
|
|
981
|
-
/* @__PURE__ */
|
|
980
|
+
}),
|
|
981
|
+
/* @__PURE__ */ jsx4("p", {
|
|
982
982
|
className: "text-muted-foreground",
|
|
983
983
|
children: "You can define Service Level Agreements (SLAs) for each step or the entire workflow. If a step exceeds its SLA, the system can trigger alerts or escalations."
|
|
984
|
-
}
|
|
984
|
+
})
|
|
985
985
|
]
|
|
986
|
-
}
|
|
986
|
+
})
|
|
987
987
|
]
|
|
988
|
-
}
|
|
988
|
+
})
|
|
989
989
|
]
|
|
990
|
-
}
|
|
991
|
-
/* @__PURE__ */
|
|
990
|
+
}),
|
|
991
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
992
992
|
className: "space-y-4",
|
|
993
993
|
children: [
|
|
994
|
-
/* @__PURE__ */
|
|
994
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
995
995
|
className: "text-2xl font-bold",
|
|
996
996
|
children: "Example WorkflowSpec (TypeScript)"
|
|
997
|
-
}
|
|
998
|
-
/* @__PURE__ */
|
|
997
|
+
}),
|
|
998
|
+
/* @__PURE__ */ jsx4("p", {
|
|
999
999
|
className: "text-muted-foreground",
|
|
1000
1000
|
children: "Here's a simplified example of a payment workflow in TypeScript:"
|
|
1001
|
-
}
|
|
1002
|
-
/* @__PURE__ */
|
|
1001
|
+
}),
|
|
1002
|
+
/* @__PURE__ */ jsx4("div", {
|
|
1003
1003
|
className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
|
|
1004
|
-
children: /* @__PURE__ */
|
|
1004
|
+
children: /* @__PURE__ */ jsx4("pre", {
|
|
1005
1005
|
children: `import { defineWorkflow } from '@contractspec/lib.contracts-spec/workflow';
|
|
1006
1006
|
import { ValidatePaymentMethod, ChargePayment, SendEmail } from './specs';
|
|
1007
1007
|
|
|
@@ -1055,265 +1055,265 @@ export const PaymentFlow = defineWorkflow({
|
|
|
1055
1055
|
alertOnBreach: true,
|
|
1056
1056
|
},
|
|
1057
1057
|
});`
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1058
|
+
})
|
|
1059
|
+
})
|
|
1060
1060
|
]
|
|
1061
|
-
}
|
|
1062
|
-
/* @__PURE__ */
|
|
1061
|
+
}),
|
|
1062
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1063
1063
|
className: "space-y-4",
|
|
1064
1064
|
children: [
|
|
1065
|
-
/* @__PURE__ */
|
|
1065
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
1066
1066
|
className: "text-2xl font-bold",
|
|
1067
1067
|
children: "Triggers"
|
|
1068
|
-
}
|
|
1069
|
-
/* @__PURE__ */
|
|
1068
|
+
}),
|
|
1069
|
+
/* @__PURE__ */ jsx4("p", {
|
|
1070
1070
|
className: "text-muted-foreground",
|
|
1071
1071
|
children: "Workflows can be triggered in several ways:"
|
|
1072
|
-
}
|
|
1073
|
-
/* @__PURE__ */
|
|
1072
|
+
}),
|
|
1073
|
+
/* @__PURE__ */ jsxs4("ul", {
|
|
1074
1074
|
className: "text-muted-foreground list-inside list-disc space-y-2",
|
|
1075
1075
|
children: [
|
|
1076
|
-
/* @__PURE__ */
|
|
1076
|
+
/* @__PURE__ */ jsxs4("li", {
|
|
1077
1077
|
children: [
|
|
1078
|
-
/* @__PURE__ */
|
|
1078
|
+
/* @__PURE__ */ jsx4("strong", {
|
|
1079
1079
|
children: "Manual invocation"
|
|
1080
|
-
}
|
|
1080
|
+
}),
|
|
1081
1081
|
" \u2013 A user or system calls the workflow via an API endpoint."
|
|
1082
1082
|
]
|
|
1083
|
-
}
|
|
1084
|
-
/* @__PURE__ */
|
|
1083
|
+
}),
|
|
1084
|
+
/* @__PURE__ */ jsxs4("li", {
|
|
1085
1085
|
children: [
|
|
1086
|
-
/* @__PURE__ */
|
|
1086
|
+
/* @__PURE__ */ jsx4("strong", {
|
|
1087
1087
|
children: "Event-driven"
|
|
1088
|
-
}
|
|
1088
|
+
}),
|
|
1089
1089
|
" \u2013 The workflow starts automatically when a specific event occurs (e.g., a new order is created)."
|
|
1090
1090
|
]
|
|
1091
|
-
}
|
|
1092
|
-
/* @__PURE__ */
|
|
1091
|
+
}),
|
|
1092
|
+
/* @__PURE__ */ jsxs4("li", {
|
|
1093
1093
|
children: [
|
|
1094
|
-
/* @__PURE__ */
|
|
1094
|
+
/* @__PURE__ */ jsx4("strong", {
|
|
1095
1095
|
children: "Scheduled"
|
|
1096
|
-
}
|
|
1096
|
+
}),
|
|
1097
1097
|
" \u2013 The workflow runs on a cron schedule (e.g., nightly batch processing)."
|
|
1098
1098
|
]
|
|
1099
|
-
}
|
|
1100
|
-
/* @__PURE__ */
|
|
1099
|
+
}),
|
|
1100
|
+
/* @__PURE__ */ jsxs4("li", {
|
|
1101
1101
|
children: [
|
|
1102
|
-
/* @__PURE__ */
|
|
1102
|
+
/* @__PURE__ */ jsx4("strong", {
|
|
1103
1103
|
children: "Chained"
|
|
1104
|
-
}
|
|
1104
|
+
}),
|
|
1105
1105
|
" \u2013 One workflow can invoke another as a step."
|
|
1106
1106
|
]
|
|
1107
|
-
}
|
|
1107
|
+
})
|
|
1108
1108
|
]
|
|
1109
|
-
}
|
|
1109
|
+
})
|
|
1110
1110
|
]
|
|
1111
|
-
}
|
|
1112
|
-
/* @__PURE__ */
|
|
1111
|
+
}),
|
|
1112
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1113
1113
|
className: "space-y-4",
|
|
1114
1114
|
children: [
|
|
1115
|
-
/* @__PURE__ */
|
|
1115
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
1116
1116
|
className: "text-2xl font-bold",
|
|
1117
1117
|
children: "Monitoring and versioning"
|
|
1118
|
-
}
|
|
1119
|
-
/* @__PURE__ */
|
|
1118
|
+
}),
|
|
1119
|
+
/* @__PURE__ */ jsx4("p", {
|
|
1120
1120
|
className: "text-muted-foreground",
|
|
1121
1121
|
children: "ContractSpec automatically instruments workflows with telemetry. You can view:"
|
|
1122
|
-
}
|
|
1123
|
-
/* @__PURE__ */
|
|
1122
|
+
}),
|
|
1123
|
+
/* @__PURE__ */ jsxs4("ul", {
|
|
1124
1124
|
className: "text-muted-foreground list-inside list-disc space-y-2",
|
|
1125
1125
|
children: [
|
|
1126
|
-
/* @__PURE__ */
|
|
1126
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1127
1127
|
children: "Real-time execution status for each step"
|
|
1128
|
-
}
|
|
1129
|
-
/* @__PURE__ */
|
|
1128
|
+
}),
|
|
1129
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1130
1130
|
children: "Historical run data and success/failure rates"
|
|
1131
|
-
}
|
|
1132
|
-
/* @__PURE__ */
|
|
1131
|
+
}),
|
|
1132
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1133
1133
|
children: "Latency distributions and SLA compliance"
|
|
1134
|
-
}
|
|
1135
|
-
/* @__PURE__ */
|
|
1134
|
+
}),
|
|
1135
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1136
1136
|
children: "Compensation events and retry attempts"
|
|
1137
|
-
}
|
|
1137
|
+
})
|
|
1138
1138
|
]
|
|
1139
|
-
}
|
|
1140
|
-
/* @__PURE__ */
|
|
1139
|
+
}),
|
|
1140
|
+
/* @__PURE__ */ jsx4("p", {
|
|
1141
1141
|
className: "text-muted-foreground",
|
|
1142
1142
|
children: "When you update a workflow, you increment its version. Running workflows continue on their original version, while new invocations use the latest version. This allows safe, zero-downtime deployments."
|
|
1143
|
-
}
|
|
1143
|
+
})
|
|
1144
1144
|
]
|
|
1145
|
-
}
|
|
1146
|
-
/* @__PURE__ */
|
|
1145
|
+
}),
|
|
1146
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1147
1147
|
className: "space-y-4",
|
|
1148
1148
|
children: [
|
|
1149
|
-
/* @__PURE__ */
|
|
1149
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
1150
1150
|
className: "text-2xl font-bold",
|
|
1151
1151
|
children: "Best practices"
|
|
1152
|
-
}
|
|
1153
|
-
/* @__PURE__ */
|
|
1152
|
+
}),
|
|
1153
|
+
/* @__PURE__ */ jsxs4("ul", {
|
|
1154
1154
|
className: "text-muted-foreground list-inside list-disc space-y-2",
|
|
1155
1155
|
children: [
|
|
1156
|
-
/* @__PURE__ */
|
|
1156
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1157
1157
|
children: "Keep steps idempotent \u2013 they should be safe to retry without side effects."
|
|
1158
|
-
}
|
|
1159
|
-
/* @__PURE__ */
|
|
1158
|
+
}),
|
|
1159
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1160
1160
|
children: "Define compensation for any step that modifies external state."
|
|
1161
|
-
}
|
|
1162
|
-
/* @__PURE__ */
|
|
1161
|
+
}),
|
|
1162
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1163
1163
|
children: "Use meaningful step IDs that describe the operation."
|
|
1164
|
-
}
|
|
1165
|
-
/* @__PURE__ */
|
|
1164
|
+
}),
|
|
1165
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1166
1166
|
children: "Set realistic SLAs and monitor them in production."
|
|
1167
|
-
}
|
|
1168
|
-
/* @__PURE__ */
|
|
1167
|
+
}),
|
|
1168
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1169
1169
|
children: "Test failure scenarios locally before deploying."
|
|
1170
|
-
}
|
|
1170
|
+
})
|
|
1171
1171
|
]
|
|
1172
|
-
}
|
|
1172
|
+
})
|
|
1173
1173
|
]
|
|
1174
|
-
}
|
|
1175
|
-
/* @__PURE__ */
|
|
1174
|
+
}),
|
|
1175
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1176
1176
|
className: "flex items-center gap-4 pt-4",
|
|
1177
1177
|
children: [
|
|
1178
|
-
/* @__PURE__ */
|
|
1178
|
+
/* @__PURE__ */ jsx4(Link4, {
|
|
1179
1179
|
href: "/docs/specs/capabilities",
|
|
1180
1180
|
className: "btn-ghost",
|
|
1181
1181
|
children: "Previous: Capabilities"
|
|
1182
|
-
}
|
|
1183
|
-
/* @__PURE__ */
|
|
1182
|
+
}),
|
|
1183
|
+
/* @__PURE__ */ jsxs4(Link4, {
|
|
1184
1184
|
href: "/docs/safety",
|
|
1185
1185
|
className: "btn-primary",
|
|
1186
1186
|
children: [
|
|
1187
1187
|
"Next: Safety Features ",
|
|
1188
|
-
/* @__PURE__ */
|
|
1188
|
+
/* @__PURE__ */ jsx4(ChevronRight4, {
|
|
1189
1189
|
size: 16
|
|
1190
|
-
}
|
|
1190
|
+
})
|
|
1191
1191
|
]
|
|
1192
|
-
}
|
|
1192
|
+
})
|
|
1193
1193
|
]
|
|
1194
|
-
}
|
|
1194
|
+
})
|
|
1195
1195
|
]
|
|
1196
|
-
}
|
|
1196
|
+
});
|
|
1197
1197
|
}
|
|
1198
1198
|
|
|
1199
1199
|
// src/components/docs/specs/SpecsPolicyPage.tsx
|
|
1200
1200
|
import Link5 from "@contractspec/lib.ui-link";
|
|
1201
1201
|
import { ChevronRight as ChevronRight5 } from "lucide-react";
|
|
1202
|
-
import {
|
|
1202
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1203
1203
|
function SpecsPolicyPage() {
|
|
1204
|
-
return /* @__PURE__ */
|
|
1204
|
+
return /* @__PURE__ */ jsxs5("div", {
|
|
1205
1205
|
className: "space-y-8",
|
|
1206
1206
|
children: [
|
|
1207
|
-
/* @__PURE__ */
|
|
1207
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1208
1208
|
className: "space-y-4",
|
|
1209
1209
|
children: [
|
|
1210
|
-
/* @__PURE__ */
|
|
1210
|
+
/* @__PURE__ */ jsx5("h1", {
|
|
1211
1211
|
className: "text-4xl font-bold",
|
|
1212
1212
|
children: "Policy"
|
|
1213
|
-
}
|
|
1214
|
-
/* @__PURE__ */
|
|
1213
|
+
}),
|
|
1214
|
+
/* @__PURE__ */ jsxs5("p", {
|
|
1215
1215
|
className: "text-muted-foreground",
|
|
1216
1216
|
children: [
|
|
1217
1217
|
"A ",
|
|
1218
|
-
/* @__PURE__ */
|
|
1218
|
+
/* @__PURE__ */ jsx5("strong", {
|
|
1219
1219
|
children: "PolicySpec"
|
|
1220
|
-
}
|
|
1220
|
+
}),
|
|
1221
1221
|
" defines who can do what, when, and under what conditions. ContractSpec uses attribute-based access control (ABAC) to enforce policies across your entire application\u2014from API endpoints to UI components."
|
|
1222
1222
|
]
|
|
1223
|
-
}
|
|
1223
|
+
})
|
|
1224
1224
|
]
|
|
1225
|
-
}
|
|
1226
|
-
/* @__PURE__ */
|
|
1225
|
+
}),
|
|
1226
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1227
1227
|
className: "space-y-4",
|
|
1228
1228
|
children: [
|
|
1229
|
-
/* @__PURE__ */
|
|
1229
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1230
1230
|
className: "text-2xl font-bold",
|
|
1231
1231
|
children: "Why policies matter"
|
|
1232
|
-
}
|
|
1233
|
-
/* @__PURE__ */
|
|
1232
|
+
}),
|
|
1233
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1234
1234
|
className: "text-muted-foreground",
|
|
1235
1235
|
children: "Traditional access control relies on roles (RBAC), which can become unwieldy as applications grow. ABAC is more flexible\u2014it evaluates policies based on attributes of the user, resource, action, and context."
|
|
1236
|
-
}
|
|
1237
|
-
/* @__PURE__ */
|
|
1236
|
+
}),
|
|
1237
|
+
/* @__PURE__ */ jsxs5("p", {
|
|
1238
1238
|
className: "text-muted-foreground",
|
|
1239
1239
|
children: [
|
|
1240
1240
|
"ContractSpec's policy engine ensures that access control is consistent across all surfaces. You don't have to remember to add authorization checks in every API endpoint or UI component\u2014the",
|
|
1241
1241
|
" ",
|
|
1242
|
-
/* @__PURE__ */
|
|
1242
|
+
/* @__PURE__ */ jsx5(Link5, {
|
|
1243
1243
|
href: "/docs/safety/pdp",
|
|
1244
1244
|
className: "text-violet-400 hover:text-violet-300",
|
|
1245
1245
|
children: "Policy Decision Point"
|
|
1246
|
-
}
|
|
1246
|
+
}),
|
|
1247
1247
|
" ",
|
|
1248
1248
|
"enforces policies automatically."
|
|
1249
1249
|
]
|
|
1250
|
-
}
|
|
1250
|
+
})
|
|
1251
1251
|
]
|
|
1252
|
-
}
|
|
1253
|
-
/* @__PURE__ */
|
|
1252
|
+
}),
|
|
1253
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1254
1254
|
className: "space-y-4",
|
|
1255
1255
|
children: [
|
|
1256
|
-
/* @__PURE__ */
|
|
1256
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1257
1257
|
className: "text-2xl font-bold",
|
|
1258
1258
|
children: "Policy structure"
|
|
1259
|
-
}
|
|
1260
|
-
/* @__PURE__ */
|
|
1259
|
+
}),
|
|
1260
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1261
1261
|
className: "text-muted-foreground",
|
|
1262
1262
|
children: "A PolicySpec contains one or more rules. Each rule has:"
|
|
1263
|
-
}
|
|
1264
|
-
/* @__PURE__ */
|
|
1263
|
+
}),
|
|
1264
|
+
/* @__PURE__ */ jsxs5("ul", {
|
|
1265
1265
|
className: "text-muted-foreground list-inside list-disc space-y-2",
|
|
1266
1266
|
children: [
|
|
1267
|
-
/* @__PURE__ */
|
|
1267
|
+
/* @__PURE__ */ jsxs5("li", {
|
|
1268
1268
|
children: [
|
|
1269
|
-
/* @__PURE__ */
|
|
1269
|
+
/* @__PURE__ */ jsx5("strong", {
|
|
1270
1270
|
children: "Effect"
|
|
1271
|
-
}
|
|
1271
|
+
}),
|
|
1272
1272
|
" \u2013 PERMIT, DENY, or REDACT"
|
|
1273
1273
|
]
|
|
1274
|
-
}
|
|
1275
|
-
/* @__PURE__ */
|
|
1274
|
+
}),
|
|
1275
|
+
/* @__PURE__ */ jsxs5("li", {
|
|
1276
1276
|
children: [
|
|
1277
|
-
/* @__PURE__ */
|
|
1277
|
+
/* @__PURE__ */ jsx5("strong", {
|
|
1278
1278
|
children: "Condition"
|
|
1279
|
-
}
|
|
1279
|
+
}),
|
|
1280
1280
|
" \u2013 A boolean expression that determines when the rule applies"
|
|
1281
1281
|
]
|
|
1282
|
-
}
|
|
1283
|
-
/* @__PURE__ */
|
|
1282
|
+
}),
|
|
1283
|
+
/* @__PURE__ */ jsxs5("li", {
|
|
1284
1284
|
children: [
|
|
1285
|
-
/* @__PURE__ */
|
|
1285
|
+
/* @__PURE__ */ jsx5("strong", {
|
|
1286
1286
|
children: "Scope"
|
|
1287
|
-
}
|
|
1287
|
+
}),
|
|
1288
1288
|
" \u2013 Which resources, actions, or fields the rule applies to"
|
|
1289
1289
|
]
|
|
1290
|
-
}
|
|
1291
|
-
/* @__PURE__ */
|
|
1290
|
+
}),
|
|
1291
|
+
/* @__PURE__ */ jsxs5("li", {
|
|
1292
1292
|
children: [
|
|
1293
|
-
/* @__PURE__ */
|
|
1293
|
+
/* @__PURE__ */ jsx5("strong", {
|
|
1294
1294
|
children: "Priority"
|
|
1295
|
-
}
|
|
1295
|
+
}),
|
|
1296
1296
|
" \u2013 Rules are evaluated in priority order; the first matching rule wins"
|
|
1297
1297
|
]
|
|
1298
|
-
}
|
|
1298
|
+
})
|
|
1299
1299
|
]
|
|
1300
|
-
}
|
|
1300
|
+
})
|
|
1301
1301
|
]
|
|
1302
|
-
}
|
|
1303
|
-
/* @__PURE__ */
|
|
1302
|
+
}),
|
|
1303
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1304
1304
|
className: "space-y-4",
|
|
1305
1305
|
children: [
|
|
1306
|
-
/* @__PURE__ */
|
|
1306
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1307
1307
|
className: "text-2xl font-bold",
|
|
1308
1308
|
children: "Example PolicySpec"
|
|
1309
|
-
}
|
|
1310
|
-
/* @__PURE__ */
|
|
1309
|
+
}),
|
|
1310
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1311
1311
|
className: "text-muted-foreground",
|
|
1312
1312
|
children: "Here's a policy that controls access to customer data in TypeScript:"
|
|
1313
|
-
}
|
|
1314
|
-
/* @__PURE__ */
|
|
1313
|
+
}),
|
|
1314
|
+
/* @__PURE__ */ jsx5("div", {
|
|
1315
1315
|
className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
|
|
1316
|
-
children: /* @__PURE__ */
|
|
1316
|
+
children: /* @__PURE__ */ jsx5("pre", {
|
|
1317
1317
|
children: `import { definePolicy } from '@contractspec/lib.contracts-spec';
|
|
1318
1318
|
|
|
1319
1319
|
export const CustomerDataAccess = definePolicy({
|
|
@@ -1357,179 +1357,179 @@ export const CustomerDataAccess = definePolicy({
|
|
|
1357
1357
|
},
|
|
1358
1358
|
],
|
|
1359
1359
|
});`
|
|
1360
|
-
}
|
|
1361
|
-
}
|
|
1360
|
+
})
|
|
1361
|
+
})
|
|
1362
1362
|
]
|
|
1363
|
-
}
|
|
1364
|
-
/* @__PURE__ */
|
|
1363
|
+
}),
|
|
1364
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1365
1365
|
className: "space-y-4",
|
|
1366
1366
|
children: [
|
|
1367
|
-
/* @__PURE__ */
|
|
1367
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1368
1368
|
className: "text-2xl font-bold",
|
|
1369
1369
|
children: "Attributes"
|
|
1370
|
-
}
|
|
1371
|
-
/* @__PURE__ */
|
|
1370
|
+
}),
|
|
1371
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1372
1372
|
className: "text-muted-foreground",
|
|
1373
1373
|
children: "Policy conditions can reference attributes from four categories:"
|
|
1374
|
-
}
|
|
1375
|
-
/* @__PURE__ */
|
|
1374
|
+
}),
|
|
1375
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1376
1376
|
className: "space-y-3",
|
|
1377
1377
|
children: [
|
|
1378
|
-
/* @__PURE__ */
|
|
1378
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1379
1379
|
children: [
|
|
1380
|
-
/* @__PURE__ */
|
|
1380
|
+
/* @__PURE__ */ jsx5("h3", {
|
|
1381
1381
|
className: "text-lg font-semibold",
|
|
1382
1382
|
children: "User attributes"
|
|
1383
|
-
}
|
|
1384
|
-
/* @__PURE__ */
|
|
1383
|
+
}),
|
|
1384
|
+
/* @__PURE__ */ jsxs5("p", {
|
|
1385
1385
|
className: "text-muted-foreground",
|
|
1386
1386
|
children: [
|
|
1387
|
-
/* @__PURE__ */
|
|
1387
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1388
1388
|
className: "bg-background/50 rounded px-2 py-1",
|
|
1389
1389
|
children: "user.id"
|
|
1390
|
-
}
|
|
1390
|
+
}),
|
|
1391
1391
|
",",
|
|
1392
1392
|
" ",
|
|
1393
|
-
/* @__PURE__ */
|
|
1393
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1394
1394
|
className: "bg-background/50 rounded px-2 py-1",
|
|
1395
1395
|
children: "user.role"
|
|
1396
|
-
}
|
|
1396
|
+
}),
|
|
1397
1397
|
",",
|
|
1398
1398
|
" ",
|
|
1399
|
-
/* @__PURE__ */
|
|
1399
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1400
1400
|
className: "bg-background/50 rounded px-2 py-1",
|
|
1401
1401
|
children: "user.groups"
|
|
1402
|
-
}
|
|
1402
|
+
}),
|
|
1403
1403
|
",",
|
|
1404
1404
|
" ",
|
|
1405
|
-
/* @__PURE__ */
|
|
1405
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1406
1406
|
className: "bg-background/50 rounded px-2 py-1",
|
|
1407
1407
|
children: "user.department"
|
|
1408
|
-
}
|
|
1408
|
+
}),
|
|
1409
1409
|
", custom attributes"
|
|
1410
1410
|
]
|
|
1411
|
-
}
|
|
1411
|
+
})
|
|
1412
1412
|
]
|
|
1413
|
-
}
|
|
1414
|
-
/* @__PURE__ */
|
|
1413
|
+
}),
|
|
1414
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1415
1415
|
children: [
|
|
1416
|
-
/* @__PURE__ */
|
|
1416
|
+
/* @__PURE__ */ jsx5("h3", {
|
|
1417
1417
|
className: "text-lg font-semibold",
|
|
1418
1418
|
children: "Resource attributes"
|
|
1419
|
-
}
|
|
1420
|
-
/* @__PURE__ */
|
|
1419
|
+
}),
|
|
1420
|
+
/* @__PURE__ */ jsxs5("p", {
|
|
1421
1421
|
className: "text-muted-foreground",
|
|
1422
1422
|
children: [
|
|
1423
|
-
/* @__PURE__ */
|
|
1423
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1424
1424
|
className: "bg-background/50 rounded px-2 py-1",
|
|
1425
1425
|
children: "resource.type"
|
|
1426
|
-
}
|
|
1426
|
+
}),
|
|
1427
1427
|
",",
|
|
1428
1428
|
" ",
|
|
1429
|
-
/* @__PURE__ */
|
|
1429
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1430
1430
|
className: "bg-background/50 rounded px-2 py-1",
|
|
1431
1431
|
children: "resource.owner"
|
|
1432
|
-
}
|
|
1432
|
+
}),
|
|
1433
1433
|
",",
|
|
1434
1434
|
" ",
|
|
1435
|
-
/* @__PURE__ */
|
|
1435
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1436
1436
|
className: "bg-background/50 rounded px-2 py-1",
|
|
1437
1437
|
children: "resource.sensitivity"
|
|
1438
|
-
}
|
|
1438
|
+
}),
|
|
1439
1439
|
", custom attributes"
|
|
1440
1440
|
]
|
|
1441
|
-
}
|
|
1441
|
+
})
|
|
1442
1442
|
]
|
|
1443
|
-
}
|
|
1444
|
-
/* @__PURE__ */
|
|
1443
|
+
}),
|
|
1444
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1445
1445
|
children: [
|
|
1446
|
-
/* @__PURE__ */
|
|
1446
|
+
/* @__PURE__ */ jsx5("h3", {
|
|
1447
1447
|
className: "text-lg font-semibold",
|
|
1448
1448
|
children: "Action attributes"
|
|
1449
|
-
}
|
|
1450
|
-
/* @__PURE__ */
|
|
1449
|
+
}),
|
|
1450
|
+
/* @__PURE__ */ jsxs5("p", {
|
|
1451
1451
|
className: "text-muted-foreground",
|
|
1452
1452
|
children: [
|
|
1453
|
-
/* @__PURE__ */
|
|
1453
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1454
1454
|
className: "bg-background/50 rounded px-2 py-1",
|
|
1455
1455
|
children: "action"
|
|
1456
|
-
}
|
|
1456
|
+
}),
|
|
1457
1457
|
" ",
|
|
1458
1458
|
"(read, write, delete, execute, export, etc.)"
|
|
1459
1459
|
]
|
|
1460
|
-
}
|
|
1460
|
+
})
|
|
1461
1461
|
]
|
|
1462
|
-
}
|
|
1463
|
-
/* @__PURE__ */
|
|
1462
|
+
}),
|
|
1463
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1464
1464
|
children: [
|
|
1465
|
-
/* @__PURE__ */
|
|
1465
|
+
/* @__PURE__ */ jsx5("h3", {
|
|
1466
1466
|
className: "text-lg font-semibold",
|
|
1467
1467
|
children: "Context attributes"
|
|
1468
|
-
}
|
|
1469
|
-
/* @__PURE__ */
|
|
1468
|
+
}),
|
|
1469
|
+
/* @__PURE__ */ jsxs5("p", {
|
|
1470
1470
|
className: "text-muted-foreground",
|
|
1471
1471
|
children: [
|
|
1472
|
-
/* @__PURE__ */
|
|
1472
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1473
1473
|
className: "bg-background/50 rounded px-2 py-1",
|
|
1474
1474
|
children: "time.hour"
|
|
1475
|
-
}
|
|
1475
|
+
}),
|
|
1476
1476
|
",",
|
|
1477
1477
|
" ",
|
|
1478
|
-
/* @__PURE__ */
|
|
1478
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1479
1479
|
className: "bg-background/50 rounded px-2 py-1",
|
|
1480
1480
|
children: "time.dayOfWeek"
|
|
1481
|
-
}
|
|
1481
|
+
}),
|
|
1482
1482
|
",",
|
|
1483
1483
|
" ",
|
|
1484
|
-
/* @__PURE__ */
|
|
1484
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1485
1485
|
className: "bg-background/50 rounded px-2 py-1",
|
|
1486
1486
|
children: "request.ipAddress"
|
|
1487
|
-
}
|
|
1487
|
+
}),
|
|
1488
1488
|
",",
|
|
1489
1489
|
" ",
|
|
1490
|
-
/* @__PURE__ */
|
|
1490
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1491
1491
|
className: "bg-background/50 rounded px-2 py-1",
|
|
1492
1492
|
children: "request.userAgent"
|
|
1493
|
-
}
|
|
1493
|
+
})
|
|
1494
1494
|
]
|
|
1495
|
-
}
|
|
1495
|
+
})
|
|
1496
1496
|
]
|
|
1497
|
-
}
|
|
1497
|
+
})
|
|
1498
1498
|
]
|
|
1499
|
-
}
|
|
1499
|
+
})
|
|
1500
1500
|
]
|
|
1501
|
-
}
|
|
1502
|
-
/* @__PURE__ */
|
|
1501
|
+
}),
|
|
1502
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1503
1503
|
className: "space-y-4",
|
|
1504
1504
|
children: [
|
|
1505
|
-
/* @__PURE__ */
|
|
1505
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1506
1506
|
className: "text-2xl font-bold",
|
|
1507
1507
|
children: "Data classification"
|
|
1508
|
-
}
|
|
1509
|
-
/* @__PURE__ */
|
|
1508
|
+
}),
|
|
1509
|
+
/* @__PURE__ */ jsxs5("p", {
|
|
1510
1510
|
className: "text-muted-foreground",
|
|
1511
1511
|
children: [
|
|
1512
1512
|
"You can tag fields with sensitivity levels in your",
|
|
1513
1513
|
" ",
|
|
1514
|
-
/* @__PURE__ */
|
|
1514
|
+
/* @__PURE__ */ jsx5(Link5, {
|
|
1515
1515
|
href: "/docs/specs/capabilities",
|
|
1516
1516
|
className: "text-violet-400 hover:text-violet-300",
|
|
1517
1517
|
children: "CapabilitySpecs"
|
|
1518
|
-
}
|
|
1518
|
+
}),
|
|
1519
1519
|
" ",
|
|
1520
1520
|
"and",
|
|
1521
1521
|
" ",
|
|
1522
|
-
/* @__PURE__ */
|
|
1522
|
+
/* @__PURE__ */ jsx5(Link5, {
|
|
1523
1523
|
href: "/docs/specs/dataviews",
|
|
1524
1524
|
className: "text-violet-400 hover:text-violet-300",
|
|
1525
1525
|
children: "DataViewSpecs"
|
|
1526
|
-
}
|
|
1526
|
+
}),
|
|
1527
1527
|
":"
|
|
1528
1528
|
]
|
|
1529
|
-
}
|
|
1530
|
-
/* @__PURE__ */
|
|
1529
|
+
}),
|
|
1530
|
+
/* @__PURE__ */ jsx5("div", {
|
|
1531
1531
|
className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
|
|
1532
|
-
children: /* @__PURE__ */
|
|
1532
|
+
children: /* @__PURE__ */ jsx5("pre", {
|
|
1533
1533
|
children: `fields:
|
|
1534
1534
|
- name: email
|
|
1535
1535
|
type: string
|
|
@@ -1544,257 +1544,257 @@ export const CustomerDataAccess = definePolicy({
|
|
|
1544
1544
|
- name: salary
|
|
1545
1545
|
type: number
|
|
1546
1546
|
sensitivity: confidential`
|
|
1547
|
-
}
|
|
1548
|
-
}
|
|
1549
|
-
/* @__PURE__ */
|
|
1547
|
+
})
|
|
1548
|
+
}),
|
|
1549
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1550
1550
|
className: "text-muted-foreground",
|
|
1551
1551
|
children: 'Policies can then reference these tags to enforce blanket rules like "support staff cannot see PII" or "PHI can only be accessed from approved IP addresses."'
|
|
1552
|
-
}
|
|
1552
|
+
})
|
|
1553
1553
|
]
|
|
1554
|
-
}
|
|
1555
|
-
/* @__PURE__ */
|
|
1554
|
+
}),
|
|
1555
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1556
1556
|
className: "space-y-4",
|
|
1557
1557
|
children: [
|
|
1558
|
-
/* @__PURE__ */
|
|
1558
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1559
1559
|
className: "text-2xl font-bold",
|
|
1560
1560
|
children: "Testing policies"
|
|
1561
|
-
}
|
|
1562
|
-
/* @__PURE__ */
|
|
1561
|
+
}),
|
|
1562
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1563
1563
|
className: "text-muted-foreground",
|
|
1564
1564
|
children: "ContractSpec provides tools for testing policies before deployment:"
|
|
1565
|
-
}
|
|
1566
|
-
/* @__PURE__ */
|
|
1565
|
+
}),
|
|
1566
|
+
/* @__PURE__ */ jsxs5("ul", {
|
|
1567
1567
|
className: "text-muted-foreground list-inside list-disc space-y-2",
|
|
1568
1568
|
children: [
|
|
1569
|
-
/* @__PURE__ */
|
|
1569
|
+
/* @__PURE__ */ jsxs5("li", {
|
|
1570
1570
|
children: [
|
|
1571
|
-
/* @__PURE__ */
|
|
1571
|
+
/* @__PURE__ */ jsx5("strong", {
|
|
1572
1572
|
children: "Policy simulator"
|
|
1573
|
-
}
|
|
1573
|
+
}),
|
|
1574
1574
|
" \u2013 Test how policies evaluate for different users and scenarios"
|
|
1575
1575
|
]
|
|
1576
|
-
}
|
|
1577
|
-
/* @__PURE__ */
|
|
1576
|
+
}),
|
|
1577
|
+
/* @__PURE__ */ jsxs5("li", {
|
|
1578
1578
|
children: [
|
|
1579
|
-
/* @__PURE__ */
|
|
1579
|
+
/* @__PURE__ */ jsx5("strong", {
|
|
1580
1580
|
children: "Coverage analysis"
|
|
1581
|
-
}
|
|
1581
|
+
}),
|
|
1582
1582
|
" \u2013 Identify resources or actions that aren't covered by any policy"
|
|
1583
1583
|
]
|
|
1584
|
-
}
|
|
1585
|
-
/* @__PURE__ */
|
|
1584
|
+
}),
|
|
1585
|
+
/* @__PURE__ */ jsxs5("li", {
|
|
1586
1586
|
children: [
|
|
1587
|
-
/* @__PURE__ */
|
|
1587
|
+
/* @__PURE__ */ jsx5("strong", {
|
|
1588
1588
|
children: "Conflict detection"
|
|
1589
|
-
}
|
|
1589
|
+
}),
|
|
1590
1590
|
" \u2013 Find rules that might conflict or produce unexpected results"
|
|
1591
1591
|
]
|
|
1592
|
-
}
|
|
1593
|
-
/* @__PURE__ */
|
|
1592
|
+
}),
|
|
1593
|
+
/* @__PURE__ */ jsxs5("li", {
|
|
1594
1594
|
children: [
|
|
1595
|
-
/* @__PURE__ */
|
|
1595
|
+
/* @__PURE__ */ jsx5("strong", {
|
|
1596
1596
|
children: "Audit mode"
|
|
1597
|
-
}
|
|
1597
|
+
}),
|
|
1598
1598
|
" \u2013 Run policies in audit-only mode to see what would be blocked without actually blocking it"
|
|
1599
1599
|
]
|
|
1600
|
-
}
|
|
1600
|
+
})
|
|
1601
1601
|
]
|
|
1602
|
-
}
|
|
1602
|
+
})
|
|
1603
1603
|
]
|
|
1604
|
-
}
|
|
1605
|
-
/* @__PURE__ */
|
|
1604
|
+
}),
|
|
1605
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1606
1606
|
className: "space-y-4",
|
|
1607
1607
|
children: [
|
|
1608
|
-
/* @__PURE__ */
|
|
1608
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1609
1609
|
className: "text-2xl font-bold",
|
|
1610
1610
|
children: "Best practices"
|
|
1611
|
-
}
|
|
1612
|
-
/* @__PURE__ */
|
|
1611
|
+
}),
|
|
1612
|
+
/* @__PURE__ */ jsxs5("ul", {
|
|
1613
1613
|
className: "text-muted-foreground list-inside list-disc space-y-2",
|
|
1614
1614
|
children: [
|
|
1615
|
-
/* @__PURE__ */
|
|
1615
|
+
/* @__PURE__ */ jsx5("li", {
|
|
1616
1616
|
children: "Start with a deny-by-default policy\u2014explicitly permit what should be allowed."
|
|
1617
|
-
}
|
|
1618
|
-
/* @__PURE__ */
|
|
1617
|
+
}),
|
|
1618
|
+
/* @__PURE__ */ jsx5("li", {
|
|
1619
1619
|
children: "Use clear, descriptive rule IDs that explain what the rule does."
|
|
1620
|
-
}
|
|
1621
|
-
/* @__PURE__ */
|
|
1620
|
+
}),
|
|
1621
|
+
/* @__PURE__ */ jsx5("li", {
|
|
1622
1622
|
children: "Set priorities carefully to ensure rules are evaluated in the right order."
|
|
1623
|
-
}
|
|
1624
|
-
/* @__PURE__ */
|
|
1623
|
+
}),
|
|
1624
|
+
/* @__PURE__ */ jsx5("li", {
|
|
1625
1625
|
children: "Test policies thoroughly with realistic user scenarios before deploying."
|
|
1626
|
-
}
|
|
1627
|
-
/* @__PURE__ */
|
|
1626
|
+
}),
|
|
1627
|
+
/* @__PURE__ */ jsxs5("li", {
|
|
1628
1628
|
children: [
|
|
1629
1629
|
"Monitor policy decisions in production using",
|
|
1630
1630
|
" ",
|
|
1631
|
-
/* @__PURE__ */
|
|
1631
|
+
/* @__PURE__ */ jsx5(Link5, {
|
|
1632
1632
|
href: "/docs/safety/auditing",
|
|
1633
1633
|
className: "text-violet-400 hover:text-violet-300",
|
|
1634
1634
|
children: "audit logs"
|
|
1635
|
-
}
|
|
1635
|
+
}),
|
|
1636
1636
|
"."
|
|
1637
1637
|
]
|
|
1638
|
-
}
|
|
1639
|
-
/* @__PURE__ */
|
|
1638
|
+
}),
|
|
1639
|
+
/* @__PURE__ */ jsx5("li", {
|
|
1640
1640
|
children: "Review and update policies regularly as your application and requirements evolve."
|
|
1641
|
-
}
|
|
1641
|
+
})
|
|
1642
1642
|
]
|
|
1643
|
-
}
|
|
1643
|
+
})
|
|
1644
1644
|
]
|
|
1645
|
-
}
|
|
1646
|
-
/* @__PURE__ */
|
|
1645
|
+
}),
|
|
1646
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1647
1647
|
className: "flex items-center gap-4 pt-4",
|
|
1648
1648
|
children: [
|
|
1649
|
-
/* @__PURE__ */
|
|
1649
|
+
/* @__PURE__ */ jsx5(Link5, {
|
|
1650
1650
|
href: "/docs/specs/workflows",
|
|
1651
1651
|
className: "btn-ghost",
|
|
1652
1652
|
children: "Previous: Workflows"
|
|
1653
|
-
}
|
|
1654
|
-
/* @__PURE__ */
|
|
1653
|
+
}),
|
|
1654
|
+
/* @__PURE__ */ jsxs5(Link5, {
|
|
1655
1655
|
href: "/docs/specs/overlays",
|
|
1656
1656
|
className: "btn-primary",
|
|
1657
1657
|
children: [
|
|
1658
1658
|
"Next: Overlays ",
|
|
1659
|
-
/* @__PURE__ */
|
|
1659
|
+
/* @__PURE__ */ jsx5(ChevronRight5, {
|
|
1660
1660
|
size: 16
|
|
1661
|
-
}
|
|
1661
|
+
})
|
|
1662
1662
|
]
|
|
1663
|
-
}
|
|
1663
|
+
})
|
|
1664
1664
|
]
|
|
1665
|
-
}
|
|
1665
|
+
})
|
|
1666
1666
|
]
|
|
1667
|
-
}
|
|
1667
|
+
});
|
|
1668
1668
|
}
|
|
1669
1669
|
|
|
1670
1670
|
// src/components/docs/specs/SpecsOverlaysPage.tsx
|
|
1671
1671
|
import Link6 from "@contractspec/lib.ui-link";
|
|
1672
1672
|
import { ChevronRight as ChevronRight6 } from "lucide-react";
|
|
1673
|
-
import {
|
|
1673
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1674
1674
|
function SpecsOverlaysPage() {
|
|
1675
|
-
return /* @__PURE__ */
|
|
1675
|
+
return /* @__PURE__ */ jsxs6("div", {
|
|
1676
1676
|
className: "space-y-8",
|
|
1677
1677
|
children: [
|
|
1678
|
-
/* @__PURE__ */
|
|
1678
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1679
1679
|
className: "space-y-4",
|
|
1680
1680
|
children: [
|
|
1681
|
-
/* @__PURE__ */
|
|
1681
|
+
/* @__PURE__ */ jsx6("h1", {
|
|
1682
1682
|
className: "text-4xl font-bold",
|
|
1683
1683
|
children: "Overlays"
|
|
1684
|
-
}
|
|
1685
|
-
/* @__PURE__ */
|
|
1684
|
+
}),
|
|
1685
|
+
/* @__PURE__ */ jsxs6("p", {
|
|
1686
1686
|
className: "text-muted-foreground",
|
|
1687
1687
|
children: [
|
|
1688
1688
|
"An ",
|
|
1689
|
-
/* @__PURE__ */
|
|
1689
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1690
1690
|
children: "OverlaySpec"
|
|
1691
|
-
}
|
|
1691
|
+
}),
|
|
1692
1692
|
" allows tenants or users to customize UI layouts and field visibility without modifying the underlying application code. Overlays are cryptographically signed to ensure they respect policy boundaries and cannot introduce security vulnerabilities."
|
|
1693
1693
|
]
|
|
1694
|
-
}
|
|
1694
|
+
})
|
|
1695
1695
|
]
|
|
1696
|
-
}
|
|
1697
|
-
/* @__PURE__ */
|
|
1696
|
+
}),
|
|
1697
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1698
1698
|
className: "space-y-4",
|
|
1699
1699
|
children: [
|
|
1700
|
-
/* @__PURE__ */
|
|
1700
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1701
1701
|
className: "text-2xl font-bold",
|
|
1702
1702
|
children: "Why overlays matter"
|
|
1703
|
-
}
|
|
1704
|
-
/* @__PURE__ */
|
|
1703
|
+
}),
|
|
1704
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1705
1705
|
className: "text-muted-foreground",
|
|
1706
1706
|
children: "Different users have different needs. A power user might want to see all available fields and actions, while a casual user prefers a simplified interface. A tenant in a multi-tenant application might want to brand the UI or hide features they don't use."
|
|
1707
|
-
}
|
|
1708
|
-
/* @__PURE__ */
|
|
1707
|
+
}),
|
|
1708
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1709
1709
|
className: "text-muted-foreground",
|
|
1710
1710
|
children: "Traditional approaches require either building multiple UIs or adding complex configuration logic throughout the codebase. OverlaySpecs provide a safer, more maintainable solution: users can customize their experience, but only within the bounds allowed by the underlying specs and policies."
|
|
1711
|
-
}
|
|
1711
|
+
})
|
|
1712
1712
|
]
|
|
1713
|
-
}
|
|
1714
|
-
/* @__PURE__ */
|
|
1713
|
+
}),
|
|
1714
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1715
1715
|
className: "space-y-4",
|
|
1716
1716
|
children: [
|
|
1717
|
-
/* @__PURE__ */
|
|
1717
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1718
1718
|
className: "text-2xl font-bold",
|
|
1719
1719
|
children: "What overlays can do"
|
|
1720
|
-
}
|
|
1721
|
-
/* @__PURE__ */
|
|
1720
|
+
}),
|
|
1721
|
+
/* @__PURE__ */ jsxs6("ul", {
|
|
1722
1722
|
className: "text-muted-foreground list-inside list-disc space-y-2",
|
|
1723
1723
|
children: [
|
|
1724
|
-
/* @__PURE__ */
|
|
1724
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1725
1725
|
children: [
|
|
1726
|
-
/* @__PURE__ */
|
|
1726
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1727
1727
|
children: "Hide or show fields"
|
|
1728
|
-
}
|
|
1728
|
+
}),
|
|
1729
1729
|
" \u2013 Remove fields from forms or detail views (but only if the user has permission to see them in the first place)"
|
|
1730
1730
|
]
|
|
1731
|
-
}
|
|
1732
|
-
/* @__PURE__ */
|
|
1731
|
+
}),
|
|
1732
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1733
1733
|
children: [
|
|
1734
|
-
/* @__PURE__ */
|
|
1734
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1735
1735
|
children: "Reorder fields"
|
|
1736
|
-
}
|
|
1736
|
+
}),
|
|
1737
1737
|
" \u2013 Change the order in which fields appear"
|
|
1738
1738
|
]
|
|
1739
|
-
}
|
|
1740
|
-
/* @__PURE__ */
|
|
1739
|
+
}),
|
|
1740
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1741
1741
|
children: [
|
|
1742
|
-
/* @__PURE__ */
|
|
1742
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1743
1743
|
children: "Rename labels"
|
|
1744
|
-
}
|
|
1744
|
+
}),
|
|
1745
1745
|
" \u2013 Use different terminology that's more familiar to the user"
|
|
1746
1746
|
]
|
|
1747
|
-
}
|
|
1748
|
-
/* @__PURE__ */
|
|
1747
|
+
}),
|
|
1748
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1749
1749
|
children: [
|
|
1750
|
-
/* @__PURE__ */
|
|
1750
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1751
1751
|
children: "Change layouts"
|
|
1752
|
-
}
|
|
1752
|
+
}),
|
|
1753
1753
|
" \u2013 Switch between list, grid, or card views"
|
|
1754
1754
|
]
|
|
1755
|
-
}
|
|
1756
|
-
/* @__PURE__ */
|
|
1755
|
+
}),
|
|
1756
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1757
1757
|
children: [
|
|
1758
|
-
/* @__PURE__ */
|
|
1758
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1759
1759
|
children: "Add help text"
|
|
1760
|
-
}
|
|
1760
|
+
}),
|
|
1761
1761
|
" \u2013 Provide context-specific guidance"
|
|
1762
1762
|
]
|
|
1763
|
-
}
|
|
1764
|
-
/* @__PURE__ */
|
|
1763
|
+
}),
|
|
1764
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1765
1765
|
children: [
|
|
1766
|
-
/* @__PURE__ */
|
|
1766
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1767
1767
|
children: "Set default values"
|
|
1768
|
-
}
|
|
1768
|
+
}),
|
|
1769
1769
|
" \u2013 Pre-fill forms with tenant-specific defaults"
|
|
1770
1770
|
]
|
|
1771
|
-
}
|
|
1772
|
-
/* @__PURE__ */
|
|
1771
|
+
}),
|
|
1772
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1773
1773
|
children: [
|
|
1774
|
-
/* @__PURE__ */
|
|
1774
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1775
1775
|
children: "Apply branding"
|
|
1776
|
-
}
|
|
1776
|
+
}),
|
|
1777
1777
|
" \u2013 Customize colors, logos, and styling (within approved themes)"
|
|
1778
1778
|
]
|
|
1779
|
-
}
|
|
1779
|
+
})
|
|
1780
1780
|
]
|
|
1781
|
-
}
|
|
1781
|
+
})
|
|
1782
1782
|
]
|
|
1783
|
-
}
|
|
1784
|
-
/* @__PURE__ */
|
|
1783
|
+
}),
|
|
1784
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1785
1785
|
className: "space-y-4",
|
|
1786
1786
|
children: [
|
|
1787
|
-
/* @__PURE__ */
|
|
1787
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1788
1788
|
className: "text-2xl font-bold",
|
|
1789
1789
|
children: "Example OverlaySpec"
|
|
1790
|
-
}
|
|
1791
|
-
/* @__PURE__ */
|
|
1790
|
+
}),
|
|
1791
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1792
1792
|
className: "text-muted-foreground",
|
|
1793
1793
|
children: "Here's an overlay that customizes an order form:"
|
|
1794
|
-
}
|
|
1795
|
-
/* @__PURE__ */
|
|
1794
|
+
}),
|
|
1795
|
+
/* @__PURE__ */ jsx6("div", {
|
|
1796
1796
|
className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
|
|
1797
|
-
children: /* @__PURE__ */
|
|
1797
|
+
children: /* @__PURE__ */ jsx6("pre", {
|
|
1798
1798
|
children: `overlayId: acme-order-form
|
|
1799
1799
|
version: '1.0.0'.0.0
|
|
1800
1800
|
appliesTo:
|
|
@@ -1833,244 +1833,244 @@ signature:
|
|
|
1833
1833
|
algorithm: EdDSA
|
|
1834
1834
|
publicKey: "acme-corp-overlay-key"
|
|
1835
1835
|
signature: "base64-encoded-signature"`
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1836
|
+
})
|
|
1837
|
+
})
|
|
1838
1838
|
]
|
|
1839
|
-
}
|
|
1840
|
-
/* @__PURE__ */
|
|
1839
|
+
}),
|
|
1840
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1841
1841
|
className: "space-y-4",
|
|
1842
1842
|
children: [
|
|
1843
|
-
/* @__PURE__ */
|
|
1843
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1844
1844
|
className: "text-2xl font-bold",
|
|
1845
1845
|
children: "Safety guarantees"
|
|
1846
|
-
}
|
|
1847
|
-
/* @__PURE__ */
|
|
1846
|
+
}),
|
|
1847
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1848
1848
|
className: "text-muted-foreground",
|
|
1849
1849
|
children: "Overlays are powerful, but they must not compromise security or data integrity. ContractSpec enforces several guarantees:"
|
|
1850
|
-
}
|
|
1851
|
-
/* @__PURE__ */
|
|
1850
|
+
}),
|
|
1851
|
+
/* @__PURE__ */ jsxs6("ul", {
|
|
1852
1852
|
className: "text-muted-foreground list-inside list-disc space-y-2",
|
|
1853
1853
|
children: [
|
|
1854
|
-
/* @__PURE__ */
|
|
1854
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1855
1855
|
children: [
|
|
1856
|
-
/* @__PURE__ */
|
|
1856
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1857
1857
|
children: "Overlays cannot grant new permissions"
|
|
1858
|
-
}
|
|
1858
|
+
}),
|
|
1859
1859
|
" \u2013 They can only hide or rearrange what the user is already allowed to see"
|
|
1860
1860
|
]
|
|
1861
|
-
}
|
|
1862
|
-
/* @__PURE__ */
|
|
1861
|
+
}),
|
|
1862
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1863
1863
|
children: [
|
|
1864
|
-
/* @__PURE__ */
|
|
1864
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1865
1865
|
children: "Overlays cannot bypass validation"
|
|
1866
|
-
}
|
|
1866
|
+
}),
|
|
1867
1867
|
" \u2013 Field types, constraints, and business rules from the underlying spec still apply"
|
|
1868
1868
|
]
|
|
1869
|
-
}
|
|
1870
|
-
/* @__PURE__ */
|
|
1869
|
+
}),
|
|
1870
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1871
1871
|
children: [
|
|
1872
|
-
/* @__PURE__ */
|
|
1872
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1873
1873
|
children: "Overlays must be signed"
|
|
1874
|
-
}
|
|
1874
|
+
}),
|
|
1875
1875
|
" \u2013 Only authorized parties (typically tenant admins) can create overlays"
|
|
1876
1876
|
]
|
|
1877
|
-
}
|
|
1878
|
-
/* @__PURE__ */
|
|
1877
|
+
}),
|
|
1878
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1879
1879
|
children: [
|
|
1880
|
-
/* @__PURE__ */
|
|
1880
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1881
1881
|
children: "Overlays are versioned"
|
|
1882
|
-
}
|
|
1882
|
+
}),
|
|
1883
1883
|
" \u2013 Changes to overlays are tracked and can be rolled back"
|
|
1884
1884
|
]
|
|
1885
|
-
}
|
|
1886
|
-
/* @__PURE__ */
|
|
1885
|
+
}),
|
|
1886
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1887
1887
|
children: [
|
|
1888
|
-
/* @__PURE__ */
|
|
1888
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1889
1889
|
children: "Overlays are audited"
|
|
1890
|
-
}
|
|
1890
|
+
}),
|
|
1891
1891
|
" \u2013 Every overlay application is logged"
|
|
1892
1892
|
]
|
|
1893
|
-
}
|
|
1893
|
+
})
|
|
1894
1894
|
]
|
|
1895
|
-
}
|
|
1895
|
+
})
|
|
1896
1896
|
]
|
|
1897
|
-
}
|
|
1898
|
-
/* @__PURE__ */
|
|
1897
|
+
}),
|
|
1898
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1899
1899
|
className: "space-y-4",
|
|
1900
1900
|
children: [
|
|
1901
|
-
/* @__PURE__ */
|
|
1901
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1902
1902
|
className: "text-2xl font-bold",
|
|
1903
1903
|
children: "Creating overlays"
|
|
1904
|
-
}
|
|
1905
|
-
/* @__PURE__ */
|
|
1904
|
+
}),
|
|
1905
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1906
1906
|
className: "text-muted-foreground",
|
|
1907
1907
|
children: "Overlays can be created through:"
|
|
1908
|
-
}
|
|
1909
|
-
/* @__PURE__ */
|
|
1908
|
+
}),
|
|
1909
|
+
/* @__PURE__ */ jsxs6("ul", {
|
|
1910
1910
|
className: "text-muted-foreground list-inside list-disc space-y-2",
|
|
1911
1911
|
children: [
|
|
1912
|
-
/* @__PURE__ */
|
|
1912
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1913
1913
|
children: [
|
|
1914
|
-
/* @__PURE__ */
|
|
1914
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1915
1915
|
children: "Visual editor"
|
|
1916
|
-
}
|
|
1916
|
+
}),
|
|
1917
1917
|
" \u2013 A drag-and-drop interface for non-technical users"
|
|
1918
1918
|
]
|
|
1919
|
-
}
|
|
1920
|
-
/* @__PURE__ */
|
|
1919
|
+
}),
|
|
1920
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1921
1921
|
children: [
|
|
1922
|
-
/* @__PURE__ */
|
|
1922
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1923
1923
|
children: "TypeScript/JSON"
|
|
1924
|
-
}
|
|
1924
|
+
}),
|
|
1925
1925
|
" \u2013 For developers who prefer code"
|
|
1926
1926
|
]
|
|
1927
|
-
}
|
|
1928
|
-
/* @__PURE__ */
|
|
1927
|
+
}),
|
|
1928
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1929
1929
|
children: [
|
|
1930
|
-
/* @__PURE__ */
|
|
1930
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1931
1931
|
children: "API"
|
|
1932
|
-
}
|
|
1932
|
+
}),
|
|
1933
1933
|
" \u2013 Programmatically create overlays for automation"
|
|
1934
1934
|
]
|
|
1935
|
-
}
|
|
1935
|
+
})
|
|
1936
1936
|
]
|
|
1937
|
-
}
|
|
1938
|
-
/* @__PURE__ */
|
|
1937
|
+
}),
|
|
1938
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1939
1939
|
className: "text-muted-foreground",
|
|
1940
1940
|
children: "Once created, overlays must be signed using a private key. The corresponding public key is registered with ContractSpec, which verifies the signature before applying the overlay."
|
|
1941
|
-
}
|
|
1942
|
-
/* @__PURE__ */
|
|
1941
|
+
}),
|
|
1942
|
+
/* @__PURE__ */ jsxs6("p", {
|
|
1943
1943
|
className: "text-muted-foreground",
|
|
1944
1944
|
children: [
|
|
1945
1945
|
"See",
|
|
1946
1946
|
" ",
|
|
1947
|
-
/* @__PURE__ */
|
|
1947
|
+
/* @__PURE__ */ jsx6(Link6, {
|
|
1948
1948
|
href: "/docs/libraries/overlay-engine",
|
|
1949
1949
|
className: "text-violet-400 underline",
|
|
1950
1950
|
children: "Overlay Engine docs"
|
|
1951
|
-
}
|
|
1951
|
+
}),
|
|
1952
1952
|
" ",
|
|
1953
1953
|
"and the",
|
|
1954
1954
|
" ",
|
|
1955
|
-
/* @__PURE__ */
|
|
1955
|
+
/* @__PURE__ */ jsx6(Link6, {
|
|
1956
1956
|
href: "/docs/advanced/overlay-editor",
|
|
1957
1957
|
className: "text-violet-400 underline",
|
|
1958
1958
|
children: "Overlay Editor guide"
|
|
1959
|
-
}
|
|
1959
|
+
}),
|
|
1960
1960
|
" ",
|
|
1961
1961
|
"for end-to-end workflows."
|
|
1962
1962
|
]
|
|
1963
|
-
}
|
|
1963
|
+
})
|
|
1964
1964
|
]
|
|
1965
|
-
}
|
|
1966
|
-
/* @__PURE__ */
|
|
1965
|
+
}),
|
|
1966
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1967
1967
|
className: "space-y-4",
|
|
1968
1968
|
children: [
|
|
1969
|
-
/* @__PURE__ */
|
|
1969
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1970
1970
|
className: "text-2xl font-bold",
|
|
1971
1971
|
children: "Overlay scope"
|
|
1972
|
-
}
|
|
1973
|
-
/* @__PURE__ */
|
|
1972
|
+
}),
|
|
1973
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1974
1974
|
className: "text-muted-foreground",
|
|
1975
1975
|
children: "Overlays can be scoped to:"
|
|
1976
|
-
}
|
|
1977
|
-
/* @__PURE__ */
|
|
1976
|
+
}),
|
|
1977
|
+
/* @__PURE__ */ jsxs6("ul", {
|
|
1978
1978
|
className: "text-muted-foreground list-inside list-disc space-y-2",
|
|
1979
1979
|
children: [
|
|
1980
|
-
/* @__PURE__ */
|
|
1980
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1981
1981
|
children: [
|
|
1982
|
-
/* @__PURE__ */
|
|
1982
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1983
1983
|
children: "Tenant"
|
|
1984
|
-
}
|
|
1984
|
+
}),
|
|
1985
1985
|
" \u2013 All users in a tenant see the same overlay"
|
|
1986
1986
|
]
|
|
1987
|
-
}
|
|
1988
|
-
/* @__PURE__ */
|
|
1987
|
+
}),
|
|
1988
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1989
1989
|
children: [
|
|
1990
|
-
/* @__PURE__ */
|
|
1990
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1991
1991
|
children: "User"
|
|
1992
|
-
}
|
|
1992
|
+
}),
|
|
1993
1993
|
" \u2013 Individual users can have personal overlays"
|
|
1994
1994
|
]
|
|
1995
|
-
}
|
|
1996
|
-
/* @__PURE__ */
|
|
1995
|
+
}),
|
|
1996
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1997
1997
|
children: [
|
|
1998
|
-
/* @__PURE__ */
|
|
1998
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1999
1999
|
children: "Role"
|
|
2000
|
-
}
|
|
2000
|
+
}),
|
|
2001
2001
|
" \u2013 All users with a specific role see the overlay"
|
|
2002
2002
|
]
|
|
2003
|
-
}
|
|
2004
|
-
/* @__PURE__ */
|
|
2003
|
+
}),
|
|
2004
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
2005
2005
|
children: [
|
|
2006
|
-
/* @__PURE__ */
|
|
2006
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
2007
2007
|
children: "Device"
|
|
2008
|
-
}
|
|
2008
|
+
}),
|
|
2009
2009
|
" \u2013 Different overlays for mobile vs desktop"
|
|
2010
2010
|
]
|
|
2011
|
-
}
|
|
2011
|
+
})
|
|
2012
2012
|
]
|
|
2013
|
-
}
|
|
2014
|
-
/* @__PURE__ */
|
|
2013
|
+
}),
|
|
2014
|
+
/* @__PURE__ */ jsx6("p", {
|
|
2015
2015
|
className: "text-muted-foreground",
|
|
2016
2016
|
children: "If multiple overlays apply to the same user, they are merged in order of specificity (user overlays override role overlays, which override tenant overlays)."
|
|
2017
|
-
}
|
|
2017
|
+
})
|
|
2018
2018
|
]
|
|
2019
|
-
}
|
|
2020
|
-
/* @__PURE__ */
|
|
2019
|
+
}),
|
|
2020
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
2021
2021
|
className: "space-y-4",
|
|
2022
2022
|
children: [
|
|
2023
|
-
/* @__PURE__ */
|
|
2023
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
2024
2024
|
className: "text-2xl font-bold",
|
|
2025
2025
|
children: "Best practices"
|
|
2026
|
-
}
|
|
2027
|
-
/* @__PURE__ */
|
|
2026
|
+
}),
|
|
2027
|
+
/* @__PURE__ */ jsxs6("ul", {
|
|
2028
2028
|
className: "text-muted-foreground list-inside list-disc space-y-2",
|
|
2029
2029
|
children: [
|
|
2030
|
-
/* @__PURE__ */
|
|
2030
|
+
/* @__PURE__ */ jsx6("li", {
|
|
2031
2031
|
children: "Start with the default UI and only create overlays when users request specific changes."
|
|
2032
|
-
}
|
|
2033
|
-
/* @__PURE__ */
|
|
2032
|
+
}),
|
|
2033
|
+
/* @__PURE__ */ jsx6("li", {
|
|
2034
2034
|
children: "Document why each overlay modification was made\u2014this helps when reviewing or updating overlays."
|
|
2035
|
-
}
|
|
2036
|
-
/* @__PURE__ */
|
|
2035
|
+
}),
|
|
2036
|
+
/* @__PURE__ */ jsx6("li", {
|
|
2037
2037
|
children: "Test overlays thoroughly to ensure they don't break workflows or confuse users."
|
|
2038
|
-
}
|
|
2039
|
-
/* @__PURE__ */
|
|
2038
|
+
}),
|
|
2039
|
+
/* @__PURE__ */ jsx6("li", {
|
|
2040
2040
|
children: "Use tenant-level overlays for organizational customizations and user-level overlays for personal preferences."
|
|
2041
|
-
}
|
|
2042
|
-
/* @__PURE__ */
|
|
2041
|
+
}),
|
|
2042
|
+
/* @__PURE__ */ jsx6("li", {
|
|
2043
2043
|
children: "Regularly review overlays to remove ones that are no longer needed."
|
|
2044
|
-
}
|
|
2045
|
-
/* @__PURE__ */
|
|
2044
|
+
}),
|
|
2045
|
+
/* @__PURE__ */ jsx6("li", {
|
|
2046
2046
|
children: "Protect overlay signing keys carefully\u2014they control what customizations are allowed."
|
|
2047
|
-
}
|
|
2047
|
+
})
|
|
2048
2048
|
]
|
|
2049
|
-
}
|
|
2049
|
+
})
|
|
2050
2050
|
]
|
|
2051
|
-
}
|
|
2052
|
-
/* @__PURE__ */
|
|
2051
|
+
}),
|
|
2052
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
2053
2053
|
className: "flex items-center gap-4 pt-4",
|
|
2054
2054
|
children: [
|
|
2055
|
-
/* @__PURE__ */
|
|
2055
|
+
/* @__PURE__ */ jsx6(Link6, {
|
|
2056
2056
|
href: "/docs/specs/policy",
|
|
2057
2057
|
className: "btn-ghost",
|
|
2058
2058
|
children: "Previous: Policy"
|
|
2059
|
-
}
|
|
2060
|
-
/* @__PURE__ */
|
|
2059
|
+
}),
|
|
2060
|
+
/* @__PURE__ */ jsxs6(Link6, {
|
|
2061
2061
|
href: "/docs/safety",
|
|
2062
2062
|
className: "btn-primary",
|
|
2063
2063
|
children: [
|
|
2064
2064
|
"Next: Safety ",
|
|
2065
|
-
/* @__PURE__ */
|
|
2065
|
+
/* @__PURE__ */ jsx6(ChevronRight6, {
|
|
2066
2066
|
size: 16
|
|
2067
|
-
}
|
|
2067
|
+
})
|
|
2068
2068
|
]
|
|
2069
|
-
}
|
|
2069
|
+
})
|
|
2070
2070
|
]
|
|
2071
|
-
}
|
|
2071
|
+
})
|
|
2072
2072
|
]
|
|
2073
|
-
}
|
|
2073
|
+
});
|
|
2074
2074
|
}
|
|
2075
2075
|
export {
|
|
2076
2076
|
SpecsWorkflowsPage,
|