@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,531 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import { Logger, LogLevel } from "@contractspec/lib.logger";
|
|
4
|
-
var createAppLogger = () => new Logger({
|
|
5
|
-
level: LogLevel.INFO,
|
|
6
|
-
environment: "production",
|
|
7
|
-
enableTracing: true,
|
|
8
|
-
enableTiming: true,
|
|
9
|
-
enableContext: true,
|
|
10
|
-
enableColors: false
|
|
11
|
-
});
|
|
12
|
-
var appLogger = createAppLogger();
|
|
13
|
-
var dbLogger = new Logger({
|
|
14
|
-
level: LogLevel.WARN,
|
|
15
|
-
environment: "production",
|
|
16
|
-
enableTracing: true,
|
|
17
|
-
enableTiming: true,
|
|
18
|
-
enableContext: true,
|
|
19
|
-
enableColors: false
|
|
20
|
-
});
|
|
21
|
-
var authLogger = new Logger({
|
|
22
|
-
level: LogLevel.INFO,
|
|
23
|
-
environment: "production",
|
|
24
|
-
enableTracing: true,
|
|
25
|
-
enableTiming: true,
|
|
26
|
-
enableContext: true,
|
|
27
|
-
enableColors: false
|
|
28
|
-
});
|
|
29
|
-
// src/application/mcp/normalizeMcpRequest.ts
|
|
30
|
-
var REQUIRED_ACCEPT_TYPES = ["application/json", "text/event-stream"];
|
|
31
|
-
function canNormalizeAcceptHeader(acceptHeader) {
|
|
32
|
-
return !acceptHeader || acceptHeader.includes("*/*") || acceptHeader.includes("application/*") || REQUIRED_ACCEPT_TYPES.some((value) => acceptHeader.includes(value));
|
|
33
|
-
}
|
|
34
|
-
function normalizeMcpRequest(request) {
|
|
35
|
-
if (request.method !== "POST")
|
|
36
|
-
return request;
|
|
37
|
-
const acceptHeader = request.headers.get("accept");
|
|
38
|
-
if (!canNormalizeAcceptHeader(acceptHeader))
|
|
39
|
-
return request;
|
|
40
|
-
const missingTypes = REQUIRED_ACCEPT_TYPES.filter((value) => !acceptHeader?.includes(value));
|
|
41
|
-
if (missingTypes.length === 0)
|
|
42
|
-
return request;
|
|
43
|
-
const headers = new Headers(request.headers);
|
|
44
|
-
headers.set("accept", [acceptHeader, ...missingTypes].filter(Boolean).join(", "));
|
|
45
|
-
return new Request(request, { headers });
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// src/application/mcp/common.ts
|
|
49
|
-
import { createMcpServer } from "@contractspec/lib.contracts-runtime-server-mcp/provider-mcp";
|
|
50
|
-
import { PresentationRegistry } from "@contractspec/lib.contracts-spec/presentations";
|
|
51
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
52
|
-
import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
|
|
53
|
-
import { randomUUID } from "crypto";
|
|
54
|
-
import { Elysia } from "elysia";
|
|
55
|
-
var baseCtx = {
|
|
56
|
-
actor: "anonymous",
|
|
57
|
-
decide: async () => ({ effect: "allow" })
|
|
58
|
-
};
|
|
59
|
-
function createJsonRpcErrorResponse(status, code, message, data) {
|
|
60
|
-
return new Response(JSON.stringify({
|
|
61
|
-
jsonrpc: "2.0",
|
|
62
|
-
error: {
|
|
63
|
-
code,
|
|
64
|
-
message,
|
|
65
|
-
...data ? { data } : {}
|
|
66
|
-
},
|
|
67
|
-
id: null
|
|
68
|
-
}), {
|
|
69
|
-
status,
|
|
70
|
-
headers: {
|
|
71
|
-
"content-type": "application/json"
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
function createSessionState({
|
|
76
|
-
logger,
|
|
77
|
-
serverName,
|
|
78
|
-
ops,
|
|
79
|
-
resources,
|
|
80
|
-
prompts,
|
|
81
|
-
presentations,
|
|
82
|
-
stateful
|
|
83
|
-
}) {
|
|
84
|
-
const server = new McpServer({
|
|
85
|
-
name: serverName,
|
|
86
|
-
version: "1.0.0"
|
|
87
|
-
}, {
|
|
88
|
-
capabilities: {
|
|
89
|
-
tools: {},
|
|
90
|
-
resources: {},
|
|
91
|
-
prompts: {},
|
|
92
|
-
logging: {}
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
logger.info("Setting up MCP server...");
|
|
96
|
-
createMcpServer(server, ops, resources, prompts, {
|
|
97
|
-
logger,
|
|
98
|
-
toolCtx: () => baseCtx,
|
|
99
|
-
promptCtx: () => ({ locale: "en" }),
|
|
100
|
-
resourceCtx: () => ({ locale: "en" }),
|
|
101
|
-
presentations: new PresentationRegistry(presentations)
|
|
102
|
-
});
|
|
103
|
-
const transport = new WebStandardStreamableHTTPServerTransport({
|
|
104
|
-
sessionIdGenerator: stateful ? () => randomUUID() : undefined,
|
|
105
|
-
enableJsonResponse: true
|
|
106
|
-
});
|
|
107
|
-
return server.connect(transport).then(() => ({ server, transport }));
|
|
108
|
-
}
|
|
109
|
-
async function closeSessionState(state) {
|
|
110
|
-
await Promise.allSettled([state.transport.close(), state.server.close()]);
|
|
111
|
-
}
|
|
112
|
-
function toErrorMessage(error) {
|
|
113
|
-
return error instanceof Error ? error.stack ?? error.message : String(error);
|
|
114
|
-
}
|
|
115
|
-
function createMcpElysiaHandler({
|
|
116
|
-
logger,
|
|
117
|
-
path,
|
|
118
|
-
serverName,
|
|
119
|
-
ops,
|
|
120
|
-
resources,
|
|
121
|
-
prompts,
|
|
122
|
-
presentations,
|
|
123
|
-
validateAuth,
|
|
124
|
-
requiredAuthMethods
|
|
125
|
-
}) {
|
|
126
|
-
logger.info("Setting up MCP handler...", {
|
|
127
|
-
requiredAuthMethods: requiredAuthMethods ?? []
|
|
128
|
-
});
|
|
129
|
-
const isStateful = process.env.CONTRACTSPEC_MCP_STATEFUL === "1";
|
|
130
|
-
const sessions = new Map;
|
|
131
|
-
async function handleStateless(request) {
|
|
132
|
-
const state = await createSessionState({
|
|
133
|
-
logger,
|
|
134
|
-
path,
|
|
135
|
-
serverName,
|
|
136
|
-
ops,
|
|
137
|
-
resources,
|
|
138
|
-
prompts,
|
|
139
|
-
presentations,
|
|
140
|
-
stateful: false
|
|
141
|
-
});
|
|
142
|
-
try {
|
|
143
|
-
return await state.transport.handleRequest(normalizeMcpRequest(request));
|
|
144
|
-
} finally {
|
|
145
|
-
await closeSessionState(state);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
async function closeSession(sessionId) {
|
|
149
|
-
const state = sessions.get(sessionId);
|
|
150
|
-
if (!state)
|
|
151
|
-
return;
|
|
152
|
-
sessions.delete(sessionId);
|
|
153
|
-
await closeSessionState(state);
|
|
154
|
-
}
|
|
155
|
-
async function handleStateful(request) {
|
|
156
|
-
const requestedSessionId = request.headers.get("mcp-session-id");
|
|
157
|
-
let state;
|
|
158
|
-
let createdState = false;
|
|
159
|
-
if (requestedSessionId) {
|
|
160
|
-
const existing = sessions.get(requestedSessionId);
|
|
161
|
-
if (!existing) {
|
|
162
|
-
return createJsonRpcErrorResponse(404, -32001, "Session not found");
|
|
163
|
-
}
|
|
164
|
-
state = existing;
|
|
165
|
-
} else {
|
|
166
|
-
state = await createSessionState({
|
|
167
|
-
logger,
|
|
168
|
-
path,
|
|
169
|
-
serverName,
|
|
170
|
-
ops,
|
|
171
|
-
resources,
|
|
172
|
-
prompts,
|
|
173
|
-
presentations,
|
|
174
|
-
stateful: true
|
|
175
|
-
});
|
|
176
|
-
createdState = true;
|
|
177
|
-
}
|
|
178
|
-
try {
|
|
179
|
-
const response = await state.transport.handleRequest(normalizeMcpRequest(request));
|
|
180
|
-
const activeSessionId = state.transport.sessionId;
|
|
181
|
-
if (activeSessionId && !sessions.has(activeSessionId)) {
|
|
182
|
-
sessions.set(activeSessionId, state);
|
|
183
|
-
}
|
|
184
|
-
if (request.method === "DELETE" && activeSessionId) {
|
|
185
|
-
await closeSession(activeSessionId);
|
|
186
|
-
} else if (!activeSessionId && createdState) {
|
|
187
|
-
await closeSessionState(state);
|
|
188
|
-
}
|
|
189
|
-
return response;
|
|
190
|
-
} catch (error) {
|
|
191
|
-
if (createdState) {
|
|
192
|
-
await closeSessionState(state);
|
|
193
|
-
}
|
|
194
|
-
throw error;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
return new Elysia({ name: `mcp-${serverName}` }).all(path, async ({ request }) => {
|
|
198
|
-
try {
|
|
199
|
-
if (validateAuth) {
|
|
200
|
-
const authResult = await validateAuth(request);
|
|
201
|
-
if (!authResult.valid) {
|
|
202
|
-
return createJsonRpcErrorResponse(401, -32002, "Authentication failed", authResult.reason);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
if (isStateful) {
|
|
206
|
-
return await handleStateful(request);
|
|
207
|
-
}
|
|
208
|
-
return await handleStateless(request);
|
|
209
|
-
} catch (error) {
|
|
210
|
-
logger.error("Error handling MCP request", {
|
|
211
|
-
path,
|
|
212
|
-
method: request.method,
|
|
213
|
-
error: toErrorMessage(error)
|
|
214
|
-
});
|
|
215
|
-
return createJsonRpcErrorResponse(500, -32000, "Internal error");
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
// src/application/mcp/providerRankingMcp.ts
|
|
221
|
-
import { getModelInfo } from "@contractspec/lib.ai-providers/models";
|
|
222
|
-
import {
|
|
223
|
-
definePrompt,
|
|
224
|
-
defineResourceTemplate,
|
|
225
|
-
installOp,
|
|
226
|
-
OperationSpecRegistry,
|
|
227
|
-
PromptRegistry,
|
|
228
|
-
ResourceRegistry
|
|
229
|
-
} from "@contractspec/lib.contracts-spec";
|
|
230
|
-
import {
|
|
231
|
-
BenchmarkIngestCommand,
|
|
232
|
-
BenchmarkRunCustomCommand,
|
|
233
|
-
RankingRefreshCommand
|
|
234
|
-
} from "@contractspec/lib.contracts-spec/provider-ranking";
|
|
235
|
-
import { InMemoryProviderRankingStore } from "@contractspec/lib.provider-ranking/in-memory-store";
|
|
236
|
-
import { createDefaultIngesterRegistry } from "@contractspec/lib.provider-ranking/ingesters";
|
|
237
|
-
import {
|
|
238
|
-
computeModelRankings,
|
|
239
|
-
normalizeBenchmarkResults
|
|
240
|
-
} from "@contractspec/lib.provider-ranking/scoring";
|
|
241
|
-
import z from "zod";
|
|
242
|
-
var TransportFilterSchema = z.enum(["rest", "mcp", "webhook", "sdk"]).optional();
|
|
243
|
-
var AuthFilterSchema = z.enum([
|
|
244
|
-
"api-key",
|
|
245
|
-
"oauth2",
|
|
246
|
-
"bearer",
|
|
247
|
-
"header",
|
|
248
|
-
"basic",
|
|
249
|
-
"webhook-signing",
|
|
250
|
-
"service-account"
|
|
251
|
-
]).optional();
|
|
252
|
-
var RANKING_TAGS = ["ranking", "mcp", "ai"];
|
|
253
|
-
var RANKING_OWNERS = ["platform.ai"];
|
|
254
|
-
var sharedStore = null;
|
|
255
|
-
function getStore() {
|
|
256
|
-
if (!sharedStore) {
|
|
257
|
-
sharedStore = new InMemoryProviderRankingStore;
|
|
258
|
-
}
|
|
259
|
-
return sharedStore;
|
|
260
|
-
}
|
|
261
|
-
function buildRankingResources() {
|
|
262
|
-
const resources = new ResourceRegistry;
|
|
263
|
-
resources.register(defineResourceTemplate({
|
|
264
|
-
meta: {
|
|
265
|
-
uriTemplate: "ranking://leaderboard",
|
|
266
|
-
title: "AI Model Leaderboard",
|
|
267
|
-
description: "Current ranked list of AI models by composite score. Supports optional transport and authMethod query filters.",
|
|
268
|
-
mimeType: "application/json",
|
|
269
|
-
tags: RANKING_TAGS
|
|
270
|
-
},
|
|
271
|
-
input: z.object({
|
|
272
|
-
transport: TransportFilterSchema,
|
|
273
|
-
authMethod: AuthFilterSchema
|
|
274
|
-
}),
|
|
275
|
-
resolve: async ({ transport, authMethod }) => {
|
|
276
|
-
const store = getStore();
|
|
277
|
-
const result = await store.listModelRankings({
|
|
278
|
-
limit: 100,
|
|
279
|
-
requiredTransport: transport,
|
|
280
|
-
requiredAuthMethod: authMethod
|
|
281
|
-
});
|
|
282
|
-
return {
|
|
283
|
-
uri: "ranking://leaderboard",
|
|
284
|
-
mimeType: "application/json",
|
|
285
|
-
data: JSON.stringify(result, null, 2)
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
}));
|
|
289
|
-
resources.register(defineResourceTemplate({
|
|
290
|
-
meta: {
|
|
291
|
-
uriTemplate: "ranking://leaderboard/{dimension}",
|
|
292
|
-
title: "AI Model Leaderboard by Dimension",
|
|
293
|
-
description: "Ranked list of AI models filtered by a specific dimension. Supports optional transport and authMethod query filters.",
|
|
294
|
-
mimeType: "application/json",
|
|
295
|
-
tags: RANKING_TAGS
|
|
296
|
-
},
|
|
297
|
-
input: z.object({
|
|
298
|
-
dimension: z.string(),
|
|
299
|
-
transport: TransportFilterSchema,
|
|
300
|
-
authMethod: AuthFilterSchema
|
|
301
|
-
}),
|
|
302
|
-
resolve: async ({ dimension, transport, authMethod }) => {
|
|
303
|
-
const store = getStore();
|
|
304
|
-
const result = await store.listModelRankings({
|
|
305
|
-
dimension,
|
|
306
|
-
limit: 100,
|
|
307
|
-
requiredTransport: transport,
|
|
308
|
-
requiredAuthMethod: authMethod
|
|
309
|
-
});
|
|
310
|
-
return {
|
|
311
|
-
uri: `ranking://leaderboard/${encodeURIComponent(dimension)}`,
|
|
312
|
-
mimeType: "application/json",
|
|
313
|
-
data: JSON.stringify(result, null, 2)
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
}));
|
|
317
|
-
resources.register(defineResourceTemplate({
|
|
318
|
-
meta: {
|
|
319
|
-
uriTemplate: "ranking://model/{modelId}",
|
|
320
|
-
title: "AI Model Profile",
|
|
321
|
-
description: "Detailed profile for a specific AI model including scores and benchmarks.",
|
|
322
|
-
mimeType: "application/json",
|
|
323
|
-
tags: RANKING_TAGS
|
|
324
|
-
},
|
|
325
|
-
input: z.object({ modelId: z.string() }),
|
|
326
|
-
resolve: async ({ modelId }) => {
|
|
327
|
-
const store = getStore();
|
|
328
|
-
const profile = await store.getModelProfile(modelId);
|
|
329
|
-
if (!profile) {
|
|
330
|
-
return {
|
|
331
|
-
uri: `ranking://model/${encodeURIComponent(modelId)}`,
|
|
332
|
-
mimeType: "application/json",
|
|
333
|
-
data: JSON.stringify({ error: "not_found", modelId })
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
const enriched = profile.costPerMillion == null ? (() => {
|
|
337
|
-
const info = getModelInfo(profile.modelId);
|
|
338
|
-
return info?.costPerMillion ? {
|
|
339
|
-
...profile,
|
|
340
|
-
costPerMillion: info.costPerMillion,
|
|
341
|
-
displayName: info.name,
|
|
342
|
-
contextWindow: info.contextWindow,
|
|
343
|
-
capabilities: [
|
|
344
|
-
...info.capabilities.vision ? ["vision"] : [],
|
|
345
|
-
...info.capabilities.tools ? ["tools"] : [],
|
|
346
|
-
...info.capabilities.reasoning ? ["reasoning"] : [],
|
|
347
|
-
...info.capabilities.streaming ? ["streaming"] : []
|
|
348
|
-
]
|
|
349
|
-
} : profile;
|
|
350
|
-
})() : profile;
|
|
351
|
-
return {
|
|
352
|
-
uri: `ranking://model/${encodeURIComponent(modelId)}`,
|
|
353
|
-
mimeType: "application/json",
|
|
354
|
-
data: JSON.stringify(enriched, null, 2)
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
}));
|
|
358
|
-
resources.register(defineResourceTemplate({
|
|
359
|
-
meta: {
|
|
360
|
-
uriTemplate: "ranking://results",
|
|
361
|
-
title: "Benchmark Results",
|
|
362
|
-
description: "List of raw benchmark results from all ingested sources.",
|
|
363
|
-
mimeType: "application/json",
|
|
364
|
-
tags: RANKING_TAGS
|
|
365
|
-
},
|
|
366
|
-
input: z.object({}),
|
|
367
|
-
resolve: async () => {
|
|
368
|
-
const store = getStore();
|
|
369
|
-
const result = await store.listBenchmarkResults({ limit: 200 });
|
|
370
|
-
return {
|
|
371
|
-
uri: "ranking://results",
|
|
372
|
-
mimeType: "application/json",
|
|
373
|
-
data: JSON.stringify(result, null, 2)
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
}));
|
|
377
|
-
return resources;
|
|
378
|
-
}
|
|
379
|
-
function buildRankingPrompts() {
|
|
380
|
-
const prompts = new PromptRegistry;
|
|
381
|
-
prompts.register(definePrompt({
|
|
382
|
-
meta: {
|
|
383
|
-
key: "ranking.advisor",
|
|
384
|
-
version: "1.0.0",
|
|
385
|
-
title: "AI Model Advisor",
|
|
386
|
-
description: "Which AI model is best for a given task? Uses the leaderboard to recommend.",
|
|
387
|
-
tags: RANKING_TAGS,
|
|
388
|
-
stability: "beta",
|
|
389
|
-
owners: RANKING_OWNERS
|
|
390
|
-
},
|
|
391
|
-
args: [
|
|
392
|
-
{
|
|
393
|
-
name: "task",
|
|
394
|
-
description: "The task or use case to recommend a model for.",
|
|
395
|
-
required: true,
|
|
396
|
-
schema: z.string()
|
|
397
|
-
},
|
|
398
|
-
{
|
|
399
|
-
name: "priority",
|
|
400
|
-
description: "Priority dimension (coding, reasoning, cost, latency, etc.).",
|
|
401
|
-
required: false,
|
|
402
|
-
schema: z.string().optional()
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
name: "transport",
|
|
406
|
-
description: "Required transport type (rest, mcp, webhook, sdk).",
|
|
407
|
-
required: false,
|
|
408
|
-
schema: TransportFilterSchema
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
name: "authMethod",
|
|
412
|
-
description: "Required auth method (api-key, oauth2, bearer, etc.).",
|
|
413
|
-
required: false,
|
|
414
|
-
schema: AuthFilterSchema
|
|
415
|
-
}
|
|
416
|
-
],
|
|
417
|
-
input: z.object({
|
|
418
|
-
task: z.string(),
|
|
419
|
-
priority: z.string().optional(),
|
|
420
|
-
transport: TransportFilterSchema,
|
|
421
|
-
authMethod: AuthFilterSchema
|
|
422
|
-
}),
|
|
423
|
-
render: async ({ task, priority, transport, authMethod }) => {
|
|
424
|
-
const constraints = [];
|
|
425
|
-
if (priority)
|
|
426
|
-
constraints.push(`Prioritize: ${priority}.`);
|
|
427
|
-
if (transport)
|
|
428
|
-
constraints.push(`Required transport: ${transport}.`);
|
|
429
|
-
if (authMethod)
|
|
430
|
-
constraints.push(`Required auth: ${authMethod}.`);
|
|
431
|
-
return [
|
|
432
|
-
{
|
|
433
|
-
type: "text",
|
|
434
|
-
text: `Recommend the best AI model for: "${task}".${constraints.length ? ` ${constraints.join(" ")}` : ""} Use the leaderboard data to justify your recommendation.`
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
type: "resource",
|
|
438
|
-
uri: priority ? `ranking://leaderboard/${priority}` : "ranking://leaderboard",
|
|
439
|
-
title: "Leaderboard"
|
|
440
|
-
}
|
|
441
|
-
];
|
|
442
|
-
}
|
|
443
|
-
}));
|
|
444
|
-
return prompts;
|
|
445
|
-
}
|
|
446
|
-
function buildRankingOps() {
|
|
447
|
-
const registry = new OperationSpecRegistry;
|
|
448
|
-
const ingesterRegistry = createDefaultIngesterRegistry();
|
|
449
|
-
installOp(registry, BenchmarkIngestCommand, async (args) => {
|
|
450
|
-
const store = getStore();
|
|
451
|
-
const source = args.source;
|
|
452
|
-
const ingester = ingesterRegistry.get(source);
|
|
453
|
-
if (!ingester) {
|
|
454
|
-
throw new Error(`No ingester registered for source: ${source}`);
|
|
455
|
-
}
|
|
456
|
-
const rawResults = await ingester.ingest({
|
|
457
|
-
sourceUrl: args.sourceUrl,
|
|
458
|
-
dimensions: args.dimensions
|
|
459
|
-
});
|
|
460
|
-
const normalized = normalizeBenchmarkResults(rawResults);
|
|
461
|
-
for (const result of normalized) {
|
|
462
|
-
await store.upsertBenchmarkResult(result);
|
|
463
|
-
}
|
|
464
|
-
return {
|
|
465
|
-
ingestionId: `ingest-${source}-${Date.now()}`,
|
|
466
|
-
source,
|
|
467
|
-
resultsCount: normalized.length,
|
|
468
|
-
status: "completed",
|
|
469
|
-
ingestedAt: new Date
|
|
470
|
-
};
|
|
471
|
-
});
|
|
472
|
-
installOp(registry, BenchmarkRunCustomCommand, async (args) => {
|
|
473
|
-
return {
|
|
474
|
-
runId: `custom-${Date.now()}`,
|
|
475
|
-
evalSuiteKey: args.evalSuiteKey,
|
|
476
|
-
modelId: args.modelId,
|
|
477
|
-
status: "started",
|
|
478
|
-
startedAt: new Date
|
|
479
|
-
};
|
|
480
|
-
});
|
|
481
|
-
installOp(registry, RankingRefreshCommand, async (args) => {
|
|
482
|
-
const store = getStore();
|
|
483
|
-
const allResults = [];
|
|
484
|
-
let offset = 0;
|
|
485
|
-
const pageSize = 500;
|
|
486
|
-
while (true) {
|
|
487
|
-
const page = await store.listBenchmarkResults({
|
|
488
|
-
limit: pageSize,
|
|
489
|
-
offset
|
|
490
|
-
});
|
|
491
|
-
allResults.push(...page.results);
|
|
492
|
-
if (allResults.length >= page.total || page.results.length < pageSize)
|
|
493
|
-
break;
|
|
494
|
-
offset += pageSize;
|
|
495
|
-
}
|
|
496
|
-
const existingRankings = new Map((await store.listModelRankings({ limit: 1e4 })).rankings.map((r) => [
|
|
497
|
-
r.modelId,
|
|
498
|
-
r
|
|
499
|
-
]));
|
|
500
|
-
const weightOverrides = args.weightOverrides ? Array.isArray(args.weightOverrides) ? args.weightOverrides : [args.weightOverrides] : undefined;
|
|
501
|
-
const newRankings = computeModelRankings(allResults, weightOverrides ? {
|
|
502
|
-
weightOverrides
|
|
503
|
-
} : undefined, existingRankings);
|
|
504
|
-
for (const ranking of newRankings) {
|
|
505
|
-
await store.upsertModelRanking(ranking);
|
|
506
|
-
}
|
|
507
|
-
return {
|
|
508
|
-
modelsRanked: newRankings.length,
|
|
509
|
-
updatedAt: new Date,
|
|
510
|
-
status: "completed"
|
|
511
|
-
};
|
|
512
|
-
});
|
|
513
|
-
return registry;
|
|
514
|
-
}
|
|
515
|
-
function createProviderRankingMcpHandler(path = "/api/mcp/ranking") {
|
|
516
|
-
return createMcpElysiaHandler({
|
|
517
|
-
logger: appLogger,
|
|
518
|
-
path,
|
|
519
|
-
serverName: "contractspec-ranking-mcp",
|
|
520
|
-
ops: buildRankingOps(),
|
|
521
|
-
resources: buildRankingResources(),
|
|
522
|
-
prompts: buildRankingPrompts()
|
|
523
|
-
});
|
|
524
|
-
}
|
|
525
|
-
function setProviderRankingStore(store) {
|
|
526
|
-
sharedStore = store;
|
|
527
|
-
}
|
|
528
|
-
export {
|
|
529
|
-
setProviderRankingStore,
|
|
530
|
-
createProviderRankingMcpHandler
|
|
531
|
-
};
|
|
2
|
+
import{Logger as M,LogLevel as k}from"@contractspec/lib.logger";function L(){return"production"}var c=()=>new M({level:k.INFO,environment:L(),enableTracing:!0,enableTiming:!0,enableContext:!0,enableColors:!1}),q=c(),Bj=new M({level:k.WARN,environment:L(),enableTracing:!0,enableTiming:!0,enableContext:!0,enableColors:!1}),Ej=new M({level:k.INFO,environment:L(),enableTracing:!0,enableTiming:!0,enableContext:!0,enableColors:!1});var N=["application/json","text/event-stream"];function h(j){return!j||j.includes("*/*")||j.includes("application/*")||N.some((U)=>j.includes(U))}function z(j){if(j.method!=="POST")return j;let U=j.headers.get("accept");if(!h(U))return j;let Q=N.filter((J)=>!U?.includes(J));if(Q.length===0)return j;let Y=new Headers(j.headers);return Y.set("accept",[U,...Q].filter(Boolean).join(", ")),new Request(j,{headers:Y})}import{createMcpServer as m}from"@contractspec/lib.contracts-runtime-server-mcp/provider-mcp";import{PresentationRegistry as u}from"@contractspec/lib.contracts-spec/presentations";import{McpServer as d}from"@modelcontextprotocol/sdk/server/mcp.js";import{WebStandardStreamableHTTPServerTransport as l}from"@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";import{randomUUID as p}from"crypto";import{Elysia as g}from"elysia";var n={actor:"anonymous",decide:async()=>({effect:"allow"})};function y(j,U,Q,Y){return new Response(JSON.stringify({jsonrpc:"2.0",error:{code:U,message:Q,...Y?{data:Y}:{}},id:null}),{status:j,headers:{"content-type":"application/json"}})}function f({logger:j,serverName:U,ops:Q,resources:Y,prompts:J,presentations:D,stateful:B}){let x=new d({name:U,version:"1.0.0"},{capabilities:{tools:{},resources:{},prompts:{},logging:{}}});j.info("Setting up MCP server..."),m(x,Q,Y,J,{logger:j,toolCtx:()=>n,promptCtx:()=>({locale:"en"}),resourceCtx:()=>({locale:"en"}),presentations:new u(D)});let E=new l({sessionIdGenerator:B?()=>p():void 0,enableJsonResponse:!0});return x.connect(E).then(()=>({server:x,transport:E}))}async function K(j){await Promise.allSettled([j.transport.close(),j.server.close()])}function i(j){return j instanceof Error?j.stack??j.message:String(j)}function I({logger:j,path:U,serverName:Q,ops:Y,resources:J,prompts:D,presentations:B,validateAuth:x,requiredAuthMethods:E}){j.info("Setting up MCP handler...",{requiredAuthMethods:E??[]});let _=process.env.CONTRACTSPEC_MCP_STATEFUL==="1",V=new Map;async function R(X){let Z=await f({logger:j,path:U,serverName:Q,ops:Y,resources:J,prompts:D,presentations:B,stateful:!1});try{return await Z.transport.handleRequest(z(X))}finally{await K(Z)}}async function v(X){let Z=V.get(X);if(!Z)return;V.delete(X),await K(Z)}async function S(X){let Z=X.headers.get("mcp-session-id"),H,T=!1;if(Z){let P=V.get(Z);if(!P)return y(404,-32001,"Session not found");H=P}else H=await f({logger:j,path:U,serverName:Q,ops:Y,resources:J,prompts:D,presentations:B,stateful:!0}),T=!0;try{let P=await H.transport.handleRequest(z(X)),W=H.transport.sessionId;if(W&&!V.has(W))V.set(W,H);if(X.method==="DELETE"&&W)await v(W);else if(!W&&T)await K(H);return P}catch(P){if(T)await K(H);throw P}}return new g({name:`mcp-${Q}`}).all(U,async({request:X})=>{try{if(x){let Z=await x(X);if(!Z.valid)return y(401,-32002,"Authentication failed",Z.reason)}if(_)return await S(X);return await R(X)}catch(Z){return j.error("Error handling MCP request",{path:U,method:X.method,error:i(Z)}),y(500,-32000,"Internal error")}})}import{getModelInfo as a}from"@contractspec/lib.ai-providers/models";import{definePrompt as o,defineResourceTemplate as b,installOp as A,OperationSpecRegistry as t,PromptRegistry as s,ResourceRegistry as r}from"@contractspec/lib.contracts-spec";import{BenchmarkIngestCommand as e,BenchmarkRunCustomCommand as jj,RankingRefreshCommand as Qj}from"@contractspec/lib.contracts-spec/provider-ranking";import{InMemoryProviderRankingStore as Uj}from"@contractspec/lib.provider-ranking/in-memory-store";import{createDefaultIngesterRegistry as Yj}from"@contractspec/lib.provider-ranking/ingesters";import{computeModelRankings as Dj,normalizeBenchmarkResults as Jj}from"@contractspec/lib.provider-ranking/scoring";import $ from"zod";var F=$.enum(["rest","mcp","webhook","sdk"]).optional(),G=$.enum(["api-key","oauth2","bearer","header","basic","webhook-signing","service-account"]).optional(),w=["ranking","mcp","ai"],Vj=["platform.ai"],O=null;function C(){if(!O)O=new Uj;return O}function Xj(){let j=new r;return j.register(b({meta:{uriTemplate:"ranking://leaderboard",title:"AI Model Leaderboard",description:"Current ranked list of AI models by composite score. Supports optional transport and authMethod query filters.",mimeType:"application/json",tags:w},input:$.object({transport:F,authMethod:G}),resolve:async({transport:U,authMethod:Q})=>{let J=await C().listModelRankings({limit:100,requiredTransport:U,requiredAuthMethod:Q});return{uri:"ranking://leaderboard",mimeType:"application/json",data:JSON.stringify(J,null,2)}}})),j.register(b({meta:{uriTemplate:"ranking://leaderboard/{dimension}",title:"AI Model Leaderboard by Dimension",description:"Ranked list of AI models filtered by a specific dimension. Supports optional transport and authMethod query filters.",mimeType:"application/json",tags:w},input:$.object({dimension:$.string(),transport:F,authMethod:G}),resolve:async({dimension:U,transport:Q,authMethod:Y})=>{let D=await C().listModelRankings({dimension:U,limit:100,requiredTransport:Q,requiredAuthMethod:Y});return{uri:`ranking://leaderboard/${encodeURIComponent(U)}`,mimeType:"application/json",data:JSON.stringify(D,null,2)}}})),j.register(b({meta:{uriTemplate:"ranking://model/{modelId}",title:"AI Model Profile",description:"Detailed profile for a specific AI model including scores and benchmarks.",mimeType:"application/json",tags:w},input:$.object({modelId:$.string()}),resolve:async({modelId:U})=>{let Y=await C().getModelProfile(U);if(!Y)return{uri:`ranking://model/${encodeURIComponent(U)}`,mimeType:"application/json",data:JSON.stringify({error:"not_found",modelId:U})};let J=Y.costPerMillion==null?(()=>{let D=a(Y.modelId);return D?.costPerMillion?{...Y,costPerMillion:D.costPerMillion,displayName:D.name,contextWindow:D.contextWindow,capabilities:[...D.capabilities.vision?["vision"]:[],...D.capabilities.tools?["tools"]:[],...D.capabilities.reasoning?["reasoning"]:[],...D.capabilities.streaming?["streaming"]:[]]}:Y})():Y;return{uri:`ranking://model/${encodeURIComponent(U)}`,mimeType:"application/json",data:JSON.stringify(J,null,2)}}})),j.register(b({meta:{uriTemplate:"ranking://results",title:"Benchmark Results",description:"List of raw benchmark results from all ingested sources.",mimeType:"application/json",tags:w},input:$.object({}),resolve:async()=>{let Q=await C().listBenchmarkResults({limit:200});return{uri:"ranking://results",mimeType:"application/json",data:JSON.stringify(Q,null,2)}}})),j}function Zj(){let j=new s;return j.register(o({meta:{key:"ranking.advisor",version:"1.0.0",title:"AI Model Advisor",description:"Which AI model is best for a given task? Uses the leaderboard to recommend.",tags:w,stability:"beta",owners:Vj},args:[{name:"task",description:"The task or use case to recommend a model for.",required:!0,schema:$.string()},{name:"priority",description:"Priority dimension (coding, reasoning, cost, latency, etc.).",required:!1,schema:$.string().optional()},{name:"transport",description:"Required transport type (rest, mcp, webhook, sdk).",required:!1,schema:F},{name:"authMethod",description:"Required auth method (api-key, oauth2, bearer, etc.).",required:!1,schema:G}],input:$.object({task:$.string(),priority:$.string().optional(),transport:F,authMethod:G}),render:async({task:U,priority:Q,transport:Y,authMethod:J})=>{let D=[];if(Q)D.push(`Prioritize: ${Q}.`);if(Y)D.push(`Required transport: ${Y}.`);if(J)D.push(`Required auth: ${J}.`);return[{type:"text",text:`Recommend the best AI model for: "${U}".${D.length?` ${D.join(" ")}`:""} Use the leaderboard data to justify your recommendation.`},{type:"resource",uri:Q?`ranking://leaderboard/${Q}`:"ranking://leaderboard",title:"Leaderboard"}]}})),j}function $j(){let j=new t,U=Yj();return A(j,e,async(Q)=>{let Y=C(),J=Q.source,D=U.get(J);if(!D)throw Error(`No ingester registered for source: ${J}`);let B=await D.ingest({sourceUrl:Q.sourceUrl,dimensions:Q.dimensions}),x=Jj(B);for(let E of x)await Y.upsertBenchmarkResult(E);return{ingestionId:`ingest-${J}-${Date.now()}`,source:J,resultsCount:x.length,status:"completed",ingestedAt:new Date}}),A(j,jj,async(Q)=>{return{runId:`custom-${Date.now()}`,evalSuiteKey:Q.evalSuiteKey,modelId:Q.modelId,status:"started",startedAt:new Date}}),A(j,Qj,async(Q)=>{let Y=C(),J=[],D=0,B=500;while(!0){let V=await Y.listBenchmarkResults({limit:B,offset:D});if(J.push(...V.results),J.length>=V.total||V.results.length<B)break;D+=B}let x=new Map((await Y.listModelRankings({limit:1e4})).rankings.map((V)=>[V.modelId,V])),E=Q.weightOverrides?Array.isArray(Q.weightOverrides)?Q.weightOverrides:[Q.weightOverrides]:void 0,_=Dj(J,E?{weightOverrides:E}:void 0,x);for(let V of _)await Y.upsertModelRanking(V);return{modelsRanked:_.length,updatedAt:new Date,status:"completed"}}),j}function Nj(j="/api/mcp/ranking"){return I({logger:q,path:j,serverName:"contractspec-ranking-mcp",ops:$j(),resources:Xj(),prompts:Zj()})}function fj(j){O=j}export{fj as setProviderRankingStore,Nj as createProviderRankingMcpHandler};
|
|
@@ -1,139 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import { defineModuleBundle } from "@contractspec/lib.surface-runtime/spec";
|
|
4
|
-
var LibraryBundle = defineModuleBundle({
|
|
5
|
-
meta: {
|
|
6
|
-
key: "library.workspace",
|
|
7
|
-
version: "0.1.0",
|
|
8
|
-
title: "Library Workspace",
|
|
9
|
-
description: "Workspace shell for docs, templates, sandbox, and feature discovery",
|
|
10
|
-
owners: ["team-platform"],
|
|
11
|
-
tags: ["library", "workspace", "docs", "sandbox", "templates"],
|
|
12
|
-
stability: "experimental"
|
|
13
|
-
},
|
|
14
|
-
routes: [
|
|
15
|
-
{
|
|
16
|
-
routeId: "sandbox",
|
|
17
|
-
path: "/sandbox",
|
|
18
|
-
defaultSurface: "workspace-shell"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
routeId: "docs",
|
|
22
|
-
path: "/docs",
|
|
23
|
-
defaultSurface: "workspace-shell"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
routeId: "docs-slug",
|
|
27
|
-
path: "/docs/:slug",
|
|
28
|
-
defaultSurface: "workspace-shell"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
routeId: "studio",
|
|
32
|
-
path: "/studio/:projectSlug",
|
|
33
|
-
defaultSurface: "workspace-shell"
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
surfaces: {
|
|
37
|
-
"workspace-shell": {
|
|
38
|
-
surfaceId: "workspace-shell",
|
|
39
|
-
kind: "workbench",
|
|
40
|
-
title: "Workspace Shell",
|
|
41
|
-
slots: [
|
|
42
|
-
{
|
|
43
|
-
slotId: "header",
|
|
44
|
-
role: "header",
|
|
45
|
-
accepts: ["action-bar"],
|
|
46
|
-
cardinality: "many"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
slotId: "sidebar",
|
|
50
|
-
role: "secondary",
|
|
51
|
-
accepts: ["entity-section", "custom-widget"],
|
|
52
|
-
cardinality: "one"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
slotId: "primary",
|
|
56
|
-
role: "primary",
|
|
57
|
-
accepts: [
|
|
58
|
-
"entity-section",
|
|
59
|
-
"rich-doc",
|
|
60
|
-
"data-view",
|
|
61
|
-
"form",
|
|
62
|
-
"custom-widget"
|
|
63
|
-
],
|
|
64
|
-
cardinality: "many",
|
|
65
|
-
mutableByAi: true,
|
|
66
|
-
mutableByUser: true
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
slotId: "assistant",
|
|
70
|
-
role: "assistant",
|
|
71
|
-
accepts: ["assistant-panel", "chat-thread"],
|
|
72
|
-
cardinality: "many",
|
|
73
|
-
mutableByAi: true,
|
|
74
|
-
mutableByUser: true
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
layouts: [
|
|
78
|
-
{
|
|
79
|
-
layoutId: "sidebar-main",
|
|
80
|
-
title: "Sidebar + Main",
|
|
81
|
-
root: {
|
|
82
|
-
type: "panel-group",
|
|
83
|
-
direction: "horizontal",
|
|
84
|
-
persistKey: "library.workspace.sidebar-main",
|
|
85
|
-
children: [
|
|
86
|
-
{ type: "slot", slotId: "sidebar" },
|
|
87
|
-
{
|
|
88
|
-
type: "panel-group",
|
|
89
|
-
direction: "vertical",
|
|
90
|
-
persistKey: "library.workspace.content",
|
|
91
|
-
children: [
|
|
92
|
-
{ type: "slot", slotId: "header" },
|
|
93
|
-
{ type: "slot", slotId: "primary" }
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
]
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
layoutId: "sidebar-main-assistant",
|
|
101
|
-
title: "Sidebar + Main + Assistant",
|
|
102
|
-
root: {
|
|
103
|
-
type: "panel-group",
|
|
104
|
-
direction: "horizontal",
|
|
105
|
-
persistKey: "library.workspace.sidebar-main-assistant",
|
|
106
|
-
children: [
|
|
107
|
-
{ type: "slot", slotId: "sidebar" },
|
|
108
|
-
{
|
|
109
|
-
type: "panel-group",
|
|
110
|
-
direction: "vertical",
|
|
111
|
-
persistKey: "library.workspace.content",
|
|
112
|
-
children: [
|
|
113
|
-
{ type: "slot", slotId: "header" },
|
|
114
|
-
{ type: "slot", slotId: "primary" }
|
|
115
|
-
]
|
|
116
|
-
},
|
|
117
|
-
{ type: "slot", slotId: "assistant" }
|
|
118
|
-
]
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
],
|
|
122
|
-
data: [],
|
|
123
|
-
verification: {
|
|
124
|
-
dimensions: {
|
|
125
|
-
guidance: "Can reveal walkthrough notes, field help, and contextual hints.",
|
|
126
|
-
density: "Can select compact, balanced, or dense layouts for docs and templates.",
|
|
127
|
-
dataDepth: "Controls content depth, pagination size, and inline expansion.",
|
|
128
|
-
control: "Shows advanced commands and raw config only when allowed.",
|
|
129
|
-
media: "Supports text-first docs, visual templates, and hybrid modes.",
|
|
130
|
-
pace: "Maps to motion tokens and confirmation behavior.",
|
|
131
|
-
narrative: "Can order summary before or after detail sections."
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
export {
|
|
138
|
-
LibraryBundle
|
|
139
|
-
};
|
|
2
|
+
import{defineModuleBundle as g}from"@contractspec/lib.surface-runtime/spec";var j=g({meta:{key:"library.workspace",version:"0.1.0",title:"Library Workspace",description:"Workspace shell for docs, templates, sandbox, and feature discovery",owners:["team-platform"],tags:["library","workspace","docs","sandbox","templates"],stability:"experimental"},routes:[{routeId:"sandbox",path:"/sandbox",defaultSurface:"workspace-shell"},{routeId:"docs",path:"/docs",defaultSurface:"workspace-shell"},{routeId:"docs-slug",path:"/docs/:slug",defaultSurface:"workspace-shell"},{routeId:"studio",path:"/studio/:projectSlug",defaultSurface:"workspace-shell"}],surfaces:{"workspace-shell":{surfaceId:"workspace-shell",kind:"workbench",title:"Workspace Shell",slots:[{slotId:"header",role:"header",accepts:["action-bar"],cardinality:"many"},{slotId:"sidebar",role:"secondary",accepts:["entity-section","custom-widget"],cardinality:"one"},{slotId:"primary",role:"primary",accepts:["entity-section","rich-doc","data-view","form","custom-widget"],cardinality:"many",mutableByAi:!0,mutableByUser:!0},{slotId:"assistant",role:"assistant",accepts:["assistant-panel","chat-thread"],cardinality:"many",mutableByAi:!0,mutableByUser:!0}],layouts:[{layoutId:"sidebar-main",title:"Sidebar + Main",root:{type:"panel-group",direction:"horizontal",persistKey:"library.workspace.sidebar-main",children:[{type:"slot",slotId:"sidebar"},{type:"panel-group",direction:"vertical",persistKey:"library.workspace.content",children:[{type:"slot",slotId:"header"},{type:"slot",slotId:"primary"}]}]}},{layoutId:"sidebar-main-assistant",title:"Sidebar + Main + Assistant",root:{type:"panel-group",direction:"horizontal",persistKey:"library.workspace.sidebar-main-assistant",children:[{type:"slot",slotId:"sidebar"},{type:"panel-group",direction:"vertical",persistKey:"library.workspace.content",children:[{type:"slot",slotId:"header"},{type:"slot",slotId:"primary"}]},{type:"slot",slotId:"assistant"}]}}],data:[],verification:{dimensions:{guidance:"Can reveal walkthrough notes, field help, and contextual hints.",density:"Can select compact, balanced, or dense layouts for docs and templates.",dataDepth:"Controls content depth, pagination size, and inline expansion.",control:"Shows advanced commands and raw config only when allowed.",media:"Supports text-first docs, visual templates, and hybrid modes.",pace:"Maps to motion tokens and confirmation behavior.",narrative:"Can order summary before or after detail sections."}}}}});export{j as LibraryBundle};
|