@contractspec/bundle.library 3.7.6 → 3.7.7
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 +144 -142
- package/AGENTS.md +42 -24
- package/README.md +59 -37
- package/dist/application/index.d.ts +1 -1
- package/dist/application/index.js +842 -840
- package/dist/application/mcp/cliMcp.js +30 -30
- package/dist/application/mcp/common.d.ts +2 -2
- package/dist/application/mcp/common.js +2 -2
- package/dist/application/mcp/contractsMcp.d.ts +1 -1
- package/dist/application/mcp/contractsMcp.js +163 -163
- package/dist/application/mcp/docsMcp.js +31 -31
- package/dist/application/mcp/index.d.ts +2 -2
- package/dist/application/mcp/index.js +842 -840
- package/dist/application/mcp/internalMcp.js +30 -30
- package/dist/application/mcp/providerRankingMcp.js +35 -33
- package/dist/components/docs/DocsIndexPage.js +859 -212
- package/dist/components/docs/advanced/AdvancedMCPPage.js +15 -15
- package/dist/components/docs/advanced/AdvancedOverlayEditorPage.js +4 -4
- package/dist/components/docs/advanced/AdvancedRenderersPage.js +7 -7
- package/dist/components/docs/advanced/AdvancedSpecExperimentsPage.js +9 -9
- package/dist/components/docs/advanced/AdvancedTelemetryPage.js +16 -16
- package/dist/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +6 -6
- package/dist/components/docs/advanced/index.d.ts +2 -2
- package/dist/components/docs/advanced/index.js +57 -57
- package/dist/components/docs/architecture/ArchitectureAppConfigPage.js +10 -10
- package/dist/components/docs/architecture/ArchitectureControlPlanePage.js +8 -8
- package/dist/components/docs/architecture/ArchitectureIntegrationBindingPage.js +14 -14
- package/dist/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +16 -16
- package/dist/components/docs/architecture/ArchitectureMultiTenancyPage.js +7 -7
- package/dist/components/docs/architecture/ArchitectureOverviewPage.js +90 -411
- package/dist/components/docs/architecture/index.d.ts +3 -3
- package/dist/components/docs/architecture/index.js +145 -466
- package/dist/components/docs/comparison/ComparisonAutomationPlatformsPage.js +6 -6
- package/dist/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +7 -7
- package/dist/components/docs/comparison/ComparisonInternalToolBuildersPage.js +6 -6
- package/dist/components/docs/comparison/ComparisonOverviewPage.js +4 -4
- package/dist/components/docs/comparison/ComparisonWindmillPage.js +6 -6
- package/dist/components/docs/comparison/ComparisonWorkflowEnginesPage.js +6 -6
- package/dist/components/docs/comparison/index.d.ts +2 -2
- package/dist/components/docs/comparison/index.js +35 -35
- package/dist/components/docs/docsManifest.d.ts +42 -0
- package/dist/components/docs/docsManifest.js +612 -0
- package/dist/components/docs/ecosystem/IntegrationsPage.js +5 -5
- package/dist/components/docs/ecosystem/PluginsPage.js +7 -7
- package/dist/components/docs/ecosystem/RegistryPage.js +4 -4
- package/dist/components/docs/ecosystem/TemplatesPage.js +11 -11
- package/dist/components/docs/ecosystem/index.d.ts +2 -2
- package/dist/components/docs/ecosystem/index.js +27 -27
- package/dist/components/docs/examples/DocsExamplesPage.js +4 -4
- package/dist/components/docs/examples/index.js +4 -4
- package/dist/components/docs/getting-started/CLIPage.js +9 -9
- package/dist/components/docs/getting-started/CompatibilityPage.js +12 -12
- package/dist/components/docs/getting-started/DataViewTutorialPage.js +7 -7
- package/dist/components/docs/getting-started/DeveloperToolsPage.js +10 -10
- package/dist/components/docs/getting-started/HelloWorldPage.js +8 -8
- package/dist/components/docs/getting-started/InstallationPage.js +10 -10
- package/dist/components/docs/getting-started/StartHerePage.js +8 -8
- package/dist/components/docs/getting-started/TroubleshootingPage.js +12 -12
- package/dist/components/docs/getting-started/VSCodeExtensionPage.js +13 -13
- package/dist/components/docs/getting-started/index.d.ts +5 -5
- package/dist/components/docs/getting-started/index.js +89 -89
- package/dist/components/docs/guides/GuideCIDiffGatingPage.js +13 -13
- package/dist/components/docs/guides/GuideContractTypesPage.js +33 -33
- package/dist/components/docs/guides/GuideDocsPipelinePage.js +13 -13
- package/dist/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +13 -13
- package/dist/components/docs/guides/GuideImportExistingCodebasesPage.js +35 -35
- package/dist/components/docs/guides/GuideNextjsOneEndpointPage.js +15 -15
- package/dist/components/docs/guides/GuideSpecValidationTypingPage.js +13 -13
- package/dist/components/docs/guides/GuidesIndexPage.js +69 -46
- package/dist/components/docs/guides/index.d.ts +4 -4
- package/dist/components/docs/guides/index.js +174 -151
- package/dist/components/docs/index.d.ts +13 -12
- package/dist/components/docs/index.js +14060 -15332
- package/dist/components/docs/integrations/IntegrationsCircuitBreakersPage.js +4 -4
- package/dist/components/docs/integrations/IntegrationsElevenLabsPage.js +7 -7
- package/dist/components/docs/integrations/IntegrationsGithubPage.js +11 -11
- package/dist/components/docs/integrations/IntegrationsGmailPage.js +7 -7
- package/dist/components/docs/integrations/IntegrationsGoogleCalendarPage.js +5 -5
- package/dist/components/docs/integrations/IntegrationsHealthRoutingPage.js +12 -12
- package/dist/components/docs/integrations/IntegrationsMistralPage.js +12 -12
- package/dist/components/docs/integrations/IntegrationsOpenAIPage.js +11 -11
- package/dist/components/docs/integrations/IntegrationsOverviewPage.js +119 -736
- package/dist/components/docs/integrations/IntegrationsPostmarkPage.js +12 -12
- package/dist/components/docs/integrations/IntegrationsPowensPage.js +24 -24
- package/dist/components/docs/integrations/IntegrationsQdrantPage.js +9 -9
- package/dist/components/docs/integrations/IntegrationsResendPage.js +7 -7
- package/dist/components/docs/integrations/IntegrationsS3Page.js +9 -9
- package/dist/components/docs/integrations/IntegrationsSlackPage.js +11 -11
- package/dist/components/docs/integrations/IntegrationsSpecModelPage.js +19 -19
- package/dist/components/docs/integrations/IntegrationsStripePage.js +25 -25
- package/dist/components/docs/integrations/IntegrationsTwilioPage.js +9 -9
- package/dist/components/docs/integrations/IntegrationsWhatsappMetaPage.js +12 -12
- package/dist/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +13 -13
- package/dist/components/docs/integrations/index.d.ts +1 -1
- package/dist/components/docs/integrations/index.js +614 -1231
- package/dist/components/docs/intent/ContractFirstApiPage.js +8 -8
- package/dist/components/docs/intent/DeterministicCodegenPage.js +9 -9
- package/dist/components/docs/intent/GenerateClientFromSchemaPage.js +13 -13
- package/dist/components/docs/intent/OpenapiAlternativePage.js +13 -13
- package/dist/components/docs/intent/SchemaValidationTypescriptPage.js +9 -9
- package/dist/components/docs/intent/SpecDrivenDevelopmentPage.js +8 -8
- package/dist/components/docs/intent/index.d.ts +3 -3
- package/dist/components/docs/intent/index.js +766 -766
- package/dist/components/docs/knowledge/KnowledgeCategoriesPage.js +38 -38
- package/dist/components/docs/knowledge/KnowledgeExamplesPage.js +9 -9
- package/dist/components/docs/knowledge/KnowledgeOverviewPage.js +91 -439
- package/dist/components/docs/knowledge/KnowledgeSourcesPage.js +28 -28
- package/dist/components/docs/knowledge/KnowledgeSpacesPage.js +21 -21
- package/dist/components/docs/knowledge/index.d.ts +1 -1
- package/dist/components/docs/knowledge/index.js +437 -785
- package/dist/components/docs/libraries/LibrariesAccessibilityPage.js +16 -16
- package/dist/components/docs/libraries/LibrariesAiAgentPage.js +8 -8
- package/dist/components/docs/libraries/LibrariesAnalyticsPage.js +6 -6
- package/dist/components/docs/libraries/LibrariesContentGenPage.js +6 -6
- package/dist/components/docs/libraries/LibrariesContractsPage.js +16 -16
- package/dist/components/docs/libraries/LibrariesCostTrackingPage.js +6 -6
- package/dist/components/docs/libraries/LibrariesDataBackendPage.js +14 -14
- package/dist/components/docs/libraries/LibrariesDataViewsPage.js +7 -7
- package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +13 -13
- package/dist/components/docs/libraries/LibrariesEvolutionPage.js +7 -7
- package/dist/components/docs/libraries/LibrariesGraphQLPage.js +13 -13
- package/dist/components/docs/libraries/LibrariesGrowthPage.js +5 -5
- package/dist/components/docs/libraries/LibrariesMultiTenancyPage.js +5 -5
- package/dist/components/docs/libraries/LibrariesObservabilityPage.js +7 -7
- package/dist/components/docs/libraries/LibrariesOverlayEnginePage.js +6 -6
- package/dist/components/docs/libraries/LibrariesOverviewPage.js +117 -430
- package/dist/components/docs/libraries/LibrariesPersonalizationPage.js +6 -6
- package/dist/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +6 -6
- package/dist/components/docs/libraries/LibrariesResiliencePage.js +6 -6
- package/dist/components/docs/libraries/LibrariesRuntimePage.js +13 -13
- package/dist/components/docs/libraries/LibrariesSLOPage.js +6 -6
- package/dist/components/docs/libraries/LibrariesSchemaPage.js +16 -16
- package/dist/components/docs/libraries/LibrariesSupportBotPage.js +7 -7
- package/dist/components/docs/libraries/LibrariesTestingPage.js +7 -7
- package/dist/components/docs/libraries/LibrariesUIKitPage.js +10 -10
- package/dist/components/docs/libraries/LibrariesWorkflowComposerPage.js +5 -5
- package/dist/components/docs/libraries/LibrariesWorkflowsPage.js +8 -8
- package/dist/components/docs/libraries/index.d.ts +4 -4
- package/dist/components/docs/libraries/index.js +1308 -1621
- package/dist/components/docs/manifesto/ManifestoPage.js +33 -138
- package/dist/components/docs/ops/AutoEvolutionOpsPage.js +9 -9
- package/dist/components/docs/ops/DistributedTracingOpsPage.js +5 -5
- package/dist/components/docs/ops/index.js +14 -14
- package/dist/components/docs/reference/DocsMarkdownContent.js +1 -1
- package/dist/components/docs/reference/DocsReferenceContent.js +2 -2
- package/dist/components/docs/reference/DocsReferenceIndexClient.js +8 -8
- package/dist/components/docs/reference/DocsReferenceIndexPage.js +8 -8
- package/dist/components/docs/reference/DocsReferencePage.js +2 -2
- package/dist/components/docs/reference/index.js +10 -10
- package/dist/components/docs/safety/SafetyAuditingPage.js +16 -16
- package/dist/components/docs/safety/SafetyMigrationsPage.js +15 -15
- package/dist/components/docs/safety/SafetyOverviewPage.js +69 -206
- package/dist/components/docs/safety/SafetyPDPPage.js +12 -12
- package/dist/components/docs/safety/SafetySecurityTrustPage.js +11 -11
- package/dist/components/docs/safety/SafetySigningPage.js +7 -7
- package/dist/components/docs/safety/SafetyTenantIsolationPage.js +6 -6
- package/dist/components/docs/safety/index.d.ts +3 -3
- package/dist/components/docs/safety/index.js +616 -753
- package/dist/components/docs/shared/StudioPrompt.js +5 -5
- package/dist/components/docs/specs/SpecsCapabilitiesPage.js +12 -12
- package/dist/components/docs/specs/SpecsDataViewsPage.js +14 -14
- package/dist/components/docs/specs/SpecsOverlaysPage.js +14 -14
- package/dist/components/docs/specs/SpecsOverviewPage.js +135 -297
- package/dist/components/docs/specs/SpecsPolicyPage.js +29 -29
- package/dist/components/docs/specs/SpecsWorkflowsPage.js +18 -18
- package/dist/components/docs/specs/index.d.ts +3 -3
- package/dist/components/docs/specs/index.js +814 -976
- package/dist/components/docs/studio/StudioBYOKPage.js +1 -1
- package/dist/components/docs/studio/StudioDeploymentsPage.js +1 -1
- package/dist/components/docs/studio/StudioGettingStartedPage.js +1 -1
- package/dist/components/docs/studio/StudioIntegrationsPage.js +1 -1
- package/dist/components/docs/studio/StudioOverviewPage.js +109 -56
- package/dist/components/docs/studio/StudioVisualBuilderPage.js +1 -1
- package/dist/components/docs/studio/index.d.ts +4 -4
- package/dist/components/docs/studio/index.js +170 -117
- package/dist/components/integrations/index.js +25 -25
- package/dist/components/integrations/molecules/IntegrationCard.js +5 -5
- package/dist/components/integrations/organisms/IntegrationMarketplace.js +12 -12
- package/dist/components/integrations/organisms/IntegrationSettings.js +7 -7
- package/dist/components/integrations/organisms/KnowledgeSourceList.js +6 -6
- package/dist/components/legal/PrivacyTemplate.js +67 -67
- package/dist/components/legal/TermsTemplate.js +54 -54
- package/dist/components/legal/index.js +121 -121
- package/dist/components/shared/FeatureGateNotice.js +4 -4
- package/dist/components/shared/index.js +4 -4
- package/dist/components/shell/WorkspaceHeader.js +4 -4
- package/dist/components/shell/WorkspaceProjectShellLayout.d.ts +3 -3
- package/dist/components/shell/WorkspaceProjectShellLayout.js +10 -10
- package/dist/components/shell/WorkspaceShellRenderer.d.ts +4 -4
- package/dist/components/shell/WorkspaceShellRenderer.js +8 -8
- package/dist/components/shell/WorkspaceSidebar.js +2 -2
- package/dist/components/shell/index.d.ts +1 -1
- package/dist/components/shell/index.js +12 -12
- package/dist/components/templates/engine/index.d.ts +1 -1
- package/dist/components/templates/index.d.ts +1 -1
- package/dist/components/templates/index.js +835 -835
- package/dist/components/templates/messaging/ConversationList.js +11 -11
- package/dist/components/templates/messaging/MessageComposer.js +11 -11
- package/dist/components/templates/messaging/MessageThread.js +6 -6
- package/dist/components/templates/messaging/MessagingWorkspace.js +23 -23
- package/dist/components/templates/messaging/index.d.ts +1 -1
- package/dist/components/templates/messaging/index.js +23 -23
- package/dist/components/templates/recipes/LanguageSwitcher.js +1 -1
- package/dist/components/templates/recipes/RecipeCard.js +5 -5
- package/dist/components/templates/recipes/RecipeDetail.js +8 -8
- package/dist/components/templates/recipes/RecipeList.js +17 -17
- package/dist/components/templates/recipes/index.d.ts +2 -2
- package/dist/components/templates/recipes/index.js +17 -17
- package/dist/components/templates/todos/FilterBar.d.ts +1 -1
- package/dist/components/templates/todos/FilterBar.js +9 -9
- package/dist/components/templates/todos/TaskForm.js +14 -14
- package/dist/components/templates/todos/TaskItem.js +4 -4
- package/dist/components/templates/todos/TaskList.js +30 -30
- package/dist/components/templates/todos/index.d.ts +2 -2
- package/dist/components/templates/todos/index.js +30 -30
- package/dist/config/index.d.ts +2 -2
- package/dist/features/contracts-registry.d.ts +3 -3
- package/dist/features/contracts-registry.js +15 -15
- package/dist/features/docs/docs.contracts.d.ts +1 -1
- package/dist/features/docs/docs.contracts.js +2 -2
- package/dist/features/docs/index.d.ts +1 -1
- package/dist/features/docs/index.js +2 -2
- package/dist/features/index.d.ts +4 -4
- package/dist/features/index.js +18 -18
- package/dist/features/registry.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +14982 -16254
- package/dist/libs/email/client.js +1 -1
- package/dist/libs/email/contact.js +1 -1
- package/dist/libs/email/newsletter.js +1 -1
- package/dist/libs/email/waitlist-application.js +1 -1
- package/dist/libs/email/waitlist.js +1 -1
- package/dist/libs/email.d.ts +1 -1
- package/dist/libs/email.js +1 -1
- package/dist/node/application/index.js +842 -840
- package/dist/node/application/mcp/cliMcp.js +30 -30
- package/dist/node/application/mcp/common.js +2 -2
- package/dist/node/application/mcp/contractsMcp.js +163 -163
- package/dist/node/application/mcp/docsMcp.js +31 -31
- package/dist/node/application/mcp/index.js +842 -840
- package/dist/node/application/mcp/internalMcp.js +30 -30
- package/dist/node/application/mcp/providerRankingMcp.js +35 -33
- package/dist/node/components/docs/DocsIndexPage.js +859 -212
- package/dist/node/components/docs/advanced/AdvancedMCPPage.js +15 -15
- package/dist/node/components/docs/advanced/AdvancedOverlayEditorPage.js +4 -4
- package/dist/node/components/docs/advanced/AdvancedRenderersPage.js +7 -7
- package/dist/node/components/docs/advanced/AdvancedSpecExperimentsPage.js +9 -9
- package/dist/node/components/docs/advanced/AdvancedTelemetryPage.js +16 -16
- package/dist/node/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +6 -6
- package/dist/node/components/docs/advanced/index.js +57 -57
- package/dist/node/components/docs/architecture/ArchitectureAppConfigPage.js +10 -10
- package/dist/node/components/docs/architecture/ArchitectureControlPlanePage.js +8 -8
- package/dist/node/components/docs/architecture/ArchitectureIntegrationBindingPage.js +14 -14
- package/dist/node/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +16 -16
- package/dist/node/components/docs/architecture/ArchitectureMultiTenancyPage.js +7 -7
- package/dist/node/components/docs/architecture/ArchitectureOverviewPage.js +90 -411
- package/dist/node/components/docs/architecture/index.js +145 -466
- package/dist/node/components/docs/comparison/ComparisonAutomationPlatformsPage.js +6 -6
- package/dist/node/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +7 -7
- package/dist/node/components/docs/comparison/ComparisonInternalToolBuildersPage.js +6 -6
- package/dist/node/components/docs/comparison/ComparisonOverviewPage.js +4 -4
- package/dist/node/components/docs/comparison/ComparisonWindmillPage.js +6 -6
- package/dist/node/components/docs/comparison/ComparisonWorkflowEnginesPage.js +6 -6
- package/dist/node/components/docs/comparison/index.js +35 -35
- package/dist/node/components/docs/docsManifest.js +611 -0
- package/dist/node/components/docs/ecosystem/IntegrationsPage.js +5 -5
- package/dist/node/components/docs/ecosystem/PluginsPage.js +7 -7
- package/dist/node/components/docs/ecosystem/RegistryPage.js +4 -4
- package/dist/node/components/docs/ecosystem/TemplatesPage.js +11 -11
- package/dist/node/components/docs/ecosystem/index.js +27 -27
- package/dist/node/components/docs/examples/DocsExamplesPage.js +4 -4
- package/dist/node/components/docs/examples/index.js +4 -4
- package/dist/node/components/docs/getting-started/CLIPage.js +9 -9
- package/dist/node/components/docs/getting-started/CompatibilityPage.js +12 -12
- package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +7 -7
- package/dist/node/components/docs/getting-started/DeveloperToolsPage.js +10 -10
- package/dist/node/components/docs/getting-started/HelloWorldPage.js +8 -8
- package/dist/node/components/docs/getting-started/InstallationPage.js +10 -10
- package/dist/node/components/docs/getting-started/StartHerePage.js +8 -8
- package/dist/node/components/docs/getting-started/TroubleshootingPage.js +12 -12
- package/dist/node/components/docs/getting-started/VSCodeExtensionPage.js +13 -13
- package/dist/node/components/docs/getting-started/index.js +89 -89
- package/dist/node/components/docs/guides/GuideCIDiffGatingPage.js +13 -13
- package/dist/node/components/docs/guides/GuideContractTypesPage.js +33 -33
- package/dist/node/components/docs/guides/GuideDocsPipelinePage.js +13 -13
- package/dist/node/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +13 -13
- package/dist/node/components/docs/guides/GuideImportExistingCodebasesPage.js +35 -35
- package/dist/node/components/docs/guides/GuideNextjsOneEndpointPage.js +15 -15
- package/dist/node/components/docs/guides/GuideSpecValidationTypingPage.js +13 -13
- package/dist/node/components/docs/guides/GuidesIndexPage.js +69 -46
- package/dist/node/components/docs/guides/index.js +174 -151
- package/dist/node/components/docs/index.js +14060 -15332
- package/dist/node/components/docs/integrations/IntegrationsCircuitBreakersPage.js +4 -4
- package/dist/node/components/docs/integrations/IntegrationsElevenLabsPage.js +7 -7
- package/dist/node/components/docs/integrations/IntegrationsGithubPage.js +11 -11
- package/dist/node/components/docs/integrations/IntegrationsGmailPage.js +7 -7
- package/dist/node/components/docs/integrations/IntegrationsGoogleCalendarPage.js +5 -5
- package/dist/node/components/docs/integrations/IntegrationsHealthRoutingPage.js +12 -12
- package/dist/node/components/docs/integrations/IntegrationsMistralPage.js +12 -12
- package/dist/node/components/docs/integrations/IntegrationsOpenAIPage.js +11 -11
- package/dist/node/components/docs/integrations/IntegrationsOverviewPage.js +119 -736
- package/dist/node/components/docs/integrations/IntegrationsPostmarkPage.js +12 -12
- package/dist/node/components/docs/integrations/IntegrationsPowensPage.js +24 -24
- package/dist/node/components/docs/integrations/IntegrationsQdrantPage.js +9 -9
- package/dist/node/components/docs/integrations/IntegrationsResendPage.js +7 -7
- package/dist/node/components/docs/integrations/IntegrationsS3Page.js +9 -9
- package/dist/node/components/docs/integrations/IntegrationsSlackPage.js +11 -11
- package/dist/node/components/docs/integrations/IntegrationsSpecModelPage.js +19 -19
- package/dist/node/components/docs/integrations/IntegrationsStripePage.js +25 -25
- package/dist/node/components/docs/integrations/IntegrationsTwilioPage.js +9 -9
- package/dist/node/components/docs/integrations/IntegrationsWhatsappMetaPage.js +12 -12
- package/dist/node/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +13 -13
- package/dist/node/components/docs/integrations/index.js +614 -1231
- package/dist/node/components/docs/intent/ContractFirstApiPage.js +8 -8
- package/dist/node/components/docs/intent/DeterministicCodegenPage.js +9 -9
- package/dist/node/components/docs/intent/GenerateClientFromSchemaPage.js +13 -13
- package/dist/node/components/docs/intent/OpenapiAlternativePage.js +13 -13
- package/dist/node/components/docs/intent/SchemaValidationTypescriptPage.js +9 -9
- package/dist/node/components/docs/intent/SpecDrivenDevelopmentPage.js +8 -8
- package/dist/node/components/docs/intent/index.js +766 -766
- package/dist/node/components/docs/knowledge/KnowledgeCategoriesPage.js +38 -38
- package/dist/node/components/docs/knowledge/KnowledgeExamplesPage.js +9 -9
- package/dist/node/components/docs/knowledge/KnowledgeOverviewPage.js +91 -439
- package/dist/node/components/docs/knowledge/KnowledgeSourcesPage.js +28 -28
- package/dist/node/components/docs/knowledge/KnowledgeSpacesPage.js +21 -21
- package/dist/node/components/docs/knowledge/index.js +437 -785
- package/dist/node/components/docs/libraries/LibrariesAccessibilityPage.js +16 -16
- package/dist/node/components/docs/libraries/LibrariesAiAgentPage.js +8 -8
- package/dist/node/components/docs/libraries/LibrariesAnalyticsPage.js +6 -6
- package/dist/node/components/docs/libraries/LibrariesContentGenPage.js +6 -6
- package/dist/node/components/docs/libraries/LibrariesContractsPage.js +16 -16
- package/dist/node/components/docs/libraries/LibrariesCostTrackingPage.js +6 -6
- package/dist/node/components/docs/libraries/LibrariesDataBackendPage.js +14 -14
- package/dist/node/components/docs/libraries/LibrariesDataViewsPage.js +7 -7
- package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +13 -13
- package/dist/node/components/docs/libraries/LibrariesEvolutionPage.js +7 -7
- package/dist/node/components/docs/libraries/LibrariesGraphQLPage.js +13 -13
- package/dist/node/components/docs/libraries/LibrariesGrowthPage.js +5 -5
- package/dist/node/components/docs/libraries/LibrariesMultiTenancyPage.js +5 -5
- package/dist/node/components/docs/libraries/LibrariesObservabilityPage.js +7 -7
- package/dist/node/components/docs/libraries/LibrariesOverlayEnginePage.js +6 -6
- package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +117 -430
- package/dist/node/components/docs/libraries/LibrariesPersonalizationPage.js +6 -6
- package/dist/node/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +6 -6
- package/dist/node/components/docs/libraries/LibrariesResiliencePage.js +6 -6
- package/dist/node/components/docs/libraries/LibrariesRuntimePage.js +13 -13
- package/dist/node/components/docs/libraries/LibrariesSLOPage.js +6 -6
- package/dist/node/components/docs/libraries/LibrariesSchemaPage.js +16 -16
- package/dist/node/components/docs/libraries/LibrariesSupportBotPage.js +7 -7
- package/dist/node/components/docs/libraries/LibrariesTestingPage.js +7 -7
- package/dist/node/components/docs/libraries/LibrariesUIKitPage.js +10 -10
- package/dist/node/components/docs/libraries/LibrariesWorkflowComposerPage.js +5 -5
- package/dist/node/components/docs/libraries/LibrariesWorkflowsPage.js +8 -8
- package/dist/node/components/docs/libraries/index.js +1308 -1621
- package/dist/node/components/docs/manifesto/ManifestoPage.js +33 -138
- package/dist/node/components/docs/ops/AutoEvolutionOpsPage.js +9 -9
- package/dist/node/components/docs/ops/DistributedTracingOpsPage.js +5 -5
- package/dist/node/components/docs/ops/index.js +14 -14
- package/dist/node/components/docs/reference/DocsMarkdownContent.js +1 -1
- package/dist/node/components/docs/reference/DocsReferenceContent.js +2 -2
- package/dist/node/components/docs/reference/DocsReferenceIndexClient.js +8 -8
- package/dist/node/components/docs/reference/DocsReferenceIndexPage.js +8 -8
- package/dist/node/components/docs/reference/DocsReferencePage.js +2 -2
- package/dist/node/components/docs/reference/index.js +10 -10
- package/dist/node/components/docs/safety/SafetyAuditingPage.js +16 -16
- package/dist/node/components/docs/safety/SafetyMigrationsPage.js +15 -15
- package/dist/node/components/docs/safety/SafetyOverviewPage.js +69 -206
- package/dist/node/components/docs/safety/SafetyPDPPage.js +12 -12
- package/dist/node/components/docs/safety/SafetySecurityTrustPage.js +11 -11
- package/dist/node/components/docs/safety/SafetySigningPage.js +7 -7
- package/dist/node/components/docs/safety/SafetyTenantIsolationPage.js +6 -6
- package/dist/node/components/docs/safety/index.js +616 -753
- package/dist/node/components/docs/shared/StudioPrompt.js +5 -5
- package/dist/node/components/docs/specs/SpecsCapabilitiesPage.js +12 -12
- package/dist/node/components/docs/specs/SpecsDataViewsPage.js +14 -14
- package/dist/node/components/docs/specs/SpecsOverlaysPage.js +14 -14
- package/dist/node/components/docs/specs/SpecsOverviewPage.js +135 -297
- package/dist/node/components/docs/specs/SpecsPolicyPage.js +29 -29
- package/dist/node/components/docs/specs/SpecsWorkflowsPage.js +18 -18
- package/dist/node/components/docs/specs/index.js +814 -976
- package/dist/node/components/docs/studio/StudioBYOKPage.js +1 -1
- package/dist/node/components/docs/studio/StudioDeploymentsPage.js +1 -1
- package/dist/node/components/docs/studio/StudioGettingStartedPage.js +1 -1
- package/dist/node/components/docs/studio/StudioIntegrationsPage.js +1 -1
- package/dist/node/components/docs/studio/StudioOverviewPage.js +109 -56
- package/dist/node/components/docs/studio/StudioVisualBuilderPage.js +1 -1
- package/dist/node/components/docs/studio/index.js +170 -117
- package/dist/node/components/integrations/index.js +25 -25
- package/dist/node/components/integrations/molecules/IntegrationCard.js +5 -5
- package/dist/node/components/integrations/organisms/IntegrationMarketplace.js +12 -12
- package/dist/node/components/integrations/organisms/IntegrationSettings.js +7 -7
- package/dist/node/components/integrations/organisms/KnowledgeSourceList.js +6 -6
- package/dist/node/components/legal/PrivacyTemplate.js +67 -67
- package/dist/node/components/legal/TermsTemplate.js +54 -54
- package/dist/node/components/legal/index.js +121 -121
- package/dist/node/components/shared/FeatureGateNotice.js +4 -4
- package/dist/node/components/shared/index.js +4 -4
- package/dist/node/components/shell/WorkspaceHeader.js +4 -4
- package/dist/node/components/shell/WorkspaceProjectShellLayout.js +10 -10
- package/dist/node/components/shell/WorkspaceShellRenderer.js +8 -8
- package/dist/node/components/shell/WorkspaceSidebar.js +2 -2
- package/dist/node/components/shell/index.js +12 -12
- package/dist/node/components/templates/index.js +835 -835
- package/dist/node/components/templates/messaging/ConversationList.js +11 -11
- package/dist/node/components/templates/messaging/MessageComposer.js +11 -11
- package/dist/node/components/templates/messaging/MessageThread.js +6 -6
- package/dist/node/components/templates/messaging/MessagingWorkspace.js +23 -23
- package/dist/node/components/templates/messaging/index.js +23 -23
- package/dist/node/components/templates/recipes/LanguageSwitcher.js +1 -1
- package/dist/node/components/templates/recipes/RecipeCard.js +5 -5
- package/dist/node/components/templates/recipes/RecipeDetail.js +8 -8
- package/dist/node/components/templates/recipes/RecipeList.js +17 -17
- package/dist/node/components/templates/recipes/index.js +17 -17
- package/dist/node/components/templates/todos/FilterBar.js +9 -9
- package/dist/node/components/templates/todos/TaskForm.js +14 -14
- package/dist/node/components/templates/todos/TaskItem.js +4 -4
- package/dist/node/components/templates/todos/TaskList.js +30 -30
- package/dist/node/components/templates/todos/index.js +30 -30
- package/dist/node/features/contracts-registry.js +15 -15
- package/dist/node/features/docs/docs.contracts.js +2 -2
- package/dist/node/features/docs/index.js +2 -2
- package/dist/node/features/index.js +18 -18
- package/dist/node/features/registry.js +1 -1
- package/dist/node/index.js +14982 -16254
- package/dist/node/libs/email/client.js +1 -1
- package/dist/node/libs/email/contact.js +1 -1
- package/dist/node/libs/email/newsletter.js +1 -1
- package/dist/node/libs/email/waitlist-application.js +1 -1
- package/dist/node/libs/email/waitlist.js +1 -1
- package/dist/node/libs/email.js +1 -1
- package/dist/node/presentation/features/atoms/FeatureIcon/FeatureIcon.js +7 -7
- package/dist/node/presentation/features/atoms/FeatureIcon/index.js +7 -7
- package/dist/node/presentation/features/atoms/index.js +7 -7
- package/dist/node/presentation/features/hooks/index.js +56 -56
- package/dist/node/presentation/features/hooks/useContractsRegistry.js +18 -18
- package/dist/node/presentation/features/hooks/useFeatureFilters.js +1 -1
- package/dist/node/presentation/features/hooks/useFeatureRegistry.js +1 -1
- package/dist/node/presentation/features/hooks/useRelatedDocs.js +1 -1
- package/dist/node/presentation/features/index.js +1364 -1364
- package/dist/node/presentation/features/molecules/FeatureCard/FeatureCard.js +15 -15
- package/dist/node/presentation/features/molecules/FeatureCard/index.js +15 -15
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +7 -7
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/index.js +7 -7
- package/dist/node/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -1
- package/dist/node/presentation/features/molecules/FeatureFilters/index.js +1 -1
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +5 -5
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/index.js +5 -5
- package/dist/node/presentation/features/molecules/index.js +77 -77
- package/dist/node/presentation/features/organisms/FeatureDataViewsList.js +18 -18
- package/dist/node/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +121 -121
- package/dist/node/presentation/features/organisms/FeatureDiscovery/index.js +121 -121
- package/dist/node/presentation/features/organisms/FeatureEventsList.js +18 -18
- package/dist/node/presentation/features/organisms/FeatureFormsList.js +18 -18
- package/dist/node/presentation/features/organisms/FeatureOperationsList.js +15 -15
- package/dist/node/presentation/features/organisms/FeaturePresentationsList.js +18 -18
- package/dist/node/presentation/features/organisms/index.js +401 -401
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +13 -13
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +13 -13
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +20 -20
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/index.js +20 -20
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +12 -12
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/index.js +12 -12
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +18 -18
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/index.js +18 -18
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +13 -13
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/index.js +13 -13
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +20 -20
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/index.js +20 -20
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +8 -8
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/index.js +8 -8
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +15 -15
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/index.js +15 -15
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +2 -2
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/index.js +2 -2
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +12 -12
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +12 -12
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +18 -18
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/index.js +18 -18
- package/dist/presentation/features/atoms/FeatureIcon/FeatureIcon.js +7 -7
- package/dist/presentation/features/atoms/FeatureIcon/index.d.ts +1 -1
- package/dist/presentation/features/atoms/FeatureIcon/index.js +7 -7
- package/dist/presentation/features/atoms/index.js +7 -7
- package/dist/presentation/features/hooks/index.d.ts +3 -3
- package/dist/presentation/features/hooks/index.js +56 -56
- package/dist/presentation/features/hooks/useContractsRegistry.js +18 -18
- package/dist/presentation/features/hooks/useFeatureFilters.js +1 -1
- package/dist/presentation/features/hooks/useFeatureRegistry.js +1 -1
- package/dist/presentation/features/hooks/useRelatedDocs.js +1 -1
- package/dist/presentation/features/index.d.ts +14 -14
- package/dist/presentation/features/index.js +1364 -1364
- package/dist/presentation/features/molecules/FeatureCard/FeatureCard.js +15 -15
- package/dist/presentation/features/molecules/FeatureCard/index.js +15 -15
- package/dist/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +7 -7
- package/dist/presentation/features/molecules/FeatureCategoryHeader/index.js +7 -7
- package/dist/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -1
- package/dist/presentation/features/molecules/FeatureFilters/index.js +1 -1
- package/dist/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +5 -5
- package/dist/presentation/features/molecules/FeatureHoverPreview/index.js +5 -5
- package/dist/presentation/features/molecules/index.d.ts +1 -1
- package/dist/presentation/features/molecules/index.js +77 -77
- package/dist/presentation/features/organisms/FeatureDataViewsList.js +18 -18
- package/dist/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +121 -121
- package/dist/presentation/features/organisms/FeatureDiscovery/index.d.ts +1 -1
- package/dist/presentation/features/organisms/FeatureDiscovery/index.js +121 -121
- package/dist/presentation/features/organisms/FeatureEventsList.js +18 -18
- package/dist/presentation/features/organisms/FeatureFormsList.js +18 -18
- package/dist/presentation/features/organisms/FeatureOperationsList.js +15 -15
- package/dist/presentation/features/organisms/FeaturePresentationsList.js +18 -18
- package/dist/presentation/features/organisms/index.d.ts +4 -4
- package/dist/presentation/features/organisms/index.js +401 -401
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +13 -13
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +13 -13
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/types.d.ts +1 -1
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +20 -20
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/index.js +20 -20
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +12 -12
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/index.js +12 -12
- package/dist/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +18 -18
- package/dist/presentation/features/templates/FeatureEventsTemplate/index.js +18 -18
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +13 -13
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/index.js +13 -13
- package/dist/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +20 -20
- package/dist/presentation/features/templates/FeatureFormsTemplate/index.js +20 -20
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +8 -8
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/index.js +8 -8
- package/dist/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +15 -15
- package/dist/presentation/features/templates/FeatureOperationsTemplate/index.js +15 -15
- package/dist/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +2 -2
- package/dist/presentation/features/templates/FeatureOverviewTemplate/index.js +2 -2
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +12 -12
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +12 -12
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +18 -18
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/index.js +18 -18
- package/package.json +38 -24
- package/src/__tests__/env-setup.ts +1 -1
- package/src/__tests__/mocks/prisma.ts +78 -78
- package/src/__tests__/setup.ts +2 -2
- package/src/application/context-storage/index.ts +42 -42
- package/src/application/index.ts +1 -1
- package/src/application/mcp/cliMcp.ts +221 -221
- package/src/application/mcp/common.ts +210 -210
- package/src/application/mcp/contractsMcp.ts +15 -15
- package/src/application/mcp/contractsMcpResources.ts +119 -119
- package/src/application/mcp/contractsMcpTools.ts +218 -218
- package/src/application/mcp/contractsMcpTypes.ts +35 -35
- package/src/application/mcp/docsMcp.ts +173 -173
- package/src/application/mcp/index.ts +2 -2
- package/src/application/mcp/internalMcp.ts +204 -204
- package/src/application/mcp/providerRankingMcp.ts +346 -344
- package/src/bundles/LibraryBundle.ts +136 -136
- package/src/components/docs/DocsIndexPage.tsx +189 -241
- package/src/components/docs/advanced/AdvancedMCPPage.tsx +168 -168
- package/src/components/docs/advanced/AdvancedOverlayEditorPage.tsx +52 -52
- package/src/components/docs/advanced/AdvancedRenderersPage.tsx +53 -53
- package/src/components/docs/advanced/AdvancedSpecExperimentsPage.tsx +48 -48
- package/src/components/docs/advanced/AdvancedTelemetryPage.tsx +205 -205
- package/src/components/docs/advanced/AdvancedWorkflowMonitoringPage.tsx +42 -42
- package/src/components/docs/advanced/index.ts +2 -2
- package/src/components/docs/architecture/ArchitectureAppConfigPage.tsx +127 -127
- package/src/components/docs/architecture/ArchitectureControlPlanePage.tsx +79 -79
- package/src/components/docs/architecture/ArchitectureIntegrationBindingPage.tsx +147 -147
- package/src/components/docs/architecture/ArchitectureKnowledgeBindingPage.tsx +193 -193
- package/src/components/docs/architecture/ArchitectureMultiTenancyPage.tsx +73 -73
- package/src/components/docs/architecture/ArchitectureOverviewPage.tsx +98 -273
- package/src/components/docs/architecture/index.ts +3 -3
- package/src/components/docs/comparison/ComparisonAutomationPlatformsPage.tsx +137 -137
- package/src/components/docs/comparison/ComparisonEnterprisePlatformsPage.tsx +138 -138
- package/src/components/docs/comparison/ComparisonInternalToolBuildersPage.tsx +147 -147
- package/src/components/docs/comparison/ComparisonOverviewPage.tsx +106 -106
- package/src/components/docs/comparison/ComparisonWindmillPage.tsx +143 -143
- package/src/components/docs/comparison/ComparisonWorkflowEnginesPage.tsx +168 -168
- package/src/components/docs/comparison/index.ts +2 -2
- package/src/components/docs/docsManifest.ts +720 -0
- package/src/components/docs/ecosystem/IntegrationsPage.tsx +45 -45
- package/src/components/docs/ecosystem/PluginsPage.tsx +77 -77
- package/src/components/docs/ecosystem/RegistryPage.tsx +48 -48
- package/src/components/docs/ecosystem/TemplatesPage.tsx +52 -52
- package/src/components/docs/ecosystem/ecosystem.docblocks.ts +42 -42
- package/src/components/docs/ecosystem/index.ts +2 -2
- package/src/components/docs/examples/DocsExamplesPage.tsx +67 -66
- package/src/components/docs/generated/docs-index._common.json +1757 -1757
- package/src/components/docs/generated/docs-index.agent-console.json +376 -376
- package/src/components/docs/generated/docs-index.ai-chat-assistant.json +8 -8
- package/src/components/docs/generated/docs-index.ai-chat.json +104 -104
- package/src/components/docs/generated/docs-index.ai-support-bot.json +8 -8
- package/src/components/docs/generated/docs-index.analytics-dashboard.json +168 -168
- package/src/components/docs/generated/docs-index.app-config.json +136 -136
- package/src/components/docs/generated/docs-index.audit-trail.json +48 -48
- package/src/components/docs/generated/docs-index.calendar-google.json +8 -8
- package/src/components/docs/generated/docs-index.content-generation.json +8 -8
- package/src/components/docs/generated/docs-index.crm-pipeline.json +160 -160
- package/src/components/docs/generated/docs-index.email-gmail.json +8 -8
- package/src/components/docs/generated/docs-index.feature-flags.json +216 -216
- package/src/components/docs/generated/docs-index.files.json +176 -176
- package/src/components/docs/generated/docs-index.generated.ts +19 -19
- package/src/components/docs/generated/docs-index.health.json +96 -96
- package/src/components/docs/generated/docs-index.identity-rbac.json +312 -312
- package/src/components/docs/generated/docs-index.in-app-docs.json +8 -8
- package/src/components/docs/generated/docs-index.integration-hub.json +264 -264
- package/src/components/docs/generated/docs-index.integration-posthog.json +8 -8
- package/src/components/docs/generated/docs-index.integration-stripe.json +8 -8
- package/src/components/docs/generated/docs-index.integration-supabase.json +8 -8
- package/src/components/docs/generated/docs-index.jobs.json +136 -136
- package/src/components/docs/generated/docs-index.kb-update-pipeline.json +128 -128
- package/src/components/docs/generated/docs-index.knowledge-canon.json +8 -8
- package/src/components/docs/generated/docs-index.learning-journey-ambient-coach.json +8 -8
- package/src/components/docs/generated/docs-index.learning-journey-crm-onboarding.json +48 -48
- package/src/components/docs/generated/docs-index.learning-journey-duo-drills.json +8 -8
- package/src/components/docs/generated/docs-index.learning-journey-platform-tour.json +48 -48
- package/src/components/docs/generated/docs-index.learning-journey-quest-challenges.json +8 -8
- package/src/components/docs/generated/docs-index.learning-journey-registry.json +32 -32
- package/src/components/docs/generated/docs-index.learning-journey-studio-onboarding.json +48 -48
- package/src/components/docs/generated/docs-index.learning-journey-ui-coaching.json +8 -8
- package/src/components/docs/generated/docs-index.learning-journey-ui-gamified.json +8 -8
- package/src/components/docs/generated/docs-index.learning-journey-ui-onboarding.json +8 -8
- package/src/components/docs/generated/docs-index.learning-journey-ui-shared.json +8 -8
- package/src/components/docs/generated/docs-index.learning-journey.json +216 -216
- package/src/components/docs/generated/docs-index.learning-patterns.json +8 -8
- package/src/components/docs/generated/docs-index.lifecycle-cli.json +8 -8
- package/src/components/docs/generated/docs-index.lifecycle-dashboard.json +8 -8
- package/src/components/docs/generated/docs-index.locale-jurisdiction-gate.json +48 -48
- package/src/components/docs/generated/docs-index.manifest.json +376 -376
- package/src/components/docs/generated/docs-index.marketplace.json +336 -336
- package/src/components/docs/generated/docs-index.meeting-recorder-providers.json +8 -8
- package/src/components/docs/generated/docs-index.meeting-recorder.json +48 -48
- package/src/components/docs/generated/docs-index.metrics.json +200 -200
- package/src/components/docs/generated/docs-index.minimal.json +16 -16
- package/src/components/docs/generated/docs-index.notifications.json +64 -64
- package/src/components/docs/generated/docs-index.openbanking-powens.json +8 -8
- package/src/components/docs/generated/docs-index.openbanking.json +64 -64
- package/src/components/docs/generated/docs-index.opencode-cli.json +16 -16
- package/src/components/docs/generated/docs-index.personalization.json +8 -8
- package/src/components/docs/generated/docs-index.platform-acp.json +72 -72
- package/src/components/docs/generated/docs-index.platform-agent.json +96 -96
- package/src/components/docs/generated/docs-index.platform-context.json +56 -56
- package/src/components/docs/generated/docs-index.platform-database.json +48 -48
- package/src/components/docs/generated/docs-index.platform-docs.json +88 -88
- package/src/components/docs/generated/docs-index.platform-integrations.json +320 -320
- package/src/components/docs/generated/docs-index.platform-knowledge.json +56 -56
- package/src/components/docs/generated/docs-index.platform-provider-ranking.json +96 -96
- package/src/components/docs/generated/docs-index.pocket-family-office.json +120 -120
- package/src/components/docs/generated/docs-index.policy-safe-knowledge-assistant.json +8 -8
- package/src/components/docs/generated/docs-index.product-intent.json +8 -8
- package/src/components/docs/generated/docs-index.project-management-sync.json +8 -8
- package/src/components/docs/generated/docs-index.saas-boilerplate.json +208 -208
- package/src/components/docs/generated/docs-index.service-business-os.json +192 -192
- package/src/components/docs/generated/docs-index.team-hub.json +184 -184
- package/src/components/docs/generated/docs-index.unknown.json +512 -512
- package/src/components/docs/generated/docs-index.versioned-knowledge-base.json +80 -80
- package/src/components/docs/generated/docs-index.video-api-showcase.json +32 -32
- package/src/components/docs/generated/docs-index.video-docs-terminal.json +8 -8
- package/src/components/docs/generated/docs-index.video-marketing-clip.json +8 -8
- package/src/components/docs/generated/docs-index.voice-providers.json +8 -8
- package/src/components/docs/generated/docs-index.wealth-snapshot.json +152 -152
- package/src/components/docs/generated/docs-index.workflow-system.json +432 -432
- package/src/components/docs/generated/docs-index.workspace-cli.json +8 -8
- package/src/components/docs/generated/index.ts +6 -6
- package/src/components/docs/generated/loader.ts +49 -49
- package/src/components/docs/getting-started/CLIPage.tsx +157 -157
- package/src/components/docs/getting-started/CompatibilityPage.tsx +69 -69
- package/src/components/docs/getting-started/DataViewTutorialPage.tsx +63 -63
- package/src/components/docs/getting-started/DeveloperToolsPage.tsx +141 -140
- package/src/components/docs/getting-started/HelloWorldPage.tsx +88 -88
- package/src/components/docs/getting-started/InstallationPage.tsx +78 -78
- package/src/components/docs/getting-started/StartHerePage.tsx +64 -64
- package/src/components/docs/getting-started/TroubleshootingPage.tsx +68 -68
- package/src/components/docs/getting-started/VSCodeExtensionPage.tsx +233 -233
- package/src/components/docs/getting-started/getting-started.docblocks.ts +30 -30
- package/src/components/docs/getting-started/index.ts +6 -5
- package/src/components/docs/guides/GuideCIDiffGatingPage.tsx +88 -88
- package/src/components/docs/guides/GuideContractTypesPage.tsx +266 -266
- package/src/components/docs/guides/GuideDocsPipelinePage.tsx +78 -78
- package/src/components/docs/guides/GuideGenerateDocsClientsSchemasPage.tsx +89 -89
- package/src/components/docs/guides/GuideImportExistingCodebasesPage.tsx +360 -360
- package/src/components/docs/guides/GuideNextjsOneEndpointPage.tsx +117 -117
- package/src/components/docs/guides/GuideSpecValidationTypingPage.tsx +82 -82
- package/src/components/docs/guides/GuidesIndexPage.tsx +109 -99
- package/src/components/docs/guides/guides.docblocks.ts +60 -60
- package/src/components/docs/guides/index.ts +4 -4
- package/src/components/docs/index.ts +26 -40
- package/src/components/docs/integrations/IntegrationsCircuitBreakersPage.tsx +22 -22
- package/src/components/docs/integrations/IntegrationsElevenLabsPage.tsx +41 -41
- package/src/components/docs/integrations/IntegrationsGithubPage.tsx +66 -66
- package/src/components/docs/integrations/IntegrationsGmailPage.tsx +44 -44
- package/src/components/docs/integrations/IntegrationsGoogleCalendarPage.tsx +31 -31
- package/src/components/docs/integrations/IntegrationsHealthRoutingPage.tsx +80 -80
- package/src/components/docs/integrations/IntegrationsMistralPage.tsx +65 -65
- package/src/components/docs/integrations/IntegrationsOpenAIPage.tsx +54 -54
- package/src/components/docs/integrations/IntegrationsOverviewPage.tsx +124 -529
- package/src/components/docs/integrations/IntegrationsPostmarkPage.tsx +97 -97
- package/src/components/docs/integrations/IntegrationsPowensPage.tsx +165 -165
- package/src/components/docs/integrations/IntegrationsQdrantPage.tsx +44 -44
- package/src/components/docs/integrations/IntegrationsResendPage.tsx +40 -40
- package/src/components/docs/integrations/IntegrationsS3Page.tsx +48 -48
- package/src/components/docs/integrations/IntegrationsSlackPage.tsx +70 -70
- package/src/components/docs/integrations/IntegrationsSpecModelPage.tsx +139 -139
- package/src/components/docs/integrations/IntegrationsStripePage.tsx +153 -153
- package/src/components/docs/integrations/IntegrationsTwilioPage.tsx +50 -50
- package/src/components/docs/integrations/IntegrationsWhatsappMetaPage.tsx +69 -69
- package/src/components/docs/integrations/IntegrationsWhatsappTwilioPage.tsx +73 -73
- package/src/components/docs/integrations/index.ts +1 -1
- package/src/components/docs/intent/ContractFirstApiPage.tsx +61 -61
- package/src/components/docs/intent/DeterministicCodegenPage.tsx +81 -80
- package/src/components/docs/intent/GenerateClientFromSchemaPage.tsx +108 -108
- package/src/components/docs/intent/OpenapiAlternativePage.tsx +98 -98
- package/src/components/docs/intent/SchemaValidationTypescriptPage.tsx +79 -79
- package/src/components/docs/intent/SpecDrivenDevelopmentPage.tsx +67 -67
- package/src/components/docs/intent/index.ts +3 -3
- package/src/components/docs/intent/intent-pages.docblocks.ts +186 -186
- package/src/components/docs/knowledge/KnowledgeCategoriesPage.tsx +304 -304
- package/src/components/docs/knowledge/KnowledgeExamplesPage.tsx +84 -84
- package/src/components/docs/knowledge/KnowledgeOverviewPage.tsx +76 -285
- package/src/components/docs/knowledge/KnowledgeSourcesPage.tsx +171 -171
- package/src/components/docs/knowledge/KnowledgeSpacesPage.tsx +132 -132
- package/src/components/docs/knowledge/index.ts +1 -1
- package/src/components/docs/libraries/LibrariesAccessibilityPage.tsx +95 -95
- package/src/components/docs/libraries/LibrariesAiAgentPage.tsx +58 -58
- package/src/components/docs/libraries/LibrariesAnalyticsPage.tsx +39 -39
- package/src/components/docs/libraries/LibrariesContentGenPage.tsx +41 -41
- package/src/components/docs/libraries/LibrariesContractsPage.tsx +132 -132
- package/src/components/docs/libraries/LibrariesCostTrackingPage.tsx +47 -47
- package/src/components/docs/libraries/LibrariesDataBackendPage.tsx +73 -73
- package/src/components/docs/libraries/LibrariesDataViewsPage.tsx +76 -76
- package/src/components/docs/libraries/LibrariesDesignSystemPage.tsx +115 -115
- package/src/components/docs/libraries/LibrariesEvolutionPage.tsx +64 -64
- package/src/components/docs/libraries/LibrariesGraphQLPage.tsx +92 -92
- package/src/components/docs/libraries/LibrariesGrowthPage.tsx +37 -37
- package/src/components/docs/libraries/LibrariesMultiTenancyPage.tsx +47 -47
- package/src/components/docs/libraries/LibrariesObservabilityPage.tsx +58 -58
- package/src/components/docs/libraries/LibrariesOverlayEnginePage.tsx +51 -51
- package/src/components/docs/libraries/LibrariesOverviewPage.tsx +137 -301
- package/src/components/docs/libraries/LibrariesPersonalizationPage.tsx +57 -57
- package/src/components/docs/libraries/LibrariesProgressiveDeliveryPage.tsx +51 -51
- package/src/components/docs/libraries/LibrariesResiliencePage.tsx +54 -54
- package/src/components/docs/libraries/LibrariesRuntimePage.tsx +96 -96
- package/src/components/docs/libraries/LibrariesSLOPage.tsx +52 -52
- package/src/components/docs/libraries/LibrariesSchemaPage.tsx +131 -131
- package/src/components/docs/libraries/LibrariesSupportBotPage.tsx +59 -59
- package/src/components/docs/libraries/LibrariesTestingPage.tsx +64 -64
- package/src/components/docs/libraries/LibrariesUIKitPage.tsx +85 -85
- package/src/components/docs/libraries/LibrariesWorkflowComposerPage.tsx +38 -38
- package/src/components/docs/libraries/LibrariesWorkflowsPage.tsx +79 -79
- package/src/components/docs/libraries/index.ts +4 -4
- package/src/components/docs/manifesto/ManifestoPage.tsx +61 -132
- package/src/components/docs/ops/AutoEvolutionOpsPage.tsx +81 -81
- package/src/components/docs/ops/DistributedTracingOpsPage.tsx +28 -28
- package/src/components/docs/ops/ops-lifecycle.docblocks.ts +32 -32
- package/src/components/docs/ops/ops-runbooks-a.docblocks.ts +60 -60
- package/src/components/docs/ops/ops-runbooks-b.docblocks.ts +60 -60
- package/src/components/docs/ops/ops-slo-tenant.docblocks.ts +61 -61
- package/src/components/docs/ops/ops-top.docs.ts +10 -10
- package/src/components/docs/ops/ops.docs.ts +6 -6
- package/src/components/docs/product/product.docblocks.ts +60 -60
- package/src/components/docs/reference/DocsMarkdownContent.tsx +74 -74
- package/src/components/docs/reference/DocsReferenceContent.tsx +51 -51
- package/src/components/docs/reference/DocsReferenceIndexClient.tsx +106 -105
- package/src/components/docs/reference/DocsReferenceIndexPage.tsx +2 -2
- package/src/components/docs/reference/DocsReferencePage.tsx +3 -3
- package/src/components/docs/reference/docsMarkdownParser.ts +90 -90
- package/src/components/docs/safety/SafetyAuditingPage.tsx +189 -189
- package/src/components/docs/safety/SafetyMigrationsPage.tsx +189 -189
- package/src/components/docs/safety/SafetyOverviewPage.tsx +70 -157
- package/src/components/docs/safety/SafetyPDPPage.tsx +163 -163
- package/src/components/docs/safety/SafetySecurityTrustPage.tsx +89 -89
- package/src/components/docs/safety/SafetySigningPage.tsx +38 -38
- package/src/components/docs/safety/SafetyTenantIsolationPage.tsx +39 -39
- package/src/components/docs/safety/index.ts +3 -3
- package/src/components/docs/shared/StudioPrompt.tsx +17 -17
- package/src/components/docs/specs/SpecsCapabilitiesPage.tsx +79 -79
- package/src/components/docs/specs/SpecsDataViewsPage.tsx +142 -142
- package/src/components/docs/specs/SpecsOverlaysPage.tsx +202 -202
- package/src/components/docs/specs/SpecsOverviewPage.tsx +118 -193
- package/src/components/docs/specs/SpecsPolicyPage.tsx +233 -233
- package/src/components/docs/specs/SpecsWorkflowsPage.tsx +156 -156
- package/src/components/docs/specs/index.ts +3 -3
- package/src/components/docs/studio/StudioBYOKPage.tsx +11 -11
- package/src/components/docs/studio/StudioDeploymentsPage.tsx +11 -11
- package/src/components/docs/studio/StudioGettingStartedPage.tsx +11 -11
- package/src/components/docs/studio/StudioIntegrationsPage.tsx +11 -11
- package/src/components/docs/studio/StudioOverviewPage.tsx +94 -73
- package/src/components/docs/studio/StudioVisualBuilderPage.tsx +11 -11
- package/src/components/docs/studio/index.ts +4 -4
- package/src/components/docs/tech/contracts/tech-docs.docblocks.ts +10 -10
- package/src/components/integrations/molecules/IntegrationCard.tsx +71 -72
- package/src/components/integrations/organisms/IntegrationMarketplace.tsx +116 -116
- package/src/components/integrations/organisms/IntegrationSettings.tsx +201 -201
- package/src/components/integrations/organisms/KnowledgeSourceList.tsx +93 -94
- package/src/components/legal/PrivacyTemplate.tsx +611 -611
- package/src/components/legal/TermsTemplate.tsx +675 -675
- package/src/components/shared/FeatureGateNotice.tsx +26 -27
- package/src/components/shell/WorkspaceHeader.tsx +80 -80
- package/src/components/shell/WorkspaceProjectShellLayout.tsx +59 -58
- package/src/components/shell/WorkspaceShellRenderer.tsx +69 -68
- package/src/components/shell/WorkspaceSidebar.tsx +58 -58
- package/src/components/shell/index.ts +1 -1
- package/src/components/templates/engine/index.ts +29 -28
- package/src/components/templates/index.ts +1 -1
- package/src/components/templates/messaging/ConversationList.tsx +68 -69
- package/src/components/templates/messaging/MessageComposer.tsx +59 -59
- package/src/components/templates/messaging/MessageThread.tsx +73 -74
- package/src/components/templates/messaging/MessagingWorkspace.tsx +18 -19
- package/src/components/templates/messaging/index.ts +1 -1
- package/src/components/templates/messaging/types.ts +17 -17
- package/src/components/templates/recipes/LanguageSwitcher.tsx +20 -20
- package/src/components/templates/recipes/RecipeCard.tsx +56 -56
- package/src/components/templates/recipes/RecipeDetail.tsx +43 -43
- package/src/components/templates/recipes/RecipeList.tsx +62 -63
- package/src/components/templates/recipes/index.ts +2 -2
- package/src/components/templates/recipes/types.ts +24 -24
- package/src/components/templates/todos/FilterBar.tsx +84 -84
- package/src/components/templates/todos/TaskForm.tsx +118 -119
- package/src/components/templates/todos/TaskItem.tsx +78 -78
- package/src/components/templates/todos/TaskList.tsx +106 -107
- package/src/components/templates/todos/index.ts +2 -2
- package/src/components/templates/todos/types.ts +11 -11
- package/src/config/contractspec-blueprint.ts +55 -55
- package/src/config/contractspec-branding.ts +37 -37
- package/src/config/contractspec-routes.ts +22 -22
- package/src/config/index.ts +14 -15
- package/src/features/contracts-registry.ts +118 -118
- package/src/features/docs/docs.contracts.ts +6 -6
- package/src/features/docs/index.ts +6 -6
- package/src/features/docs.feature.ts +27 -27
- package/src/features/index.ts +59 -63
- package/src/features/mcp.feature.ts +24 -24
- package/src/features/presentations.feature.ts +27 -27
- package/src/features/registry.ts +14 -14
- package/src/index.ts +2 -2
- package/src/infrastructure/elysia/logger.ts +21 -21
- package/src/libs/email/client.test.ts +81 -81
- package/src/libs/email/client.ts +111 -111
- package/src/libs/email/contact.ts +35 -35
- package/src/libs/email/newsletter.ts +46 -46
- package/src/libs/email/types.ts +29 -29
- package/src/libs/email/utils.ts +5 -5
- package/src/libs/email/waitlist-application.ts +69 -69
- package/src/libs/email/waitlist.ts +46 -46
- package/src/libs/email.ts +7 -7
- package/src/libs/posthog/client.ts +44 -44
- package/src/libs/posthog/native.ts +23 -22
- package/src/libs/posthog/server.ts +7 -7
- package/src/libs/pricing-examples.ts +12 -12
- package/src/presentation/features/atoms/FeatureIcon/FeatureIcon.tsx +90 -90
- package/src/presentation/features/atoms/FeatureIcon/index.ts +3 -3
- package/src/presentation/features/hooks/index.ts +9 -9
- package/src/presentation/features/hooks/useContractsRegistry.ts +23 -23
- package/src/presentation/features/hooks/useFeatureFilters.ts +117 -117
- package/src/presentation/features/hooks/useFeatureRegistry.ts +40 -40
- package/src/presentation/features/hooks/useRelatedDocs.ts +28 -28
- package/src/presentation/features/index.ts +50 -52
- package/src/presentation/features/molecules/FeatureCard/FeatureCard.tsx +80 -80
- package/src/presentation/features/molecules/FeatureCard/types.ts +6 -6
- package/src/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.tsx +54 -54
- package/src/presentation/features/molecules/FeatureCategoryHeader/index.ts +2 -2
- package/src/presentation/features/molecules/FeatureFilters/FeatureFilters.tsx +67 -67
- package/src/presentation/features/molecules/FeatureFilters/types.ts +20 -20
- package/src/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.tsx +120 -121
- package/src/presentation/features/molecules/FeatureHoverPreview/index.ts +2 -2
- package/src/presentation/features/molecules/index.ts +8 -8
- package/src/presentation/features/organisms/FeatureDataViewsList.tsx +21 -21
- package/src/presentation/features/organisms/FeatureDetail/FeatureDetail.tsx +86 -86
- package/src/presentation/features/organisms/FeatureDetail/types.ts +4 -4
- package/src/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.tsx +210 -210
- package/src/presentation/features/organisms/FeatureDiscovery/index.ts +3 -3
- package/src/presentation/features/organisms/FeatureDiscovery/types.ts +10 -10
- package/src/presentation/features/organisms/FeatureEventsList.tsx +19 -19
- package/src/presentation/features/organisms/FeatureFormsList.tsx +19 -19
- package/src/presentation/features/organisms/FeatureOperationsList.tsx +21 -21
- package/src/presentation/features/organisms/FeaturePresentationsList.tsx +21 -21
- package/src/presentation/features/organisms/index.ts +6 -6
- package/src/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.tsx +219 -219
- package/src/presentation/features/templates/FeatureDataViewDetailTemplate/types.ts +7 -7
- package/src/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.tsx +26 -26
- package/src/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.tsx +195 -195
- package/src/presentation/features/templates/FeatureEventDetailTemplate/types.ts +7 -7
- package/src/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.tsx +26 -26
- package/src/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.tsx +216 -216
- package/src/presentation/features/templates/FeatureFormDetailTemplate/types.ts +7 -7
- package/src/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.tsx +26 -26
- package/src/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.tsx +228 -228
- package/src/presentation/features/templates/FeatureOperationDetailTemplate/types.ts +7 -7
- package/src/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.tsx +26 -26
- package/src/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.tsx +24 -24
- package/src/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.tsx +201 -201
- package/src/presentation/features/templates/FeaturePresentationDetailTemplate/types.ts +8 -8
- package/src/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.tsx +26 -26
- package/src/presentation/features/templates/types.ts +2 -2
- package/tsconfig.json +12 -12
- package/tsdown.config.js +5 -5
|
@@ -209,11 +209,11 @@ function ContractFirstApiPage() {
|
|
|
209
209
|
className: "space-y-3",
|
|
210
210
|
children: [
|
|
211
211
|
/* @__PURE__ */ jsx("h1", {
|
|
212
|
-
className: "text-4xl
|
|
212
|
+
className: "font-bold text-4xl",
|
|
213
213
|
children: contractFirstApiBrief2.title
|
|
214
214
|
}),
|
|
215
215
|
/* @__PURE__ */ jsx("p", {
|
|
216
|
-
className: "text-muted-foreground
|
|
216
|
+
className: "text-lg text-muted-foreground",
|
|
217
217
|
children: contractFirstApiBrief2.summary
|
|
218
218
|
})
|
|
219
219
|
]
|
|
@@ -222,11 +222,11 @@ function ContractFirstApiPage() {
|
|
|
222
222
|
className: "card-subtle space-y-4 p-6",
|
|
223
223
|
children: [
|
|
224
224
|
/* @__PURE__ */ jsx("h2", {
|
|
225
|
-
className: "text-2xl
|
|
225
|
+
className: "font-bold text-2xl",
|
|
226
226
|
children: "Problems Solved"
|
|
227
227
|
}),
|
|
228
228
|
/* @__PURE__ */ jsx("ul", {
|
|
229
|
-
className: "
|
|
229
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
230
230
|
children: contractFirstApiBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx("li", {
|
|
231
231
|
children: problem
|
|
232
232
|
}, index))
|
|
@@ -237,11 +237,11 @@ function ContractFirstApiPage() {
|
|
|
237
237
|
className: "card-subtle space-y-4 p-6",
|
|
238
238
|
children: [
|
|
239
239
|
/* @__PURE__ */ jsx("h2", {
|
|
240
|
-
className: "text-2xl
|
|
240
|
+
className: "font-bold text-2xl",
|
|
241
241
|
children: "Solutions"
|
|
242
242
|
}),
|
|
243
243
|
/* @__PURE__ */ jsx("ul", {
|
|
244
|
-
className: "
|
|
244
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
245
245
|
children: contractFirstApiBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx("li", {
|
|
246
246
|
children: solution
|
|
247
247
|
}, index))
|
|
@@ -255,7 +255,7 @@ function ContractFirstApiPage() {
|
|
|
255
255
|
className: "space-y-3",
|
|
256
256
|
children: [
|
|
257
257
|
/* @__PURE__ */ jsx("h2", {
|
|
258
|
-
className: "text-2xl
|
|
258
|
+
className: "font-bold text-2xl",
|
|
259
259
|
children: "Quick Start"
|
|
260
260
|
}),
|
|
261
261
|
/* @__PURE__ */ jsx("p", {
|
|
@@ -307,7 +307,7 @@ export const CreateUserOperation = defineOperation({
|
|
|
307
307
|
className: "space-y-3",
|
|
308
308
|
children: [
|
|
309
309
|
/* @__PURE__ */ jsx("h2", {
|
|
310
|
-
className: "text-2xl
|
|
310
|
+
className: "font-bold text-2xl",
|
|
311
311
|
children: "Generate OpenAPI"
|
|
312
312
|
}),
|
|
313
313
|
/* @__PURE__ */ jsx("p", {
|
|
@@ -349,15 +349,15 @@ export const CreateUserOperation = defineOperation({
|
|
|
349
349
|
});
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
-
// src/components/docs/intent/
|
|
353
|
-
import {
|
|
352
|
+
// src/components/docs/intent/DeterministicCodegenPage.tsx
|
|
353
|
+
import { deterministicCodegenBrief as deterministicCodegenBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
354
354
|
import { SeoOptimizer as SeoOptimizer2 } from "@contractspec/lib.content-gen/seo";
|
|
355
355
|
import { CodeBlock as CodeBlock2 } from "@contractspec/lib.design-system";
|
|
356
356
|
import Link2 from "@contractspec/lib.ui-link";
|
|
357
357
|
import { ChevronRight as ChevronRight2 } from "lucide-react";
|
|
358
358
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
359
|
-
var metadata2 = new SeoOptimizer2().optimize(
|
|
360
|
-
function
|
|
359
|
+
var metadata2 = new SeoOptimizer2().optimize(deterministicCodegenBrief2);
|
|
360
|
+
function DeterministicCodegenPage() {
|
|
361
361
|
return /* @__PURE__ */ jsxs2("div", {
|
|
362
362
|
className: "space-y-8",
|
|
363
363
|
children: [
|
|
@@ -365,12 +365,12 @@ function SpecDrivenDevelopmentPage() {
|
|
|
365
365
|
className: "space-y-3",
|
|
366
366
|
children: [
|
|
367
367
|
/* @__PURE__ */ jsx2("h1", {
|
|
368
|
-
className: "text-4xl
|
|
369
|
-
children:
|
|
368
|
+
className: "font-bold text-4xl",
|
|
369
|
+
children: deterministicCodegenBrief2.title
|
|
370
370
|
}),
|
|
371
371
|
/* @__PURE__ */ jsx2("p", {
|
|
372
|
-
className: "text-muted-foreground
|
|
373
|
-
children:
|
|
372
|
+
className: "text-lg text-muted-foreground",
|
|
373
|
+
children: deterministicCodegenBrief2.summary
|
|
374
374
|
})
|
|
375
375
|
]
|
|
376
376
|
}),
|
|
@@ -378,12 +378,12 @@ function SpecDrivenDevelopmentPage() {
|
|
|
378
378
|
className: "card-subtle space-y-4 p-6",
|
|
379
379
|
children: [
|
|
380
380
|
/* @__PURE__ */ jsx2("h2", {
|
|
381
|
-
className: "text-2xl
|
|
382
|
-
children: "
|
|
381
|
+
className: "font-bold text-2xl",
|
|
382
|
+
children: "Regeneration Challenges"
|
|
383
383
|
}),
|
|
384
384
|
/* @__PURE__ */ jsx2("ul", {
|
|
385
|
-
className: "
|
|
386
|
-
children:
|
|
385
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
386
|
+
children: deterministicCodegenBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx2("li", {
|
|
387
387
|
children: problem
|
|
388
388
|
}, index))
|
|
389
389
|
})
|
|
@@ -393,12 +393,12 @@ function SpecDrivenDevelopmentPage() {
|
|
|
393
393
|
className: "card-subtle space-y-4 p-6",
|
|
394
394
|
children: [
|
|
395
395
|
/* @__PURE__ */ jsx2("h2", {
|
|
396
|
-
className: "text-2xl
|
|
397
|
-
children: "
|
|
396
|
+
className: "font-bold text-2xl",
|
|
397
|
+
children: "Deterministic Solutions"
|
|
398
398
|
}),
|
|
399
399
|
/* @__PURE__ */ jsx2("ul", {
|
|
400
|
-
className: "
|
|
401
|
-
children:
|
|
400
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
401
|
+
children: deterministicCodegenBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx2("li", {
|
|
402
402
|
children: solution
|
|
403
403
|
}, index))
|
|
404
404
|
})
|
|
@@ -411,208 +411,14 @@ function SpecDrivenDevelopmentPage() {
|
|
|
411
411
|
className: "space-y-3",
|
|
412
412
|
children: [
|
|
413
413
|
/* @__PURE__ */ jsx2("h2", {
|
|
414
|
-
className: "text-2xl
|
|
415
|
-
children: "Feature Specification Example"
|
|
416
|
-
}),
|
|
417
|
-
/* @__PURE__ */ jsx2("p", {
|
|
418
|
-
className: "text-muted-foreground text-sm",
|
|
419
|
-
children: "Define a complete feature with operations, events, and data models."
|
|
420
|
-
}),
|
|
421
|
-
/* @__PURE__ */ jsx2(CodeBlock2, {
|
|
422
|
-
language: "typescript",
|
|
423
|
-
filename: "src/contracts/user-management.feature.ts",
|
|
424
|
-
code: `import { defineFeature } from '@contractspec/lib.contracts-spec/features';
|
|
425
|
-
import { defineOperation } from '@contractspec/lib.contracts-spec/operations';
|
|
426
|
-
import { defineEvent } from '@contractspec/lib.contracts-spec/events';
|
|
427
|
-
import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
428
|
-
|
|
429
|
-
export const UserManagementFeature = defineFeature({
|
|
430
|
-
goal: 'Complete user management system with CRUD operations',
|
|
431
|
-
context: 'Handles user lifecycle from creation to deletion with proper authorization',
|
|
432
|
-
operations: {
|
|
433
|
-
createUser: defineOperation({
|
|
434
|
-
goal: 'Create a new user account',
|
|
435
|
-
input: new SchemaModel({
|
|
436
|
-
type: 'object',
|
|
437
|
-
properties: {
|
|
438
|
-
email: { type: 'string', format: 'email', required: true },
|
|
439
|
-
name: { type: 'string', minLength: 1, required: true },
|
|
440
|
-
},
|
|
441
|
-
}),
|
|
442
|
-
output: new SchemaModel({
|
|
443
|
-
type: 'object',
|
|
444
|
-
properties: {
|
|
445
|
-
id: { type: 'string', required: true },
|
|
446
|
-
email: { type: 'string', required: true },
|
|
447
|
-
name: { type: 'string', required: true },
|
|
448
|
-
},
|
|
449
|
-
}),
|
|
450
|
-
}),
|
|
451
|
-
updateUser: defineOperation({
|
|
452
|
-
goal: 'Update existing user information',
|
|
453
|
-
input: new SchemaModel({
|
|
454
|
-
type: 'object',
|
|
455
|
-
properties: {
|
|
456
|
-
name: { type: 'string', minLength: 1 },
|
|
457
|
-
},
|
|
458
|
-
}),
|
|
459
|
-
output: new SchemaModel({
|
|
460
|
-
type: 'object',
|
|
461
|
-
properties: {
|
|
462
|
-
id: { type: 'string', required: true },
|
|
463
|
-
email: { type: 'string', required: true },
|
|
464
|
-
name: { type: 'string', required: true },
|
|
465
|
-
},
|
|
466
|
-
}),
|
|
467
|
-
}),
|
|
468
|
-
},
|
|
469
|
-
events: {
|
|
470
|
-
userCreated: defineEvent({
|
|
471
|
-
goal: 'Emit when a new user is created',
|
|
472
|
-
payload: new SchemaModel({
|
|
473
|
-
type: 'object',
|
|
474
|
-
properties: {
|
|
475
|
-
userId: { type: 'string', required: true },
|
|
476
|
-
email: { type: 'string', required: true },
|
|
477
|
-
},
|
|
478
|
-
}),
|
|
479
|
-
}),
|
|
480
|
-
userUpdated: defineEvent({
|
|
481
|
-
goal: 'Emit when user information changes',
|
|
482
|
-
payload: new SchemaModel({
|
|
483
|
-
type: 'object',
|
|
484
|
-
properties: {
|
|
485
|
-
userId: { type: 'string', required: true },
|
|
486
|
-
changes: { type: 'array', items: { type: 'string' }, required: true },
|
|
487
|
-
},
|
|
488
|
-
}),
|
|
489
|
-
}),
|
|
490
|
-
},
|
|
491
|
-
metadata: {
|
|
492
|
-
name: 'user-management',
|
|
493
|
-
version: '1.0.0',
|
|
494
|
-
description: 'Complete user management with operations and events',
|
|
495
|
-
},
|
|
496
|
-
});`
|
|
497
|
-
})
|
|
498
|
-
]
|
|
499
|
-
}),
|
|
500
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
501
|
-
className: "space-y-3",
|
|
502
|
-
children: [
|
|
503
|
-
/* @__PURE__ */ jsx2("h2", {
|
|
504
|
-
className: "text-2xl font-bold",
|
|
505
|
-
children: "Generate Type-safe Implementations"
|
|
506
|
-
}),
|
|
507
|
-
/* @__PURE__ */ jsx2("p", {
|
|
508
|
-
className: "text-muted-foreground text-sm",
|
|
509
|
-
children: "Generate validation, types, and API handlers from your feature."
|
|
510
|
-
}),
|
|
511
|
-
/* @__PURE__ */ jsx2(CodeBlock2, {
|
|
512
|
-
language: "bash",
|
|
513
|
-
filename: "generate-from-feature",
|
|
514
|
-
code: `contractspec generate \\
|
|
515
|
-
--input ./src/contracts/user-management.feature.ts \\
|
|
516
|
-
--output ./generated/user-management`
|
|
517
|
-
})
|
|
518
|
-
]
|
|
519
|
-
})
|
|
520
|
-
]
|
|
521
|
-
}),
|
|
522
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
523
|
-
className: "flex items-center gap-4 pt-4",
|
|
524
|
-
children: [
|
|
525
|
-
/* @__PURE__ */ jsxs2(Link2, {
|
|
526
|
-
href: "/docs/guides/spec-validation-and-typing",
|
|
527
|
-
className: "btn-primary",
|
|
528
|
-
children: [
|
|
529
|
-
"Type Safety Guide ",
|
|
530
|
-
/* @__PURE__ */ jsx2(ChevronRight2, {
|
|
531
|
-
size: 16
|
|
532
|
-
})
|
|
533
|
-
]
|
|
534
|
-
}),
|
|
535
|
-
/* @__PURE__ */ jsx2(Link2, {
|
|
536
|
-
href: "/docs/intent/deterministic-codegen",
|
|
537
|
-
className: "btn-ghost",
|
|
538
|
-
children: "Deterministic Codegen"
|
|
539
|
-
})
|
|
540
|
-
]
|
|
541
|
-
})
|
|
542
|
-
]
|
|
543
|
-
});
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
// src/components/docs/intent/DeterministicCodegenPage.tsx
|
|
547
|
-
import { deterministicCodegenBrief as deterministicCodegenBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
548
|
-
import { SeoOptimizer as SeoOptimizer3 } from "@contractspec/lib.content-gen/seo";
|
|
549
|
-
import { CodeBlock as CodeBlock3 } from "@contractspec/lib.design-system";
|
|
550
|
-
import Link3 from "@contractspec/lib.ui-link";
|
|
551
|
-
import { ChevronRight as ChevronRight3 } from "lucide-react";
|
|
552
|
-
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
553
|
-
var metadata3 = new SeoOptimizer3().optimize(deterministicCodegenBrief2);
|
|
554
|
-
function DeterministicCodegenPage() {
|
|
555
|
-
return /* @__PURE__ */ jsxs3("div", {
|
|
556
|
-
className: "space-y-8",
|
|
557
|
-
children: [
|
|
558
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
559
|
-
className: "space-y-3",
|
|
560
|
-
children: [
|
|
561
|
-
/* @__PURE__ */ jsx3("h1", {
|
|
562
|
-
className: "text-4xl font-bold",
|
|
563
|
-
children: deterministicCodegenBrief2.title
|
|
564
|
-
}),
|
|
565
|
-
/* @__PURE__ */ jsx3("p", {
|
|
566
|
-
className: "text-muted-foreground text-lg",
|
|
567
|
-
children: deterministicCodegenBrief2.summary
|
|
568
|
-
})
|
|
569
|
-
]
|
|
570
|
-
}),
|
|
571
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
572
|
-
className: "card-subtle space-y-4 p-6",
|
|
573
|
-
children: [
|
|
574
|
-
/* @__PURE__ */ jsx3("h2", {
|
|
575
|
-
className: "text-2xl font-bold",
|
|
576
|
-
children: "Regeneration Challenges"
|
|
577
|
-
}),
|
|
578
|
-
/* @__PURE__ */ jsx3("ul", {
|
|
579
|
-
className: "text-muted-foreground space-y-2 text-sm",
|
|
580
|
-
children: deterministicCodegenBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx3("li", {
|
|
581
|
-
children: problem
|
|
582
|
-
}, index))
|
|
583
|
-
})
|
|
584
|
-
]
|
|
585
|
-
}),
|
|
586
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
587
|
-
className: "card-subtle space-y-4 p-6",
|
|
588
|
-
children: [
|
|
589
|
-
/* @__PURE__ */ jsx3("h2", {
|
|
590
|
-
className: "text-2xl font-bold",
|
|
591
|
-
children: "Deterministic Solutions"
|
|
592
|
-
}),
|
|
593
|
-
/* @__PURE__ */ jsx3("ul", {
|
|
594
|
-
className: "text-muted-foreground space-y-2 text-sm",
|
|
595
|
-
children: deterministicCodegenBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx3("li", {
|
|
596
|
-
children: solution
|
|
597
|
-
}, index))
|
|
598
|
-
})
|
|
599
|
-
]
|
|
600
|
-
}),
|
|
601
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
602
|
-
className: "space-y-6",
|
|
603
|
-
children: [
|
|
604
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
605
|
-
className: "space-y-3",
|
|
606
|
-
children: [
|
|
607
|
-
/* @__PURE__ */ jsx3("h2", {
|
|
608
|
-
className: "text-2xl font-bold",
|
|
414
|
+
className: "font-bold text-2xl",
|
|
609
415
|
children: "Protected Zones"
|
|
610
416
|
}),
|
|
611
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ jsx2("p", {
|
|
612
418
|
className: "text-muted-foreground text-sm",
|
|
613
419
|
children: "Separate generated code from hand-written business logic with clear boundaries."
|
|
614
420
|
}),
|
|
615
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ jsx2(CodeBlock2, {
|
|
616
422
|
language: "typescript",
|
|
617
423
|
filename: "src/handlers/user-handlers.ts",
|
|
618
424
|
code: `// Hand-written business logic (protected from regeneration)
|
|
@@ -656,18 +462,18 @@ export const createUserHandler = wrapOperationHandler(
|
|
|
656
462
|
})
|
|
657
463
|
]
|
|
658
464
|
}),
|
|
659
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
660
466
|
className: "space-y-3",
|
|
661
467
|
children: [
|
|
662
|
-
/* @__PURE__ */
|
|
663
|
-
className: "text-2xl
|
|
468
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
469
|
+
className: "font-bold text-2xl",
|
|
664
470
|
children: "Incremental Regeneration"
|
|
665
471
|
}),
|
|
666
|
-
/* @__PURE__ */
|
|
472
|
+
/* @__PURE__ */ jsx2("p", {
|
|
667
473
|
className: "text-muted-foreground text-sm",
|
|
668
474
|
children: "Regenerate only what changed while preserving custom logic."
|
|
669
475
|
}),
|
|
670
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ jsx2(CodeBlock2, {
|
|
671
477
|
language: "bash",
|
|
672
478
|
filename: "incremental-regen",
|
|
673
479
|
code: `contractspec generate \\
|
|
@@ -678,18 +484,18 @@ export const createUserHandler = wrapOperationHandler(
|
|
|
678
484
|
})
|
|
679
485
|
]
|
|
680
486
|
}),
|
|
681
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
682
488
|
className: "space-y-3",
|
|
683
489
|
children: [
|
|
684
|
-
/* @__PURE__ */
|
|
685
|
-
className: "text-2xl
|
|
490
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
491
|
+
className: "font-bold text-2xl",
|
|
686
492
|
children: "Conflict Detection"
|
|
687
493
|
}),
|
|
688
|
-
/* @__PURE__ */
|
|
494
|
+
/* @__PURE__ */ jsx2("p", {
|
|
689
495
|
className: "text-muted-foreground text-sm",
|
|
690
496
|
children: "Automatically detect and report conflicts during regeneration."
|
|
691
497
|
}),
|
|
692
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ jsx2(CodeBlock2, {
|
|
693
499
|
language: "bash",
|
|
694
500
|
filename: "check-conflicts",
|
|
695
501
|
code: `contractspec generate \\
|
|
@@ -700,20 +506,20 @@ export const createUserHandler = wrapOperationHandler(
|
|
|
700
506
|
})
|
|
701
507
|
]
|
|
702
508
|
}),
|
|
703
|
-
/* @__PURE__ */
|
|
509
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
704
510
|
className: "flex items-center gap-4 pt-4",
|
|
705
511
|
children: [
|
|
706
|
-
/* @__PURE__ */
|
|
512
|
+
/* @__PURE__ */ jsxs2(Link2, {
|
|
707
513
|
href: "/docs/guides/generate-docs-clients-schemas",
|
|
708
514
|
className: "btn-primary",
|
|
709
515
|
children: [
|
|
710
516
|
"Client Generation ",
|
|
711
|
-
/* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ jsx2(ChevronRight2, {
|
|
712
518
|
size: 16
|
|
713
519
|
})
|
|
714
520
|
]
|
|
715
521
|
}),
|
|
716
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ jsx2(Link2, {
|
|
717
523
|
href: "/docs/intent/schema-validation-typescript",
|
|
718
524
|
className: "btn-ghost",
|
|
719
525
|
children: "Type Safety"
|
|
@@ -724,232 +530,394 @@ export const createUserHandler = wrapOperationHandler(
|
|
|
724
530
|
});
|
|
725
531
|
}
|
|
726
532
|
|
|
727
|
-
// src/components/docs/intent/
|
|
728
|
-
import {
|
|
729
|
-
import { SeoOptimizer as
|
|
730
|
-
import { CodeBlock as
|
|
731
|
-
import
|
|
732
|
-
import { ChevronRight as
|
|
733
|
-
import { jsx as
|
|
734
|
-
var
|
|
735
|
-
function
|
|
736
|
-
return /* @__PURE__ */
|
|
533
|
+
// src/components/docs/intent/GenerateClientFromSchemaPage.tsx
|
|
534
|
+
import { generateClientFromSchemaBrief as generateClientFromSchemaBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
535
|
+
import { SeoOptimizer as SeoOptimizer3 } from "@contractspec/lib.content-gen/seo";
|
|
536
|
+
import { CodeBlock as CodeBlock3 } from "@contractspec/lib.design-system";
|
|
537
|
+
import Link3 from "@contractspec/lib.ui-link";
|
|
538
|
+
import { ChevronRight as ChevronRight3 } from "lucide-react";
|
|
539
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
540
|
+
var metadata3 = new SeoOptimizer3().optimize(generateClientFromSchemaBrief2);
|
|
541
|
+
function GenerateClientFromSchemaPage() {
|
|
542
|
+
return /* @__PURE__ */ jsxs3("div", {
|
|
737
543
|
className: "space-y-8",
|
|
738
544
|
children: [
|
|
739
|
-
/* @__PURE__ */
|
|
545
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
740
546
|
className: "space-y-3",
|
|
741
547
|
children: [
|
|
742
|
-
/* @__PURE__ */
|
|
743
|
-
className: "text-4xl
|
|
744
|
-
children:
|
|
548
|
+
/* @__PURE__ */ jsx3("h1", {
|
|
549
|
+
className: "font-bold text-4xl",
|
|
550
|
+
children: generateClientFromSchemaBrief2.title
|
|
745
551
|
}),
|
|
746
|
-
/* @__PURE__ */
|
|
747
|
-
className: "text-muted-foreground
|
|
748
|
-
children:
|
|
552
|
+
/* @__PURE__ */ jsx3("p", {
|
|
553
|
+
className: "text-lg text-muted-foreground",
|
|
554
|
+
children: generateClientFromSchemaBrief2.summary
|
|
749
555
|
})
|
|
750
556
|
]
|
|
751
557
|
}),
|
|
752
|
-
/* @__PURE__ */
|
|
558
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
753
559
|
className: "card-subtle space-y-4 p-6",
|
|
754
560
|
children: [
|
|
755
|
-
/* @__PURE__ */
|
|
756
|
-
className: "text-2xl
|
|
757
|
-
children: "
|
|
561
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
562
|
+
className: "font-bold text-2xl",
|
|
563
|
+
children: "Client Development Problems"
|
|
758
564
|
}),
|
|
759
|
-
/* @__PURE__ */
|
|
760
|
-
className: "
|
|
761
|
-
children:
|
|
565
|
+
/* @__PURE__ */ jsx3("ul", {
|
|
566
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
567
|
+
children: generateClientFromSchemaBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx3("li", {
|
|
762
568
|
children: problem
|
|
763
569
|
}, index))
|
|
764
570
|
})
|
|
765
571
|
]
|
|
766
572
|
}),
|
|
767
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
768
574
|
className: "card-subtle space-y-4 p-6",
|
|
769
575
|
children: [
|
|
770
|
-
/* @__PURE__ */
|
|
771
|
-
className: "text-2xl
|
|
772
|
-
children: "
|
|
576
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
577
|
+
className: "font-bold text-2xl",
|
|
578
|
+
children: "Automated Solutions"
|
|
773
579
|
}),
|
|
774
|
-
/* @__PURE__ */
|
|
775
|
-
className: "
|
|
776
|
-
children:
|
|
580
|
+
/* @__PURE__ */ jsx3("ul", {
|
|
581
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
582
|
+
children: generateClientFromSchemaBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx3("li", {
|
|
777
583
|
children: solution
|
|
778
584
|
}, index))
|
|
779
585
|
})
|
|
780
586
|
]
|
|
781
587
|
}),
|
|
782
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
783
589
|
className: "space-y-6",
|
|
784
590
|
children: [
|
|
785
|
-
/* @__PURE__ */
|
|
591
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
786
592
|
className: "space-y-3",
|
|
787
593
|
children: [
|
|
788
|
-
/* @__PURE__ */
|
|
789
|
-
className: "text-2xl
|
|
790
|
-
children: "Contract
|
|
594
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
595
|
+
className: "font-bold text-2xl",
|
|
596
|
+
children: "Contract Definition"
|
|
791
597
|
}),
|
|
792
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ jsx3("p", {
|
|
793
599
|
className: "text-muted-foreground text-sm",
|
|
794
|
-
children: "Define
|
|
600
|
+
children: "Define your API contract once, generate clients for any language."
|
|
795
601
|
}),
|
|
796
|
-
/* @__PURE__ */
|
|
602
|
+
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
797
603
|
language: "typescript",
|
|
798
|
-
filename: "src/contracts/
|
|
799
|
-
code: `import {
|
|
604
|
+
filename: "src/contracts/api.contract.ts",
|
|
605
|
+
code: `import { defineContract } from '@contractspec/lib.contracts-spec';
|
|
606
|
+
import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
800
607
|
|
|
801
|
-
export const
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
608
|
+
export const ApiContract = defineContract({
|
|
609
|
+
name: 'MyAPI',
|
|
610
|
+
version: '1.0.0',
|
|
611
|
+
baseUrl: 'https://api.example.com',
|
|
612
|
+
operations: {
|
|
613
|
+
getUsers: {
|
|
614
|
+
goal: 'Retrieve paginated list of users',
|
|
615
|
+
method: 'GET',
|
|
616
|
+
path: '/users',
|
|
617
|
+
input: new SchemaModel({
|
|
618
|
+
type: 'object',
|
|
619
|
+
properties: {
|
|
620
|
+
page: { type: 'integer', minimum: 1, default: 1 },
|
|
621
|
+
limit: { type: 'integer', minimum: 1, maximum: 100, default: 20 },
|
|
622
|
+
},
|
|
623
|
+
}),
|
|
624
|
+
output: new SchemaModel({
|
|
625
|
+
type: 'object',
|
|
626
|
+
properties: {
|
|
627
|
+
users: {
|
|
628
|
+
type: 'array',
|
|
629
|
+
items: {
|
|
630
|
+
type: 'object',
|
|
631
|
+
properties: {
|
|
632
|
+
id: { type: 'string', required: true },
|
|
633
|
+
email: { type: 'string', required: true },
|
|
634
|
+
name: { type: 'string', required: true },
|
|
635
|
+
},
|
|
636
|
+
},
|
|
637
|
+
},
|
|
638
|
+
pagination: {
|
|
639
|
+
type: 'object',
|
|
640
|
+
properties: {
|
|
641
|
+
page: { type: 'integer', required: true },
|
|
642
|
+
limit: { type: 'integer', required: true },
|
|
643
|
+
total: { type: 'integer', required: true },
|
|
644
|
+
},
|
|
645
|
+
},
|
|
646
|
+
},
|
|
647
|
+
}),
|
|
828
648
|
},
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
649
|
+
createUser: {
|
|
650
|
+
goal: 'Create a new user account',
|
|
651
|
+
method: 'POST',
|
|
652
|
+
path: '/users',
|
|
653
|
+
input: new SchemaModel({
|
|
654
|
+
type: 'object',
|
|
655
|
+
properties: {
|
|
656
|
+
email: { type: 'string', format: 'email', required: true },
|
|
657
|
+
name: { type: 'string', minLength: 1, required: true },
|
|
658
|
+
},
|
|
659
|
+
}),
|
|
660
|
+
output: new SchemaModel({
|
|
661
|
+
type: 'object',
|
|
662
|
+
properties: {
|
|
663
|
+
id: { type: 'string', required: true },
|
|
664
|
+
email: { type: 'string', required: true },
|
|
665
|
+
name: { type: 'string', required: true },
|
|
666
|
+
createdAt: { type: 'string', format: 'date-time', required: true },
|
|
667
|
+
},
|
|
668
|
+
}),
|
|
834
669
|
},
|
|
835
670
|
},
|
|
836
|
-
required: ['id', 'email', 'name', 'createdAt'],
|
|
837
671
|
metadata: {
|
|
838
|
-
|
|
839
|
-
|
|
672
|
+
description: 'User management API with authentication',
|
|
673
|
+
tags: ['users', 'authentication'],
|
|
840
674
|
},
|
|
841
675
|
});`
|
|
842
676
|
})
|
|
843
677
|
]
|
|
844
678
|
}),
|
|
845
|
-
/* @__PURE__ */
|
|
679
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
846
680
|
className: "space-y-3",
|
|
847
681
|
children: [
|
|
848
|
-
/* @__PURE__ */
|
|
849
|
-
className: "text-2xl
|
|
850
|
-
children: "
|
|
682
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
683
|
+
className: "font-bold text-2xl",
|
|
684
|
+
children: "Generate Multiple Clients"
|
|
851
685
|
}),
|
|
852
|
-
/* @__PURE__ */
|
|
686
|
+
/* @__PURE__ */ jsx3("p", {
|
|
853
687
|
className: "text-muted-foreground text-sm",
|
|
854
|
-
children: "
|
|
688
|
+
children: "Generate type-safe clients for any language from the same contract."
|
|
855
689
|
}),
|
|
856
|
-
/* @__PURE__ */
|
|
857
|
-
language: "
|
|
858
|
-
filename: "
|
|
859
|
-
code:
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
role: 'user' | 'admin' | 'moderator';
|
|
865
|
-
createdAt: string;
|
|
866
|
-
}
|
|
690
|
+
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
691
|
+
language: "bash",
|
|
692
|
+
filename: "generate-clients",
|
|
693
|
+
code: `# Generate all supported language clients
|
|
694
|
+
contractspec generate clients \\
|
|
695
|
+
--contract ./src/contracts/api.contract.ts \\
|
|
696
|
+
--output ./generated/clients \\
|
|
697
|
+
--languages typescript,python,go,java,csharp
|
|
867
698
|
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
699
|
+
# Generate specific language client
|
|
700
|
+
contractspec generate clients \\
|
|
701
|
+
--contract ./src/contracts/api.contract.ts \\
|
|
702
|
+
--output ./generated/clients \\
|
|
703
|
+
--languages typescript \\
|
|
704
|
+
--format npm-package
|
|
705
|
+
|
|
706
|
+
# Options
|
|
707
|
+
# --with-types: Include TypeScript definitions
|
|
708
|
+
# --with-tests: Generate client test suites
|
|
709
|
+
# --with-docs: Include client documentation
|
|
710
|
+
# --framework: Use specific HTTP client framework`
|
|
711
|
+
})
|
|
712
|
+
]
|
|
713
|
+
}),
|
|
714
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
715
|
+
className: "space-y-3",
|
|
716
|
+
children: [
|
|
717
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
718
|
+
className: "font-bold text-2xl",
|
|
719
|
+
children: "Generated Client Examples"
|
|
720
|
+
}),
|
|
721
|
+
/* @__PURE__ */ jsx3("p", {
|
|
722
|
+
className: "text-muted-foreground text-sm",
|
|
723
|
+
children: "Each generated client is fully type-safe and idiomatic."
|
|
724
|
+
}),
|
|
725
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
726
|
+
className: "space-y-4",
|
|
727
|
+
children: [
|
|
728
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
729
|
+
className: "card-subtle p-4",
|
|
730
|
+
children: [
|
|
731
|
+
/* @__PURE__ */ jsx3("h4", {
|
|
732
|
+
className: "font-semibold text-lg",
|
|
733
|
+
children: "TypeScript Client"
|
|
734
|
+
}),
|
|
735
|
+
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
736
|
+
language: "typescript",
|
|
737
|
+
filename: "generated/clients/typescript/index.ts",
|
|
738
|
+
code: `import { MyAPIClient } from './client';
|
|
739
|
+
|
|
740
|
+
const client = new MyAPIClient({
|
|
741
|
+
baseUrl: 'https://api.example.com',
|
|
742
|
+
apiKey: process.env.API_KEY,
|
|
875
743
|
});
|
|
876
744
|
|
|
877
|
-
//
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
745
|
+
// Type-safe method calls
|
|
746
|
+
const users = await client.getUsers({
|
|
747
|
+
page: 1,
|
|
748
|
+
limit: 10,
|
|
749
|
+
});
|
|
881
750
|
|
|
882
|
-
|
|
883
|
-
|
|
751
|
+
const newUser = await client.createUser({
|
|
752
|
+
email: 'user@example.com',
|
|
753
|
+
name: 'John Doe',
|
|
754
|
+
});
|
|
755
|
+
|
|
756
|
+
// Full type inference
|
|
757
|
+
// users: GetUsersResponse
|
|
758
|
+
// newUser: CreateUserResponse`
|
|
759
|
+
})
|
|
760
|
+
]
|
|
761
|
+
}),
|
|
762
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
763
|
+
className: "card-subtle p-4",
|
|
764
|
+
children: [
|
|
765
|
+
/* @__PURE__ */ jsx3("h4", {
|
|
766
|
+
className: "font-semibold text-lg",
|
|
767
|
+
children: "Python Client"
|
|
768
|
+
}),
|
|
769
|
+
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
770
|
+
language: "python",
|
|
771
|
+
filename: "generated/clients/python/index.py",
|
|
772
|
+
code: `from myapi_client import MyAPIClient
|
|
773
|
+
|
|
774
|
+
client = MyAPIClient(
|
|
775
|
+
base_url='https://api.example.com',
|
|
776
|
+
api_key=os.getenv('API_KEY')
|
|
777
|
+
)
|
|
778
|
+
|
|
779
|
+
# Type-safe method calls
|
|
780
|
+
users = await client.get_users(
|
|
781
|
+
page=1,
|
|
782
|
+
limit=10
|
|
783
|
+
)
|
|
784
|
+
|
|
785
|
+
new_user = await client.create_user(
|
|
786
|
+
email='user@example.com',
|
|
787
|
+
name='John Doe'
|
|
788
|
+
)
|
|
789
|
+
|
|
790
|
+
# Full type hints
|
|
791
|
+
# users: GetUsersResponse
|
|
792
|
+
# new_user: CreateUserResponse`
|
|
793
|
+
})
|
|
794
|
+
]
|
|
795
|
+
}),
|
|
796
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
797
|
+
className: "card-subtle p-4",
|
|
798
|
+
children: [
|
|
799
|
+
/* @__PURE__ */ jsx3("h4", {
|
|
800
|
+
className: "font-semibold text-lg",
|
|
801
|
+
children: "Go Client"
|
|
802
|
+
}),
|
|
803
|
+
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
804
|
+
language: "go",
|
|
805
|
+
filename: "generated/clients/go/client.go",
|
|
806
|
+
code: `package main
|
|
807
|
+
|
|
808
|
+
import (
|
|
809
|
+
"context"
|
|
810
|
+
"myapi_client"
|
|
811
|
+
)
|
|
812
|
+
|
|
813
|
+
func main() {
|
|
814
|
+
client := myapi_client.NewMyAPIClient(
|
|
815
|
+
myapi_client.WithBaseURL("https://api.example.com"),
|
|
816
|
+
myapi_client.WithAPIKey(os.Getenv("API_KEY")),
|
|
817
|
+
)
|
|
818
|
+
|
|
819
|
+
// Type-safe method calls
|
|
820
|
+
users, err := client.GetUsers(&myapi_client.GetUsersParams{
|
|
821
|
+
Page: 1,
|
|
822
|
+
Limit: 10,
|
|
823
|
+
})
|
|
824
|
+
|
|
825
|
+
newUser, err := client.CreateUser(&myapi_client.CreateUserParams{
|
|
826
|
+
Email: "user@example.com",
|
|
827
|
+
Name: "John Doe",
|
|
828
|
+
})
|
|
829
|
+
|
|
830
|
+
// Full type checking at compile time
|
|
831
|
+
// users: *GetUsersResponse
|
|
832
|
+
// newUser: *CreateUserResponse
|
|
884
833
|
}`
|
|
834
|
+
})
|
|
835
|
+
]
|
|
836
|
+
})
|
|
837
|
+
]
|
|
885
838
|
})
|
|
886
839
|
]
|
|
887
840
|
}),
|
|
888
|
-
/* @__PURE__ */
|
|
841
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
889
842
|
className: "space-y-3",
|
|
890
843
|
children: [
|
|
891
|
-
/* @__PURE__ */
|
|
892
|
-
className: "text-2xl
|
|
893
|
-
children: "
|
|
844
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
845
|
+
className: "font-bold text-2xl",
|
|
846
|
+
children: "Advanced Features"
|
|
894
847
|
}),
|
|
895
|
-
/* @__PURE__ */
|
|
848
|
+
/* @__PURE__ */ jsx3("p", {
|
|
896
849
|
className: "text-muted-foreground text-sm",
|
|
897
|
-
children: "
|
|
850
|
+
children: "Generated clients include enterprise-grade features out of the box."
|
|
898
851
|
}),
|
|
899
|
-
/* @__PURE__ */
|
|
852
|
+
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
900
853
|
language: "typescript",
|
|
901
|
-
filename: "
|
|
902
|
-
code:
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
return
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
854
|
+
filename: "client-features.ts",
|
|
855
|
+
code: `// Advanced client features
|
|
856
|
+
const client = new MyAPIClient({
|
|
857
|
+
baseUrl: 'https://api.example.com',
|
|
858
|
+
apiKey: 'your-api-key',
|
|
859
|
+
|
|
860
|
+
// Retry configuration
|
|
861
|
+
retryConfig: {
|
|
862
|
+
maxRetries: 3,
|
|
863
|
+
backoffMultiplier: 2,
|
|
864
|
+
maxDelay: 30000,
|
|
865
|
+
},
|
|
866
|
+
|
|
867
|
+
// Request/Response interceptors
|
|
868
|
+
interceptors: {
|
|
869
|
+
request: [(config) => {
|
|
870
|
+
// Add authentication headers
|
|
871
|
+
config.headers.Authorization = \`Bearer \${await getAuthToken()}\`;
|
|
872
|
+
return config;
|
|
873
|
+
}],
|
|
874
|
+
response: [(response) => {
|
|
875
|
+
// Log API calls
|
|
876
|
+
console.log(\`API Call: \${response.config.method} \${response.config.url}\`);
|
|
877
|
+
return response;
|
|
878
|
+
}],
|
|
879
|
+
},
|
|
880
|
+
|
|
881
|
+
// Error handling
|
|
882
|
+
errorHandler: (error) => {
|
|
883
|
+
if (error.status === 401) {
|
|
884
|
+
// Refresh token and retry
|
|
885
|
+
return refreshTokenAndRetry(error.originalRequest);
|
|
926
886
|
}
|
|
927
|
-
|
|
928
887
|
throw error;
|
|
929
|
-
}
|
|
930
|
-
}
|
|
888
|
+
},
|
|
889
|
+
});
|
|
890
|
+
|
|
891
|
+
// Automatic request deduplication
|
|
892
|
+
const user1 = client.getUser({ id: '123' });
|
|
893
|
+
const user2 = client.getUser({ id: '123' }); // Uses cached result
|
|
894
|
+
|
|
895
|
+
// Request cancellation
|
|
896
|
+
const controller = new AbortController();
|
|
897
|
+
const promise = client.getUsers({ page: 1, signal: controller.signal });
|
|
898
|
+
controller.abort(); // Cancels the request`
|
|
931
899
|
})
|
|
932
900
|
]
|
|
933
901
|
})
|
|
934
902
|
]
|
|
935
903
|
}),
|
|
936
|
-
/* @__PURE__ */
|
|
904
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
937
905
|
className: "flex items-center gap-4 pt-4",
|
|
938
906
|
children: [
|
|
939
|
-
/* @__PURE__ */
|
|
940
|
-
href: "/docs/guides/
|
|
907
|
+
/* @__PURE__ */ jsxs3(Link3, {
|
|
908
|
+
href: "/docs/guides/generate-docs-clients-schemas",
|
|
941
909
|
className: "btn-primary",
|
|
942
910
|
children: [
|
|
943
|
-
"
|
|
944
|
-
/* @__PURE__ */
|
|
911
|
+
"Client Generation Guide ",
|
|
912
|
+
/* @__PURE__ */ jsx3(ChevronRight3, {
|
|
945
913
|
size: 16
|
|
946
914
|
})
|
|
947
915
|
]
|
|
948
916
|
}),
|
|
949
|
-
/* @__PURE__ */
|
|
950
|
-
href: "/docs/intent/
|
|
917
|
+
/* @__PURE__ */ jsx3(Link3, {
|
|
918
|
+
href: "/docs/intent/contract-first-api",
|
|
951
919
|
className: "btn-ghost",
|
|
952
|
-
children: "
|
|
920
|
+
children: "Contract-first API"
|
|
953
921
|
})
|
|
954
922
|
]
|
|
955
923
|
})
|
|
@@ -959,128 +927,128 @@ export async function createUserHandler(request: Request) {
|
|
|
959
927
|
|
|
960
928
|
// src/components/docs/intent/OpenapiAlternativePage.tsx
|
|
961
929
|
import { openapiAlternativeBrief as openapiAlternativeBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
962
|
-
import { SeoOptimizer as
|
|
963
|
-
import { CodeBlock as
|
|
964
|
-
import
|
|
965
|
-
import { ChevronRight as
|
|
966
|
-
import { jsx as
|
|
967
|
-
var
|
|
930
|
+
import { SeoOptimizer as SeoOptimizer4 } from "@contractspec/lib.content-gen/seo";
|
|
931
|
+
import { CodeBlock as CodeBlock4 } from "@contractspec/lib.design-system";
|
|
932
|
+
import Link4 from "@contractspec/lib.ui-link";
|
|
933
|
+
import { ChevronRight as ChevronRight4 } from "lucide-react";
|
|
934
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
935
|
+
var metadata4 = new SeoOptimizer4().optimize(openapiAlternativeBrief2);
|
|
968
936
|
function OpenapiAlternativePage() {
|
|
969
|
-
return /* @__PURE__ */
|
|
937
|
+
return /* @__PURE__ */ jsxs4("div", {
|
|
970
938
|
className: "space-y-8",
|
|
971
939
|
children: [
|
|
972
|
-
/* @__PURE__ */
|
|
940
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
973
941
|
className: "space-y-3",
|
|
974
942
|
children: [
|
|
975
|
-
/* @__PURE__ */
|
|
976
|
-
className: "text-4xl
|
|
943
|
+
/* @__PURE__ */ jsx4("h1", {
|
|
944
|
+
className: "font-bold text-4xl",
|
|
977
945
|
children: openapiAlternativeBrief2.title
|
|
978
946
|
}),
|
|
979
|
-
/* @__PURE__ */
|
|
980
|
-
className: "text-muted-foreground
|
|
947
|
+
/* @__PURE__ */ jsx4("p", {
|
|
948
|
+
className: "text-lg text-muted-foreground",
|
|
981
949
|
children: openapiAlternativeBrief2.summary
|
|
982
950
|
})
|
|
983
951
|
]
|
|
984
952
|
}),
|
|
985
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
986
954
|
className: "card-subtle space-y-4 p-6",
|
|
987
955
|
children: [
|
|
988
|
-
/* @__PURE__ */
|
|
989
|
-
className: "text-2xl
|
|
956
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
957
|
+
className: "font-bold text-2xl",
|
|
990
958
|
children: "OpenAPI Limitations"
|
|
991
959
|
}),
|
|
992
|
-
/* @__PURE__ */
|
|
993
|
-
className: "
|
|
994
|
-
children: openapiAlternativeBrief2.problems.map((problem, index) => /* @__PURE__ */
|
|
960
|
+
/* @__PURE__ */ jsx4("ul", {
|
|
961
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
962
|
+
children: openapiAlternativeBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx4("li", {
|
|
995
963
|
children: problem
|
|
996
964
|
}, index))
|
|
997
965
|
})
|
|
998
966
|
]
|
|
999
967
|
}),
|
|
1000
|
-
/* @__PURE__ */
|
|
968
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1001
969
|
className: "card-subtle space-y-4 p-6",
|
|
1002
970
|
children: [
|
|
1003
|
-
/* @__PURE__ */
|
|
1004
|
-
className: "text-2xl
|
|
971
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
972
|
+
className: "font-bold text-2xl",
|
|
1005
973
|
children: "ContractSpec Advantages"
|
|
1006
974
|
}),
|
|
1007
|
-
/* @__PURE__ */
|
|
1008
|
-
className: "
|
|
1009
|
-
children: openapiAlternativeBrief2.solutions.map((solution, index) => /* @__PURE__ */
|
|
975
|
+
/* @__PURE__ */ jsx4("ul", {
|
|
976
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
977
|
+
children: openapiAlternativeBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx4("li", {
|
|
1010
978
|
children: solution
|
|
1011
979
|
}, index))
|
|
1012
980
|
})
|
|
1013
981
|
]
|
|
1014
982
|
}),
|
|
1015
|
-
/* @__PURE__ */
|
|
983
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1016
984
|
className: "space-y-6",
|
|
1017
985
|
children: [
|
|
1018
|
-
/* @__PURE__ */
|
|
986
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1019
987
|
className: "space-y-3",
|
|
1020
988
|
children: [
|
|
1021
|
-
/* @__PURE__ */
|
|
1022
|
-
className: "text-2xl
|
|
989
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
990
|
+
className: "font-bold text-2xl",
|
|
1023
991
|
children: "Comparison: OpenAPI vs ContractSpec"
|
|
1024
992
|
}),
|
|
1025
|
-
/* @__PURE__ */
|
|
993
|
+
/* @__PURE__ */ jsx4("p", {
|
|
1026
994
|
className: "text-muted-foreground text-sm",
|
|
1027
995
|
children: "Key differences between OpenAPI documentation and ContractSpec executable contracts."
|
|
1028
996
|
}),
|
|
1029
|
-
/* @__PURE__ */
|
|
997
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1030
998
|
className: "grid gap-6 md:grid-cols-2",
|
|
1031
999
|
children: [
|
|
1032
|
-
/* @__PURE__ */
|
|
1000
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1033
1001
|
className: "card-subtle space-y-3 p-4",
|
|
1034
1002
|
children: [
|
|
1035
|
-
/* @__PURE__ */
|
|
1036
|
-
className: "text-lg
|
|
1003
|
+
/* @__PURE__ */ jsx4("h3", {
|
|
1004
|
+
className: "font-semibold text-lg",
|
|
1037
1005
|
children: "OpenAPI"
|
|
1038
1006
|
}),
|
|
1039
|
-
/* @__PURE__ */
|
|
1040
|
-
className: "
|
|
1007
|
+
/* @__PURE__ */ jsxs4("ul", {
|
|
1008
|
+
className: "space-y-1 text-muted-foreground text-sm",
|
|
1041
1009
|
children: [
|
|
1042
|
-
/* @__PURE__ */
|
|
1010
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1043
1011
|
children: "\u2022 Documentation specification only"
|
|
1044
1012
|
}),
|
|
1045
|
-
/* @__PURE__ */
|
|
1013
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1046
1014
|
children: "\u2022 No runtime validation"
|
|
1047
1015
|
}),
|
|
1048
|
-
/* @__PURE__ */
|
|
1016
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1049
1017
|
children: "\u2022 Manual code generation"
|
|
1050
1018
|
}),
|
|
1051
|
-
/* @__PURE__ */
|
|
1019
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1052
1020
|
children: "\u2022 Type safety requires tools"
|
|
1053
1021
|
}),
|
|
1054
|
-
/* @__PURE__ */
|
|
1022
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1055
1023
|
children: "\u2022 Separate schemas from documentation"
|
|
1056
1024
|
})
|
|
1057
1025
|
]
|
|
1058
1026
|
})
|
|
1059
1027
|
]
|
|
1060
1028
|
}),
|
|
1061
|
-
/* @__PURE__ */
|
|
1029
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1062
1030
|
className: "card-subtle space-y-3 p-4",
|
|
1063
1031
|
children: [
|
|
1064
|
-
/* @__PURE__ */
|
|
1065
|
-
className: "text-lg
|
|
1032
|
+
/* @__PURE__ */ jsx4("h3", {
|
|
1033
|
+
className: "font-semibold text-lg",
|
|
1066
1034
|
children: "ContractSpec"
|
|
1067
1035
|
}),
|
|
1068
|
-
/* @__PURE__ */
|
|
1069
|
-
className: "
|
|
1036
|
+
/* @__PURE__ */ jsxs4("ul", {
|
|
1037
|
+
className: "space-y-1 text-muted-foreground text-sm",
|
|
1070
1038
|
children: [
|
|
1071
|
-
/* @__PURE__ */
|
|
1039
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1072
1040
|
children: "\u2022 Executable contracts"
|
|
1073
1041
|
}),
|
|
1074
|
-
/* @__PURE__ */
|
|
1042
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1075
1043
|
children: "\u2022 Built-in runtime validation"
|
|
1076
1044
|
}),
|
|
1077
|
-
/* @__PURE__ */
|
|
1045
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1078
1046
|
children: "\u2022 Automatic code generation"
|
|
1079
1047
|
}),
|
|
1080
|
-
/* @__PURE__ */
|
|
1048
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1081
1049
|
children: "\u2022 Type-safe by default"
|
|
1082
1050
|
}),
|
|
1083
|
-
/* @__PURE__ */
|
|
1051
|
+
/* @__PURE__ */ jsx4("li", {
|
|
1084
1052
|
children: "\u2022 Unified spec and implementation"
|
|
1085
1053
|
})
|
|
1086
1054
|
]
|
|
@@ -1091,29 +1059,264 @@ function OpenapiAlternativePage() {
|
|
|
1091
1059
|
})
|
|
1092
1060
|
]
|
|
1093
1061
|
}),
|
|
1062
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1063
|
+
className: "space-y-3",
|
|
1064
|
+
children: [
|
|
1065
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
1066
|
+
className: "font-bold text-2xl",
|
|
1067
|
+
children: "Export from Contracts"
|
|
1068
|
+
}),
|
|
1069
|
+
/* @__PURE__ */ jsx4("p", {
|
|
1070
|
+
className: "text-muted-foreground text-sm",
|
|
1071
|
+
children: "Generate OpenAPI documentation from ContractSpec for existing tooling."
|
|
1072
|
+
}),
|
|
1073
|
+
/* @__PURE__ */ jsx4(CodeBlock4, {
|
|
1074
|
+
language: "bash",
|
|
1075
|
+
filename: "export-openapi",
|
|
1076
|
+
code: `# From ContractSpec contracts
|
|
1077
|
+
contractspec openapi export \\
|
|
1078
|
+
--registry ./src/contracts/registry.ts \\
|
|
1079
|
+
--format yaml \\
|
|
1080
|
+
--out ./openapi.yaml
|
|
1081
|
+
|
|
1082
|
+
# Compare: Manual OpenAPI vs Generated
|
|
1083
|
+
# Manual: Write OpenAPI by hand, maintain separately
|
|
1084
|
+
# Generated: Single source of truth, always in sync`
|
|
1085
|
+
})
|
|
1086
|
+
]
|
|
1087
|
+
}),
|
|
1088
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1089
|
+
className: "space-y-3",
|
|
1090
|
+
children: [
|
|
1091
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
1092
|
+
className: "font-bold text-2xl",
|
|
1093
|
+
children: "Beyond Documentation"
|
|
1094
|
+
}),
|
|
1095
|
+
/* @__PURE__ */ jsx4("p", {
|
|
1096
|
+
className: "text-muted-foreground text-sm",
|
|
1097
|
+
children: "ContractSpec provides more than just API documentation."
|
|
1098
|
+
}),
|
|
1099
|
+
/* @__PURE__ */ jsx4(CodeBlock4, {
|
|
1100
|
+
language: "typescript",
|
|
1101
|
+
filename: "multi-output-example.ts",
|
|
1102
|
+
code: `// One contract, multiple outputs
|
|
1103
|
+
import { UserApiContract } from './contracts/user-api.contract';
|
|
1104
|
+
|
|
1105
|
+
// Generated outputs
|
|
1106
|
+
export const outputs = {
|
|
1107
|
+
// API documentation (OpenAPI)
|
|
1108
|
+
openapi: UserApiContract.toOpenAPI(),
|
|
1109
|
+
|
|
1110
|
+
// Client SDKs (TypeScript, Python, etc.)
|
|
1111
|
+
clients: UserApiContract.generateClients({
|
|
1112
|
+
languages: ['typescript', 'python', 'go'],
|
|
1113
|
+
}),
|
|
1114
|
+
|
|
1115
|
+
// Database schemas (Prisma, Drizzle)
|
|
1116
|
+
database: UserApiContract.toDatabase({
|
|
1117
|
+
adapter: 'prisma',
|
|
1118
|
+
}),
|
|
1119
|
+
|
|
1120
|
+
// API handlers (Express, Fastify, Next.js)
|
|
1121
|
+
handlers: UserApiContract.toHandlers({
|
|
1122
|
+
framework: 'express',
|
|
1123
|
+
}),
|
|
1124
|
+
|
|
1125
|
+
// Validation middleware
|
|
1126
|
+
validation: UserApiContract.toValidation({
|
|
1127
|
+
library: 'zod',
|
|
1128
|
+
}),
|
|
1129
|
+
|
|
1130
|
+
// Type definitions
|
|
1131
|
+
types: UserApiContract.toTypescript(),
|
|
1132
|
+
};`
|
|
1133
|
+
})
|
|
1134
|
+
]
|
|
1135
|
+
})
|
|
1136
|
+
]
|
|
1137
|
+
}),
|
|
1138
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1139
|
+
className: "flex items-center gap-4 pt-4",
|
|
1140
|
+
children: [
|
|
1141
|
+
/* @__PURE__ */ jsxs4(Link4, {
|
|
1142
|
+
href: "/docs/guides/generate-docs-clients-schemas",
|
|
1143
|
+
className: "btn-primary",
|
|
1144
|
+
children: [
|
|
1145
|
+
"Generate from Contracts ",
|
|
1146
|
+
/* @__PURE__ */ jsx4(ChevronRight4, {
|
|
1147
|
+
size: 16
|
|
1148
|
+
})
|
|
1149
|
+
]
|
|
1150
|
+
}),
|
|
1151
|
+
/* @__PURE__ */ jsx4(Link4, {
|
|
1152
|
+
href: "/docs/intent/generate-client-from-schema",
|
|
1153
|
+
className: "btn-ghost",
|
|
1154
|
+
children: "Client Generation"
|
|
1155
|
+
})
|
|
1156
|
+
]
|
|
1157
|
+
})
|
|
1158
|
+
]
|
|
1159
|
+
});
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
// src/components/docs/intent/SchemaValidationTypescriptPage.tsx
|
|
1163
|
+
import { schemaValidationTypescriptBrief as schemaValidationTypescriptBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
1164
|
+
import { SeoOptimizer as SeoOptimizer5 } from "@contractspec/lib.content-gen/seo";
|
|
1165
|
+
import { CodeBlock as CodeBlock5 } from "@contractspec/lib.design-system";
|
|
1166
|
+
import Link5 from "@contractspec/lib.ui-link";
|
|
1167
|
+
import { ChevronRight as ChevronRight5 } from "lucide-react";
|
|
1168
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1169
|
+
var metadata5 = new SeoOptimizer5().optimize(schemaValidationTypescriptBrief2);
|
|
1170
|
+
function SchemaValidationTypescriptPage() {
|
|
1171
|
+
return /* @__PURE__ */ jsxs5("div", {
|
|
1172
|
+
className: "space-y-8",
|
|
1173
|
+
children: [
|
|
1174
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1175
|
+
className: "space-y-3",
|
|
1176
|
+
children: [
|
|
1177
|
+
/* @__PURE__ */ jsx5("h1", {
|
|
1178
|
+
className: "font-bold text-4xl",
|
|
1179
|
+
children: schemaValidationTypescriptBrief2.title
|
|
1180
|
+
}),
|
|
1181
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1182
|
+
className: "text-lg text-muted-foreground",
|
|
1183
|
+
children: schemaValidationTypescriptBrief2.summary
|
|
1184
|
+
})
|
|
1185
|
+
]
|
|
1186
|
+
}),
|
|
1187
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1188
|
+
className: "card-subtle space-y-4 p-6",
|
|
1189
|
+
children: [
|
|
1190
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1191
|
+
className: "font-bold text-2xl",
|
|
1192
|
+
children: "Validation Pain Points"
|
|
1193
|
+
}),
|
|
1194
|
+
/* @__PURE__ */ jsx5("ul", {
|
|
1195
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
1196
|
+
children: schemaValidationTypescriptBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx5("li", {
|
|
1197
|
+
children: problem
|
|
1198
|
+
}, index))
|
|
1199
|
+
})
|
|
1200
|
+
]
|
|
1201
|
+
}),
|
|
1202
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1203
|
+
className: "card-subtle space-y-4 p-6",
|
|
1204
|
+
children: [
|
|
1205
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1206
|
+
className: "font-bold text-2xl",
|
|
1207
|
+
children: "Type-safe Solutions"
|
|
1208
|
+
}),
|
|
1209
|
+
/* @__PURE__ */ jsx5("ul", {
|
|
1210
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
1211
|
+
children: schemaValidationTypescriptBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx5("li", {
|
|
1212
|
+
children: solution
|
|
1213
|
+
}, index))
|
|
1214
|
+
})
|
|
1215
|
+
]
|
|
1216
|
+
}),
|
|
1217
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1218
|
+
className: "space-y-6",
|
|
1219
|
+
children: [
|
|
1220
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1221
|
+
className: "space-y-3",
|
|
1222
|
+
children: [
|
|
1223
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1224
|
+
className: "font-bold text-2xl",
|
|
1225
|
+
children: "Contract Schema"
|
|
1226
|
+
}),
|
|
1227
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1228
|
+
className: "text-muted-foreground text-sm",
|
|
1229
|
+
children: "Define data models with automatic TypeScript generation."
|
|
1230
|
+
}),
|
|
1231
|
+
/* @__PURE__ */ jsx5(CodeBlock5, {
|
|
1232
|
+
language: "typescript",
|
|
1233
|
+
filename: "src/contracts/user.schema.ts",
|
|
1234
|
+
code: `import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
1235
|
+
|
|
1236
|
+
export const UserSchema = new SchemaModel({
|
|
1237
|
+
type: 'object',
|
|
1238
|
+
properties: {
|
|
1239
|
+
id: {
|
|
1240
|
+
type: 'string',
|
|
1241
|
+
format: 'uuid',
|
|
1242
|
+
required: true,
|
|
1243
|
+
description: 'Unique user identifier',
|
|
1244
|
+
},
|
|
1245
|
+
email: {
|
|
1246
|
+
type: 'string',
|
|
1247
|
+
format: 'email',
|
|
1248
|
+
required: true,
|
|
1249
|
+
description: 'User email address',
|
|
1250
|
+
},
|
|
1251
|
+
name: {
|
|
1252
|
+
type: 'string',
|
|
1253
|
+
minLength: 1,
|
|
1254
|
+
maxLength: 100,
|
|
1255
|
+
required: true,
|
|
1256
|
+
description: 'Display name for the user',
|
|
1257
|
+
},
|
|
1258
|
+
role: {
|
|
1259
|
+
type: 'string',
|
|
1260
|
+
enum: ['user', 'admin', 'moderator'],
|
|
1261
|
+
default: 'user',
|
|
1262
|
+
description: 'User role in the system',
|
|
1263
|
+
},
|
|
1264
|
+
createdAt: {
|
|
1265
|
+
type: 'string',
|
|
1266
|
+
format: 'date-time',
|
|
1267
|
+
required: true,
|
|
1268
|
+
description: 'Account creation timestamp',
|
|
1269
|
+
},
|
|
1270
|
+
},
|
|
1271
|
+
required: ['id', 'email', 'name', 'createdAt'],
|
|
1272
|
+
metadata: {
|
|
1273
|
+
name: 'User',
|
|
1274
|
+
description: 'User account information',
|
|
1275
|
+
},
|
|
1276
|
+
});`
|
|
1277
|
+
})
|
|
1278
|
+
]
|
|
1279
|
+
}),
|
|
1094
1280
|
/* @__PURE__ */ jsxs5("div", {
|
|
1095
1281
|
className: "space-y-3",
|
|
1096
1282
|
children: [
|
|
1097
1283
|
/* @__PURE__ */ jsx5("h2", {
|
|
1098
|
-
className: "text-2xl
|
|
1099
|
-
children: "
|
|
1284
|
+
className: "font-bold text-2xl",
|
|
1285
|
+
children: "Generated Types"
|
|
1100
1286
|
}),
|
|
1101
1287
|
/* @__PURE__ */ jsx5("p", {
|
|
1102
1288
|
className: "text-muted-foreground text-sm",
|
|
1103
|
-
children: "
|
|
1289
|
+
children: "TypeScript types are automatically generated with proper validation."
|
|
1104
1290
|
}),
|
|
1105
1291
|
/* @__PURE__ */ jsx5(CodeBlock5, {
|
|
1106
|
-
language: "
|
|
1107
|
-
filename: "
|
|
1108
|
-
code:
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1292
|
+
language: "typescript",
|
|
1293
|
+
filename: "generated/types/user.ts",
|
|
1294
|
+
code: `// Auto-generated from UserSchema
|
|
1295
|
+
export interface User {
|
|
1296
|
+
id: string;
|
|
1297
|
+
email: string;
|
|
1298
|
+
name: string;
|
|
1299
|
+
role: 'user' | 'admin' | 'moderator';
|
|
1300
|
+
createdAt: string;
|
|
1301
|
+
}
|
|
1113
1302
|
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1303
|
+
// Auto-generated Zod schema for runtime validation
|
|
1304
|
+
export const UserSchemaZod = z.object({
|
|
1305
|
+
id: z.string().uuid(),
|
|
1306
|
+
email: z.string().email(),
|
|
1307
|
+
name: z.string().min(1).max(100),
|
|
1308
|
+
role: z.enum(['user', 'admin', 'moderator']).default('user'),
|
|
1309
|
+
createdAt: z.string().datetime(),
|
|
1310
|
+
});
|
|
1311
|
+
|
|
1312
|
+
// Generated validation utilities
|
|
1313
|
+
export function validateUser(data: unknown): User {
|
|
1314
|
+
return UserSchemaZod.parse(data);
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
export function isUser(data: unknown): data is User {
|
|
1318
|
+
return UserSchemaZod.safeParse(data).success;
|
|
1319
|
+
}`
|
|
1117
1320
|
})
|
|
1118
1321
|
]
|
|
1119
1322
|
}),
|
|
@@ -1121,47 +1324,45 @@ contractspec openapi export \\
|
|
|
1121
1324
|
className: "space-y-3",
|
|
1122
1325
|
children: [
|
|
1123
1326
|
/* @__PURE__ */ jsx5("h2", {
|
|
1124
|
-
className: "text-2xl
|
|
1125
|
-
children: "
|
|
1327
|
+
className: "font-bold text-2xl",
|
|
1328
|
+
children: "Runtime Validation"
|
|
1126
1329
|
}),
|
|
1127
1330
|
/* @__PURE__ */ jsx5("p", {
|
|
1128
1331
|
className: "text-muted-foreground text-sm",
|
|
1129
|
-
children: "
|
|
1332
|
+
children: "Use generated validation in your API handlers with zero boilerplate."
|
|
1130
1333
|
}),
|
|
1131
1334
|
/* @__PURE__ */ jsx5(CodeBlock5, {
|
|
1132
1335
|
language: "typescript",
|
|
1133
|
-
filename: "
|
|
1134
|
-
code:
|
|
1135
|
-
import { UserApiContract } from './contracts/user-api.contract';
|
|
1336
|
+
filename: "src/handlers/user-handler.ts",
|
|
1337
|
+
code: `import { validateUser } from '../generated/types/user';
|
|
1136
1338
|
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
})
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
};`
|
|
1339
|
+
export async function createUserHandler(request: Request) {
|
|
1340
|
+
try {
|
|
1341
|
+
const input = validateUser(await request.json());
|
|
1342
|
+
|
|
1343
|
+
// input is now fully typed as User
|
|
1344
|
+
const user = await db.users.create({
|
|
1345
|
+
data: {
|
|
1346
|
+
...input,
|
|
1347
|
+
createdAt: new Date().toISOString(),
|
|
1348
|
+
},
|
|
1349
|
+
});
|
|
1350
|
+
|
|
1351
|
+
return Response.json({ user });
|
|
1352
|
+
} catch (error) {
|
|
1353
|
+
if (error instanceof z.ZodError) {
|
|
1354
|
+
return Response.json(
|
|
1355
|
+
{
|
|
1356
|
+
error: 'Validation failed',
|
|
1357
|
+
details: error.errors
|
|
1358
|
+
},
|
|
1359
|
+
{ status: 400 }
|
|
1360
|
+
);
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
throw error;
|
|
1364
|
+
}
|
|
1365
|
+
}`
|
|
1165
1366
|
})
|
|
1166
1367
|
]
|
|
1167
1368
|
})
|
|
@@ -1171,10 +1372,10 @@ export const outputs = {
|
|
|
1171
1372
|
className: "flex items-center gap-4 pt-4",
|
|
1172
1373
|
children: [
|
|
1173
1374
|
/* @__PURE__ */ jsxs5(Link5, {
|
|
1174
|
-
href: "/docs/guides/
|
|
1375
|
+
href: "/docs/guides/spec-validation-and-typing",
|
|
1175
1376
|
className: "btn-primary",
|
|
1176
1377
|
children: [
|
|
1177
|
-
"
|
|
1378
|
+
"Type Safety Guide ",
|
|
1178
1379
|
/* @__PURE__ */ jsx5(ChevronRight5, {
|
|
1179
1380
|
size: 16
|
|
1180
1381
|
})
|
|
@@ -1191,15 +1392,15 @@ export const outputs = {
|
|
|
1191
1392
|
});
|
|
1192
1393
|
}
|
|
1193
1394
|
|
|
1194
|
-
// src/components/docs/intent/
|
|
1195
|
-
import {
|
|
1395
|
+
// src/components/docs/intent/SpecDrivenDevelopmentPage.tsx
|
|
1396
|
+
import { specDrivenDevelopmentBrief as specDrivenDevelopmentBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
1196
1397
|
import { SeoOptimizer as SeoOptimizer6 } from "@contractspec/lib.content-gen/seo";
|
|
1197
1398
|
import { CodeBlock as CodeBlock6 } from "@contractspec/lib.design-system";
|
|
1198
1399
|
import Link6 from "@contractspec/lib.ui-link";
|
|
1199
1400
|
import { ChevronRight as ChevronRight6 } from "lucide-react";
|
|
1200
1401
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1201
|
-
var metadata6 = new SeoOptimizer6().optimize(
|
|
1202
|
-
function
|
|
1402
|
+
var metadata6 = new SeoOptimizer6().optimize(specDrivenDevelopmentBrief2);
|
|
1403
|
+
function SpecDrivenDevelopmentPage() {
|
|
1203
1404
|
return /* @__PURE__ */ jsxs6("div", {
|
|
1204
1405
|
className: "space-y-8",
|
|
1205
1406
|
children: [
|
|
@@ -1207,12 +1408,12 @@ function GenerateClientFromSchemaPage() {
|
|
|
1207
1408
|
className: "space-y-3",
|
|
1208
1409
|
children: [
|
|
1209
1410
|
/* @__PURE__ */ jsx6("h1", {
|
|
1210
|
-
className: "text-4xl
|
|
1211
|
-
children:
|
|
1411
|
+
className: "font-bold text-4xl",
|
|
1412
|
+
children: specDrivenDevelopmentBrief2.title
|
|
1212
1413
|
}),
|
|
1213
1414
|
/* @__PURE__ */ jsx6("p", {
|
|
1214
|
-
className: "text-muted-foreground
|
|
1215
|
-
children:
|
|
1415
|
+
className: "text-lg text-muted-foreground",
|
|
1416
|
+
children: specDrivenDevelopmentBrief2.summary
|
|
1216
1417
|
})
|
|
1217
1418
|
]
|
|
1218
1419
|
}),
|
|
@@ -1220,12 +1421,12 @@ function GenerateClientFromSchemaPage() {
|
|
|
1220
1421
|
className: "card-subtle space-y-4 p-6",
|
|
1221
1422
|
children: [
|
|
1222
1423
|
/* @__PURE__ */ jsx6("h2", {
|
|
1223
|
-
className: "text-2xl
|
|
1224
|
-
children: "
|
|
1424
|
+
className: "font-bold text-2xl",
|
|
1425
|
+
children: "Why Spec-driven?"
|
|
1225
1426
|
}),
|
|
1226
1427
|
/* @__PURE__ */ jsx6("ul", {
|
|
1227
|
-
className: "
|
|
1228
|
-
children:
|
|
1428
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
1429
|
+
children: specDrivenDevelopmentBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx6("li", {
|
|
1229
1430
|
children: problem
|
|
1230
1431
|
}, index))
|
|
1231
1432
|
})
|
|
@@ -1235,12 +1436,12 @@ function GenerateClientFromSchemaPage() {
|
|
|
1235
1436
|
className: "card-subtle space-y-4 p-6",
|
|
1236
1437
|
children: [
|
|
1237
1438
|
/* @__PURE__ */ jsx6("h2", {
|
|
1238
|
-
className: "text-2xl
|
|
1239
|
-
children: "
|
|
1439
|
+
className: "font-bold text-2xl",
|
|
1440
|
+
children: "Benefits"
|
|
1240
1441
|
}),
|
|
1241
1442
|
/* @__PURE__ */ jsx6("ul", {
|
|
1242
|
-
className: "
|
|
1243
|
-
children:
|
|
1443
|
+
className: "space-y-2 text-muted-foreground text-sm",
|
|
1444
|
+
children: specDrivenDevelopmentBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx6("li", {
|
|
1244
1445
|
children: solution
|
|
1245
1446
|
}, index))
|
|
1246
1447
|
})
|
|
@@ -1253,64 +1454,27 @@ function GenerateClientFromSchemaPage() {
|
|
|
1253
1454
|
className: "space-y-3",
|
|
1254
1455
|
children: [
|
|
1255
1456
|
/* @__PURE__ */ jsx6("h2", {
|
|
1256
|
-
className: "text-2xl
|
|
1257
|
-
children: "
|
|
1457
|
+
className: "font-bold text-2xl",
|
|
1458
|
+
children: "Feature Specification Example"
|
|
1258
1459
|
}),
|
|
1259
1460
|
/* @__PURE__ */ jsx6("p", {
|
|
1260
1461
|
className: "text-muted-foreground text-sm",
|
|
1261
|
-
children: "Define
|
|
1462
|
+
children: "Define a complete feature with operations, events, and data models."
|
|
1262
1463
|
}),
|
|
1263
1464
|
/* @__PURE__ */ jsx6(CodeBlock6, {
|
|
1264
1465
|
language: "typescript",
|
|
1265
|
-
filename: "src/contracts/
|
|
1266
|
-
code: `import {
|
|
1466
|
+
filename: "src/contracts/user-management.feature.ts",
|
|
1467
|
+
code: `import { defineFeature } from '@contractspec/lib.contracts-spec/features';
|
|
1468
|
+
import { defineOperation } from '@contractspec/lib.contracts-spec/operations';
|
|
1469
|
+
import { defineEvent } from '@contractspec/lib.contracts-spec/events';
|
|
1267
1470
|
import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
1268
1471
|
|
|
1269
|
-
export const
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
baseUrl: 'https://api.example.com',
|
|
1472
|
+
export const UserManagementFeature = defineFeature({
|
|
1473
|
+
goal: 'Complete user management system with CRUD operations',
|
|
1474
|
+
context: 'Handles user lifecycle from creation to deletion with proper authorization',
|
|
1273
1475
|
operations: {
|
|
1274
|
-
|
|
1275
|
-
goal: '
|
|
1276
|
-
method: 'GET',
|
|
1277
|
-
path: '/users',
|
|
1278
|
-
input: new SchemaModel({
|
|
1279
|
-
type: 'object',
|
|
1280
|
-
properties: {
|
|
1281
|
-
page: { type: 'integer', minimum: 1, default: 1 },
|
|
1282
|
-
limit: { type: 'integer', minimum: 1, maximum: 100, default: 20 },
|
|
1283
|
-
},
|
|
1284
|
-
}),
|
|
1285
|
-
output: new SchemaModel({
|
|
1286
|
-
type: 'object',
|
|
1287
|
-
properties: {
|
|
1288
|
-
users: {
|
|
1289
|
-
type: 'array',
|
|
1290
|
-
items: {
|
|
1291
|
-
type: 'object',
|
|
1292
|
-
properties: {
|
|
1293
|
-
id: { type: 'string', required: true },
|
|
1294
|
-
email: { type: 'string', required: true },
|
|
1295
|
-
name: { type: 'string', required: true },
|
|
1296
|
-
},
|
|
1297
|
-
},
|
|
1298
|
-
},
|
|
1299
|
-
pagination: {
|
|
1300
|
-
type: 'object',
|
|
1301
|
-
properties: {
|
|
1302
|
-
page: { type: 'integer', required: true },
|
|
1303
|
-
limit: { type: 'integer', required: true },
|
|
1304
|
-
total: { type: 'integer', required: true },
|
|
1305
|
-
},
|
|
1306
|
-
},
|
|
1307
|
-
},
|
|
1308
|
-
}),
|
|
1309
|
-
},
|
|
1310
|
-
createUser: {
|
|
1311
|
-
goal: 'Create a new user account',
|
|
1312
|
-
method: 'POST',
|
|
1313
|
-
path: '/users',
|
|
1476
|
+
createUser: defineOperation({
|
|
1477
|
+
goal: 'Create a new user account',
|
|
1314
1478
|
input: new SchemaModel({
|
|
1315
1479
|
type: 'object',
|
|
1316
1480
|
properties: {
|
|
@@ -1324,14 +1488,53 @@ export const ApiContract = defineContract({
|
|
|
1324
1488
|
id: { type: 'string', required: true },
|
|
1325
1489
|
email: { type: 'string', required: true },
|
|
1326
1490
|
name: { type: 'string', required: true },
|
|
1327
|
-
createdAt: { type: 'string', format: 'date-time', required: true },
|
|
1328
1491
|
},
|
|
1329
1492
|
}),
|
|
1330
|
-
},
|
|
1493
|
+
}),
|
|
1494
|
+
updateUser: defineOperation({
|
|
1495
|
+
goal: 'Update existing user information',
|
|
1496
|
+
input: new SchemaModel({
|
|
1497
|
+
type: 'object',
|
|
1498
|
+
properties: {
|
|
1499
|
+
name: { type: 'string', minLength: 1 },
|
|
1500
|
+
},
|
|
1501
|
+
}),
|
|
1502
|
+
output: new SchemaModel({
|
|
1503
|
+
type: 'object',
|
|
1504
|
+
properties: {
|
|
1505
|
+
id: { type: 'string', required: true },
|
|
1506
|
+
email: { type: 'string', required: true },
|
|
1507
|
+
name: { type: 'string', required: true },
|
|
1508
|
+
},
|
|
1509
|
+
}),
|
|
1510
|
+
}),
|
|
1511
|
+
},
|
|
1512
|
+
events: {
|
|
1513
|
+
userCreated: defineEvent({
|
|
1514
|
+
goal: 'Emit when a new user is created',
|
|
1515
|
+
payload: new SchemaModel({
|
|
1516
|
+
type: 'object',
|
|
1517
|
+
properties: {
|
|
1518
|
+
userId: { type: 'string', required: true },
|
|
1519
|
+
email: { type: 'string', required: true },
|
|
1520
|
+
},
|
|
1521
|
+
}),
|
|
1522
|
+
}),
|
|
1523
|
+
userUpdated: defineEvent({
|
|
1524
|
+
goal: 'Emit when user information changes',
|
|
1525
|
+
payload: new SchemaModel({
|
|
1526
|
+
type: 'object',
|
|
1527
|
+
properties: {
|
|
1528
|
+
userId: { type: 'string', required: true },
|
|
1529
|
+
changes: { type: 'array', items: { type: 'string' }, required: true },
|
|
1530
|
+
},
|
|
1531
|
+
}),
|
|
1532
|
+
}),
|
|
1331
1533
|
},
|
|
1332
1534
|
metadata: {
|
|
1333
|
-
|
|
1334
|
-
|
|
1535
|
+
name: 'user-management',
|
|
1536
|
+
version: '1.0.0',
|
|
1537
|
+
description: 'Complete user management with operations and events',
|
|
1335
1538
|
},
|
|
1336
1539
|
});`
|
|
1337
1540
|
})
|
|
@@ -1341,222 +1544,19 @@ export const ApiContract = defineContract({
|
|
|
1341
1544
|
className: "space-y-3",
|
|
1342
1545
|
children: [
|
|
1343
1546
|
/* @__PURE__ */ jsx6("h2", {
|
|
1344
|
-
className: "text-2xl
|
|
1345
|
-
children: "Generate
|
|
1547
|
+
className: "font-bold text-2xl",
|
|
1548
|
+
children: "Generate Type-safe Implementations"
|
|
1346
1549
|
}),
|
|
1347
1550
|
/* @__PURE__ */ jsx6("p", {
|
|
1348
1551
|
className: "text-muted-foreground text-sm",
|
|
1349
|
-
children: "Generate
|
|
1552
|
+
children: "Generate validation, types, and API handlers from your feature."
|
|
1350
1553
|
}),
|
|
1351
1554
|
/* @__PURE__ */ jsx6(CodeBlock6, {
|
|
1352
1555
|
language: "bash",
|
|
1353
|
-
filename: "generate-
|
|
1354
|
-
code:
|
|
1355
|
-
|
|
1356
|
-
--
|
|
1357
|
-
--output ./generated/clients \\
|
|
1358
|
-
--languages typescript,python,go,java,csharp
|
|
1359
|
-
|
|
1360
|
-
# Generate specific language client
|
|
1361
|
-
contractspec generate clients \\
|
|
1362
|
-
--contract ./src/contracts/api.contract.ts \\
|
|
1363
|
-
--output ./generated/clients \\
|
|
1364
|
-
--languages typescript \\
|
|
1365
|
-
--format npm-package
|
|
1366
|
-
|
|
1367
|
-
# Options
|
|
1368
|
-
# --with-types: Include TypeScript definitions
|
|
1369
|
-
# --with-tests: Generate client test suites
|
|
1370
|
-
# --with-docs: Include client documentation
|
|
1371
|
-
# --framework: Use specific HTTP client framework`
|
|
1372
|
-
})
|
|
1373
|
-
]
|
|
1374
|
-
}),
|
|
1375
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1376
|
-
className: "space-y-3",
|
|
1377
|
-
children: [
|
|
1378
|
-
/* @__PURE__ */ jsx6("h2", {
|
|
1379
|
-
className: "text-2xl font-bold",
|
|
1380
|
-
children: "Generated Client Examples"
|
|
1381
|
-
}),
|
|
1382
|
-
/* @__PURE__ */ jsx6("p", {
|
|
1383
|
-
className: "text-muted-foreground text-sm",
|
|
1384
|
-
children: "Each generated client is fully type-safe and idiomatic."
|
|
1385
|
-
}),
|
|
1386
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1387
|
-
className: "space-y-4",
|
|
1388
|
-
children: [
|
|
1389
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1390
|
-
className: "card-subtle p-4",
|
|
1391
|
-
children: [
|
|
1392
|
-
/* @__PURE__ */ jsx6("h4", {
|
|
1393
|
-
className: "text-lg font-semibold",
|
|
1394
|
-
children: "TypeScript Client"
|
|
1395
|
-
}),
|
|
1396
|
-
/* @__PURE__ */ jsx6(CodeBlock6, {
|
|
1397
|
-
language: "typescript",
|
|
1398
|
-
filename: "generated/clients/typescript/index.ts",
|
|
1399
|
-
code: `import { MyAPIClient } from './client';
|
|
1400
|
-
|
|
1401
|
-
const client = new MyAPIClient({
|
|
1402
|
-
baseUrl: 'https://api.example.com',
|
|
1403
|
-
apiKey: process.env.API_KEY,
|
|
1404
|
-
});
|
|
1405
|
-
|
|
1406
|
-
// Type-safe method calls
|
|
1407
|
-
const users = await client.getUsers({
|
|
1408
|
-
page: 1,
|
|
1409
|
-
limit: 10,
|
|
1410
|
-
});
|
|
1411
|
-
|
|
1412
|
-
const newUser = await client.createUser({
|
|
1413
|
-
email: 'user@example.com',
|
|
1414
|
-
name: 'John Doe',
|
|
1415
|
-
});
|
|
1416
|
-
|
|
1417
|
-
// Full type inference
|
|
1418
|
-
// users: GetUsersResponse
|
|
1419
|
-
// newUser: CreateUserResponse`
|
|
1420
|
-
})
|
|
1421
|
-
]
|
|
1422
|
-
}),
|
|
1423
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1424
|
-
className: "card-subtle p-4",
|
|
1425
|
-
children: [
|
|
1426
|
-
/* @__PURE__ */ jsx6("h4", {
|
|
1427
|
-
className: "text-lg font-semibold",
|
|
1428
|
-
children: "Python Client"
|
|
1429
|
-
}),
|
|
1430
|
-
/* @__PURE__ */ jsx6(CodeBlock6, {
|
|
1431
|
-
language: "python",
|
|
1432
|
-
filename: "generated/clients/python/index.py",
|
|
1433
|
-
code: `from myapi_client import MyAPIClient
|
|
1434
|
-
|
|
1435
|
-
client = MyAPIClient(
|
|
1436
|
-
base_url='https://api.example.com',
|
|
1437
|
-
api_key=os.getenv('API_KEY')
|
|
1438
|
-
)
|
|
1439
|
-
|
|
1440
|
-
# Type-safe method calls
|
|
1441
|
-
users = await client.get_users(
|
|
1442
|
-
page=1,
|
|
1443
|
-
limit=10
|
|
1444
|
-
)
|
|
1445
|
-
|
|
1446
|
-
new_user = await client.create_user(
|
|
1447
|
-
email='user@example.com',
|
|
1448
|
-
name='John Doe'
|
|
1449
|
-
)
|
|
1450
|
-
|
|
1451
|
-
# Full type hints
|
|
1452
|
-
# users: GetUsersResponse
|
|
1453
|
-
# new_user: CreateUserResponse`
|
|
1454
|
-
})
|
|
1455
|
-
]
|
|
1456
|
-
}),
|
|
1457
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1458
|
-
className: "card-subtle p-4",
|
|
1459
|
-
children: [
|
|
1460
|
-
/* @__PURE__ */ jsx6("h4", {
|
|
1461
|
-
className: "text-lg font-semibold",
|
|
1462
|
-
children: "Go Client"
|
|
1463
|
-
}),
|
|
1464
|
-
/* @__PURE__ */ jsx6(CodeBlock6, {
|
|
1465
|
-
language: "go",
|
|
1466
|
-
filename: "generated/clients/go/client.go",
|
|
1467
|
-
code: `package main
|
|
1468
|
-
|
|
1469
|
-
import (
|
|
1470
|
-
"context"
|
|
1471
|
-
"myapi_client"
|
|
1472
|
-
)
|
|
1473
|
-
|
|
1474
|
-
func main() {
|
|
1475
|
-
client := myapi_client.NewMyAPIClient(
|
|
1476
|
-
myapi_client.WithBaseURL("https://api.example.com"),
|
|
1477
|
-
myapi_client.WithAPIKey(os.Getenv("API_KEY")),
|
|
1478
|
-
)
|
|
1479
|
-
|
|
1480
|
-
// Type-safe method calls
|
|
1481
|
-
users, err := client.GetUsers(&myapi_client.GetUsersParams{
|
|
1482
|
-
Page: 1,
|
|
1483
|
-
Limit: 10,
|
|
1484
|
-
})
|
|
1485
|
-
|
|
1486
|
-
newUser, err := client.CreateUser(&myapi_client.CreateUserParams{
|
|
1487
|
-
Email: "user@example.com",
|
|
1488
|
-
Name: "John Doe",
|
|
1489
|
-
})
|
|
1490
|
-
|
|
1491
|
-
// Full type checking at compile time
|
|
1492
|
-
// users: *GetUsersResponse
|
|
1493
|
-
// newUser: *CreateUserResponse
|
|
1494
|
-
}`
|
|
1495
|
-
})
|
|
1496
|
-
]
|
|
1497
|
-
})
|
|
1498
|
-
]
|
|
1499
|
-
})
|
|
1500
|
-
]
|
|
1501
|
-
}),
|
|
1502
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1503
|
-
className: "space-y-3",
|
|
1504
|
-
children: [
|
|
1505
|
-
/* @__PURE__ */ jsx6("h2", {
|
|
1506
|
-
className: "text-2xl font-bold",
|
|
1507
|
-
children: "Advanced Features"
|
|
1508
|
-
}),
|
|
1509
|
-
/* @__PURE__ */ jsx6("p", {
|
|
1510
|
-
className: "text-muted-foreground text-sm",
|
|
1511
|
-
children: "Generated clients include enterprise-grade features out of the box."
|
|
1512
|
-
}),
|
|
1513
|
-
/* @__PURE__ */ jsx6(CodeBlock6, {
|
|
1514
|
-
language: "typescript",
|
|
1515
|
-
filename: "client-features.ts",
|
|
1516
|
-
code: `// Advanced client features
|
|
1517
|
-
const client = new MyAPIClient({
|
|
1518
|
-
baseUrl: 'https://api.example.com',
|
|
1519
|
-
apiKey: 'your-api-key',
|
|
1520
|
-
|
|
1521
|
-
// Retry configuration
|
|
1522
|
-
retryConfig: {
|
|
1523
|
-
maxRetries: 3,
|
|
1524
|
-
backoffMultiplier: 2,
|
|
1525
|
-
maxDelay: 30000,
|
|
1526
|
-
},
|
|
1527
|
-
|
|
1528
|
-
// Request/Response interceptors
|
|
1529
|
-
interceptors: {
|
|
1530
|
-
request: [(config) => {
|
|
1531
|
-
// Add authentication headers
|
|
1532
|
-
config.headers.Authorization = \`Bearer \${await getAuthToken()}\`;
|
|
1533
|
-
return config;
|
|
1534
|
-
}],
|
|
1535
|
-
response: [(response) => {
|
|
1536
|
-
// Log API calls
|
|
1537
|
-
console.log(\`API Call: \${response.config.method} \${response.config.url}\`);
|
|
1538
|
-
return response;
|
|
1539
|
-
}],
|
|
1540
|
-
},
|
|
1541
|
-
|
|
1542
|
-
// Error handling
|
|
1543
|
-
errorHandler: (error) => {
|
|
1544
|
-
if (error.status === 401) {
|
|
1545
|
-
// Refresh token and retry
|
|
1546
|
-
return refreshTokenAndRetry(error.originalRequest);
|
|
1547
|
-
}
|
|
1548
|
-
throw error;
|
|
1549
|
-
},
|
|
1550
|
-
});
|
|
1551
|
-
|
|
1552
|
-
// Automatic request deduplication
|
|
1553
|
-
const user1 = client.getUser({ id: '123' });
|
|
1554
|
-
const user2 = client.getUser({ id: '123' }); // Uses cached result
|
|
1555
|
-
|
|
1556
|
-
// Request cancellation
|
|
1557
|
-
const controller = new AbortController();
|
|
1558
|
-
const promise = client.getUsers({ page: 1, signal: controller.signal });
|
|
1559
|
-
controller.abort(); // Cancels the request`
|
|
1556
|
+
filename: "generate-from-feature",
|
|
1557
|
+
code: `contractspec generate \\
|
|
1558
|
+
--input ./src/contracts/user-management.feature.ts \\
|
|
1559
|
+
--output ./generated/user-management`
|
|
1560
1560
|
})
|
|
1561
1561
|
]
|
|
1562
1562
|
})
|
|
@@ -1566,19 +1566,19 @@ controller.abort(); // Cancels the request`
|
|
|
1566
1566
|
className: "flex items-center gap-4 pt-4",
|
|
1567
1567
|
children: [
|
|
1568
1568
|
/* @__PURE__ */ jsxs6(Link6, {
|
|
1569
|
-
href: "/docs/guides/
|
|
1569
|
+
href: "/docs/guides/spec-validation-and-typing",
|
|
1570
1570
|
className: "btn-primary",
|
|
1571
1571
|
children: [
|
|
1572
|
-
"
|
|
1572
|
+
"Type Safety Guide ",
|
|
1573
1573
|
/* @__PURE__ */ jsx6(ChevronRight6, {
|
|
1574
1574
|
size: 16
|
|
1575
1575
|
})
|
|
1576
1576
|
]
|
|
1577
1577
|
}),
|
|
1578
1578
|
/* @__PURE__ */ jsx6(Link6, {
|
|
1579
|
-
href: "/docs/intent/
|
|
1579
|
+
href: "/docs/intent/deterministic-codegen",
|
|
1580
1580
|
className: "btn-ghost",
|
|
1581
|
-
children: "
|
|
1581
|
+
children: "Deterministic Codegen"
|
|
1582
1582
|
})
|
|
1583
1583
|
]
|
|
1584
1584
|
})
|