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