@contractspec/bundle.library 3.8.10 → 3.8.12
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 +606 -594
- package/CHANGELOG.md +59 -0
- package/dist/application/context-storage/index.js +1 -28
- package/dist/application/index.js +13 -2133
- package/dist/application/mcp/cliMcp.js +4 -452
- package/dist/application/mcp/common.js +1 -193
- package/dist/application/mcp/contractsMcp.js +2 -549
- package/dist/application/mcp/contractsMcpResources.js +2 -123
- package/dist/application/mcp/contractsMcpTools.js +1 -199
- package/dist/application/mcp/docsMcp.catalog.js +3 -381
- package/dist/application/mcp/docsMcp.data.js +1 -147
- package/dist/application/mcp/docsMcp.js +6 -1039
- package/dist/application/mcp/docsMcp.prompts.js +6 -521
- package/dist/application/mcp/docsMcp.reference.js +3 -235
- package/dist/application/mcp/docsMcp.resources.js +3 -519
- package/dist/application/mcp/docsMcp.tools.js +3 -518
- package/dist/application/mcp/index.js +13 -2106
- package/dist/application/mcp/internalMcp.js +2 -410
- package/dist/application/mcp/normalizeMcpRequest.js +1 -21
- package/dist/application/mcp/providerRankingMcp.js +1 -530
- package/dist/bundles/LibraryBundle.js +1 -138
- package/dist/bundles/index.js +1 -138
- package/dist/components/docs/DocsIndexPage.js +2 -912
- package/dist/components/docs/advanced/AdvancedMCPPage.js +4 -271
- package/dist/components/docs/advanced/AdvancedOverlayEditorPage.js +1 -107
- package/dist/components/docs/advanced/AdvancedRenderersPage.js +2 -118
- package/dist/components/docs/advanced/AdvancedSpecExperimentsPage.js +4 -92
- package/dist/components/docs/advanced/AdvancedTelemetryPage.js +2 -373
- package/dist/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +2 -99
- package/dist/components/docs/advanced/index.js +10 -1055
- package/dist/components/docs/architecture/ArchitectureAppConfigPage.js +6 -243
- package/dist/components/docs/architecture/ArchitectureControlPlanePage.js +3 -160
- package/dist/components/docs/architecture/ArchitectureIntegrationBindingPage.js +7 -259
- package/dist/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +6 -374
- package/dist/components/docs/architecture/ArchitectureMultiTenancyPage.js +2 -166
- package/dist/components/docs/architecture/ArchitectureOverviewPage.js +1 -143
- package/dist/components/docs/architecture/index.js +20 -1340
- package/dist/components/docs/comparison/ComparisonAutomationPlatformsPage.js +1 -245
- package/dist/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +1 -230
- package/dist/components/docs/comparison/ComparisonInternalToolBuildersPage.js +1 -245
- package/dist/components/docs/comparison/ComparisonOverviewPage.js +1 -202
- package/dist/components/docs/comparison/ComparisonWindmillPage.js +1 -254
- package/dist/components/docs/comparison/ComparisonWorkflowEnginesPage.js +1 -339
- package/dist/components/docs/comparison/index.js +1 -1510
- package/dist/components/docs/docsManifest.js +1 -611
- package/dist/components/docs/docsManifest.test.d.ts +1 -0
- package/dist/components/docs/ecosystem/IntegrationsPage.js +2 -103
- package/dist/components/docs/ecosystem/PluginsPage.js +13 -179
- package/dist/components/docs/ecosystem/RegistryPage.js +7 -100
- package/dist/components/docs/ecosystem/TemplatesPage.js +3 -141
- package/dist/components/docs/ecosystem/ecosystem.docblocks.js +2 -48
- package/dist/components/docs/ecosystem/index.js +23 -569
- package/dist/components/docs/examples/DocsExamplesPage.js +4 -124
- package/dist/components/docs/examples/ExampleShowcasePage.js +4 -244
- package/dist/components/docs/examples/exampleShowcaseData.js +4 -39
- package/dist/components/docs/examples/index.js +4 -330
- package/dist/components/docs/generated/docs-index.generated.js +1 -5
- package/dist/components/docs/generated/index.js +1 -74
- package/dist/components/docs/generated/loader.js +1 -74
- package/dist/components/docs/getting-started/CLIPage.js +4 -271
- package/dist/components/docs/getting-started/CompatibilityPage.js +1 -173
- package/dist/components/docs/getting-started/DataViewTutorialPage.js +4 -134
- package/dist/components/docs/getting-started/DeveloperToolsPage.js +1 -194
- package/dist/components/docs/getting-started/HelloWorldPage.js +5 -183
- package/dist/components/docs/getting-started/InstallationPage.js +3 -154
- package/dist/components/docs/getting-started/StartHerePage.js +2 -129
- package/dist/components/docs/getting-started/TroubleshootingPage.js +2 -168
- package/dist/components/docs/getting-started/VSCodeExtensionPage.js +1 -432
- package/dist/components/docs/getting-started/getting-started.docblocks.js +4 -41
- package/dist/components/docs/getting-started/index.js +18 -1869
- package/dist/components/docs/guides/GuideCIDiffGatingPage.js +2 -196
- package/dist/components/docs/guides/GuideConnectInRepoPage.d.ts +1 -0
- package/dist/components/docs/guides/GuideConnectInRepoPage.js +44 -0
- package/dist/components/docs/guides/GuideContractTypesPage.js +6 -541
- package/dist/components/docs/guides/GuideDocsPipelinePage.js +3 -207
- package/dist/components/docs/guides/GuideFirstModuleBundlePage.d.ts +1 -0
- package/dist/components/docs/guides/GuideFirstModuleBundlePage.js +76 -0
- package/dist/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +2 -209
- package/dist/components/docs/guides/GuideHostBuilderWorkbenchPage.d.ts +1 -0
- package/dist/components/docs/guides/GuideHostBuilderWorkbenchPage.js +70 -0
- package/dist/components/docs/guides/GuideImportExistingCodebasesPage.js +8 -754
- package/dist/components/docs/guides/GuideNextjsOneEndpointPage.js +6 -268
- package/dist/components/docs/guides/GuideSpecValidationTypingPage.js +4 -196
- package/dist/components/docs/guides/GuidesIndexPage.js +2 -169
- package/dist/components/docs/guides/guides.docblocks.js +11 -75
- package/dist/components/docs/guides/index.d.ts +3 -0
- package/dist/components/docs/guides/index.js +213 -2428
- package/dist/components/docs/index.js +542 -24310
- package/dist/components/docs/integrations/IntegrationsCircuitBreakersPage.js +2 -42
- package/dist/components/docs/integrations/IntegrationsElevenLabsPage.js +3 -105
- package/dist/components/docs/integrations/IntegrationsGithubPage.js +3 -142
- package/dist/components/docs/integrations/IntegrationsGmailPage.js +3 -109
- package/dist/components/docs/integrations/IntegrationsGoogleCalendarPage.js +3 -79
- package/dist/components/docs/integrations/IntegrationsHealthRoutingPage.js +3 -146
- package/dist/components/docs/integrations/IntegrationsMistralPage.js +5 -150
- package/dist/components/docs/integrations/IntegrationsOpenAIPage.js +5 -140
- package/dist/components/docs/integrations/IntegrationsOverviewPage.js +1 -160
- package/dist/components/docs/integrations/IntegrationsPostmarkPage.js +4 -218
- package/dist/components/docs/integrations/IntegrationsPowensPage.js +4 -300
- package/dist/components/docs/integrations/IntegrationsQdrantPage.js +5 -111
- package/dist/components/docs/integrations/IntegrationsResendPage.js +3 -102
- package/dist/components/docs/integrations/IntegrationsS3Page.js +4 -124
- package/dist/components/docs/integrations/IntegrationsSlackPage.js +3 -144
- package/dist/components/docs/integrations/IntegrationsSpecModelPage.js +7 -290
- package/dist/components/docs/integrations/IntegrationsStripePage.js +6 -327
- package/dist/components/docs/integrations/IntegrationsTwilioPage.js +3 -128
- package/dist/components/docs/integrations/IntegrationsWhatsappMetaPage.js +2 -146
- package/dist/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +2 -156
- package/dist/components/docs/integrations/index.js +52 -3100
- package/dist/components/docs/intent/ContractFirstApiPage.js +2 -126
- package/dist/components/docs/intent/DeterministicCodegenPage.js +2 -148
- package/dist/components/docs/intent/GenerateClientFromSchemaPage.js +7 -207
- package/dist/components/docs/intent/OpenapiAlternativePage.js +3 -201
- package/dist/components/docs/intent/SchemaValidationTypescriptPage.js +4 -144
- package/dist/components/docs/intent/SpecDrivenDevelopmentPage.js +2 -126
- package/dist/components/docs/intent/index.js +15 -1135
- package/dist/components/docs/intent/intent-pages.docblocks.js +1 -201
- package/dist/components/docs/knowledge/KnowledgeCategoriesPage.js +6 -750
- package/dist/components/docs/knowledge/KnowledgeExamplesPage.js +4 -175
- package/dist/components/docs/knowledge/KnowledgeOverviewPage.js +1 -116
- package/dist/components/docs/knowledge/KnowledgeSourcesPage.js +8 -391
- package/dist/components/docs/knowledge/KnowledgeSpacesPage.js +6 -302
- package/dist/components/docs/knowledge/index.js +21 -1730
- package/dist/components/docs/libraries/LibrariesAccessibilityPage.js +3 -198
- package/dist/components/docs/libraries/LibrariesAiAgentPage.js +3 -141
- package/dist/components/docs/libraries/LibrariesAnalyticsPage.js +4 -80
- package/dist/components/docs/libraries/LibrariesContentGenPage.js +2 -100
- package/dist/components/docs/libraries/LibrariesContractsPage.js +2 -284
- package/dist/components/docs/libraries/LibrariesCostTrackingPage.js +3 -112
- package/dist/components/docs/libraries/LibrariesDataBackendPage.js +2 -166
- package/dist/components/docs/libraries/LibrariesDataViewsPage.js +3 -186
- package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +4 -279
- package/dist/components/docs/libraries/LibrariesEvolutionPage.js +4 -127
- package/dist/components/docs/libraries/LibrariesGraphQLPage.js +2 -173
- package/dist/components/docs/libraries/LibrariesGrowthPage.js +3 -88
- package/dist/components/docs/libraries/LibrariesMultiTenancyPage.js +3 -108
- package/dist/components/docs/libraries/LibrariesObservabilityPage.js +5 -130
- package/dist/components/docs/libraries/LibrariesOverlayEnginePage.js +4 -110
- package/dist/components/docs/libraries/LibrariesOverviewPage.js +1 -170
- package/dist/components/docs/libraries/LibrariesPersonalizationPage.js +4 -114
- package/dist/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +3 -132
- package/dist/components/docs/libraries/LibrariesResiliencePage.js +4 -120
- package/dist/components/docs/libraries/LibrariesRuntimePage.js +2 -200
- package/dist/components/docs/libraries/LibrariesSLOPage.js +3 -116
- package/dist/components/docs/libraries/LibrariesSchemaPage.js +3 -273
- package/dist/components/docs/libraries/LibrariesSupportBotPage.js +3 -134
- package/dist/components/docs/libraries/LibrariesTestingPage.js +3 -133
- package/dist/components/docs/libraries/LibrariesUIKitPage.js +2 -230
- package/dist/components/docs/libraries/LibrariesWorkflowComposerPage.js +3 -88
- package/dist/components/docs/libraries/LibrariesWorkflowsPage.js +2 -181
- package/dist/components/docs/libraries/index.js +54 -4147
- package/dist/components/docs/manifesto/ManifestoPage.js +1 -86
- package/dist/components/docs/ops/AutoEvolutionOpsPage.js +2 -132
- package/dist/components/docs/ops/DistributedTracingOpsPage.js +2 -71
- package/dist/components/docs/ops/index.js +3 -202
- package/dist/components/docs/ops/ops-lifecycle.docblocks.js +3 -38
- package/dist/components/docs/ops/ops-runbooks-a.docblocks.js +3 -94
- package/dist/components/docs/ops/ops-runbooks-b.docblocks.js +3 -76
- package/dist/components/docs/ops/ops-slo-tenant.docblocks.js +3 -76
- package/dist/components/docs/ops/ops-top.docs.js +2 -17
- package/dist/components/docs/ops/ops.docs.js +10 -302
- package/dist/components/docs/product/product.docblocks.js +5 -72
- package/dist/components/docs/reference/DocsMarkdownContent.js +2 -196
- package/dist/components/docs/reference/DocsReferenceContent.js +3 -256
- package/dist/components/docs/reference/DocsReferenceIndexClient.js +2 -127
- package/dist/components/docs/reference/DocsReferenceIndexPage.js +2 -206
- package/dist/components/docs/reference/DocsReferencePage.js +3 -265
- package/dist/components/docs/reference/docsMarkdownParser.js +2 -92
- package/dist/components/docs/reference/index.js +4 -470
- package/dist/components/docs/safety/SafetyAuditingPage.js +2 -350
- package/dist/components/docs/safety/SafetyMigrationsPage.js +2 -359
- package/dist/components/docs/safety/SafetyOverviewPage.js +1 -101
- package/dist/components/docs/safety/SafetyPDPPage.js +2 -301
- package/dist/components/docs/safety/SafetySecurityTrustPage.js +1 -206
- package/dist/components/docs/safety/SafetySigningPage.js +3 -90
- package/dist/components/docs/safety/SafetyTenantIsolationPage.js +2 -79
- package/dist/components/docs/safety/index.js +7 -1480
- package/dist/components/docs/shared/StudioPrompt.js +1 -31
- package/dist/components/docs/specs/SpecsBuilderControlPlanePage.d.ts +1 -0
- package/dist/components/docs/specs/SpecsBuilderControlPlanePage.js +34 -0
- package/dist/components/docs/specs/SpecsCapabilitiesPage.js +2 -158
- package/dist/components/docs/specs/SpecsConnectPage.d.ts +1 -0
- package/dist/components/docs/specs/SpecsConnectPage.js +8 -0
- package/dist/components/docs/specs/SpecsDataViewsPage.js +2 -260
- package/dist/components/docs/specs/SpecsModuleBundlesPage.d.ts +1 -0
- package/dist/components/docs/specs/SpecsModuleBundlesPage.js +67 -0
- package/dist/components/docs/specs/SpecsOverlaysPage.js +2 -372
- package/dist/components/docs/specs/SpecsOverviewPage.js +1 -186
- package/dist/components/docs/specs/SpecsPolicyPage.js +3 -420
- package/dist/components/docs/specs/SpecsWorkflowsPage.js +2 -325
- package/dist/components/docs/specs/index.d.ts +3 -0
- package/dist/components/docs/specs/index.js +109 -1715
- package/dist/components/docs/studio/StudioBYOKPage.js +1 -26
- package/dist/components/docs/studio/StudioDeploymentsPage.js +1 -26
- package/dist/components/docs/studio/StudioGettingStartedPage.js +1 -26
- package/dist/components/docs/studio/StudioIntegrationsPage.js +1 -26
- package/dist/components/docs/studio/StudioOverviewPage.js +1 -157
- package/dist/components/docs/studio/StudioVisualBuilderPage.js +1 -26
- package/dist/components/docs/studio/index.js +1 -282
- package/dist/components/docs/tech/contracts/tech-docs.docblocks.js +2 -19
- package/dist/components/integrations/index.js +2 -600
- package/dist/components/integrations/molecules/IntegrationCard.js +1 -100
- package/dist/components/integrations/organisms/IntegrationMarketplace.js +1 -214
- package/dist/components/integrations/organisms/IntegrationSettings.js +2 -284
- package/dist/components/integrations/organisms/KnowledgeSourceList.js +1 -103
- package/dist/components/legal/PrivacyTemplate.js +1 -1025
- package/dist/components/legal/TermsTemplate.js +1 -941
- package/dist/components/legal/index.js +1 -1963
- package/dist/components/shared/FeatureGateNotice.js +1 -38
- package/dist/components/shared/index.js +1 -38
- package/dist/components/shell/WorkspaceHeader.js +1 -100
- package/dist/components/shell/WorkspaceProjectShellLayout.js +1 -222
- package/dist/components/shell/WorkspaceShellRenderer.js +1 -228
- package/dist/components/shell/WorkspaceSidebar.js +1 -68
- package/dist/components/shell/index.js +1 -287
- package/dist/components/templates/engine/index.js +1 -39
- package/dist/components/templates/index.js +11 -965
- package/dist/components/templates/messaging/ConversationList.js +2 -83
- package/dist/components/templates/messaging/MessageComposer.js +4 -150
- package/dist/components/templates/messaging/MessageThread.js +3 -83
- package/dist/components/templates/messaging/MessagingWorkspace.js +5 -265
- package/dist/components/templates/messaging/index.js +5 -269
- package/dist/components/templates/recipes/LanguageSwitcher.js +1 -16
- package/dist/components/templates/recipes/RecipeCard.js +1 -80
- package/dist/components/templates/recipes/RecipeDetail.js +1 -74
- package/dist/components/templates/recipes/RecipeList.js +3 -245
- package/dist/components/templates/recipes/index.js +3 -248
- package/dist/components/templates/todos/FilterBar.js +1 -107
- package/dist/components/templates/todos/TaskForm.js +2 -158
- package/dist/components/templates/todos/TaskItem.js +1 -77
- package/dist/components/templates/todos/TaskList.js +5 -449
- package/dist/components/templates/todos/index.js +5 -452
- package/dist/config/contractspec-blueprint.js +1 -123
- package/dist/config/contractspec-branding.js +1 -44
- package/dist/config/contractspec-routes.js +1 -24
- package/dist/config/index.js +1 -126
- package/dist/features/contracts-registry.js +1 -178
- package/dist/features/docs/docs.contracts.js +1 -17
- package/dist/features/docs/index.js +1 -17
- package/dist/features/docs.feature.js +1 -33
- package/dist/features/index.js +1 -315
- package/dist/features/mcp.feature.js +1 -30
- package/dist/features/presentations.feature.js +1 -33
- package/dist/features/registry.js +1 -116
- package/dist/index.js +556 -28593
- package/dist/infrastructure/elysia/index.js +1 -35
- package/dist/infrastructure/elysia/logger.js +1 -35
- package/dist/infrastructure/index.js +1 -35
- package/dist/libs/email/client.js +1 -114
- package/dist/libs/email/contact.js +12 -165
- package/dist/libs/email/newsletter.js +6 -167
- package/dist/libs/email/types.js +0 -2
- package/dist/libs/email/utils.js +2 -8
- package/dist/libs/email/waitlist-application.js +28 -209
- package/dist/libs/email/waitlist.js +6 -167
- package/dist/libs/email.js +46 -363
- package/dist/libs/posthog/client.js +1 -63
- package/dist/libs/posthog/native.js +1 -23
- package/dist/libs/posthog/server.js +1 -13
- package/dist/libs/pricing-examples.js +1 -18
- package/dist/node/application/context-storage/index.js +1 -28
- package/dist/node/application/index.js +13 -2133
- package/dist/node/application/mcp/cliMcp.js +4 -452
- package/dist/node/application/mcp/common.js +1 -193
- package/dist/node/application/mcp/contractsMcp.js +2 -549
- package/dist/node/application/mcp/contractsMcpResources.js +2 -123
- package/dist/node/application/mcp/contractsMcpTools.js +1 -199
- package/dist/node/application/mcp/docsMcp.catalog.js +3 -381
- package/dist/node/application/mcp/docsMcp.data.js +1 -147
- package/dist/node/application/mcp/docsMcp.js +6 -1039
- package/dist/node/application/mcp/docsMcp.prompts.js +6 -521
- package/dist/node/application/mcp/docsMcp.reference.js +3 -235
- package/dist/node/application/mcp/docsMcp.resources.js +3 -519
- package/dist/node/application/mcp/docsMcp.tools.js +3 -518
- package/dist/node/application/mcp/index.js +13 -2106
- package/dist/node/application/mcp/internalMcp.js +2 -410
- package/dist/node/application/mcp/normalizeMcpRequest.js +1 -21
- package/dist/node/application/mcp/providerRankingMcp.js +1 -530
- package/dist/node/bundles/LibraryBundle.js +1 -138
- package/dist/node/bundles/index.js +1 -138
- package/dist/node/components/docs/DocsIndexPage.js +2 -912
- package/dist/node/components/docs/advanced/AdvancedMCPPage.js +4 -271
- package/dist/node/components/docs/advanced/AdvancedOverlayEditorPage.js +1 -107
- package/dist/node/components/docs/advanced/AdvancedRenderersPage.js +2 -118
- package/dist/node/components/docs/advanced/AdvancedSpecExperimentsPage.js +4 -92
- package/dist/node/components/docs/advanced/AdvancedTelemetryPage.js +2 -373
- package/dist/node/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +2 -99
- package/dist/node/components/docs/advanced/index.js +10 -1055
- package/dist/node/components/docs/architecture/ArchitectureAppConfigPage.js +6 -243
- package/dist/node/components/docs/architecture/ArchitectureControlPlanePage.js +3 -160
- package/dist/node/components/docs/architecture/ArchitectureIntegrationBindingPage.js +7 -259
- package/dist/node/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +6 -374
- package/dist/node/components/docs/architecture/ArchitectureMultiTenancyPage.js +2 -166
- package/dist/node/components/docs/architecture/ArchitectureOverviewPage.js +1 -143
- package/dist/node/components/docs/architecture/index.js +20 -1340
- package/dist/node/components/docs/comparison/ComparisonAutomationPlatformsPage.js +1 -245
- package/dist/node/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +1 -230
- package/dist/node/components/docs/comparison/ComparisonInternalToolBuildersPage.js +1 -245
- package/dist/node/components/docs/comparison/ComparisonOverviewPage.js +1 -202
- package/dist/node/components/docs/comparison/ComparisonWindmillPage.js +1 -254
- package/dist/node/components/docs/comparison/ComparisonWorkflowEnginesPage.js +1 -339
- package/dist/node/components/docs/comparison/index.js +1 -1510
- package/dist/node/components/docs/docsManifest.js +1 -611
- package/dist/node/components/docs/ecosystem/IntegrationsPage.js +2 -103
- package/dist/node/components/docs/ecosystem/PluginsPage.js +13 -179
- package/dist/node/components/docs/ecosystem/RegistryPage.js +7 -100
- package/dist/node/components/docs/ecosystem/TemplatesPage.js +3 -141
- package/dist/node/components/docs/ecosystem/ecosystem.docblocks.js +2 -48
- package/dist/node/components/docs/ecosystem/index.js +23 -569
- package/dist/node/components/docs/examples/DocsExamplesPage.js +4 -124
- package/dist/node/components/docs/examples/ExampleShowcasePage.js +4 -244
- package/dist/node/components/docs/examples/exampleShowcaseData.js +4 -39
- package/dist/node/components/docs/examples/index.js +4 -330
- package/dist/node/components/docs/generated/docs-index.generated.js +1 -5
- package/dist/node/components/docs/generated/index.js +1 -74
- package/dist/node/components/docs/generated/loader.js +1 -74
- package/dist/node/components/docs/getting-started/CLIPage.js +4 -271
- package/dist/node/components/docs/getting-started/CompatibilityPage.js +1 -173
- package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +4 -134
- package/dist/node/components/docs/getting-started/DeveloperToolsPage.js +1 -194
- package/dist/node/components/docs/getting-started/HelloWorldPage.js +5 -183
- package/dist/node/components/docs/getting-started/InstallationPage.js +3 -154
- package/dist/node/components/docs/getting-started/StartHerePage.js +2 -129
- package/dist/node/components/docs/getting-started/TroubleshootingPage.js +2 -168
- package/dist/node/components/docs/getting-started/VSCodeExtensionPage.js +1 -432
- package/dist/node/components/docs/getting-started/getting-started.docblocks.js +4 -41
- package/dist/node/components/docs/getting-started/index.js +18 -1869
- package/dist/node/components/docs/guides/GuideCIDiffGatingPage.js +2 -196
- package/dist/node/components/docs/guides/GuideConnectInRepoPage.js +43 -0
- package/dist/node/components/docs/guides/GuideContractTypesPage.js +6 -541
- package/dist/node/components/docs/guides/GuideDocsPipelinePage.js +3 -207
- package/dist/node/components/docs/guides/GuideFirstModuleBundlePage.js +75 -0
- package/dist/node/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +2 -209
- package/dist/node/components/docs/guides/GuideHostBuilderWorkbenchPage.js +69 -0
- package/dist/node/components/docs/guides/GuideImportExistingCodebasesPage.js +8 -754
- package/dist/node/components/docs/guides/GuideNextjsOneEndpointPage.js +6 -268
- package/dist/node/components/docs/guides/GuideSpecValidationTypingPage.js +4 -196
- package/dist/node/components/docs/guides/GuidesIndexPage.js +2 -169
- package/dist/node/components/docs/guides/guides.docblocks.js +11 -75
- package/dist/node/components/docs/guides/index.js +213 -2428
- package/dist/node/components/docs/index.js +542 -24310
- package/dist/node/components/docs/integrations/IntegrationsCircuitBreakersPage.js +2 -42
- package/dist/node/components/docs/integrations/IntegrationsElevenLabsPage.js +3 -105
- package/dist/node/components/docs/integrations/IntegrationsGithubPage.js +3 -142
- package/dist/node/components/docs/integrations/IntegrationsGmailPage.js +3 -109
- package/dist/node/components/docs/integrations/IntegrationsGoogleCalendarPage.js +3 -79
- package/dist/node/components/docs/integrations/IntegrationsHealthRoutingPage.js +3 -146
- package/dist/node/components/docs/integrations/IntegrationsMistralPage.js +5 -150
- package/dist/node/components/docs/integrations/IntegrationsOpenAIPage.js +5 -140
- package/dist/node/components/docs/integrations/IntegrationsOverviewPage.js +1 -160
- package/dist/node/components/docs/integrations/IntegrationsPostmarkPage.js +4 -218
- package/dist/node/components/docs/integrations/IntegrationsPowensPage.js +4 -300
- package/dist/node/components/docs/integrations/IntegrationsQdrantPage.js +5 -111
- package/dist/node/components/docs/integrations/IntegrationsResendPage.js +3 -102
- package/dist/node/components/docs/integrations/IntegrationsS3Page.js +4 -124
- package/dist/node/components/docs/integrations/IntegrationsSlackPage.js +3 -144
- package/dist/node/components/docs/integrations/IntegrationsSpecModelPage.js +7 -290
- package/dist/node/components/docs/integrations/IntegrationsStripePage.js +6 -327
- package/dist/node/components/docs/integrations/IntegrationsTwilioPage.js +3 -128
- package/dist/node/components/docs/integrations/IntegrationsWhatsappMetaPage.js +2 -146
- package/dist/node/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +2 -156
- package/dist/node/components/docs/integrations/index.js +52 -3100
- package/dist/node/components/docs/intent/ContractFirstApiPage.js +2 -126
- package/dist/node/components/docs/intent/DeterministicCodegenPage.js +2 -148
- package/dist/node/components/docs/intent/GenerateClientFromSchemaPage.js +7 -207
- package/dist/node/components/docs/intent/OpenapiAlternativePage.js +3 -201
- package/dist/node/components/docs/intent/SchemaValidationTypescriptPage.js +4 -144
- package/dist/node/components/docs/intent/SpecDrivenDevelopmentPage.js +2 -126
- package/dist/node/components/docs/intent/index.js +15 -1135
- package/dist/node/components/docs/intent/intent-pages.docblocks.js +1 -201
- package/dist/node/components/docs/knowledge/KnowledgeCategoriesPage.js +6 -750
- package/dist/node/components/docs/knowledge/KnowledgeExamplesPage.js +4 -175
- package/dist/node/components/docs/knowledge/KnowledgeOverviewPage.js +1 -116
- package/dist/node/components/docs/knowledge/KnowledgeSourcesPage.js +8 -391
- package/dist/node/components/docs/knowledge/KnowledgeSpacesPage.js +6 -302
- package/dist/node/components/docs/knowledge/index.js +21 -1730
- package/dist/node/components/docs/libraries/LibrariesAccessibilityPage.js +3 -198
- package/dist/node/components/docs/libraries/LibrariesAiAgentPage.js +3 -141
- package/dist/node/components/docs/libraries/LibrariesAnalyticsPage.js +4 -80
- package/dist/node/components/docs/libraries/LibrariesContentGenPage.js +2 -100
- package/dist/node/components/docs/libraries/LibrariesContractsPage.js +2 -284
- package/dist/node/components/docs/libraries/LibrariesCostTrackingPage.js +3 -112
- package/dist/node/components/docs/libraries/LibrariesDataBackendPage.js +2 -166
- package/dist/node/components/docs/libraries/LibrariesDataViewsPage.js +3 -186
- package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +4 -279
- package/dist/node/components/docs/libraries/LibrariesEvolutionPage.js +4 -127
- package/dist/node/components/docs/libraries/LibrariesGraphQLPage.js +2 -173
- package/dist/node/components/docs/libraries/LibrariesGrowthPage.js +3 -88
- package/dist/node/components/docs/libraries/LibrariesMultiTenancyPage.js +3 -108
- package/dist/node/components/docs/libraries/LibrariesObservabilityPage.js +5 -130
- package/dist/node/components/docs/libraries/LibrariesOverlayEnginePage.js +4 -110
- package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +1 -170
- package/dist/node/components/docs/libraries/LibrariesPersonalizationPage.js +4 -114
- package/dist/node/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +3 -132
- package/dist/node/components/docs/libraries/LibrariesResiliencePage.js +4 -120
- package/dist/node/components/docs/libraries/LibrariesRuntimePage.js +2 -200
- package/dist/node/components/docs/libraries/LibrariesSLOPage.js +3 -116
- package/dist/node/components/docs/libraries/LibrariesSchemaPage.js +3 -273
- package/dist/node/components/docs/libraries/LibrariesSupportBotPage.js +3 -134
- package/dist/node/components/docs/libraries/LibrariesTestingPage.js +3 -133
- package/dist/node/components/docs/libraries/LibrariesUIKitPage.js +2 -230
- package/dist/node/components/docs/libraries/LibrariesWorkflowComposerPage.js +3 -88
- package/dist/node/components/docs/libraries/LibrariesWorkflowsPage.js +2 -181
- package/dist/node/components/docs/libraries/index.js +54 -4147
- package/dist/node/components/docs/manifesto/ManifestoPage.js +1 -86
- package/dist/node/components/docs/ops/AutoEvolutionOpsPage.js +2 -132
- package/dist/node/components/docs/ops/DistributedTracingOpsPage.js +2 -71
- package/dist/node/components/docs/ops/index.js +3 -202
- package/dist/node/components/docs/ops/ops-lifecycle.docblocks.js +3 -38
- package/dist/node/components/docs/ops/ops-runbooks-a.docblocks.js +3 -94
- package/dist/node/components/docs/ops/ops-runbooks-b.docblocks.js +3 -76
- package/dist/node/components/docs/ops/ops-slo-tenant.docblocks.js +3 -76
- package/dist/node/components/docs/ops/ops-top.docs.js +2 -17
- package/dist/node/components/docs/ops/ops.docs.js +10 -302
- package/dist/node/components/docs/product/product.docblocks.js +5 -72
- package/dist/node/components/docs/reference/DocsMarkdownContent.js +2 -196
- package/dist/node/components/docs/reference/DocsReferenceContent.js +3 -256
- package/dist/node/components/docs/reference/DocsReferenceIndexClient.js +2 -127
- package/dist/node/components/docs/reference/DocsReferenceIndexPage.js +2 -206
- package/dist/node/components/docs/reference/DocsReferencePage.js +3 -265
- package/dist/node/components/docs/reference/docsMarkdownParser.js +2 -92
- package/dist/node/components/docs/reference/index.js +4 -470
- package/dist/node/components/docs/safety/SafetyAuditingPage.js +2 -350
- package/dist/node/components/docs/safety/SafetyMigrationsPage.js +2 -359
- package/dist/node/components/docs/safety/SafetyOverviewPage.js +1 -101
- package/dist/node/components/docs/safety/SafetyPDPPage.js +2 -301
- package/dist/node/components/docs/safety/SafetySecurityTrustPage.js +1 -206
- package/dist/node/components/docs/safety/SafetySigningPage.js +3 -90
- package/dist/node/components/docs/safety/SafetyTenantIsolationPage.js +2 -79
- package/dist/node/components/docs/safety/index.js +7 -1480
- package/dist/node/components/docs/shared/StudioPrompt.js +1 -31
- package/dist/node/components/docs/specs/SpecsBuilderControlPlanePage.js +33 -0
- package/dist/node/components/docs/specs/SpecsCapabilitiesPage.js +2 -158
- package/dist/node/components/docs/specs/SpecsConnectPage.js +7 -0
- package/dist/node/components/docs/specs/SpecsDataViewsPage.js +2 -260
- package/dist/node/components/docs/specs/SpecsModuleBundlesPage.js +66 -0
- package/dist/node/components/docs/specs/SpecsOverlaysPage.js +2 -372
- package/dist/node/components/docs/specs/SpecsOverviewPage.js +1 -186
- package/dist/node/components/docs/specs/SpecsPolicyPage.js +3 -420
- package/dist/node/components/docs/specs/SpecsWorkflowsPage.js +2 -325
- package/dist/node/components/docs/specs/index.js +109 -1715
- package/dist/node/components/docs/studio/StudioBYOKPage.js +1 -26
- package/dist/node/components/docs/studio/StudioDeploymentsPage.js +1 -26
- package/dist/node/components/docs/studio/StudioGettingStartedPage.js +1 -26
- package/dist/node/components/docs/studio/StudioIntegrationsPage.js +1 -26
- package/dist/node/components/docs/studio/StudioOverviewPage.js +1 -157
- package/dist/node/components/docs/studio/StudioVisualBuilderPage.js +1 -26
- package/dist/node/components/docs/studio/index.js +1 -282
- package/dist/node/components/docs/tech/contracts/tech-docs.docblocks.js +2 -19
- package/dist/node/components/integrations/index.js +2 -600
- package/dist/node/components/integrations/molecules/IntegrationCard.js +1 -100
- package/dist/node/components/integrations/organisms/IntegrationMarketplace.js +1 -214
- package/dist/node/components/integrations/organisms/IntegrationSettings.js +2 -284
- package/dist/node/components/integrations/organisms/KnowledgeSourceList.js +1 -103
- package/dist/node/components/legal/PrivacyTemplate.js +1 -1025
- package/dist/node/components/legal/TermsTemplate.js +1 -941
- package/dist/node/components/legal/index.js +1 -1963
- package/dist/node/components/shared/FeatureGateNotice.js +1 -38
- package/dist/node/components/shared/index.js +1 -38
- package/dist/node/components/shell/WorkspaceHeader.js +1 -100
- package/dist/node/components/shell/WorkspaceProjectShellLayout.js +1 -222
- package/dist/node/components/shell/WorkspaceShellRenderer.js +1 -228
- package/dist/node/components/shell/WorkspaceSidebar.js +1 -68
- package/dist/node/components/shell/index.js +1 -287
- package/dist/node/components/templates/engine/index.js +1 -39
- package/dist/node/components/templates/index.js +11 -965
- package/dist/node/components/templates/messaging/ConversationList.js +2 -83
- package/dist/node/components/templates/messaging/MessageComposer.js +4 -150
- package/dist/node/components/templates/messaging/MessageThread.js +3 -83
- package/dist/node/components/templates/messaging/MessagingWorkspace.js +5 -265
- package/dist/node/components/templates/messaging/index.js +5 -269
- package/dist/node/components/templates/recipes/LanguageSwitcher.js +1 -16
- package/dist/node/components/templates/recipes/RecipeCard.js +1 -80
- package/dist/node/components/templates/recipes/RecipeDetail.js +1 -74
- package/dist/node/components/templates/recipes/RecipeList.js +3 -245
- package/dist/node/components/templates/recipes/index.js +3 -248
- package/dist/node/components/templates/todos/FilterBar.js +1 -107
- package/dist/node/components/templates/todos/TaskForm.js +2 -158
- package/dist/node/components/templates/todos/TaskItem.js +1 -77
- package/dist/node/components/templates/todos/TaskList.js +5 -449
- package/dist/node/components/templates/todos/index.js +5 -452
- package/dist/node/config/contractspec-blueprint.js +1 -123
- package/dist/node/config/contractspec-branding.js +1 -44
- package/dist/node/config/contractspec-routes.js +1 -24
- package/dist/node/config/index.js +1 -126
- package/dist/node/features/contracts-registry.js +1 -178
- package/dist/node/features/docs/docs.contracts.js +1 -17
- package/dist/node/features/docs/index.js +1 -17
- package/dist/node/features/docs.feature.js +1 -33
- package/dist/node/features/index.js +1 -315
- package/dist/node/features/mcp.feature.js +1 -30
- package/dist/node/features/presentations.feature.js +1 -33
- package/dist/node/features/registry.js +1 -116
- package/dist/node/index.js +556 -28593
- package/dist/node/infrastructure/elysia/index.js +1 -35
- package/dist/node/infrastructure/elysia/logger.js +1 -35
- package/dist/node/infrastructure/index.js +1 -35
- package/dist/node/libs/email/client.js +1 -114
- package/dist/node/libs/email/contact.js +12 -165
- package/dist/node/libs/email/newsletter.js +6 -167
- package/dist/node/libs/email/types.js +0 -2
- package/dist/node/libs/email/utils.js +2 -8
- package/dist/node/libs/email/waitlist-application.js +28 -209
- package/dist/node/libs/email/waitlist.js +6 -167
- package/dist/node/libs/email.js +46 -363
- package/dist/node/libs/posthog/client.js +1 -63
- package/dist/node/libs/posthog/native.js +1 -23
- package/dist/node/libs/posthog/server.js +1 -13
- package/dist/node/libs/pricing-examples.js +1 -18
- package/dist/node/presentation/features/atoms/FeatureIcon/FeatureIcon.js +1 -97
- package/dist/node/presentation/features/atoms/FeatureIcon/index.js +1 -97
- package/dist/node/presentation/features/atoms/index.js +1 -97
- package/dist/node/presentation/features/hooks/index.js +1 -397
- package/dist/node/presentation/features/hooks/useContractsRegistry.js +1 -289
- package/dist/node/presentation/features/hooks/useFeatureFilters.js +1 -75
- package/dist/node/presentation/features/hooks/useFeatureRegistry.js +1 -147
- package/dist/node/presentation/features/hooks/useRelatedDocs.js +1 -28
- package/dist/node/presentation/features/index.js +1 -3063
- package/dist/node/presentation/features/molecules/FeatureCard/FeatureCard.js +1 -366
- package/dist/node/presentation/features/molecules/FeatureCard/index.js +1 -366
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +1 -50
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/index.js +1 -50
- package/dist/node/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -92
- package/dist/node/presentation/features/molecules/FeatureFilters/index.js +1 -92
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +1 -176
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/index.js +1 -176
- package/dist/node/presentation/features/molecules/index.js +1 -505
- package/dist/node/presentation/features/organisms/FeatureDataViewsList.js +1 -304
- package/dist/node/presentation/features/organisms/FeatureDetail/FeatureDetail.js +1 -154
- package/dist/node/presentation/features/organisms/FeatureDetail/index.js +1 -154
- package/dist/node/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +1 -909
- package/dist/node/presentation/features/organisms/FeatureDiscovery/index.js +1 -909
- package/dist/node/presentation/features/organisms/FeatureEventsList.js +1 -302
- package/dist/node/presentation/features/organisms/FeatureFormsList.js +1 -302
- package/dist/node/presentation/features/organisms/FeatureOperationsList.js +1 -180
- package/dist/node/presentation/features/organisms/FeaturePresentationsList.js +1 -304
- package/dist/node/presentation/features/organisms/index.js +1 -1359
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +1 -332
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +1 -332
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +1 -342
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/index.js +1 -342
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +1 -303
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/index.js +1 -303
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +1 -340
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/index.js +1 -340
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +1 -329
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/index.js +1 -329
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +1 -340
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/index.js +1 -340
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +1 -302
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/index.js +1 -302
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +1 -218
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/index.js +1 -218
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +1 -187
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/index.js +1 -187
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +1 -306
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +1 -306
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +1 -342
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/index.js +1 -342
- package/dist/presentation/features/atoms/FeatureIcon/FeatureIcon.js +1 -97
- package/dist/presentation/features/atoms/FeatureIcon/index.js +1 -97
- package/dist/presentation/features/atoms/index.js +1 -97
- package/dist/presentation/features/hooks/index.js +1 -397
- package/dist/presentation/features/hooks/useContractsRegistry.js +1 -289
- package/dist/presentation/features/hooks/useFeatureFilters.js +1 -75
- package/dist/presentation/features/hooks/useFeatureRegistry.js +1 -147
- package/dist/presentation/features/hooks/useRelatedDocs.js +1 -28
- package/dist/presentation/features/index.js +1 -3063
- package/dist/presentation/features/molecules/FeatureCard/FeatureCard.js +1 -366
- package/dist/presentation/features/molecules/FeatureCard/index.js +1 -366
- package/dist/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +1 -50
- package/dist/presentation/features/molecules/FeatureCategoryHeader/index.js +1 -50
- package/dist/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -92
- package/dist/presentation/features/molecules/FeatureFilters/index.js +1 -92
- package/dist/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +1 -176
- package/dist/presentation/features/molecules/FeatureHoverPreview/index.js +1 -176
- package/dist/presentation/features/molecules/index.js +1 -505
- package/dist/presentation/features/organisms/FeatureDataViewsList.js +1 -304
- package/dist/presentation/features/organisms/FeatureDetail/FeatureDetail.js +1 -154
- package/dist/presentation/features/organisms/FeatureDetail/index.js +1 -154
- package/dist/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +1 -909
- package/dist/presentation/features/organisms/FeatureDiscovery/index.js +1 -909
- package/dist/presentation/features/organisms/FeatureEventsList.js +1 -302
- package/dist/presentation/features/organisms/FeatureFormsList.js +1 -302
- package/dist/presentation/features/organisms/FeatureOperationsList.js +1 -180
- package/dist/presentation/features/organisms/FeaturePresentationsList.js +1 -304
- package/dist/presentation/features/organisms/index.js +1 -1359
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +1 -332
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +1 -332
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +1 -342
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/index.js +1 -342
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +1 -303
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/index.js +1 -303
- package/dist/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +1 -340
- package/dist/presentation/features/templates/FeatureEventsTemplate/index.js +1 -340
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +1 -329
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/index.js +1 -329
- package/dist/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +1 -340
- package/dist/presentation/features/templates/FeatureFormsTemplate/index.js +1 -340
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +1 -302
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/index.js +1 -302
- package/dist/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +1 -218
- package/dist/presentation/features/templates/FeatureOperationsTemplate/index.js +1 -218
- package/dist/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +1 -187
- package/dist/presentation/features/templates/FeatureOverviewTemplate/index.js +1 -187
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +1 -306
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +1 -306
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +1 -342
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/index.js +1 -342
- package/package.json +103 -31
- package/src/components/docs/DocsIndexPage.tsx +55 -0
- package/src/components/docs/architecture/ArchitectureControlPlanePage.tsx +19 -0
- package/src/components/docs/architecture/ArchitectureOverviewPage.tsx +34 -0
- package/src/components/docs/docsManifest.test.ts +70 -0
- package/src/components/docs/docsManifest.ts +71 -1
- package/src/components/docs/ecosystem/PluginsPage.tsx +24 -10
- package/src/components/docs/ecosystem/RegistryPage.tsx +11 -6
- package/src/components/docs/generated/docs-index._common.json +206 -273
- package/src/components/docs/generated/docs-index.control-plane.json +18 -0
- package/src/components/docs/generated/docs-index.defineExample.json +10 -0
- package/src/components/docs/generated/docs-index.manifest.json +22 -12
- package/src/components/docs/generated/docs-index.platform-acp.json +64 -0
- package/src/components/docs/generated/docs-index.platform-agent.json +89 -1
- package/src/components/docs/generated/docs-index.platform-context.json +48 -0
- package/src/components/docs/generated/docs-index.platform-control-plane.json +72 -0
- package/src/components/docs/generated/docs-index.platform-database.json +40 -0
- package/src/components/docs/generated/docs-index.platform-docs.json +64 -0
- package/src/components/docs/generated/docs-index.platform-provider-ranking.json +89 -1
- package/src/components/docs/generated/docs-index.pocket-family-office.json +8 -0
- package/src/components/docs/generated/docs-index.unknown.json +8 -0
- package/src/components/docs/guides/GuideConnectInRepoPage.tsx +184 -0
- package/src/components/docs/guides/GuideFirstModuleBundlePage.tsx +182 -0
- package/src/components/docs/guides/GuideHostBuilderWorkbenchPage.tsx +230 -0
- package/src/components/docs/guides/GuidesIndexPage.tsx +21 -0
- package/src/components/docs/guides/index.ts +3 -0
- package/src/components/docs/specs/SpecsBuilderControlPlanePage.tsx +210 -0
- package/src/components/docs/specs/SpecsConnectPage.tsx +162 -0
- package/src/components/docs/specs/SpecsModuleBundlesPage.tsx +223 -0
- package/src/components/docs/specs/SpecsOverlaysPage.tsx +20 -0
- package/src/components/docs/specs/SpecsOverviewPage.tsx +44 -0
- package/src/components/docs/specs/index.ts +3 -0
- package/src/components/docs/studio/StudioOverviewPage.tsx +26 -0
- package/src/infrastructure/elysia/logger.ts +11 -3
|
@@ -1,115 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import Link from "@contractspec/lib.ui-link";
|
|
3
|
-
import { ChevronRight } from "lucide-react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
function AdvancedMCPPage() {
|
|
6
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
7
|
-
className: "space-y-8",
|
|
8
|
-
children: [
|
|
9
|
-
/* @__PURE__ */ jsxs("div", {
|
|
10
|
-
className: "space-y-4",
|
|
11
|
-
children: [
|
|
12
|
-
/* @__PURE__ */ jsx("h1", {
|
|
13
|
-
className: "font-bold text-4xl",
|
|
14
|
-
children: "MCP Adapters"
|
|
15
|
-
}),
|
|
16
|
-
/* @__PURE__ */ jsxs("p", {
|
|
17
|
-
className: "text-muted-foreground",
|
|
18
|
-
children: [
|
|
19
|
-
"The ",
|
|
20
|
-
/* @__PURE__ */ jsx("strong", {
|
|
21
|
-
children: "Model Context Protocol (MCP)"
|
|
22
|
-
}),
|
|
23
|
-
" is an open standard for connecting AI models to external tools and data sources. ContractSpec provides MCP adapters that allow you to expose your capabilities as MCP tools and consume external MCP servers as capabilities."
|
|
24
|
-
]
|
|
25
|
-
})
|
|
26
|
-
]
|
|
27
|
-
}),
|
|
28
|
-
/* @__PURE__ */ jsxs("div", {
|
|
29
|
-
className: "space-y-4",
|
|
30
|
-
children: [
|
|
31
|
-
/* @__PURE__ */ jsx("h2", {
|
|
32
|
-
className: "font-bold text-2xl",
|
|
33
|
-
children: "Why MCP integration matters"
|
|
34
|
-
}),
|
|
35
|
-
/* @__PURE__ */ jsx("p", {
|
|
36
|
-
className: "text-muted-foreground",
|
|
37
|
-
children: "AI agents need access to real-world tools and data to be useful. MCP provides a standardized way to expose these capabilities. By integrating ContractSpec with MCP, you can:"
|
|
38
|
-
}),
|
|
39
|
-
/* @__PURE__ */ jsxs("ul", {
|
|
40
|
-
className: "list-inside list-disc space-y-2 text-muted-foreground",
|
|
41
|
-
children: [
|
|
42
|
-
/* @__PURE__ */ jsx("li", {
|
|
43
|
-
children: "Let AI agents invoke your ContractSpec capabilities safely and securely"
|
|
44
|
-
}),
|
|
45
|
-
/* @__PURE__ */ jsx("li", {
|
|
46
|
-
children: "Use external MCP servers (databases, APIs, search engines) as capability providers in your workflows"
|
|
47
|
-
}),
|
|
48
|
-
/* @__PURE__ */ jsx("li", {
|
|
49
|
-
children: "Build AI-powered features without writing custom integration code"
|
|
50
|
-
}),
|
|
51
|
-
/* @__PURE__ */ jsx("li", {
|
|
52
|
-
children: "Enforce policies on AI agent actions just like any other user"
|
|
53
|
-
})
|
|
54
|
-
]
|
|
55
|
-
})
|
|
56
|
-
]
|
|
57
|
-
}),
|
|
58
|
-
/* @__PURE__ */ jsxs("div", {
|
|
59
|
-
className: "space-y-4",
|
|
60
|
-
children: [
|
|
61
|
-
/* @__PURE__ */ jsx("h2", {
|
|
62
|
-
className: "font-bold text-2xl",
|
|
63
|
-
children: "Exposing capabilities as MCP tools"
|
|
64
|
-
}),
|
|
65
|
-
/* @__PURE__ */ jsxs("p", {
|
|
66
|
-
className: "text-muted-foreground",
|
|
67
|
-
children: [
|
|
68
|
-
"Any",
|
|
69
|
-
" ",
|
|
70
|
-
/* @__PURE__ */ jsx(Link, {
|
|
71
|
-
href: "/docs/specs/capabilities",
|
|
72
|
-
className: "text-violet-400 hover:text-violet-300",
|
|
73
|
-
children: "CapabilitySpec"
|
|
74
|
-
}),
|
|
75
|
-
" ",
|
|
76
|
-
"can be automatically exposed as an MCP tool. ContractSpec generates:"
|
|
77
|
-
]
|
|
78
|
-
}),
|
|
79
|
-
/* @__PURE__ */ jsxs("ul", {
|
|
80
|
-
className: "list-inside list-disc space-y-2 text-muted-foreground",
|
|
81
|
-
children: [
|
|
82
|
-
/* @__PURE__ */ jsx("li", {
|
|
83
|
-
children: "A tool schema describing the capability's inputs, outputs, and purpose"
|
|
84
|
-
}),
|
|
85
|
-
/* @__PURE__ */ jsx("li", {
|
|
86
|
-
children: "An MCP server endpoint that AI agents can connect to"
|
|
87
|
-
}),
|
|
88
|
-
/* @__PURE__ */ jsx("li", {
|
|
89
|
-
children: "Policy enforcement ensuring agents can only invoke capabilities they're authorized to use"
|
|
90
|
-
}),
|
|
91
|
-
/* @__PURE__ */ jsx("li", {
|
|
92
|
-
children: "Audit logging of all agent actions for compliance and debugging"
|
|
93
|
-
})
|
|
94
|
-
]
|
|
95
|
-
})
|
|
96
|
-
]
|
|
97
|
-
}),
|
|
98
|
-
/* @__PURE__ */ jsxs("div", {
|
|
99
|
-
className: "space-y-4",
|
|
100
|
-
children: [
|
|
101
|
-
/* @__PURE__ */ jsx("h2", {
|
|
102
|
-
className: "font-bold text-2xl",
|
|
103
|
-
children: "Example: Exposing a capability"
|
|
104
|
-
}),
|
|
105
|
-
/* @__PURE__ */ jsx("p", {
|
|
106
|
-
className: "text-muted-foreground",
|
|
107
|
-
children: "Here's how to expose ContractSpec operations as MCP tools:"
|
|
108
|
-
}),
|
|
109
|
-
/* @__PURE__ */ jsx("div", {
|
|
110
|
-
className: "overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",
|
|
111
|
-
children: /* @__PURE__ */ jsx("pre", {
|
|
112
|
-
children: `import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
1
|
+
import m from"@contractspec/lib.ui-link";import{ChevronRight as v}from"lucide-react";import{jsx as t,jsxs as r}from"react/jsx-runtime";function k(){return r("div",{className:"space-y-8",children:[r("div",{className:"space-y-4",children:[t("h1",{className:"font-bold text-4xl",children:"MCP Adapters"}),r("p",{className:"text-muted-foreground",children:["The ",t("strong",{children:"Model Context Protocol (MCP)"})," is an open standard for connecting AI models to external tools and data sources. ContractSpec provides MCP adapters that allow you to expose your capabilities as MCP tools and consume external MCP servers as capabilities."]})]}),r("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Why MCP integration matters"}),t("p",{className:"text-muted-foreground",children:"AI agents need access to real-world tools and data to be useful. MCP provides a standardized way to expose these capabilities. By integrating ContractSpec with MCP, you can:"}),r("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[t("li",{children:"Let AI agents invoke your ContractSpec capabilities safely and securely"}),t("li",{children:"Use external MCP servers (databases, APIs, search engines) as capability providers in your workflows"}),t("li",{children:"Build AI-powered features without writing custom integration code"}),t("li",{children:"Enforce policies on AI agent actions just like any other user"})]})]}),r("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Exposing capabilities as MCP tools"}),r("p",{className:"text-muted-foreground",children:["Any"," ",t(m,{href:"/docs/specs/capabilities",className:"text-violet-400 hover:text-violet-300",children:"CapabilitySpec"})," ","can be automatically exposed as an MCP tool. ContractSpec generates:"]}),r("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[t("li",{children:"A tool schema describing the capability's inputs, outputs, and purpose"}),t("li",{children:"An MCP server endpoint that AI agents can connect to"}),t("li",{children:"Policy enforcement ensuring agents can only invoke capabilities they're authorized to use"}),t("li",{children:"Audit logging of all agent actions for compliance and debugging"})]})]}),r("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Example: Exposing a capability"}),t("p",{className:"text-muted-foreground",children:"Here's how to expose ContractSpec operations as MCP tools:"}),t("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:t("pre",{children:`import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
113
2
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
114
3
|
import { createMcpServer } from '@contractspec/lib.contracts-runtime-server-mcp/provider-mcp';
|
|
115
4
|
import { registry, resources, prompts } from './lib/registry';
|
|
@@ -126,30 +15,7 @@ createMcpServer(server, registry, resources, prompts, {
|
|
|
126
15
|
});
|
|
127
16
|
|
|
128
17
|
const transport = new StdioServerTransport();
|
|
129
|
-
await server.connect(transport);`
|
|
130
|
-
})
|
|
131
|
-
}),
|
|
132
|
-
/* @__PURE__ */ jsx("p", {
|
|
133
|
-
className: "text-muted-foreground",
|
|
134
|
-
children: "AI agents can now discover and invoke your operations through the MCP protocol. ContractSpec handles authentication, authorization, and execution automatically via the `OperationSpecRegistry`."
|
|
135
|
-
})
|
|
136
|
-
]
|
|
137
|
-
}),
|
|
138
|
-
/* @__PURE__ */ jsxs("div", {
|
|
139
|
-
className: "space-y-4",
|
|
140
|
-
children: [
|
|
141
|
-
/* @__PURE__ */ jsx("h2", {
|
|
142
|
-
className: "font-bold text-2xl",
|
|
143
|
-
children: "Consuming external MCP servers"
|
|
144
|
-
}),
|
|
145
|
-
/* @__PURE__ */ jsx("p", {
|
|
146
|
-
className: "text-muted-foreground",
|
|
147
|
-
children: "You can integrate external MCP servers into your workflows. Define an integration spec and use it in your operations:"
|
|
148
|
-
}),
|
|
149
|
-
/* @__PURE__ */ jsx("div", {
|
|
150
|
-
className: "overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",
|
|
151
|
-
children: /* @__PURE__ */ jsx("pre", {
|
|
152
|
-
children: `import { defineIntegration } from '@contractspec/lib.contracts-integrations';
|
|
18
|
+
await server.connect(transport);`})}),t("p",{className:"text-muted-foreground",children:"AI agents can now discover and invoke your operations through the MCP protocol. ContractSpec handles authentication, authorization, and execution automatically via the `OperationSpecRegistry`."})]}),r("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Consuming external MCP servers"}),t("p",{className:"text-muted-foreground",children:"You can integrate external MCP servers into your workflows. Define an integration spec and use it in your operations:"}),t("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:t("pre",{children:`import { defineIntegration } from '@contractspec/lib.contracts-integrations';
|
|
153
19
|
import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
154
20
|
|
|
155
21
|
const SearchProductsIntegration = defineIntegration({
|
|
@@ -178,35 +44,7 @@ const SearchProductsIntegration = defineIntegration({
|
|
|
178
44
|
},
|
|
179
45
|
}),
|
|
180
46
|
},
|
|
181
|
-
});`
|
|
182
|
-
})
|
|
183
|
-
})
|
|
184
|
-
]
|
|
185
|
-
}),
|
|
186
|
-
/* @__PURE__ */ jsxs("div", {
|
|
187
|
-
className: "space-y-4",
|
|
188
|
-
children: [
|
|
189
|
-
/* @__PURE__ */ jsx("h2", {
|
|
190
|
-
className: "font-bold text-2xl",
|
|
191
|
-
children: "Policy enforcement for AI agents"
|
|
192
|
-
}),
|
|
193
|
-
/* @__PURE__ */ jsxs("p", {
|
|
194
|
-
className: "text-muted-foreground",
|
|
195
|
-
children: [
|
|
196
|
-
"AI agents are treated like any other actor in ContractSpec. They must authenticate, and all their actions are subject to",
|
|
197
|
-
" ",
|
|
198
|
-
/* @__PURE__ */ jsx(Link, {
|
|
199
|
-
href: "/docs/specs/policy",
|
|
200
|
-
className: "text-violet-400 hover:text-violet-300",
|
|
201
|
-
children: "PolicySpecs"
|
|
202
|
-
}),
|
|
203
|
-
". You can define specific policies in TypeScript:"
|
|
204
|
-
]
|
|
205
|
-
}),
|
|
206
|
-
/* @__PURE__ */ jsx("div", {
|
|
207
|
-
className: "overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",
|
|
208
|
-
children: /* @__PURE__ */ jsx("pre", {
|
|
209
|
-
children: `import { definePolicy } from '@contractspec/lib.contracts-spec';
|
|
47
|
+
});`})})]}),r("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Policy enforcement for AI agents"}),r("p",{className:"text-muted-foreground",children:["AI agents are treated like any other actor in ContractSpec. They must authenticate, and all their actions are subject to"," ",t(m,{href:"/docs/specs/policy",className:"text-violet-400 hover:text-violet-300",children:"PolicySpecs"}),". You can define specific policies in TypeScript:"]}),t("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:t("pre",{children:`import { definePolicy } from '@contractspec/lib.contracts-spec';
|
|
210
48
|
|
|
211
49
|
export const AIAgentRestrictions = definePolicy({
|
|
212
50
|
meta: {
|
|
@@ -229,273 +67,7 @@ export const AIAgentRestrictions = definePolicy({
|
|
|
229
67
|
!ctx.approvalGranted,
|
|
230
68
|
},
|
|
231
69
|
],
|
|
232
|
-
});`
|
|
233
|
-
})
|
|
234
|
-
})
|
|
235
|
-
]
|
|
236
|
-
}),
|
|
237
|
-
/* @__PURE__ */ jsxs("div", {
|
|
238
|
-
className: "space-y-4",
|
|
239
|
-
children: [
|
|
240
|
-
/* @__PURE__ */ jsx("h2", {
|
|
241
|
-
className: "font-bold text-2xl",
|
|
242
|
-
children: "Human-in-the-loop workflows"
|
|
243
|
-
}),
|
|
244
|
-
/* @__PURE__ */ jsx("p", {
|
|
245
|
-
className: "text-muted-foreground",
|
|
246
|
-
children: "For sensitive operations, you can require human approval before an AI agent can proceed. ContractSpec provides built-in approval workflows:"
|
|
247
|
-
}),
|
|
248
|
-
/* @__PURE__ */ jsxs("ul", {
|
|
249
|
-
className: "list-inside list-disc space-y-2 text-muted-foreground",
|
|
250
|
-
children: [
|
|
251
|
-
/* @__PURE__ */ jsx("li", {
|
|
252
|
-
children: "Agent requests permission to invoke a capability"
|
|
253
|
-
}),
|
|
254
|
-
/* @__PURE__ */ jsx("li", {
|
|
255
|
-
children: "Request is sent to designated approvers (via email, Slack, etc.)"
|
|
256
|
-
}),
|
|
257
|
-
/* @__PURE__ */ jsx("li", {
|
|
258
|
-
children: "Approver reviews the request and approves or denies it"
|
|
259
|
-
}),
|
|
260
|
-
/* @__PURE__ */ jsx("li", {
|
|
261
|
-
children: "Agent receives the decision and can proceed if approved"
|
|
262
|
-
})
|
|
263
|
-
]
|
|
264
|
-
}),
|
|
265
|
-
/* @__PURE__ */ jsxs("p", {
|
|
266
|
-
className: "text-muted-foreground",
|
|
267
|
-
children: [
|
|
268
|
-
"All approval decisions are logged in the",
|
|
269
|
-
" ",
|
|
270
|
-
/* @__PURE__ */ jsx(Link, {
|
|
271
|
-
href: "/docs/safety/auditing",
|
|
272
|
-
className: "text-violet-400 hover:text-violet-300",
|
|
273
|
-
children: "audit log"
|
|
274
|
-
}),
|
|
275
|
-
"."
|
|
276
|
-
]
|
|
277
|
-
})
|
|
278
|
-
]
|
|
279
|
-
}),
|
|
280
|
-
/* @__PURE__ */ jsxs("div", {
|
|
281
|
-
className: "space-y-4",
|
|
282
|
-
children: [
|
|
283
|
-
/* @__PURE__ */ jsx("h2", {
|
|
284
|
-
className: "font-bold text-2xl",
|
|
285
|
-
children: "Best practices"
|
|
286
|
-
}),
|
|
287
|
-
/* @__PURE__ */ jsxs("ul", {
|
|
288
|
-
className: "list-inside list-disc space-y-2 text-muted-foreground",
|
|
289
|
-
children: [
|
|
290
|
-
/* @__PURE__ */ jsx("li", {
|
|
291
|
-
children: "Start with read-only capabilities for AI agents—only grant write access when necessary."
|
|
292
|
-
}),
|
|
293
|
-
/* @__PURE__ */ jsx("li", {
|
|
294
|
-
children: "Use human-in-the-loop approval for any capability that modifies critical data or triggers financial transactions."
|
|
295
|
-
}),
|
|
296
|
-
/* @__PURE__ */ jsx("li", {
|
|
297
|
-
children: "Set rate limits to prevent runaway agents from overwhelming your system."
|
|
298
|
-
}),
|
|
299
|
-
/* @__PURE__ */ jsx("li", {
|
|
300
|
-
children: "Provide clear, detailed descriptions for each capability so agents know when to use them."
|
|
301
|
-
}),
|
|
302
|
-
/* @__PURE__ */ jsx("li", {
|
|
303
|
-
children: "Monitor agent actions closely in production and adjust policies as needed."
|
|
304
|
-
}),
|
|
305
|
-
/* @__PURE__ */ jsx("li", {
|
|
306
|
-
children: "Test agent integrations thoroughly with realistic scenarios before deploying."
|
|
307
|
-
})
|
|
308
|
-
]
|
|
309
|
-
})
|
|
310
|
-
]
|
|
311
|
-
}),
|
|
312
|
-
/* @__PURE__ */ jsxs("div", {
|
|
313
|
-
className: "flex items-center gap-4 pt-4",
|
|
314
|
-
children: [
|
|
315
|
-
/* @__PURE__ */ jsx(Link, {
|
|
316
|
-
href: "/docs/advanced/renderers",
|
|
317
|
-
className: "btn-ghost",
|
|
318
|
-
children: "Previous: Custom Renderers"
|
|
319
|
-
}),
|
|
320
|
-
/* @__PURE__ */ jsxs(Link, {
|
|
321
|
-
href: "/docs/advanced/telemetry",
|
|
322
|
-
className: "btn-primary",
|
|
323
|
-
children: [
|
|
324
|
-
"Next: Telemetry ",
|
|
325
|
-
/* @__PURE__ */ jsx(ChevronRight, {
|
|
326
|
-
size: 16
|
|
327
|
-
})
|
|
328
|
-
]
|
|
329
|
-
})
|
|
330
|
-
]
|
|
331
|
-
})
|
|
332
|
-
]
|
|
333
|
-
});
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
// src/components/docs/advanced/AdvancedOverlayEditorPage.tsx
|
|
337
|
-
import Link2 from "@contractspec/lib.ui-link";
|
|
338
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
339
|
-
function AdvancedOverlayEditorPage() {
|
|
340
|
-
return /* @__PURE__ */ jsxs2("div", {
|
|
341
|
-
className: "space-y-8",
|
|
342
|
-
children: [
|
|
343
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
344
|
-
className: "space-y-4",
|
|
345
|
-
children: [
|
|
346
|
-
/* @__PURE__ */ jsx2("h1", {
|
|
347
|
-
className: "font-bold text-4xl",
|
|
348
|
-
children: "Overlay Editor"
|
|
349
|
-
}),
|
|
350
|
-
/* @__PURE__ */ jsx2("p", {
|
|
351
|
-
className: "text-lg text-muted-foreground",
|
|
352
|
-
children: "A Next.js app (`@contractspec/app.overlay-editor`) that lets tenant admins tweak field visibility, labels, and ordering, then sign OverlaySpecs."
|
|
353
|
-
})
|
|
354
|
-
]
|
|
355
|
-
}),
|
|
356
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
357
|
-
className: "space-y-4",
|
|
358
|
-
children: [
|
|
359
|
-
/* @__PURE__ */ jsx2("h2", {
|
|
360
|
-
className: "font-bold text-2xl",
|
|
361
|
-
children: "Features"
|
|
362
|
-
}),
|
|
363
|
-
/* @__PURE__ */ jsxs2("ul", {
|
|
364
|
-
className: "list-disc space-y-2 pl-6",
|
|
365
|
-
children: [
|
|
366
|
-
/* @__PURE__ */ jsx2("li", {
|
|
367
|
-
children: "Toggle visibility and rename labels without touching code."
|
|
368
|
-
}),
|
|
369
|
-
/* @__PURE__ */ jsx2("li", {
|
|
370
|
-
children: "Move fields up/down to define the overlay order."
|
|
371
|
-
}),
|
|
372
|
-
/* @__PURE__ */ jsx2("li", {
|
|
373
|
-
children: "Preview JSON output powered by `@contractspec/lib.overlay-engine`."
|
|
374
|
-
}),
|
|
375
|
-
/* @__PURE__ */ jsx2("li", {
|
|
376
|
-
children: "Server action for PEM signing (Ed25519/RSA-PSS)."
|
|
377
|
-
})
|
|
378
|
-
]
|
|
379
|
-
}),
|
|
380
|
-
/* @__PURE__ */ jsxs2("p", {
|
|
381
|
-
children: [
|
|
382
|
-
"Project path: ",
|
|
383
|
-
/* @__PURE__ */ jsx2("code", {
|
|
384
|
-
children: "packages/apps/overlay-editor"
|
|
385
|
-
})
|
|
386
|
-
]
|
|
387
|
-
})
|
|
388
|
-
]
|
|
389
|
-
}),
|
|
390
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
391
|
-
className: "space-y-4",
|
|
392
|
-
children: [
|
|
393
|
-
/* @__PURE__ */ jsx2("h2", {
|
|
394
|
-
className: "font-bold text-2xl",
|
|
395
|
-
children: "Provisioning flow"
|
|
396
|
-
}),
|
|
397
|
-
/* @__PURE__ */ jsxs2("ol", {
|
|
398
|
-
className: "list-decimal space-y-2 pl-6",
|
|
399
|
-
children: [
|
|
400
|
-
/* @__PURE__ */ jsxs2("li", {
|
|
401
|
-
children: [
|
|
402
|
-
"Clone the repo and run ",
|
|
403
|
-
/* @__PURE__ */ jsx2("code", {
|
|
404
|
-
children: "bun dev"
|
|
405
|
-
}),
|
|
406
|
-
" inside the app."
|
|
407
|
-
]
|
|
408
|
-
}),
|
|
409
|
-
/* @__PURE__ */ jsx2("li", {
|
|
410
|
-
children: "Use the UI to craft the overlay for a tenant."
|
|
411
|
-
}),
|
|
412
|
-
/* @__PURE__ */ jsx2("li", {
|
|
413
|
-
children: "Paste the tenant's PEM private key (stored in Vault/KMS)."
|
|
414
|
-
}),
|
|
415
|
-
/* @__PURE__ */ jsx2("li", {
|
|
416
|
-
children: "Click “Sign overlay” to get the final JSON payload."
|
|
417
|
-
}),
|
|
418
|
-
/* @__PURE__ */ jsx2("li", {
|
|
419
|
-
children: "Persist in the `Overlay` table and register with `OverlayRegistry`."
|
|
420
|
-
})
|
|
421
|
-
]
|
|
422
|
-
}),
|
|
423
|
-
/* @__PURE__ */ jsxs2("p", {
|
|
424
|
-
children: [
|
|
425
|
-
"See also:",
|
|
426
|
-
" ",
|
|
427
|
-
/* @__PURE__ */ jsx2(Link2, {
|
|
428
|
-
href: "/docs/ops/tenant-customization",
|
|
429
|
-
className: "text-violet-400 underline",
|
|
430
|
-
children: "Tenant customization runbook"
|
|
431
|
-
}),
|
|
432
|
-
"."
|
|
433
|
-
]
|
|
434
|
-
})
|
|
435
|
-
]
|
|
436
|
-
})
|
|
437
|
-
]
|
|
438
|
-
});
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
// src/components/docs/advanced/AdvancedRenderersPage.tsx
|
|
442
|
-
import Link3 from "@contractspec/lib.ui-link";
|
|
443
|
-
import { ChevronRight as ChevronRight2 } from "lucide-react";
|
|
444
|
-
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
445
|
-
function AdvancedRenderersPage() {
|
|
446
|
-
return /* @__PURE__ */ jsxs3("div", {
|
|
447
|
-
className: "space-y-8",
|
|
448
|
-
children: [
|
|
449
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
450
|
-
className: "space-y-2",
|
|
451
|
-
children: [
|
|
452
|
-
/* @__PURE__ */ jsx3("h1", {
|
|
453
|
-
className: "font-bold text-4xl",
|
|
454
|
-
children: "Custom Renderers"
|
|
455
|
-
}),
|
|
456
|
-
/* @__PURE__ */ jsx3("p", {
|
|
457
|
-
className: "text-lg text-muted-foreground",
|
|
458
|
-
children: "ContractSpec ships with React and React Native renderers. You can build custom renderers for any framework."
|
|
459
|
-
})
|
|
460
|
-
]
|
|
461
|
-
}),
|
|
462
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
463
|
-
className: "space-y-6",
|
|
464
|
-
children: [
|
|
465
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
466
|
-
className: "space-y-3",
|
|
467
|
-
children: [
|
|
468
|
-
/* @__PURE__ */ jsx3("h2", {
|
|
469
|
-
className: "font-bold text-2xl",
|
|
470
|
-
children: "Overview"
|
|
471
|
-
}),
|
|
472
|
-
/* @__PURE__ */ jsxs3("p", {
|
|
473
|
-
className: "text-muted-foreground",
|
|
474
|
-
children: [
|
|
475
|
-
"The presentation runtime libraries (",
|
|
476
|
-
/* @__PURE__ */ jsx3("code", {
|
|
477
|
-
children: "@contractspec/lib.presentation-runtime-react"
|
|
478
|
-
}),
|
|
479
|
-
" and",
|
|
480
|
-
/* @__PURE__ */ jsx3("code", {
|
|
481
|
-
children: "@contractspec/lib.presentation-runtime-react-native"
|
|
482
|
-
}),
|
|
483
|
-
") provide hooks and components to render ContractSpec-defined UI like workflows and data views. You can extend these or create custom implementations for other frameworks."
|
|
484
|
-
]
|
|
485
|
-
})
|
|
486
|
-
]
|
|
487
|
-
}),
|
|
488
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
489
|
-
className: "space-y-3",
|
|
490
|
-
children: [
|
|
491
|
-
/* @__PURE__ */ jsx3("h2", {
|
|
492
|
-
className: "font-bold text-2xl",
|
|
493
|
-
children: "Using the React Renderer"
|
|
494
|
-
}),
|
|
495
|
-
/* @__PURE__ */ jsx3("div", {
|
|
496
|
-
className: "overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",
|
|
497
|
-
children: /* @__PURE__ */ jsx3("pre", {
|
|
498
|
-
children: `import { useWorkflow, WorkflowStepRenderer } from '@contractspec/lib.presentation-runtime-react';
|
|
70
|
+
});`})})]}),r("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Human-in-the-loop workflows"}),t("p",{className:"text-muted-foreground",children:"For sensitive operations, you can require human approval before an AI agent can proceed. ContractSpec provides built-in approval workflows:"}),r("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[t("li",{children:"Agent requests permission to invoke a capability"}),t("li",{children:"Request is sent to designated approvers (via email, Slack, etc.)"}),t("li",{children:"Approver reviews the request and approves or denies it"}),t("li",{children:"Agent receives the decision and can proceed if approved"})]}),r("p",{className:"text-muted-foreground",children:["All approval decisions are logged in the"," ",t(m,{href:"/docs/safety/auditing",className:"text-violet-400 hover:text-violet-300",children:"audit log"}),"."]})]}),r("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Best practices"}),r("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[t("li",{children:"Start with read-only capabilities for AI agents—only grant write access when necessary."}),t("li",{children:"Use human-in-the-loop approval for any capability that modifies critical data or triggers financial transactions."}),t("li",{children:"Set rate limits to prevent runaway agents from overwhelming your system."}),t("li",{children:"Provide clear, detailed descriptions for each capability so agents know when to use them."}),t("li",{children:"Monitor agent actions closely in production and adjust policies as needed."}),t("li",{children:"Test agent integrations thoroughly with realistic scenarios before deploying."})]})]}),r("div",{className:"flex items-center gap-4 pt-4",children:[t(m,{href:"/docs/advanced/renderers",className:"btn-ghost",children:"Previous: Custom Renderers"}),r(m,{href:"/docs/advanced/telemetry",className:"btn-primary",children:["Next: Telemetry ",t(v,{size:16})]})]})]})}import f from"@contractspec/lib.ui-link";import{jsx as a,jsxs as c}from"react/jsx-runtime";function A(){return c("div",{className:"space-y-8",children:[c("div",{className:"space-y-4",children:[a("h1",{className:"font-bold text-4xl",children:"Overlay Editor"}),a("p",{className:"text-lg text-muted-foreground",children:"A Next.js app (`@contractspec/app.overlay-editor`) that lets tenant admins tweak field visibility, labels, and ordering, then sign OverlaySpecs."})]}),c("div",{className:"space-y-4",children:[a("h2",{className:"font-bold text-2xl",children:"Features"}),c("ul",{className:"list-disc space-y-2 pl-6",children:[a("li",{children:"Toggle visibility and rename labels without touching code."}),a("li",{children:"Move fields up/down to define the overlay order."}),a("li",{children:"Preview JSON output powered by `@contractspec/lib.overlay-engine`."}),a("li",{children:"Server action for PEM signing (Ed25519/RSA-PSS)."})]}),c("p",{children:["Project path: ",a("code",{children:"packages/apps/overlay-editor"})]})]}),c("div",{className:"space-y-4",children:[a("h2",{className:"font-bold text-2xl",children:"Provisioning flow"}),c("ol",{className:"list-decimal space-y-2 pl-6",children:[c("li",{children:["Clone the repo and run ",a("code",{children:"bun dev"})," inside the app."]}),a("li",{children:"Use the UI to craft the overlay for a tenant."}),a("li",{children:"Paste the tenant's PEM private key (stored in Vault/KMS)."}),a("li",{children:"Click “Sign overlay” to get the final JSON payload."}),a("li",{children:"Persist in the `Overlay` table and register with `OverlayRegistry`."})]}),c("p",{children:["See also:"," ",a(f,{href:"/docs/ops/tenant-customization",className:"text-violet-400 underline",children:"Tenant customization runbook"}),"."]})]})]})}import h from"@contractspec/lib.ui-link";import{ChevronRight as y}from"lucide-react";import{jsx as i,jsxs as s}from"react/jsx-runtime";function E(){return s("div",{className:"space-y-8",children:[s("div",{className:"space-y-2",children:[i("h1",{className:"font-bold text-4xl",children:"Custom Renderers"}),i("p",{className:"text-lg text-muted-foreground",children:"ContractSpec ships with React and React Native renderers. You can build custom renderers for any framework."})]}),s("div",{className:"space-y-6",children:[s("div",{className:"space-y-3",children:[i("h2",{className:"font-bold text-2xl",children:"Overview"}),s("p",{className:"text-muted-foreground",children:["The presentation runtime libraries (",i("code",{children:"@contractspec/lib.presentation-runtime-react"})," and",i("code",{children:"@contractspec/lib.presentation-runtime-react-native"}),") provide hooks and components to render ContractSpec-defined UI like workflows and data views. You can extend these or create custom implementations for other frameworks."]})]}),s("div",{className:"space-y-3",children:[i("h2",{className:"font-bold text-2xl",children:"Using the React Renderer"}),i("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:i("pre",{children:`import { useWorkflow, WorkflowStepRenderer } from '@contractspec/lib.presentation-runtime-react';
|
|
499
71
|
import { MyWorkflowSpec } from './specs';
|
|
500
72
|
|
|
501
73
|
export function WorkflowPage() {
|
|
@@ -510,93 +82,7 @@ export function WorkflowPage() {
|
|
|
510
82
|
</button>
|
|
511
83
|
</div>
|
|
512
84
|
);
|
|
513
|
-
}`
|
|
514
|
-
})
|
|
515
|
-
})
|
|
516
|
-
]
|
|
517
|
-
}),
|
|
518
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
519
|
-
className: "space-y-3",
|
|
520
|
-
children: [
|
|
521
|
-
/* @__PURE__ */ jsx3("h2", {
|
|
522
|
-
className: "font-bold text-2xl",
|
|
523
|
-
children: "Custom Platform Support"
|
|
524
|
-
}),
|
|
525
|
-
/* @__PURE__ */ jsx3("p", {
|
|
526
|
-
className: "text-muted-foreground",
|
|
527
|
-
children: "To support a new platform (e.g., Vue, Svelte), you would:"
|
|
528
|
-
}),
|
|
529
|
-
/* @__PURE__ */ jsxs3("ol", {
|
|
530
|
-
className: "list-inside list-decimal space-y-2 text-muted-foreground",
|
|
531
|
-
children: [
|
|
532
|
-
/* @__PURE__ */ jsxs3("li", {
|
|
533
|
-
children: [
|
|
534
|
-
"Implement the core workflow state machine (from",
|
|
535
|
-
" ",
|
|
536
|
-
/* @__PURE__ */ jsx3("code", {
|
|
537
|
-
children: "@contractspec/lib.presentation-runtime-core"
|
|
538
|
-
}),
|
|
539
|
-
")"
|
|
540
|
-
]
|
|
541
|
-
}),
|
|
542
|
-
/* @__PURE__ */ jsx3("li", {
|
|
543
|
-
children: "Create framework-specific hooks/components for step rendering"
|
|
544
|
-
}),
|
|
545
|
-
/* @__PURE__ */ jsx3("li", {
|
|
546
|
-
children: "Handle validation and submission via the ContractSpec I/O schemas"
|
|
547
|
-
})
|
|
548
|
-
]
|
|
549
|
-
})
|
|
550
|
-
]
|
|
551
|
-
}),
|
|
552
|
-
/* @__PURE__ */ jsx3("div", {
|
|
553
|
-
className: "flex items-center gap-4 pt-4",
|
|
554
|
-
children: /* @__PURE__ */ jsxs3(Link3, {
|
|
555
|
-
href: "/docs",
|
|
556
|
-
className: "btn-primary",
|
|
557
|
-
children: [
|
|
558
|
-
"Back to docs ",
|
|
559
|
-
/* @__PURE__ */ jsx3(ChevronRight2, {
|
|
560
|
-
size: 16
|
|
561
|
-
})
|
|
562
|
-
]
|
|
563
|
-
})
|
|
564
|
-
})
|
|
565
|
-
]
|
|
566
|
-
})
|
|
567
|
-
]
|
|
568
|
-
});
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
// src/components/docs/advanced/AdvancedSpecExperimentsPage.tsx
|
|
572
|
-
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
573
|
-
function AdvancedSpecExperimentsPage() {
|
|
574
|
-
return /* @__PURE__ */ jsxs4("div", {
|
|
575
|
-
className: "space-y-8",
|
|
576
|
-
children: [
|
|
577
|
-
/* @__PURE__ */ jsxs4("div", {
|
|
578
|
-
className: "space-y-4",
|
|
579
|
-
children: [
|
|
580
|
-
/* @__PURE__ */ jsx4("h1", {
|
|
581
|
-
className: "font-bold text-4xl",
|
|
582
|
-
children: "Spec Experiments"
|
|
583
|
-
}),
|
|
584
|
-
/* @__PURE__ */ jsx4("p", {
|
|
585
|
-
className: "text-lg text-muted-foreground",
|
|
586
|
-
children: "Run controlled experiments on ContractSpec operations, gradually shift traffic, and roll back automatically when guardrails trip."
|
|
587
|
-
})
|
|
588
|
-
]
|
|
589
|
-
}),
|
|
590
|
-
/* @__PURE__ */ jsxs4("div", {
|
|
591
|
-
className: "space-y-3",
|
|
592
|
-
children: [
|
|
593
|
-
/* @__PURE__ */ jsx4("h2", {
|
|
594
|
-
className: "font-bold text-2xl",
|
|
595
|
-
children: "Define control + variants"
|
|
596
|
-
}),
|
|
597
|
-
/* @__PURE__ */ jsx4("pre", {
|
|
598
|
-
className: "rounded-lg border bg-muted p-4 text-sm",
|
|
599
|
-
children: `import { SpecExperimentRegistry } from '@contractspec/lib.growth/spec-experiments';
|
|
85
|
+
}`})})]}),s("div",{className:"space-y-3",children:[i("h2",{className:"font-bold text-2xl",children:"Custom Platform Support"}),i("p",{className:"text-muted-foreground",children:"To support a new platform (e.g., Vue, Svelte), you would:"}),s("ol",{className:"list-inside list-decimal space-y-2 text-muted-foreground",children:[s("li",{children:["Implement the core workflow state machine (from"," ",i("code",{children:"@contractspec/lib.presentation-runtime-core"}),")"]}),i("li",{children:"Create framework-specific hooks/components for step rendering"}),i("li",{children:"Handle validation and submission via the ContractSpec I/O schemas"})]})]}),i("div",{className:"flex items-center gap-4 pt-4",children:s(h,{href:"/docs",className:"btn-primary",children:["Back to docs ",i(y,{size:16})]})})]})]})}import{jsx as l,jsxs as p}from"react/jsx-runtime";function q(){return p("div",{className:"space-y-8",children:[p("div",{className:"space-y-4",children:[l("h1",{className:"font-bold text-4xl",children:"Spec Experiments"}),l("p",{className:"text-lg text-muted-foreground",children:"Run controlled experiments on ContractSpec operations, gradually shift traffic, and roll back automatically when guardrails trip."})]}),p("div",{className:"space-y-3",children:[l("h2",{className:"font-bold text-2xl",children:"Define control + variants"}),l("pre",{className:"rounded-lg border bg-muted p-4 text-sm",children:`import { SpecExperimentRegistry } from '@contractspec/lib.growth/spec-experiments';
|
|
600
86
|
|
|
601
87
|
const registry = new SpecExperimentRegistry().register({
|
|
602
88
|
target: { name: 'billing.createInvoice', version: 4 },
|
|
@@ -616,38 +102,12 @@ const registry = new SpecExperimentRegistry().register({
|
|
|
616
102
|
],
|
|
617
103
|
rolloutStages: [0.01, 0.1, 0.5, 1],
|
|
618
104
|
guardrails: { errorRateThreshold: 0.02, latencyP99ThresholdMs: 500 },
|
|
619
|
-
});`
|
|
620
|
-
})
|
|
621
|
-
]
|
|
622
|
-
}),
|
|
623
|
-
/* @__PURE__ */ jsxs4("div", {
|
|
624
|
-
className: "space-y-3",
|
|
625
|
-
children: [
|
|
626
|
-
/* @__PURE__ */ jsx4("h2", {
|
|
627
|
-
className: "font-bold text-2xl",
|
|
628
|
-
children: "Attach to runtime"
|
|
629
|
-
}),
|
|
630
|
-
/* @__PURE__ */ jsx4("pre", {
|
|
631
|
-
className: "rounded-lg border bg-muted p-4 text-sm",
|
|
632
|
-
children: `import { createSpecVariantResolver } from '@contractspec/lib.growth/spec-experiments';
|
|
105
|
+
});`})]}),p("div",{className:"space-y-3",children:[l("h2",{className:"font-bold text-2xl",children:"Attach to runtime"}),l("pre",{className:"rounded-lg border bg-muted p-4 text-sm",children:`import { createSpecVariantResolver } from '@contractspec/lib.growth/spec-experiments';
|
|
633
106
|
|
|
634
107
|
adapterContext.specVariantResolver = createSpecVariantResolver({
|
|
635
108
|
adapter,
|
|
636
109
|
resolveUserId: (ctx) => ctx.userId ?? ctx.organizationId ?? 'anon',
|
|
637
|
-
});`
|
|
638
|
-
})
|
|
639
|
-
]
|
|
640
|
-
}),
|
|
641
|
-
/* @__PURE__ */ jsxs4("div", {
|
|
642
|
-
className: "space-y-3",
|
|
643
|
-
children: [
|
|
644
|
-
/* @__PURE__ */ jsx4("h2", {
|
|
645
|
-
className: "font-bold text-2xl",
|
|
646
|
-
children: "Track outcomes + auto-rollback"
|
|
647
|
-
}),
|
|
648
|
-
/* @__PURE__ */ jsx4("pre", {
|
|
649
|
-
className: "rounded-lg border bg-muted p-4 text-sm",
|
|
650
|
-
children: `import {
|
|
110
|
+
});`})]}),p("div",{className:"space-y-3",children:[l("h2",{className:"font-bold text-2xl",children:"Track outcomes + auto-rollback"}),l("pre",{className:"rounded-lg border bg-muted p-4 text-sm",children:`import {
|
|
651
111
|
SpecExperimentAnalyzer,
|
|
652
112
|
SpecExperimentController,
|
|
653
113
|
} from '@contractspec/lib.growth/spec-experiments';
|
|
@@ -657,148 +117,7 @@ const controller = new SpecExperimentController({
|
|
|
657
117
|
registry,
|
|
658
118
|
analyzer,
|
|
659
119
|
onRollback: (target, evaluation) => notifyOps(target, evaluation.reasons),
|
|
660
|
-
});`
|
|
661
|
-
})
|
|
662
|
-
]
|
|
663
|
-
}),
|
|
664
|
-
/* @__PURE__ */ jsx4("div", {
|
|
665
|
-
className: "grid gap-4 md:grid-cols-2",
|
|
666
|
-
children: [
|
|
667
|
-
{
|
|
668
|
-
title: "Deterministic bucketing",
|
|
669
|
-
description: "ExperimentRunner reuses the same hashing logic as growth experiments—every user sticks to a variant."
|
|
670
|
-
},
|
|
671
|
-
{
|
|
672
|
-
title: "Multi-stage rollouts",
|
|
673
|
-
description: "Use `rolloutStages` to shift 1% → 10% → 50% → 100%. Guardrails trigger rollbacks automatically."
|
|
674
|
-
}
|
|
675
|
-
].map((card) => /* @__PURE__ */ jsxs4("div", {
|
|
676
|
-
className: "card-subtle space-y-2 p-4",
|
|
677
|
-
children: [
|
|
678
|
-
/* @__PURE__ */ jsx4("h3", {
|
|
679
|
-
className: "font-semibold text-lg",
|
|
680
|
-
children: card.title
|
|
681
|
-
}),
|
|
682
|
-
/* @__PURE__ */ jsx4("p", {
|
|
683
|
-
className: "text-muted-foreground text-sm",
|
|
684
|
-
children: card.description
|
|
685
|
-
})
|
|
686
|
-
]
|
|
687
|
-
}, card.title))
|
|
688
|
-
})
|
|
689
|
-
]
|
|
690
|
-
});
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
// src/components/docs/advanced/AdvancedTelemetryPage.tsx
|
|
694
|
-
import Link4 from "@contractspec/lib.ui-link";
|
|
695
|
-
import { ChevronRight as ChevronRight3 } from "lucide-react";
|
|
696
|
-
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
697
|
-
function AdvancedTelemetryPage() {
|
|
698
|
-
return /* @__PURE__ */ jsxs5("div", {
|
|
699
|
-
className: "space-y-8",
|
|
700
|
-
children: [
|
|
701
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
702
|
-
className: "space-y-4",
|
|
703
|
-
children: [
|
|
704
|
-
/* @__PURE__ */ jsx5("h1", {
|
|
705
|
-
className: "font-bold text-4xl",
|
|
706
|
-
children: "Telemetry"
|
|
707
|
-
}),
|
|
708
|
-
/* @__PURE__ */ jsxs5("p", {
|
|
709
|
-
className: "text-muted-foreground",
|
|
710
|
-
children: [
|
|
711
|
-
"A ",
|
|
712
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
713
|
-
children: "TelemetrySpec"
|
|
714
|
-
}),
|
|
715
|
-
" defines what metrics, logs, and traces to collect for observability. ContractSpec automatically instruments your application based on these specs, ensuring you have the visibility you need to monitor, debug, and optimize your system."
|
|
716
|
-
]
|
|
717
|
-
})
|
|
718
|
-
]
|
|
719
|
-
}),
|
|
720
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
721
|
-
className: "space-y-4",
|
|
722
|
-
children: [
|
|
723
|
-
/* @__PURE__ */ jsx5("h2", {
|
|
724
|
-
className: "font-bold text-2xl",
|
|
725
|
-
children: "Why telemetry matters"
|
|
726
|
-
}),
|
|
727
|
-
/* @__PURE__ */ jsx5("p", {
|
|
728
|
-
className: "text-muted-foreground",
|
|
729
|
-
children: "You can't fix what you can't see. Telemetry provides visibility into how your application is performing, where errors are occurring, and how users are interacting with your system. Without proper instrumentation, you're flying blind in production."
|
|
730
|
-
}),
|
|
731
|
-
/* @__PURE__ */ jsx5("p", {
|
|
732
|
-
className: "text-muted-foreground",
|
|
733
|
-
children: "ContractSpec takes a spec-first approach to telemetry: you declare what you want to observe, and runtime adapters instrument operations automatically. This ensures consistent, comprehensive coverage without manual effort."
|
|
734
|
-
})
|
|
735
|
-
]
|
|
736
|
-
}),
|
|
737
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
738
|
-
className: "space-y-4",
|
|
739
|
-
children: [
|
|
740
|
-
/* @__PURE__ */ jsx5("h2", {
|
|
741
|
-
className: "font-bold text-2xl",
|
|
742
|
-
children: "Three pillars of observability"
|
|
743
|
-
}),
|
|
744
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
745
|
-
className: "space-y-3",
|
|
746
|
-
children: [
|
|
747
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
748
|
-
children: [
|
|
749
|
-
/* @__PURE__ */ jsx5("h3", {
|
|
750
|
-
className: "font-semibold text-lg",
|
|
751
|
-
children: "Metrics"
|
|
752
|
-
}),
|
|
753
|
-
/* @__PURE__ */ jsx5("p", {
|
|
754
|
-
className: "text-muted-foreground",
|
|
755
|
-
children: "Numerical measurements collected over time. Examples: request count, error rate, latency percentiles, active users, queue depth. Metrics are cheap to collect and store, making them ideal for high-level monitoring and alerting."
|
|
756
|
-
})
|
|
757
|
-
]
|
|
758
|
-
}),
|
|
759
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
760
|
-
children: [
|
|
761
|
-
/* @__PURE__ */ jsx5("h3", {
|
|
762
|
-
className: "font-semibold text-lg",
|
|
763
|
-
children: "Logs"
|
|
764
|
-
}),
|
|
765
|
-
/* @__PURE__ */ jsx5("p", {
|
|
766
|
-
className: "text-muted-foreground",
|
|
767
|
-
children: 'Timestamped text records of events. Examples: "User 123 logged in", "Payment failed for order 456", "Database connection pool exhausted". Logs provide detailed context for debugging specific issues.'
|
|
768
|
-
})
|
|
769
|
-
]
|
|
770
|
-
}),
|
|
771
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
772
|
-
children: [
|
|
773
|
-
/* @__PURE__ */ jsx5("h3", {
|
|
774
|
-
className: "font-semibold text-lg",
|
|
775
|
-
children: "Traces"
|
|
776
|
-
}),
|
|
777
|
-
/* @__PURE__ */ jsx5("p", {
|
|
778
|
-
className: "text-muted-foreground",
|
|
779
|
-
children: "Records of requests as they flow through your system. A trace shows the complete path of a request—which services it touched, how long each step took, and where errors occurred. Traces are essential for debugging distributed systems."
|
|
780
|
-
})
|
|
781
|
-
]
|
|
782
|
-
})
|
|
783
|
-
]
|
|
784
|
-
})
|
|
785
|
-
]
|
|
786
|
-
}),
|
|
787
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
788
|
-
className: "space-y-4",
|
|
789
|
-
children: [
|
|
790
|
-
/* @__PURE__ */ jsx5("h2", {
|
|
791
|
-
className: "font-bold text-2xl",
|
|
792
|
-
children: "Example TelemetrySpec"
|
|
793
|
-
}),
|
|
794
|
-
/* @__PURE__ */ jsx5("p", {
|
|
795
|
-
className: "text-muted-foreground",
|
|
796
|
-
children: "Here's how telemetry is configured in TypeScript:"
|
|
797
|
-
}),
|
|
798
|
-
/* @__PURE__ */ jsx5("div", {
|
|
799
|
-
className: "overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",
|
|
800
|
-
children: /* @__PURE__ */ jsx5("pre", {
|
|
801
|
-
children: `import { defineTelemetry } from '@contractspec/lib.contracts-spec/telemetry';
|
|
120
|
+
});`})]}),l("div",{className:"grid gap-4 md:grid-cols-2",children:[{title:"Deterministic bucketing",description:"ExperimentRunner reuses the same hashing logic as growth experiments—every user sticks to a variant."},{title:"Multi-stage rollouts",description:"Use `rolloutStages` to shift 1% → 10% → 50% → 100%. Guardrails trigger rollbacks automatically."}].map((u)=>p("div",{className:"card-subtle space-y-2 p-4",children:[l("h3",{className:"font-semibold text-lg",children:u.title}),l("p",{className:"text-muted-foreground text-sm",children:u.description})]},u.title))})]})}import g from"@contractspec/lib.ui-link";import{ChevronRight as b}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function _(){return o("div",{className:"space-y-8",children:[o("div",{className:"space-y-4",children:[e("h1",{className:"font-bold text-4xl",children:"Telemetry"}),o("p",{className:"text-muted-foreground",children:["A ",e("strong",{children:"TelemetrySpec"})," defines what metrics, logs, and traces to collect for observability. ContractSpec automatically instruments your application based on these specs, ensuring you have the visibility you need to monitor, debug, and optimize your system."]})]}),o("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Why telemetry matters"}),e("p",{className:"text-muted-foreground",children:"You can't fix what you can't see. Telemetry provides visibility into how your application is performing, where errors are occurring, and how users are interacting with your system. Without proper instrumentation, you're flying blind in production."}),e("p",{className:"text-muted-foreground",children:"ContractSpec takes a spec-first approach to telemetry: you declare what you want to observe, and runtime adapters instrument operations automatically. This ensures consistent, comprehensive coverage without manual effort."})]}),o("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Three pillars of observability"}),o("div",{className:"space-y-3",children:[o("div",{children:[e("h3",{className:"font-semibold text-lg",children:"Metrics"}),e("p",{className:"text-muted-foreground",children:"Numerical measurements collected over time. Examples: request count, error rate, latency percentiles, active users, queue depth. Metrics are cheap to collect and store, making them ideal for high-level monitoring and alerting."})]}),o("div",{children:[e("h3",{className:"font-semibold text-lg",children:"Logs"}),e("p",{className:"text-muted-foreground",children:'Timestamped text records of events. Examples: "User 123 logged in", "Payment failed for order 456", "Database connection pool exhausted". Logs provide detailed context for debugging specific issues.'})]}),o("div",{children:[e("h3",{className:"font-semibold text-lg",children:"Traces"}),e("p",{className:"text-muted-foreground",children:"Records of requests as they flow through your system. A trace shows the complete path of a request—which services it touched, how long each step took, and where errors occurred. Traces are essential for debugging distributed systems."})]})]})]}),o("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Example TelemetrySpec"}),e("p",{className:"text-muted-foreground",children:"Here's how telemetry is configured in TypeScript:"}),e("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:e("pre",{children:`import { defineTelemetry } from '@contractspec/lib.contracts-spec/telemetry';
|
|
802
121
|
|
|
803
122
|
export const OrderProcessingTelemetry = defineTelemetry({
|
|
804
123
|
meta: {
|
|
@@ -843,306 +162,7 @@ export const OrderProcessingTelemetry = defineTelemetry({
|
|
|
843
162
|
notify: ['pagerduty', 'slack'],
|
|
844
163
|
},
|
|
845
164
|
],
|
|
846
|
-
});`
|
|
847
|
-
})
|
|
848
|
-
})
|
|
849
|
-
]
|
|
850
|
-
}),
|
|
851
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
852
|
-
className: "space-y-4",
|
|
853
|
-
children: [
|
|
854
|
-
/* @__PURE__ */ jsx5("h2", {
|
|
855
|
-
className: "font-bold text-2xl",
|
|
856
|
-
children: "Automatic instrumentation"
|
|
857
|
-
}),
|
|
858
|
-
/* @__PURE__ */ jsx5("p", {
|
|
859
|
-
className: "text-muted-foreground",
|
|
860
|
-
children: "ContractSpec automatically instruments:"
|
|
861
|
-
}),
|
|
862
|
-
/* @__PURE__ */ jsxs5("ul", {
|
|
863
|
-
className: "list-inside list-disc space-y-2 text-muted-foreground",
|
|
864
|
-
children: [
|
|
865
|
-
/* @__PURE__ */ jsxs5("li", {
|
|
866
|
-
children: [
|
|
867
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
868
|
-
children: "All operations"
|
|
869
|
-
}),
|
|
870
|
-
" – Request count, latency, error rate per Command/Query"
|
|
871
|
-
]
|
|
872
|
-
}),
|
|
873
|
-
/* @__PURE__ */ jsxs5("li", {
|
|
874
|
-
children: [
|
|
875
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
876
|
-
children: "All workflows"
|
|
877
|
-
}),
|
|
878
|
-
" – Step execution time, retry counts, compensation events"
|
|
879
|
-
]
|
|
880
|
-
}),
|
|
881
|
-
/* @__PURE__ */ jsxs5("li", {
|
|
882
|
-
children: [
|
|
883
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
884
|
-
children: "All data views"
|
|
885
|
-
}),
|
|
886
|
-
" – Query execution time, result set size"
|
|
887
|
-
]
|
|
888
|
-
}),
|
|
889
|
-
/* @__PURE__ */ jsxs5("li", {
|
|
890
|
-
children: [
|
|
891
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
892
|
-
children: "All policy decisions"
|
|
893
|
-
}),
|
|
894
|
-
" – Decision time, permit/deny ratio"
|
|
895
|
-
]
|
|
896
|
-
}),
|
|
897
|
-
/* @__PURE__ */ jsxs5("li", {
|
|
898
|
-
children: [
|
|
899
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
900
|
-
children: "System resources"
|
|
901
|
-
}),
|
|
902
|
-
" – CPU, memory, disk, network usage"
|
|
903
|
-
]
|
|
904
|
-
})
|
|
905
|
-
]
|
|
906
|
-
}),
|
|
907
|
-
/* @__PURE__ */ jsx5("p", {
|
|
908
|
-
className: "text-muted-foreground",
|
|
909
|
-
children: "You don't need to add instrumentation code manually—the runtime handles it based on your specs."
|
|
910
|
-
})
|
|
911
|
-
]
|
|
912
|
-
}),
|
|
913
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
914
|
-
className: "space-y-4",
|
|
915
|
-
children: [
|
|
916
|
-
/* @__PURE__ */ jsx5("h2", {
|
|
917
|
-
className: "font-bold text-2xl",
|
|
918
|
-
children: "Integration with observability platforms"
|
|
919
|
-
}),
|
|
920
|
-
/* @__PURE__ */ jsx5("p", {
|
|
921
|
-
className: "text-muted-foreground",
|
|
922
|
-
children: "ContractSpec supports multiple observability backends:"
|
|
923
|
-
}),
|
|
924
|
-
/* @__PURE__ */ jsxs5("ul", {
|
|
925
|
-
className: "list-inside list-disc space-y-2 text-muted-foreground",
|
|
926
|
-
children: [
|
|
927
|
-
/* @__PURE__ */ jsxs5("li", {
|
|
928
|
-
children: [
|
|
929
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
930
|
-
children: "Prometheus"
|
|
931
|
-
}),
|
|
932
|
-
" – For metrics collection and alerting"
|
|
933
|
-
]
|
|
934
|
-
}),
|
|
935
|
-
/* @__PURE__ */ jsxs5("li", {
|
|
936
|
-
children: [
|
|
937
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
938
|
-
children: "Grafana"
|
|
939
|
-
}),
|
|
940
|
-
" – For dashboards and visualization"
|
|
941
|
-
]
|
|
942
|
-
}),
|
|
943
|
-
/* @__PURE__ */ jsxs5("li", {
|
|
944
|
-
children: [
|
|
945
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
946
|
-
children: "Jaeger / Tempo"
|
|
947
|
-
}),
|
|
948
|
-
" – For distributed tracing"
|
|
949
|
-
]
|
|
950
|
-
}),
|
|
951
|
-
/* @__PURE__ */ jsxs5("li", {
|
|
952
|
-
children: [
|
|
953
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
954
|
-
children: "Loki"
|
|
955
|
-
}),
|
|
956
|
-
" – For log aggregation"
|
|
957
|
-
]
|
|
958
|
-
}),
|
|
959
|
-
/* @__PURE__ */ jsxs5("li", {
|
|
960
|
-
children: [
|
|
961
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
962
|
-
children: "Datadog"
|
|
963
|
-
}),
|
|
964
|
-
" – All-in-one observability platform"
|
|
965
|
-
]
|
|
966
|
-
}),
|
|
967
|
-
/* @__PURE__ */ jsxs5("li", {
|
|
968
|
-
children: [
|
|
969
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
970
|
-
children: "New Relic"
|
|
971
|
-
}),
|
|
972
|
-
" – Application performance monitoring"
|
|
973
|
-
]
|
|
974
|
-
}),
|
|
975
|
-
/* @__PURE__ */ jsxs5("li", {
|
|
976
|
-
children: [
|
|
977
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
978
|
-
children: "Honeycomb"
|
|
979
|
-
}),
|
|
980
|
-
" – Observability for complex systems"
|
|
981
|
-
]
|
|
982
|
-
})
|
|
983
|
-
]
|
|
984
|
-
}),
|
|
985
|
-
/* @__PURE__ */ jsx5("p", {
|
|
986
|
-
className: "text-muted-foreground",
|
|
987
|
-
children: "You can configure multiple backends and send telemetry to all of them simultaneously."
|
|
988
|
-
})
|
|
989
|
-
]
|
|
990
|
-
}),
|
|
991
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
992
|
-
className: "space-y-4",
|
|
993
|
-
children: [
|
|
994
|
-
/* @__PURE__ */ jsx5("h2", {
|
|
995
|
-
className: "font-bold text-2xl",
|
|
996
|
-
children: "Sampling and performance"
|
|
997
|
-
}),
|
|
998
|
-
/* @__PURE__ */ jsx5("p", {
|
|
999
|
-
className: "text-muted-foreground",
|
|
1000
|
-
children: "Collecting telemetry has a cost—CPU, memory, network bandwidth, and storage. ContractSpec provides several mechanisms to control overhead:"
|
|
1001
|
-
}),
|
|
1002
|
-
/* @__PURE__ */ jsxs5("ul", {
|
|
1003
|
-
className: "list-inside list-disc space-y-2 text-muted-foreground",
|
|
1004
|
-
children: [
|
|
1005
|
-
/* @__PURE__ */ jsxs5("li", {
|
|
1006
|
-
children: [
|
|
1007
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
1008
|
-
children: "Sampling"
|
|
1009
|
-
}),
|
|
1010
|
-
" – Trace only a percentage of requests (e.g., 10%)"
|
|
1011
|
-
]
|
|
1012
|
-
}),
|
|
1013
|
-
/* @__PURE__ */ jsxs5("li", {
|
|
1014
|
-
children: [
|
|
1015
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
1016
|
-
children: "Adaptive sampling"
|
|
1017
|
-
}),
|
|
1018
|
-
" – Automatically reduce sampling rate under high load"
|
|
1019
|
-
]
|
|
1020
|
-
}),
|
|
1021
|
-
/* @__PURE__ */ jsxs5("li", {
|
|
1022
|
-
children: [
|
|
1023
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
1024
|
-
children: "Tail-based sampling"
|
|
1025
|
-
}),
|
|
1026
|
-
" – Keep traces for failed requests, sample successful ones"
|
|
1027
|
-
]
|
|
1028
|
-
}),
|
|
1029
|
-
/* @__PURE__ */ jsxs5("li", {
|
|
1030
|
-
children: [
|
|
1031
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
1032
|
-
children: "Field redaction"
|
|
1033
|
-
}),
|
|
1034
|
-
" – Remove sensitive data from traces and logs"
|
|
1035
|
-
]
|
|
1036
|
-
}),
|
|
1037
|
-
/* @__PURE__ */ jsxs5("li", {
|
|
1038
|
-
children: [
|
|
1039
|
-
/* @__PURE__ */ jsx5("strong", {
|
|
1040
|
-
children: "Aggregation"
|
|
1041
|
-
}),
|
|
1042
|
-
" – Pre-aggregate metrics before sending to reduce network traffic"
|
|
1043
|
-
]
|
|
1044
|
-
})
|
|
1045
|
-
]
|
|
1046
|
-
})
|
|
1047
|
-
]
|
|
1048
|
-
}),
|
|
1049
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
1050
|
-
className: "space-y-4",
|
|
1051
|
-
children: [
|
|
1052
|
-
/* @__PURE__ */ jsx5("h2", {
|
|
1053
|
-
className: "font-bold text-2xl",
|
|
1054
|
-
children: "Best practices"
|
|
1055
|
-
}),
|
|
1056
|
-
/* @__PURE__ */ jsxs5("ul", {
|
|
1057
|
-
className: "list-inside list-disc space-y-2 text-muted-foreground",
|
|
1058
|
-
children: [
|
|
1059
|
-
/* @__PURE__ */ jsx5("li", {
|
|
1060
|
-
children: "Start with high-level metrics (request rate, error rate, latency) and add more detailed instrumentation as needed."
|
|
1061
|
-
}),
|
|
1062
|
-
/* @__PURE__ */ jsx5("li", {
|
|
1063
|
-
children: "Use structured logging—log events with structured fields, not free-form text."
|
|
1064
|
-
}),
|
|
1065
|
-
/* @__PURE__ */ jsx5("li", {
|
|
1066
|
-
children: "Set up alerts for critical metrics so you're notified when things go wrong."
|
|
1067
|
-
}),
|
|
1068
|
-
/* @__PURE__ */ jsx5("li", {
|
|
1069
|
-
children: "Use traces to debug complex issues—they show the complete picture of a request."
|
|
1070
|
-
}),
|
|
1071
|
-
/* @__PURE__ */ jsx5("li", {
|
|
1072
|
-
children: "Redact sensitive data from logs and traces to comply with privacy regulations."
|
|
1073
|
-
}),
|
|
1074
|
-
/* @__PURE__ */ jsx5("li", {
|
|
1075
|
-
children: "Review dashboards regularly to understand normal behavior—this makes anomalies easier to spot."
|
|
1076
|
-
}),
|
|
1077
|
-
/* @__PURE__ */ jsx5("li", {
|
|
1078
|
-
children: "Use sampling to control costs, but always trace errors and slow requests."
|
|
1079
|
-
})
|
|
1080
|
-
]
|
|
1081
|
-
})
|
|
1082
|
-
]
|
|
1083
|
-
}),
|
|
1084
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
1085
|
-
className: "flex items-center gap-4 pt-4",
|
|
1086
|
-
children: [
|
|
1087
|
-
/* @__PURE__ */ jsx5(Link4, {
|
|
1088
|
-
href: "/docs/advanced/mcp",
|
|
1089
|
-
className: "btn-ghost",
|
|
1090
|
-
children: "Previous: MCP Adapters"
|
|
1091
|
-
}),
|
|
1092
|
-
/* @__PURE__ */ jsxs5(Link4, {
|
|
1093
|
-
href: "/docs/comparison",
|
|
1094
|
-
className: "btn-primary",
|
|
1095
|
-
children: [
|
|
1096
|
-
"Next: Comparison ",
|
|
1097
|
-
/* @__PURE__ */ jsx5(ChevronRight3, {
|
|
1098
|
-
size: 16
|
|
1099
|
-
})
|
|
1100
|
-
]
|
|
1101
|
-
})
|
|
1102
|
-
]
|
|
1103
|
-
})
|
|
1104
|
-
]
|
|
1105
|
-
});
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
// src/components/docs/advanced/AdvancedWorkflowMonitoringPage.tsx
|
|
1109
|
-
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1110
|
-
function AdvancedWorkflowMonitoringPage() {
|
|
1111
|
-
return /* @__PURE__ */ jsxs6("div", {
|
|
1112
|
-
className: "space-y-8",
|
|
1113
|
-
children: [
|
|
1114
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1115
|
-
className: "space-y-4",
|
|
1116
|
-
children: [
|
|
1117
|
-
/* @__PURE__ */ jsx6("h1", {
|
|
1118
|
-
className: "font-bold text-4xl",
|
|
1119
|
-
children: "Workflow Monitoring"
|
|
1120
|
-
}),
|
|
1121
|
-
/* @__PURE__ */ jsx6("p", {
|
|
1122
|
-
className: "text-lg text-muted-foreground",
|
|
1123
|
-
children: "Production workflows need robust observability. ContractSpec provides SLA monitoring, distributed tracing, and audit logging out of the box."
|
|
1124
|
-
})
|
|
1125
|
-
]
|
|
1126
|
-
}),
|
|
1127
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1128
|
-
className: "space-y-4",
|
|
1129
|
-
children: [
|
|
1130
|
-
/* @__PURE__ */ jsx6("h2", {
|
|
1131
|
-
className: "font-bold text-2xl",
|
|
1132
|
-
children: "SLA Monitoring"
|
|
1133
|
-
}),
|
|
1134
|
-
/* @__PURE__ */ jsxs6("p", {
|
|
1135
|
-
children: [
|
|
1136
|
-
"Use the ",
|
|
1137
|
-
/* @__PURE__ */ jsx6("code", {
|
|
1138
|
-
children: "SLAMonitor"
|
|
1139
|
-
}),
|
|
1140
|
-
" to detect when workflows or individual steps exceed their budgeted duration."
|
|
1141
|
-
]
|
|
1142
|
-
}),
|
|
1143
|
-
/* @__PURE__ */ jsx6("pre", {
|
|
1144
|
-
className: "rounded-lg border bg-muted p-4 text-sm",
|
|
1145
|
-
children: `import { SLAMonitor } from '@contractspec/lib.contracts-spec/workflow/sla-monitor';
|
|
165
|
+
});`})})]}),o("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Automatic instrumentation"}),e("p",{className:"text-muted-foreground",children:"ContractSpec automatically instruments:"}),o("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[o("li",{children:[e("strong",{children:"All operations"})," – Request count, latency, error rate per Command/Query"]}),o("li",{children:[e("strong",{children:"All workflows"})," – Step execution time, retry counts, compensation events"]}),o("li",{children:[e("strong",{children:"All data views"})," – Query execution time, result set size"]}),o("li",{children:[e("strong",{children:"All policy decisions"})," – Decision time, permit/deny ratio"]}),o("li",{children:[e("strong",{children:"System resources"})," – CPU, memory, disk, network usage"]})]}),e("p",{className:"text-muted-foreground",children:"You don't need to add instrumentation code manually—the runtime handles it based on your specs."})]}),o("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Integration with observability platforms"}),e("p",{className:"text-muted-foreground",children:"ContractSpec supports multiple observability backends:"}),o("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[o("li",{children:[e("strong",{children:"Prometheus"})," – For metrics collection and alerting"]}),o("li",{children:[e("strong",{children:"Grafana"})," – For dashboards and visualization"]}),o("li",{children:[e("strong",{children:"Jaeger / Tempo"})," – For distributed tracing"]}),o("li",{children:[e("strong",{children:"Loki"})," – For log aggregation"]}),o("li",{children:[e("strong",{children:"Datadog"})," – All-in-one observability platform"]}),o("li",{children:[e("strong",{children:"New Relic"})," – Application performance monitoring"]}),o("li",{children:[e("strong",{children:"Honeycomb"})," – Observability for complex systems"]})]}),e("p",{className:"text-muted-foreground",children:"You can configure multiple backends and send telemetry to all of them simultaneously."})]}),o("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Sampling and performance"}),e("p",{className:"text-muted-foreground",children:"Collecting telemetry has a cost—CPU, memory, network bandwidth, and storage. ContractSpec provides several mechanisms to control overhead:"}),o("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[o("li",{children:[e("strong",{children:"Sampling"})," – Trace only a percentage of requests (e.g., 10%)"]}),o("li",{children:[e("strong",{children:"Adaptive sampling"})," – Automatically reduce sampling rate under high load"]}),o("li",{children:[e("strong",{children:"Tail-based sampling"})," – Keep traces for failed requests, sample successful ones"]}),o("li",{children:[e("strong",{children:"Field redaction"})," – Remove sensitive data from traces and logs"]}),o("li",{children:[e("strong",{children:"Aggregation"})," – Pre-aggregate metrics before sending to reduce network traffic"]})]})]}),o("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Best practices"}),o("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[e("li",{children:"Start with high-level metrics (request rate, error rate, latency) and add more detailed instrumentation as needed."}),e("li",{children:"Use structured logging—log events with structured fields, not free-form text."}),e("li",{children:"Set up alerts for critical metrics so you're notified when things go wrong."}),e("li",{children:"Use traces to debug complex issues—they show the complete picture of a request."}),e("li",{children:"Redact sensitive data from logs and traces to comply with privacy regulations."}),e("li",{children:"Review dashboards regularly to understand normal behavior—this makes anomalies easier to spot."}),e("li",{children:"Use sampling to control costs, but always trace errors and slow requests."})]})]}),o("div",{className:"flex items-center gap-4 pt-4",children:[e(g,{href:"/docs/advanced/mcp",className:"btn-ghost",children:"Previous: MCP Adapters"}),o(g,{href:"/docs/comparison",className:"btn-primary",children:["Next: Comparison ",e(b,{size:16})]})]})]})}import{jsx as n,jsxs as d}from"react/jsx-runtime";function B(){return d("div",{className:"space-y-8",children:[d("div",{className:"space-y-4",children:[n("h1",{className:"font-bold text-4xl",children:"Workflow Monitoring"}),n("p",{className:"text-lg text-muted-foreground",children:"Production workflows need robust observability. ContractSpec provides SLA monitoring, distributed tracing, and audit logging out of the box."})]}),d("div",{className:"space-y-4",children:[n("h2",{className:"font-bold text-2xl",children:"SLA Monitoring"}),d("p",{children:["Use the ",n("code",{children:"SLAMonitor"})," to detect when workflows or individual steps exceed their budgeted duration."]}),n("pre",{className:"rounded-lg border bg-muted p-4 text-sm",children:`import { SLAMonitor } from '@contractspec/lib.contracts-spec/workflow/sla-monitor';
|
|
1146
166
|
|
|
1147
167
|
const monitor = new SLAMonitor((event, payload) => {
|
|
1148
168
|
if (event === 'workflow.sla_breach') {
|
|
@@ -1152,69 +172,4 @@ const monitor = new SLAMonitor((event, payload) => {
|
|
|
1152
172
|
});
|
|
1153
173
|
|
|
1154
174
|
// Check periodically
|
|
1155
|
-
monitor.check(currentState, workflowSpec);`
|
|
1156
|
-
})
|
|
1157
|
-
]
|
|
1158
|
-
}),
|
|
1159
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1160
|
-
className: "space-y-4",
|
|
1161
|
-
children: [
|
|
1162
|
-
/* @__PURE__ */ jsx6("h2", {
|
|
1163
|
-
className: "font-bold text-2xl",
|
|
1164
|
-
children: "Telemetry & Tracing"
|
|
1165
|
-
}),
|
|
1166
|
-
/* @__PURE__ */ jsx6("p", {
|
|
1167
|
-
children: "Workflows automatically generate OpenTelemetry spans for:"
|
|
1168
|
-
}),
|
|
1169
|
-
/* @__PURE__ */ jsxs6("ul", {
|
|
1170
|
-
className: "list-disc space-y-2 pl-6",
|
|
1171
|
-
children: [
|
|
1172
|
-
/* @__PURE__ */ jsx6("li", {
|
|
1173
|
-
children: "Overall workflow execution"
|
|
1174
|
-
}),
|
|
1175
|
-
/* @__PURE__ */ jsx6("li", {
|
|
1176
|
-
children: "Individual steps"
|
|
1177
|
-
}),
|
|
1178
|
-
/* @__PURE__ */ jsx6("li", {
|
|
1179
|
-
children: "Retries and compensation"
|
|
1180
|
-
})
|
|
1181
|
-
]
|
|
1182
|
-
}),
|
|
1183
|
-
/* @__PURE__ */ jsx6("p", {
|
|
1184
|
-
children: "Configure your OpenTelemetry exporter to send traces to Jaeger, Datadog, or Honeycomb."
|
|
1185
|
-
})
|
|
1186
|
-
]
|
|
1187
|
-
}),
|
|
1188
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1189
|
-
className: "space-y-4",
|
|
1190
|
-
children: [
|
|
1191
|
-
/* @__PURE__ */ jsx6("h2", {
|
|
1192
|
-
className: "font-bold text-2xl",
|
|
1193
|
-
children: "Dashboarding"
|
|
1194
|
-
}),
|
|
1195
|
-
/* @__PURE__ */ jsxs6("p", {
|
|
1196
|
-
children: [
|
|
1197
|
-
"You can build a custom dashboard using ",
|
|
1198
|
-
/* @__PURE__ */ jsx6("code", {
|
|
1199
|
-
children: "DataViews"
|
|
1200
|
-
}),
|
|
1201
|
-
" over your workflow state database. See the DataViews tutorial for how to visualize ",
|
|
1202
|
-
/* @__PURE__ */ jsx6("code", {
|
|
1203
|
-
children: "WorkflowState"
|
|
1204
|
-
}),
|
|
1205
|
-
" records."
|
|
1206
|
-
]
|
|
1207
|
-
})
|
|
1208
|
-
]
|
|
1209
|
-
})
|
|
1210
|
-
]
|
|
1211
|
-
});
|
|
1212
|
-
}
|
|
1213
|
-
export {
|
|
1214
|
-
AdvancedWorkflowMonitoringPage,
|
|
1215
|
-
AdvancedTelemetryPage,
|
|
1216
|
-
AdvancedSpecExperimentsPage,
|
|
1217
|
-
AdvancedRenderersPage,
|
|
1218
|
-
AdvancedOverlayEditorPage,
|
|
1219
|
-
AdvancedMCPPage
|
|
1220
|
-
};
|
|
175
|
+
monitor.check(currentState, workflowSpec);`})]}),d("div",{className:"space-y-4",children:[n("h2",{className:"font-bold text-2xl",children:"Telemetry & Tracing"}),n("p",{children:"Workflows automatically generate OpenTelemetry spans for:"}),d("ul",{className:"list-disc space-y-2 pl-6",children:[n("li",{children:"Overall workflow execution"}),n("li",{children:"Individual steps"}),n("li",{children:"Retries and compensation"})]}),n("p",{children:"Configure your OpenTelemetry exporter to send traces to Jaeger, Datadog, or Honeycomb."})]}),d("div",{className:"space-y-4",children:[n("h2",{className:"font-bold text-2xl",children:"Dashboarding"}),d("p",{children:["You can build a custom dashboard using ",n("code",{children:"DataViews"})," over your workflow state database. See the DataViews tutorial for how to visualize ",n("code",{children:"WorkflowState"})," records."]})]})]})}export{B as AdvancedWorkflowMonitoringPage,_ as AdvancedTelemetryPage,q as AdvancedSpecExperimentsPage,E as AdvancedRenderersPage,A as AdvancedOverlayEditorPage,k as AdvancedMCPPage};
|